-
Notifications
You must be signed in to change notification settings - Fork 10
/
CheckListWindow.xaml
79 lines (75 loc) · 4.38 KB
/
CheckListWindow.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<rtf:ManagedWindow x:Class="TankIconMaker.CheckListWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:rtf="clr-namespace:RT.Util.Forms;assembly=RT.Util"
xmlns:src="clr-namespace:TankIconMaker"
x:ClassModifier="internal"
Title="Tank Icon Maker" ShowInTaskbar="False"
Height="415" Width="607" MinHeight="200" MinWidth="260"
TextOptions.TextFormattingMode="Display"
Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"
Icon="/TankIconMaker;component/Resources/Graphics/icon.ico">
<Window.Resources>
<ScaleTransform x:Key="UiZoomer" CenterX="0" CenterY="0" ScaleX="1" ScaleY="1" />
</Window.Resources>
<Grid LayoutTransform="{StaticResource UiZoomer}">
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" Margin="10" Padding="0" Name="ctPrompt" TextWrapping="Wrap">
Placeholder
</TextBlock>
<DataGrid Grid.Row="1" GridLinesVisibility="None" AutoGenerateColumns="False" Height="Auto" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Name="ctGrid" Width="Auto"
HeadersVisibility="Column" CanUserAddRows="False" CanUserDeleteRows="False" Background="White" Margin="10,0">
<DataGrid.Resources>
<Style TargetType="{x:Type DataGridCell}">
<Setter Property="FontWeight" Value="Normal"/>
<Style.Triggers>
<DataTrigger Binding="{Binding IsChecked}" Value="True">
<Setter Property="FontWeight" Value="Bold"/>
</DataTrigger>
</Style.Triggers>
</Style>
</DataGrid.Resources>
<DataGrid.Columns>
<DataGridTemplateColumn IsReadOnly="False" MinWidth="35">
<DataGridTemplateColumn.Header>
<CheckBox Name="chkSelectAll"/>
</DataGridTemplateColumn.Header>
<DataGridTemplateColumn.HeaderStyle>
<Style TargetType="DataGridColumnHeader">
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
</Style>
</DataGridTemplateColumn.HeaderStyle>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<CheckBox IsChecked="{Binding IsChecked, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Checked="checkedChanged" Unchecked="checkedChanged"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
<DataGridTemplateColumn.CellStyle>
<Style TargetType="DataGridCell">
<Style.Resources>
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Transparent" />
</Style.Resources>
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
</DataGridTemplateColumn.CellStyle>
</DataGridTemplateColumn>
<DataGridTextColumn Binding="{Binding Column1}" Header="Name" Width="*" IsReadOnly="True" />
<DataGridTextColumn Binding="{Binding Column2}" Header="Name" Width="*" IsReadOnly="True" Visibility="Collapsed" />
</DataGrid.Columns>
</DataGrid>
<WrapPanel Grid.Row="2" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="10">
<Button Margin="8,0,0,0" IsDefault="True" Click="ok">
<AccessText Margin="16,2" Name="ctOkBtn">_OK</AccessText>
</Button>
<Button Margin="8,0,0,0" IsCancel="True">
<AccessText Margin="16,2" Name="ctCancelBtn">_Cancel</AccessText>
</Button>
</WrapPanel>
</Grid>
</rtf:ManagedWindow>