TicTacToe/tictactoe/MainWindow.xaml

53 lines
3.2 KiB
Plaintext
Raw Permalink Normal View History

2023-03-13 12:59:49 +00:00
<Window x:Class="TicTacToe.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:TicTacToe"
xmlns:c="clr-namespace:TicTacToe"
mc:Ignorable="d"
Title="MainWindow" Height="200" Width="200" ResizeMode="NoResize">
<Window.Resources>
<c:TicTacToeViewModel x:Key="viewModel" />
</Window.Resources>
<Grid DataContext="{StaticResource viewModel}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Border BorderBrush="Black" BorderThickness="2" Grid.Row="0" Grid.Column="0">
2023-03-13 20:49:24 +00:00
<Button Content="{ Binding Field1 }" Style="{ StaticResource Field }" Command="{ Binding FieldClickCommand }" CommandParameter="1" />
2023-03-13 12:59:49 +00:00
</Border>
<Border BorderBrush="Black" BorderThickness="2" Grid.Row="1" Grid.Column="0">
2023-03-13 20:49:24 +00:00
<Button Content="{ Binding Field2 }" Style="{ StaticResource Field }" Command="{ Binding FieldClickCommand }" CommandParameter="2" />
2023-03-13 12:59:49 +00:00
</Border>
<Border BorderBrush="Black" BorderThickness="2" Grid.Row="2" Grid.Column="0">
2023-03-13 20:49:24 +00:00
<Button Content="{ Binding Field3 }" Style="{ StaticResource Field }" Command="{ Binding FieldClickCommand }" CommandParameter="3" />
2023-03-13 12:59:49 +00:00
</Border>
<Border BorderBrush="Black" BorderThickness="2" Grid.Row="0" Grid.Column="1">
2023-03-13 20:49:24 +00:00
<Button Content="{ Binding Field4 }" Style="{ StaticResource Field }" Command="{ Binding FieldClickCommand }" CommandParameter="4" />
2023-03-13 12:59:49 +00:00
</Border>
<Border BorderBrush="Black" BorderThickness="2" Grid.Row="1" Grid.Column="1">
2023-03-13 20:49:24 +00:00
<Button Content="{ Binding Field5 }" Style="{ StaticResource Field }" Command="{ Binding FieldClickCommand }" CommandParameter="5" />
2023-03-13 12:59:49 +00:00
</Border>
<Border BorderBrush="Black" BorderThickness="2" Grid.Row="2" Grid.Column="1">
2023-03-13 20:49:24 +00:00
<Button Content="{ Binding Field6 }" Style="{ StaticResource Field }" Command="{ Binding FieldClickCommand }" CommandParameter="6" />
2023-03-13 12:59:49 +00:00
</Border>
<Border BorderBrush="Black" BorderThickness="2" Grid.Row="0" Grid.Column="2">
2023-03-13 20:49:24 +00:00
<Button Content="{ Binding Field7 }" Style="{ StaticResource Field }" Command="{ Binding FieldClickCommand }" CommandParameter="7" />
2023-03-13 12:59:49 +00:00
</Border>
<Border BorderBrush="Black" BorderThickness="2" Grid.Row="1" Grid.Column="2">
2023-03-13 20:49:24 +00:00
<Button Content="{ Binding Field8 }" Style="{ StaticResource Field }" Command="{ Binding FieldClickCommand }" CommandParameter="8" />
2023-03-13 12:59:49 +00:00
</Border>
<Border BorderBrush="Black" BorderThickness="2" Grid.Row="2" Grid.Column="2">
2023-03-13 20:49:24 +00:00
<Button Content="{ Binding Field9 }" Style="{ StaticResource Field }" Command="{ Binding FieldClickCommand }" CommandParameter="9" />
2023-03-13 12:59:49 +00:00
</Border>
</Grid>
</Window>