-
Notifications
You must be signed in to change notification settings - Fork 0
/
ImWpfUser.xaml
53 lines (53 loc) · 2.52 KB
/
ImWpfUser.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<Window x:Class="ImWpfUser.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:ImWpfUser"
mc:Ignorable="d"
Title="ImWpf Demo" SizeToContent="WidthAndHeight">
<Grid x:Name="grid" Height="800" Width="600">
<Grid.Resources>
<Style TargetType="{x:Type TextBlock}">
<Setter Property="TextWrapping" Value="Wrap"/>
</Style>
<Style TargetType="{x:Type StackPanel}">
<Setter Property="Margin" Value="4,4,4,4"/>
<Setter Property="HorizontalAlignment" Value="Stretch"/>
<Setter Property="VerticalAlignment" Value="Stretch"/>
<Setter Property="Width" Value="Auto"/>
<Setter Property="Height" Value="Auto"/>
</Style>
<Style TargetType="{x:Type Button}">
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="Padding" Value="16,4,16,4"/>
<Setter Property="Margin" Value="4,8,4,8"/>
</Style>
</Grid.Resources>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Border Background="AntiqueWhite" Grid.Column="0" Grid.Row="0" Grid.RowSpan="2">
<StackPanel x:Name="ImWpfPanelLeft"/>
</Border>
<Border Background="Beige" Grid.Column="1" Grid.Row="0">
<StackPanel x:Name="ImWpfPanelRight"/>
</Border>
<Border Background="Honeydew" Grid.Column="1" Grid.Row="1">
<StackPanel x:Name="NonImPanel">
<TextBlock>
Everything below here has been made through the normal Windows Forms Designer with no hacky workarounds.<LineBreak/><LineBreak/>
But!<LineBreak/><LineBreak/>
It can modify values which are displayed in the other panels.
</TextBlock>
<Button Click="YIncrBtn_Click">y++</Button>
<Button Click="RefreshBtn_Click">Refresh Right-hand Panel</Button>
</StackPanel>
</Border>
</Grid>
</Window>