<Page
    x:Class="NewToggleDemo.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:NewToggleDemo"
    xmlns:ch11="using:Petzold.ProgrammingWindows6.Chapter11"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">
    
    <Page.Resources>
        <Style TargetType="ch11:NewToggle">
            <Setter Property="HorizontalAlignment" Value="Center" />
            <Setter Property="VerticalAlignment" Value="Center" />
        </Style>
    </Page.Resources>

    <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        
        <ch11:NewToggle Content="Nie rób tego!"
                        CheckedContent="Zrób to!"
                        Grid.Column="0"
                        FontSize="24" />
        
        <ch11:NewToggle Grid.Column="1">
            <ch11:NewToggle.Content>
                <Image Source="Images/MunchScream.jpg" />
            </ch11:NewToggle.Content>
            
            <ch11:NewToggle.CheckedContent>
                <Image Source="Images/BotticelliVenus.jpg" />
            </ch11:NewToggle.CheckedContent>
        </ch11:NewToggle>
    </Grid>
</Page>
