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

    <Grid Background="{StaticResource AppBackground}"
          DataContext="{Binding AcercaDeModel}"
          d:DataContext="{d:DesignData Source=/Assets/Data/AcercaDeDataSource.json, Type=vm:AcercaDeViewModel, IsDesignTimeCreatable=true}">

        <Grid.ChildrenTransitions>
            <TransitionCollection>
                <EntranceThemeTransition/>
            </TransitionCollection>
        </Grid.ChildrenTransitions>

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

        <FlipView x:Name="Flip" Grid.Row="0" AutomationProperties.AutomationId="ItemsFlipView" AutomationProperties.Name="Item Details" TabIndex="1"
                  ItemsSource="{Binding Items}"
                  ItemTemplate="{StaticResource AcercaDe1DetailDetail}"
                  SelectedItem="{Binding SelectedItem, Mode=TwoWay}"/>

    </Grid>

    <Page.BottomAppBar>
        <CommandBar ClosedDisplayMode="Minimal" Background="{StaticResource AppBarBackground}" Foreground="{StaticResource AppBarForeground}">
            <AppBarButton x:Uid="TextToSpeechButton" Icon="Volume" DataContext="{Binding AcercaDeModel}" Command="{Binding TextToSpeechCommand}" Visibility="{Binding TextToSpeechVisibility}"/>
            <AppBarButton x:Uid="RefreshButton" Icon="Refresh" DataContext="{Binding AcercaDeModel}" Command="{Binding RefreshCommand}" Visibility="{Binding RefreshVisibility}"/>
            <AppBarButton x:Uid="GoToSourceButton" Icon="Globe" DataContext="{Binding AcercaDeModel}" Command="{Binding GoToSourceCommand}" Visibility="{Binding GoToSourceVisibility}"/>
            <CommandBar.SecondaryCommands>
                <AppBarButton x:Uid="ShareItemButton" DataContext="{Binding AcercaDeModel}" Command="{Binding ShareItemCommand}" Visibility="{Binding ShareItemVisibility}"/>
                <AppBarButton x:Uid="SmallTextButton" DataContext="{Binding AcercaDeModel}" Command="{Binding ChangeFontSizeCommand}" CommandParameter="Small"/>
                <AppBarButton x:Uid="NormalTextButton" DataContext="{Binding AcercaDeModel}" Command="{Binding ChangeFontSizeCommand}" CommandParameter="Normal"/>
                <AppBarButton x:Uid="BigTextButton" DataContext="{Binding AcercaDeModel}" Command="{Binding ChangeFontSizeCommand}" CommandParameter="Big"/>
            </CommandBar.SecondaryCommands>
        </CommandBar>
    </Page.BottomAppBar>
</Page>
