Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<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"
mc:Ignorable="d"
ResizeMode="NoResize"
Title="Tic Tac Toe" Height="600" Width="500">
<Window.Resources>
<Style TargetType="Label">
<Setter Property="Background" Value="LightGray"/>
<Setter Property="FontSize" Value="20" />
<Setter Property="VerticalContentAlignment" Value="Center" />
</Style>
<Style TargetType="Button" x:Key="CellStyle">
<Setter Property="Background" Value="White"/>
<Setter Property="BorderThickness" Value="2"/>
<Setter Property="BorderBrush" Value="DarkGray" />
<Setter Property="FontSize" Value="65" />
</Style>
<Style TargetType="Button" x:Key="ButtonStyle">
<Setter Property="Background" Value="PaleGreen"/>
<Setter Property="FontSize" Value="20" />
</Style>
</Window.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="50" />
<RowDefinition Height="*" />
<RowDefinition Height="50" />
</Grid.RowDefinitions>
<Label Grid.Row="0" Name="GameInformation"></Label>
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Button Name="Button0_0" Grid.Column="0" Grid.Row="0" Style="{StaticResource CellStyle}" />
<Button Name="Button0_1" Grid.Column="0" Grid.Row="1" Style="{StaticResource CellStyle}" />
<Button Name="Button0_2" Grid.Column="0" Grid.Row="2" Style="{StaticResource CellStyle}" />
<Button Name="Button1_0" Grid.Column="1" Grid.Row="0" Style="{StaticResource CellStyle}" />
<Button Name="Button1_1" Grid.Column="1" Grid.Row="1" Style="{StaticResource CellStyle}" />
<Button Name="Button1_2" Grid.Column="1" Grid.Row="2" Style="{StaticResource CellStyle}" />
<Button Name="Button2_0" Grid.Column="2" Grid.Row="0" Style="{StaticResource CellStyle}" />
<Button Name="Button2_1" Grid.Column="2" Grid.Row="1" Style="{StaticResource CellStyle}" />
<Button Name="Button2_2" Grid.Column="2" Grid.Row="2" Style="{StaticResource CellStyle}" />
</Grid>
<Button ="StartButton" Grid.Row="2" Style="{StaticResource ButtonStyle}">
Neues Spiel starten
</Button>
</Grid>
</Window>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment