Last active
December 13, 2020 12:40
-
-
Save MartinZikmund/69b2e5f1160e516bda02bf69bc0909f7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Page | |
... | |
xmlns:controls="using:Microsoft.UI.Xaml.Controls"> | |
<Grid | |
Padding="12" | |
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" | |
RowSpacing="8"> | |
<Grid.RowDefinitions> | |
<RowDefinition Height="Auto" /> | |
<RowDefinition Height="Auto" /> | |
<RowDefinition Height="*" /> | |
</Grid.RowDefinitions> | |
<TextBlock | |
FontSize="20" | |
Style="{ThemeResource HeaderTextBlockStyle}" | |
Text="Conway's Game of Life" | |
TextAlignment="Center" /> | |
<Grid | |
Grid.Row="1" | |
ColumnSpacing="8" | |
RowSpacing="8" | |
HorizontalAlignment="Left"> | |
<Grid.RowDefinitions> | |
<RowDefinition Height="Auto" /> | |
<RowDefinition Height="Auto" /> | |
</Grid.RowDefinitions> | |
<Grid.ColumnDefinitions> | |
<ColumnDefinition Width="Auto" /> | |
<ColumnDefinition Width="Auto" /> | |
<ColumnDefinition Width="Auto" /> | |
</Grid.ColumnDefinitions> | |
<Button | |
HorizontalAlignment="Stretch" | |
Click="{x:Bind StartNewGame}" | |
Content="Start new game" /> | |
<Button | |
Grid.Column="1" | |
HorizontalAlignment="Stretch" | |
Click="{x:Bind Clear}" | |
Content="Clear" /> | |
<Button | |
Grid.Column="2" | |
Click="{x:Bind NextGeneration}" | |
Content="Next generation" /> | |
<controls:NumberBox | |
x:Name="BoardSizeNumberBox" | |
Maximum="50" | |
Minimum="3" | |
Header="Board size" | |
SpinButtonPlacementMode="Inline" | |
Value="10" /> | |
<ToggleSwitch | |
x:Name="AutoPlayToggleSwitch" | |
Grid.Row="1" | |
Grid.Column="2" | |
Header="Auto-play" | |
Toggled="{x:Bind AutoPlayToggled}" /> | |
</Grid> | |
<Border | |
x:Name="GameCanvasContainer" | |
Grid.Row="2" | |
SizeChanged="{x:Bind LayoutGameBoard}"> | |
<Canvas x:Name="GameCanvas" /> | |
</Border> | |
</Grid> | |
</Page> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment