-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainWindow.xaml
56 lines (53 loc) · 3.11 KB
/
MainWindow.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
<Window x:Class="Localization_Demo.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:Localization_Demo"
mc:Ignorable="d"
FontSize="35"
Title="{DynamicResource MainWindowTitle}" Height="600" Width="600" WindowStartupLocation="CenterScreen">
<Window.DataContext>
<local:MainWindowViewModel />
</Window.DataContext>
<Grid>
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Width="450">
<TextBlock Text="{DynamicResource TextCurrentLanguage}"/>
<ComboBox Margin="0 10 0 0" SelectionChanged="ComboBox_SelectionChanged" x:Name="comboBoxChangeLanguage">
<ComboBoxItem Content="{DynamicResource ComboBoxItemChineseSimplified}" IsSelected="True" />
<ComboBoxItem Content="{DynamicResource ComboBoxItemChineseTraditional}" />
<ComboBoxItem Content="{DynamicResource ComboBoxItemEnglish}" />
</ComboBox>
<Button x:Name="buttonDialogTest" Margin="0 20 0 0" Height="80" Width="450" Content="{DynamicResource ButtonDialogTest}"/>
<Button x:Name="buttonNewWindowTest" Margin="0 10 0 0" Height="80" Width="450" Content="{DynamicResource ButtonNewWindowTest}"/>
<DataGrid Height="150" Margin="0 20 0 0" x:Name="DataGridGames" AutoGenerateColumns="False" ItemsSource="{Binding Games}" CanUserAddRows="False">
<DataGrid.Columns>
<DataGridTemplateColumn>
<DataGridTemplateColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{DynamicResource DataGridTextColumnHeaderID}" />
</DataTemplate>
</DataGridTemplateColumn.HeaderTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding ID}" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn>
<DataGridTemplateColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{DynamicResource DataGridTextColumnHeaderName}" />
</DataTemplate>
</DataGridTemplateColumn.HeaderTemplate>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Name}" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</StackPanel>
</Grid>
</Window>