﻿<UserControl
    x:Class="WinStore.UX.Controls.PDP.ScreenshotViewer"
    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:local="using:WinStore.UX.Controls.PDP"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    d:DesignHeight="300"
    d:DesignWidth="400"
    mc:Ignorable="d">

    <UserControl.Resources>
        <Style TargetType="Image">
            <Setter Property="Stretch" Value="None"/>
        </Style>

        <Style x:Key="DefaultFlipViewItemStyle" TargetType="FlipViewItem">
            <Setter Property="Background" Value="Transparent"/>
            <Setter Property="TabNavigation" Value="Local"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="FlipViewItem">
                        <Grid  VerticalAlignment="Center" HorizontalAlignment="Center">
                            <Viewbox StretchDirection="DownOnly">
                                <ContentPresenter ContentTemplate="{TemplateBinding ContentTemplate}" ContentTransitions="{TemplateBinding ContentTransitions}" Content="{TemplateBinding Content}" HorizontalAlignment="Center" Margin="{TemplateBinding Padding}" VerticalAlignment="Center"/>
                            </Viewbox>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

    </UserControl.Resources>


    <Grid x:ConnectionId='1' x:Name="_viewerGrid">
        <!--  FlipView needs content  -->

        <Rectangle x:ConnectionId='2' x:Name="_overlayRectangle" Fill="Black" Opacity=".6"                                   />
        <StackPanel x:ConnectionId='3' 
            x:Name="_backgroundStackPanel"
            Orientation="Vertical"
            Background="{StaticResource ScreenshotViewerBlackBrush}">
        <TextBlock x:ConnectionId='4'
              VerticalAlignment="Top"
              x:Name="_captionText"
              Margin="18,5,0,5"
              Foreground="{StaticResource ScreenshotViewerWhiteBrush}"
              Style="{StaticResource CaptionTextBlockStyle}" />
        <FlipView x:ConnectionId='5'
                                  
            x:Name="_viewerFlipview"
                                                        
            ItemContainerStyle="{StaticResource DefaultFlipViewItemStyle}"
            Style="{StaticResource FlipViewStyle}"/>
        </StackPanel>
    </Grid>
</UserControl>

