<Window x:Class="GuySerializer.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:GuySerializer"
        Title="Guy Serializer" Height="275" Width="525" ResizeMode="NoResize">
    
    <Window.Resources>
        <local:GuyManager x:Key="guyManager"/>
    </Window.Resources>
    
    <Grid DataContext="{StaticResource guyManager}" Margin="5">
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>

        <Grid.RowDefinitions>
            <RowDefinition Height="4*"/>
            <RowDefinition Height="3*"/>
        </Grid.RowDefinitions>

        <StackPanel>
            <Button x:Name="WriteJoe" Content="Write Joe" HorizontalAlignment="Left" Click="WriteJoe_Click"/>
            <TextBlock Text="{Binding Joe}" Margin="0,0,10,20" TextWrapping="Wrap"/>
        </StackPanel>

        <StackPanel Grid.Column="1">
            <Button x:Name="WriteBob" Content="Write Bob" HorizontalAlignment="Left" Click="WriteBob_Click"/>
            <TextBlock Text="{Binding Bob}" Margin="0,0,0,20"  TextWrapping="Wrap"/>
        </StackPanel>

        <StackPanel Grid.Column="2" Margin="10,0,0,0">
            <Button x:Name="WriteEd" Content="Write Ed" HorizontalAlignment="Left" Click="WriteEd_Click"/>
            <TextBlock Text="{Binding Ed}" Margin="0,0,0,20"  TextWrapping="Wrap"/>
        </StackPanel>

        <StackPanel Grid.Row="1" Grid.ColumnSpan="2" Margin="0,0,20,0">
            <TextBlock>Last filename written</TextBlock>
            <TextBox Text="{Binding GuyFile, Mode=TwoWay}" 
                    TextWrapping="Wrap" Height="60" Margin="0,0,0,20"/>
        </StackPanel>

        <StackPanel Grid.Row="1" Grid.Column="2"  Margin="10,0,0,0">
            <Button x:Name="ReadNewGuy" Content="Read a new Guy" HorizontalAlignment="Left" Click="ReadNewGuy_Click" />
            <StackPanel>
                <TextBlock Text="New guy:"/>
                <TextBlock TextWrapping="Wrap" Text="{Binding NewGuy}"/>
            </StackPanel>
        </StackPanel>
    </Grid>
</Window>
