<Page
    x:Class="Millionenquiz.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Millionenquiz"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Grid Name="gitter">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="12*"/>
            <ColumnDefinition Width="4*"/>
        </Grid.ColumnDefinitions>
        
        <Image Grid.Row="0" Grid.ColumnSpan="2" Source="Backgrund.png" Stretch="Fill"  />
        <StackPanel Orientation="Vertical" Grid.Column="0" Margin="20">
            <TextBlock Name="title" HorizontalAlignment="Center" Foreground="Gold" Text="Das C#-Millionenquiz" FontSize="64" TextAlignment="Center" Padding="10" Margin="0,0,0,40"/>
            <TextBlock Name="question" x:FieldModifier="public" 
                       Grid.Row="1" HorizontalAlignment="Left" 
                       Foreground="White" Text="Frage" FontSize="48" 
                       FontFamily="Microsoft Sans Serif" Padding="10" 
                       TextWrapping="Wrap" Margin="0,0,0,200"/>
            <VariableSizedWrapGrid Grid.Row="3" Orientation="Horizontal" MaximumRowsOrColumns="2" Height="250" HorizontalChildrenAlignment="Stretch" VerticalChildrenAlignment="Stretch">
                <Button Name="answer1" x:FieldModifier="public" Content="Button 1"  FontSize="32" FontFamily="Microsoft Sans Serif" Padding="5,4" Foreground="Black" Background="LightGray" Click="answer1_Click"  Width="300"  />
                <Button Name="answer2" x:FieldModifier="public" Content="Button 2"  FontSize="32" FontFamily="Microsoft Sans Serif" Padding="5,4" Foreground="Black" Background="LightGray" Click="answer2_Click"  Width="300"   />
                <Button Name="answer3" x:FieldModifier="public" Content="Button 3"  FontSize="32" FontFamily="Microsoft Sans Serif" Padding="5,4" Foreground="Black" Background="LightGray" Click="answer3_Click"  Width="300"   />
                <Button Name="answer4" x:FieldModifier="public" Content="Button 4"  FontSize="32" FontFamily="Microsoft Sans Serif" Padding="5,4" Foreground="Black" Background="LightGray" Click="answer4_Click"  Width="300"   />
            </VariableSizedWrapGrid>                                                                                                         
        </StackPanel>
        <StackPanel Orientation="Vertical" Grid.Column="1" VerticalAlignment="Center" Margin="0,15,5,34" >
            <TextBlock Name="level8" FontFamily="Microsoft Sans Serif" FontSize="46" Foreground="Gold" Margin="3,10,40,0" Padding="5,6,5,5" Text="1000000" TextAlignment="Right" />
            <TextBlock Name="level7" FontFamily="Microsoft Sans Serif" FontSize="46" Foreground="Gold" Margin="3,10,40,0" Padding="5,6,5,5" Text="500000" TextAlignment="Right" />
            <TextBlock Name="level6" FontFamily="Microsoft Sans Serif" FontSize="46" Foreground="Gold" Margin="3,10,40,0" Padding="5,6,5,5" Text="250000" TextAlignment="Right" />
            <TextBlock Name="level5" FontFamily="Microsoft Sans Serif" FontSize="46" Foreground="Gold" Margin="3,10,40,0" Padding="5,6,5,5" Text="100000" TextAlignment="Right"/>
            <TextBlock Name="level4" FontFamily="Microsoft Sans Serif" FontSize="46" Foreground="Gold" Margin="3,10,40,0" Padding="5,6,5,5" Text="50000" TextAlignment="Right"/>
            <TextBlock Name="level3" FontFamily="Microsoft Sans Serif" FontSize="46" Foreground="Gold" Margin="3,10,40,0" Padding="5,6,5,5" Text="25000" TextAlignment="Right"/>
            <TextBlock Name="level2" FontFamily="Microsoft Sans Serif" FontSize="46" Foreground="Gold" Margin="3,10,40,0" Padding="5,6,5,5" Text="10000" TextAlignment="Right"/>
            <TextBlock Name="level1" FontFamily="Microsoft Sans Serif" FontSize="46" Foreground="Gold" Margin="3,10,40,0" Padding="5,6,5,5" Text="5000" TextAlignment="Right"/>
        </StackPanel>

        <VisualStateManager.VisualStateGroups>
            <VisualStateGroup >
                <VisualState x:Name="Snapped">
                    <Storyboard>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="title" 
                                                   Storyboard.TargetProperty="Text">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="Quiz"/>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="gitter" 
                                                   Storyboard.TargetProperty="ColumnDefinitions[1].Width">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="0"/>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="answer1" 
                                                   Storyboard.TargetProperty="Visibility">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="answer2" 
                                                   Storyboard.TargetProperty="Visibility">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="answer3" 
                                                   Storyboard.TargetProperty="Visibility">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="answer4" 
                                                   Storyboard.TargetProperty="Visibility">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                        </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                </VisualState>
                <VisualState x:Name="Portrait">
                    <Storyboard>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="title" 
                                                   Storyboard.TargetProperty="Text">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="Quiz"/>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="gitter" 
                                                   Storyboard.TargetProperty="ColumnDefinitions[1].Width">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="0"/>
                        </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                </VisualState>
                <VisualState x:Name="AllOthers">
                    <Storyboard>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="title" 
                                                   Storyboard.TargetProperty="Text">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="Das C#-Millionenquiz"/>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="gitter" 
                                                   Storyboard.TargetProperty="ColumnDefinitions[1].Width">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="4*"/>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="answer1" 
                                                   Storyboard.TargetProperty="Visibility">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="answer2" 
                                                   Storyboard.TargetProperty="Visibility">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="answer3" 
                                                   Storyboard.TargetProperty="Visibility">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="answer4" 
                                                   Storyboard.TargetProperty="Visibility">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                        </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                </VisualState>
            </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>

    </Grid>


</Page>
