<Page
    x:Class="BitmapSamples.DemoGifImage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:BitmapSamples"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <ScrollViewer x:Name="scrollViewer" Margin="10, 10, 10, 20" ZoomMode="Enabled">
            <Image x:Name="image" VerticalAlignment="Center" HorizontalAlignment="Center" Stretch="None">
                <Image.Source>
                    <BitmapImage x:Name="gifImage" />
                </Image.Source>
            </Image>
        </ScrollViewer>
        
        <StackPanel x:Name="playbackButtons" Grid.Row="1" Margin="0, 0, 0, 20" Orientation="Horizontal" Visibility="Collapsed" HorizontalAlignment="Center">
            <Button
                    Click="{x:Bind PlayButton_Click}"
                    Content="{Binding GifImagePlay, Source={StaticResource BitmapSamplesLocalization}}"
                    Margin="10,0,0,0"/>
            <Button
                    Click="{x:Bind StopButton_Click}"
                    Content="{Binding GifImageStop, Source={StaticResource BitmapSamplesLocalization}}"
                    Margin="10,0,0,0"/>
            <Button
                    Click="{x:Bind ZoomInButton_Click}"
                    Content="{Binding GifImageZoomIn, Source={StaticResource BitmapSamplesLocalization}}"
                    Margin="10,0,0,0"/>
            <Button
                    Click="{x:Bind ZoomOutButton_Click}"
                    Content="{Binding GifImageZoomOut, Source={StaticResource BitmapSamplesLocalization}}"
                    Margin="10,0,0,0"/>
        </StackPanel>
    </Grid>
</Page>
