Skip to content

Instantly share code, notes, and snippets.

@IntegerMan
Last active October 23, 2019 04:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IntegerMan/306edbc960a8cabd6ca10b7cd861fe77 to your computer and use it in GitHub Desktop.
Save IntegerMan/306edbc960a8cabd6ca10b7cd861fe77 to your computer and use it in GitHub Desktop.
<Window x:Class="MattEland.FSharpGeneticAlgorithm.WindowsClient.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:MattEland.FSharpGeneticAlgorithm.WindowsClient"
mc:Ignorable="d"
Title="WPF Core C# talking to F# Tutorial by Matt Eland"
Width="450" Height="355"
Background="Black"
Foreground="White"
d:DataContext="{d:DesignInstance local:MainViewModel}">
<Window.Resources>
<Style TargetType="Button" x:Key="CommandButtonStyle">
<Setter Property="Margin" Value="5"></Setter>
</Style>
</Window.Resources>
<DockPanel>
<!-- Status Bar -->
<StatusBar DockPanel.Dock="Bottom">
<StatusBarItem>
<TextBlock Text="{Binding TurnsLeftText}"></TextBlock>
</StatusBarItem>
<StatusBarItem>
<TextBlock Text="{Binding GameStatusText}"></TextBlock>
</StatusBarItem>
</StatusBar>
<!-- Commands Area -->
<StackPanel DockPanel.Dock="Right" Width="150">
<Button Style="{StaticResource CommandButtonStyle}" Command="{Binding ResetCommand}">Restart</Button>
</StackPanel>
<!-- Main UI -->
<Grid Margin="10">
<TextBlock FontFamily="Courier New" Text="{Binding TextGrid}" FontSize="18"></TextBlock>
</Grid>
</DockPanel>
</Window>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment