<Window x:Class="PracticeUsingIfElse.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Fun with if/else statements" Height="150" Width="400">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>

        <Button x:Name="changeText" Content="Change the label if checked"
            HorizontalAlignment="Center" VerticalAlignment="Center" Click="changeText_Click"/>

        <CheckBox x:Name="enableCheckbox" Content="Enable label changing"
            HorizontalAlignment="Center"  VerticalAlignment="Center" 
            IsChecked="true" Grid.Column="1"/>

        <TextBlock x:Name="labelToChange" Grid.Row="1" TextWrapping="Wrap"
               Text="Press the button to set my text"
               HorizontalAlignment="Center" VerticalAlignment="Center"
               Grid.ColumnSpan="2"/>
    </Grid>
</Window>
