<UserControl x:Class="Flashcard.Views.MainPage"
             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="using:Flashcard.Views"
             mc:Ignorable="d"
             d:DesignHeight="768"
             d:DesignWidth="1366">

    <Grid x:Name="LayoutRoot"
          Background="#FF0C0C0C">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel x:Name="TitlePanel"
                    Grid.Row="0"
                    Margin="12,17,0,28">
            
        <TextBlock x:Name="ApplicationTitle"
                    Style="{StaticResource PhoneTextNormalStyle}"
                    x:Uid="TextBlockTitle"
                    Text="FLASHCARD" />

            <!--Style="{StaticResource PhoneTextNormalStyle}"-->
        </StackPanel>

        <Grid x:Name="ContentPanel"
              DataContext="{StaticResource MainViewModelDataSource}"
              Grid.Row="1"
              Margin="12,0,12,0">
            <Grid.RowDefinitions>
                <RowDefinition Height="0.172*" />
                <RowDefinition Height="0.661*" />
                <RowDefinition Height="0.167*" />
            </Grid.RowDefinitions>
            <TextBlock HorizontalAlignment="Center"
                       
                       VerticalAlignment="Center"
                       FontSize="{StaticResource FontSize}"
                       Text="{Binding Question.Text}" />
            <ItemsControl Grid.Row="1"
                          HorizontalAlignment="Center"
                          ItemsSource="{Binding Question.Answers}">
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <local:AnswerButton />
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
                <ItemsControl.ItemsPanel>
                    <ItemsPanelTemplate>
                        <WrapGrid >
                            <!--<WrapGrid.ChildrenTransitions>
                                <TransitionCollection>
                                    <EntranceThemeTransition FromHorizontalOffset="100" />
                                </TransitionCollection>
                            </WrapGrid.ChildrenTransitions>-->
                        </WrapGrid> 
                    </ItemsPanelTemplate>
                </ItemsControl.ItemsPanel>
            </ItemsControl>
            <Button Content="Generate"
                   x:Uid="ButtonGenerate"
                    HorizontalAlignment="Center"
                    Grid.Row="2"
                    FontSize="48"
                    Command="{Binding GenerateCommand}" />
        </Grid>

    </Grid>

</UserControl>