<Page xmlns:local="clr-namespace:ForzaUI"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      xmlns:System="clr-namespace:System;assembly=mscorlib"
      x:Class="ForzaUI.Scenes.Anthem.A_FestivalSiteSelection" 
      mc:Ignorable="d"
      Style="{StaticResource A_Style_Page_Generic}"
      DataContext="{Binding RelativeSource={RelativeSource Self}}">

      <local:UIPageTransitionManager.TransitionManager>
          <local:UIPageTransitionManager Preset="{StaticResource A_UIPageTransitionManagerPreset_Menu}"/>
      </local:UIPageTransitionManager.TransitionManager>

      <Page.Resources>
          <ResourceDictionary>

            <System:Double x:Key="A_Double_FestivalSiteTileWidth">479</System:Double>
            <System:Double x:Key="A_Double_FestivalSiteTileHeight">711</System:Double>

            <Style x:Key="A_Style_FZMaterial_FestialOptionBackground" TargetType="local:FZMaterial">
                <Style.Triggers>
                    <DataTrigger Binding="{Binding FestivalID}" Value="SurfersParadise">
                        <Setter Property="ImageSource" Value="/ForzaUI;component/Textures/Anthem/FestivalSitePosters/SurfersParadise.png" />
                    </DataTrigger>
                    <DataTrigger Binding="{Binding FestivalID}" Value="Outback">
                        <Setter Property="ImageSource" Value="/ForzaUI;component/Textures/Anthem/FestivalSitePosters/TheOutback.png" />
                    </DataTrigger>
                    <DataTrigger Binding="{Binding FestivalID}" Value="YarraValley">
                        <Setter Property="ImageSource" Value="/ForzaUI;component/Textures/Anthem/FestivalSitePosters/YarraValley.png" />
                    </DataTrigger>
                </Style.Triggers>
            </Style>

            <Style x:Key="A_Style_FZTextBlock_GamerTag" TargetType="local:FZTextBlock"
                   BasedOn="{StaticResource A_Style_FZTextBlock_Heading}">
                <Setter Property="Color" Value="{StaticResource A_Color_Tile_Text_Alternate}" />
                <Setter Property="FontSize" Value="26" />
                <Setter Property="TrackingAdjust" Value="0.04" />
            </Style>
              
            <Style x:Key="A_Style_FZTextBlock_Presents" TargetType="local:FZTextBlock"
                   BasedOn="{StaticResource A_Style_FZTextBlock_HorizonB}">
                <Setter Property="Color" Value="{StaticResource A_Color_Tile_Text_Alternate}" />
                <Setter Property="FontSize" Value="18" />
            </Style>
              
            <Style x:Key="A_Style_FZTextBlock_ComingSoon" TargetType="local:FZTextBlock"
                   BasedOn="{StaticResource A_Style_FZTextBlock_Heading}">
                <Setter Property="Color" Value="{StaticResource A_Color_Tile_Text_Alternate}" />
                <Setter Property="FontSize" Value="35" />
            </Style>
              
            <Style x:Key="A_Style_FZTextBlock_TicketsOnSale" TargetType="local:FZTextBlock"
                   BasedOn="{StaticResource A_Style_FZTextBlock_Body}">
                <Setter Property="Color" Value="{StaticResource A_Color_Tile_Text_Alternate}" />
                <Setter Property="FontSize" Value="10" />
                <Setter Property="TrackingAdjust" Value="0.31" />
            </Style>
              
            <Style x:Key="A_Style_FZTextBlock_StatText" TargetType="local:FZTextBlock"
                   BasedOn="{StaticResource A_Style_FZTextBlock_HorizonB}">
                <Setter Property="Color" Value="{StaticResource A_Color_Tile_Text_Alternate}" />
                <Setter Property="FontSize" Value="32" />
                <Setter Property="local:TextBlockInlineMarkup.ResourceBaseName" Value="A_Style_FZRun_Markup_FestivalStatText_" />
                <Setter Property="TextAlignment" Value="Center" />
                <Setter Property="TextWrapping" Value="Wrap" />
            </Style>
              
            <Style x:Key="A_Style_FZTextBlock_StatValueText" TargetType="local:FZTextBlock"
                   BasedOn="{StaticResource A_Style_FZTextBlock_HorizonA}">
                <Setter Property="Color" Value="{StaticResource A_Color_Tile_LiveText}" />
                <Setter Property="TextAlignment" Value="Center" />
            </Style>

            <Style x:Key="A_Style_FZRun_Markup_FestivalOptionName_Bold" TargetType="local:FZRun">
                <Setter Property="FontFamily" Value="Horizon_C" />
            </Style>
              
            <Style x:Key="A_Style_FZRun_Markup_FestivalStatText_Highlight" TargetType="local:FZRun">
                <Setter Property="Color" Value="{StaticResource A_Color_Tile_LiveText}" />
                <Setter Property="FontFamily" Value="Horizon_A" />
            </Style>

            <ControlTemplate x:Key="A_ControlTemplate_FZButton_FestivalSiteOption" TargetType="Button">
                <ControlTemplate.Resources>
                    <Storyboard x:Key="SelectItemStory">
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)"
                                                           Storyboard.TargetName="ScaledContainer">
                            <EasingDoubleKeyFrame KeyTime="0:0:0.0"
                                                      Value="1.16" />
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)"
                                                           Storyboard.TargetName="ScaledContainer">
                            <EasingDoubleKeyFrame KeyTime="0:0:0.0"
                                                      Value="1.16" />
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(local:ZPanel.ZOffset)"
                                                           Storyboard.TargetName="ScaledContainer">
                            <EasingDoubleKeyFrame KeyTime="0:0:0.0"
                                                      Value="{StaticResource A_Double_ZOffset_Acrylic}" />
                        </DoubleAnimationUsingKeyFrames>
                        <Int32AnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.ZIndex)"
                                                      Storyboard.Target="{Binding RelativeSource={RelativeSource AncestorType=ListBoxItem}}">
                            <EasingInt32KeyFrame KeyTime="0:0:0.0"
                                                     Value="20" />
                        </Int32AnimationUsingKeyFrames>
                    </Storyboard>
                    <Storyboard x:Key="DeselectItemStory">
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)"
                                                           Storyboard.TargetName="ScaledContainer">
                            <EasingDoubleKeyFrame KeyTime="0:0:0.3"
                                                      Value="1.0" 
                                                      EasingFunction="{StaticResource A_EasingFunction_TileSelection}"/>
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)"
                                                           Storyboard.TargetName="ScaledContainer">
                            <EasingDoubleKeyFrame KeyTime="0:0:0.3"
                                                      Value="1.0" 
                                                      EasingFunction="{StaticResource A_EasingFunction_TileSelection}"/>
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(local:ZPanel.ZOffset)"
                                                           Storyboard.TargetName="ScaledContainer">
                            <EasingDoubleKeyFrame KeyTime="0:0:0.3"
                                                      Value="0.0"
                                                      EasingFunction="{StaticResource A_EasingFunction_TileSelection}"/>
                        </DoubleAnimationUsingKeyFrames>
                        <Int32AnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.ZIndex)"
                                                          Storyboard.Target="{Binding RelativeSource={RelativeSource AncestorType=ListBoxItem}}">
                            <EasingInt32KeyFrame KeyTime="0:0:0.3"
                                                     Value="0" 
                                                     EasingFunction="{StaticResource A_EasingFunction_TileSelection}"/>
                        </Int32AnimationUsingKeyFrames>
                    </Storyboard>
                    <Storyboard x:Key="UnlockStory">
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="UnlockContent"
                                                       Storyboard.TargetProperty="Opacity">
                            <LinearDoubleKeyFrame KeyTime="0:0:0.3"
                                                  Value="1.0" />
                        </DoubleAnimationUsingKeyFrames>
                    </Storyboard>
                </ControlTemplate.Resources>
                <Decorator x:Name="ScaledContainer"
                        Width="{StaticResource A_Double_FestivalSiteTileWidth}" 
                        Height="{StaticResource A_Double_FestivalSiteTileHeight}"
                        RenderTransformOrigin="0.5,0.5">
                    <Decorator.RenderTransform>
                        <ScaleTransform ScaleX="1" ScaleY="1" />
                    </Decorator.RenderTransform>
                    <Grid>
                        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_ShadowBase}" 
                                  Color="{StaticResource A_Color_DropShadow}">
                            <local:FZMaterial.RenderTransform>
                                <ScaleTransform ScaleX="1.05" ScaleY="1.05" />
                            </local:FZMaterial.RenderTransform>
                            <local:FZMaterial.Preset>
                                <local:FZMaterialPresetRoundtangle Softness="25" Unlit="True" />
                            </local:FZMaterial.Preset>
                        </local:FZMaterial>
                        
                        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_FestialOptionBackground}">
                            <Grid>
                                <Grid x:Name="UnlockContent" Opacity="0">
                                    <StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Top"
                                            Margin="0,37,0,0">
                                        <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_GamerTag}"
                                                Text="{Binding PlayerPresentsText, RelativeSource={RelativeSource AncestorType=Page}}"
                                                HorizontalAlignment="Center" />
                                        <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_Presents}"
                                                Text="{local:Loc Festival.IDS_FestivalUnlock_PlayerPresents}"
                                                HorizontalAlignment="Center"
                                                Margin="0,9,0,0" />
                                    </StackPanel>

                                    <local:FZMaterial Width="5" HorizontalAlignment="Left" />
                                    <local:FZMaterial Height="5" VerticalAlignment="Top" />
                                    <local:FZMaterial Width="5" HorizontalAlignment="Right" />
                                    <local:FZMaterial Height="5" VerticalAlignment="Bottom" />
                                </Grid>
                                
                                <StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Bottom"
                                            Margin="0,0,0,67">
                                    <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_ComingSoon}"
                                                Text="{local:Loc Festival.IDS_FestivalUnlock_ComingSoon}"
                                                HorizontalAlignment="Center" />
                                    <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_TicketsOnSale}"
                                                Text="{local:Loc Festival.IDS_FestivalUnlock_TicketsOnSale}"
                                                HorizontalAlignment="Center"
                                                Margin="0,9,0,0" />
                                </StackPanel>
                            </Grid>
                        </local:FZMaterial>

                        <Decorator x:Name="MouseRolloverContainer" Visibility="Collapsed">
                            <ContentControl x:Name="MouseRollover"
                                                Style="{StaticResource A_Style_Control_MouseRollover}"
                                                Visibility="{Binding Path=IsMouseOver, ElementName=MouseHitHelper, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"/>
                        </Decorator>
                        <local:RoutedEventCommand x:Name="ClickOnMouseItem"
                                                  RoutedEvent="UIElement.MouseLeftButtonDown"/>
                        <local:FZMaterial x:Name="MouseHitHelper"
                                                Color="#00000000"
                                                local:RoutedEventCommand.Action="{Binding ElementName=ClickOnMouseItem}"
                                                Visibility="{Binding ElementName=Flyer, Path=Focusable, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"/>
                    </Grid>
                </Decorator>
                <ControlTemplate.Triggers>
                    <Trigger Property="IsKeyboardFocusWithin"
                                     Value="True">
                        <Setter TargetName="ClickOnMouseItem" Property="Command" Value="{Binding SelectCommand, RelativeSource={RelativeSource AncestorType=Page}}"/>
                        <Trigger.EnterActions>
                            <BeginStoryboard HandoffBehavior="SnapshotAndReplace"
                                            Storyboard="{StaticResource SelectItemStory}" />
                        </Trigger.EnterActions>
                        <Trigger.ExitActions>
                            <BeginStoryboard HandoffBehavior="SnapshotAndReplace"
                                            Storyboard="{StaticResource DeselectItemStory}" />
                        </Trigger.ExitActions>
                    </Trigger>
                    <DataTrigger Binding="{Binding IsUnlocked}" Value="True">
                        <DataTrigger.EnterActions>
                            <BeginStoryboard Storyboard="{StaticResource UnlockStory}" />
                        </DataTrigger.EnterActions>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding UnlockedFestivalSite, RelativeSource={RelativeSource AncestorType=Page}}" Value="{x:Null}">
                        <Setter TargetName="MouseRolloverContainer" Property="Visibility" Value="Visible" />
                        <Setter TargetName="ClickOnMouseItem" Property="Command" Value="{Binding SelectCommand, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}" />
                    </DataTrigger>
                </ControlTemplate.Triggers>
            </ControlTemplate>

            <Style x:Key="A_Style_FZButton_FestivalSiteOption" TargetType="local:FZButton">
                <Setter Property="Template" Value="{StaticResource A_ControlTemplate_FZButton_FestivalSiteOption}" />
                <Setter Property="IsSfxEnabled" Value="False" />
                <Setter Property="RenderTransform">
                    <Setter.Value>
                        <TranslateTransform X="0" />
                    </Setter.Value>
                </Setter>
                <Style.Triggers>
                    <DataTrigger Binding="{Binding UnlockedFestivalSite, RelativeSource={RelativeSource AncestorType=Page}}" Value="{x:Null}">
                        <Setter Property="local:FocusOnMouseOverBehaviour.Self" Value="True" />
                    </DataTrigger>
                </Style.Triggers>
            </Style>

            <Style x:Key="A_Style_FZMaterial_FriendGamerpic_Empty" TargetType="local:FZMaterial"
                   BasedOn="{StaticResource A_Style_FZMaterial_AcrylicPanel_BodyPanel}">
                <Setter Property="Height" Value="88" />
                <Setter Property="Width" Value="88" />
                <Setter Property="Margin" Value="0,3,3,0" />
            </Style>

            <Size x:Key="A_Size_GamerPicSizeParams">88,88</Size>

            <Style x:Key="A_Style_ListBoxItem_FriendGamerpic" TargetType="ListBoxItem">
                <Setter Property="Height" Value="88" />
                <Setter Property="Width" Value="88" />
                <Setter Property="Margin" Value="0,3,3,0" />
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="ListBoxItem">
                            <Grid>
                                <local:FZMaterial ImageSource="{Binding Converter={StaticResource A_GamerPicConverter}, ConverterParameter={StaticResource A_Size_GamerPicSizeParams}}" />
                            </Grid>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>

            <Style x:Key="A_Style_CommonListBox_FriendGamerpics" TargetType="local:CommonListBox">
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="local:CommonListBox">
                            <WrapPanel IsItemsHost="True" Margin="0,0,-3,0" />
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
                <Setter Property="ItemContainerStyle" Value="{StaticResource A_Style_ListBoxItem_FriendGamerpic}" />
            </Style>

            <Style x:Key="A_Style_FrameworkElement_HideWhenNoFriends" TargetType="FrameworkElement">
                <Style.Triggers>
                    <DataTrigger Binding="{Binding UnlockedFestivalSite.Friends.Count}" Value="0">
                        <Setter Property="Visibility" Value="Collapsed" />
                    </DataTrigger>
                </Style.Triggers>
            </Style>

        </ResourceDictionary>
    </Page.Resources>

    <Grid x:Name="LayoutRoot">
        <VisualStateManager.VisualStateGroups>
            <VisualStateGroup x:Name="MainLayout">
                <VisualState x:Name="SelectFrom1Item">
                    <Storyboard>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_FZButton_FestivalSiteOption2"
                                                       Storyboard.TargetProperty="(UIElement.Visibility)">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Collapsed}" />
                        </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                </VisualState>
                <VisualState x:Name="SelectFrom2Items">
                    <Storyboard>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_FZButton_FestivalSiteOption1"
                                                       Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)">
                            <DiscreteDoubleKeyFrame KeyTime="0" Value="-258" />
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_FZButton_FestivalSiteOption2"
                                                       Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)">
                            <DiscreteDoubleKeyFrame KeyTime="0" Value="258" />
                        </DoubleAnimationUsingKeyFrames>
                    </Storyboard>
                </VisualState>
                <VisualState x:Name="SingleItemSelectedStats">
                    <Storyboard>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_FZButton_FestivalSiteOption1"
                                                       Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)">
                            <DiscreteDoubleKeyFrame KeyTime="0:0:0.6"
                                                    Value="0" />
                            <EasingDoubleKeyFrame KeyTime="0:0:0.9"
                                                  Value="-228">
                                <EasingDoubleKeyFrame.EasingFunction>
                                    <ExponentialEase EasingMode="EaseInOut" />
                                </EasingDoubleKeyFrame.EasingFunction>
                            </EasingDoubleKeyFrame>
                        </DoubleAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_FZButton_FestivalSiteOption2"
                                                       Storyboard.TargetProperty="(UIElement.Visibility)">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Collapsed}" />
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="StatsPanel"
                                                       Storyboard.TargetProperty="Visibility">
                            <DiscreteObjectKeyFrame KeyTime="0:0:00" Value="{x:Static Visibility.Visible}" />
                        </ObjectAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="StatsPanel"
                                                       Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)">
                            <DiscreteDoubleKeyFrame KeyTime="0:0:0.6"
                                                    Value="0" />
                            <EasingDoubleKeyFrame KeyTime="0:0:0.9"
                                                  Value="228">
                                <EasingDoubleKeyFrame.EasingFunction>
                                    <ExponentialEase EasingMode="EaseInOut" />
                                </EasingDoubleKeyFrame.EasingFunction>
                            </EasingDoubleKeyFrame>
                        </DoubleAnimationUsingKeyFrames>
                        <StringAnimationUsingKeyFrames Storyboard.TargetProperty="(local:EventFire.EventName)" Storyboard.TargetName="EventFire" FillBehavior="Stop">
                            <DiscreteStringKeyFrame KeyTime="0:0:0" Value="UnlockSelectedItem"/>
                            <DiscreteStringKeyFrame KeyTime="0:0:1.0" Value="UnlockComplete"/>
                            <DiscreteStringKeyFrame KeyTime="0:0:2.0" Value=""/>
                        </StringAnimationUsingKeyFrames>
                    </Storyboard>
                </VisualState>
                <VisualState x:Name="FirstItemSelectedStats">
                    <Storyboard>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_FZButton_FestivalSiteOption1"
                                                       Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)">
                            <EasingDoubleKeyFrame KeyTime="0:0:0.6"
                                                  Value="0">
                                <EasingDoubleKeyFrame.EasingFunction>
                                    <ExponentialEase EasingMode="EaseInOut" />
                                </EasingDoubleKeyFrame.EasingFunction>
                            </EasingDoubleKeyFrame>
                            <DiscreteDoubleKeyFrame KeyTime="0:0:1.6"
                                                    Value="0" />
                            <EasingDoubleKeyFrame KeyTime="0:0:1.9"
                                                  Value="-228">
                                <EasingDoubleKeyFrame.EasingFunction>
                                    <ExponentialEase EasingMode="EaseInOut" />
                                </EasingDoubleKeyFrame.EasingFunction>
                            </EasingDoubleKeyFrame>
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_FZButton_FestivalSiteOption2"
                                                       Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)">
                            <EasingDoubleKeyFrame KeyTime="0:0:0.6"
                                                  Value="0">
                                <EasingDoubleKeyFrame.EasingFunction>
                                    <ExponentialEase EasingMode="EaseInOut" />
                                </EasingDoubleKeyFrame.EasingFunction>
                            </EasingDoubleKeyFrame>
                        </DoubleAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_FZButton_FestivalSiteOption2"
                                                       Storyboard.TargetProperty="(UIElement.Visibility)">
                            <DiscreteObjectKeyFrame KeyTime="0:0:0.7" Value="{x:Static Visibility.Collapsed}" />
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="StatsPanel"
                                                       Storyboard.TargetProperty="Visibility">
                            <DiscreteObjectKeyFrame KeyTime="0:0:0.65" Value="{x:Static Visibility.Visible}" />
                        </ObjectAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="StatsPanel"
                                                       Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)">
                            <DiscreteDoubleKeyFrame KeyTime="0:0:1.6"
                                                    Value="0" />
                            <EasingDoubleKeyFrame KeyTime="0:0:1.9"
                                                  Value="228">
                                <EasingDoubleKeyFrame.EasingFunction>
                                    <ExponentialEase EasingMode="EaseInOut" />
                                </EasingDoubleKeyFrame.EasingFunction>
                            </EasingDoubleKeyFrame>
                        </DoubleAnimationUsingKeyFrames>
                        <StringAnimationUsingKeyFrames Storyboard.TargetProperty="(local:EventFire.EventName)" Storyboard.TargetName="EventFire" FillBehavior="Stop">
                            <DiscreteStringKeyFrame KeyTime="0:0:0" Value="UnlockSelectedItem"/>
                            <DiscreteStringKeyFrame KeyTime="0:0:2.3" Value="UnlockComplete"/>
                            <DiscreteStringKeyFrame KeyTime="0:0:3" Value=""/>
                        </StringAnimationUsingKeyFrames>
                    </Storyboard>
                </VisualState>
                <VisualState x:Name="SecondItemSelectedStats">
                    <Storyboard>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_FZButton_FestivalSiteOption2"
                                                       Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)">
                            <EasingDoubleKeyFrame KeyTime="0:0:0.6"
                                                  Value="0">
                                <EasingDoubleKeyFrame.EasingFunction>
                                    <ExponentialEase EasingMode="EaseInOut" />
                                </EasingDoubleKeyFrame.EasingFunction>
                            </EasingDoubleKeyFrame>
                            <DiscreteDoubleKeyFrame KeyTime="0:0:1.6"
                                                    Value="0" />
                            <EasingDoubleKeyFrame KeyTime="0:0:1.9"
                                                  Value="-228">
                                <EasingDoubleKeyFrame.EasingFunction>
                                    <ExponentialEase EasingMode="EaseInOut" />
                                </EasingDoubleKeyFrame.EasingFunction>
                            </EasingDoubleKeyFrame>
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_FZButton_FestivalSiteOption1"
                                                       Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)">
                            <EasingDoubleKeyFrame KeyTime="0:0:0.6"
                                                  Value="0">
                                <EasingDoubleKeyFrame.EasingFunction>
                                    <ExponentialEase EasingMode="EaseInOut" />
                                </EasingDoubleKeyFrame.EasingFunction>
                            </EasingDoubleKeyFrame>
                        </DoubleAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_FZButton_FestivalSiteOption1"
                                                       Storyboard.TargetProperty="(UIElement.Visibility)">
                            <DiscreteObjectKeyFrame KeyTime="0:0:0.7" Value="{x:Static Visibility.Collapsed}" />
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="StatsPanel"
                                                       Storyboard.TargetProperty="Visibility">
                            <DiscreteObjectKeyFrame KeyTime="0:0:0.65" Value="{x:Static Visibility.Visible}" />
                        </ObjectAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="StatsPanel"
                                                       Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)">
                            <DiscreteDoubleKeyFrame KeyTime="0:0:1.6"
                                                    Value="0" />
                            <EasingDoubleKeyFrame KeyTime="0:0:1.9"
                                                  Value="228">
                                <EasingDoubleKeyFrame.EasingFunction>
                                    <ExponentialEase EasingMode="EaseInOut" />
                                </EasingDoubleKeyFrame.EasingFunction>
                            </EasingDoubleKeyFrame>
                        </DoubleAnimationUsingKeyFrames>
                        <StringAnimationUsingKeyFrames Storyboard.TargetProperty="(local:EventFire.EventName)" Storyboard.TargetName="EventFire" FillBehavior="Stop">
                            <DiscreteStringKeyFrame KeyTime="0:0:0" Value="UnlockSelectedItem"/>
                            <DiscreteStringKeyFrame KeyTime="0:0:2.3" Value="UnlockComplete"/>
                            <DiscreteStringKeyFrame KeyTime="0:0:3" Value=""/>
                        </StringAnimationUsingKeyFrames>
                    </Storyboard>
                </VisualState>
                <VisualState x:Name="SingleItemSelectedNoStats">
                    <Storyboard>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_FZButton_FestivalSiteOption2"
                                                       Storyboard.TargetProperty="(UIElement.Visibility)">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Collapsed}" />
                        </ObjectAnimationUsingKeyFrames>
                        <StringAnimationUsingKeyFrames Storyboard.TargetProperty="(local:EventFire.EventName)" Storyboard.TargetName="EventFire" FillBehavior="Stop">
                            <DiscreteStringKeyFrame KeyTime="0:0:0.0" Value="UnlockSelectedItem"/>
                            <DiscreteStringKeyFrame KeyTime="0:0:0.4" Value="UnlockComplete"/>
                            <DiscreteStringKeyFrame KeyTime="0:0:1" Value=""/>
                        </StringAnimationUsingKeyFrames>
                    </Storyboard>
                </VisualState>
                <VisualState x:Name="FirstItemSelectedNoStats">
                    <Storyboard>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_FZButton_FestivalSiteOption1"
                                                       Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)">
                            <EasingDoubleKeyFrame KeyTime="0:0:0.6"
                                                  Value="0">
                                <EasingDoubleKeyFrame.EasingFunction>
                                    <ExponentialEase EasingMode="EaseInOut" />
                                </EasingDoubleKeyFrame.EasingFunction>
                            </EasingDoubleKeyFrame>
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_FZButton_FestivalSiteOption2"
                                                       Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)">
                            <EasingDoubleKeyFrame KeyTime="0:0:0.6"
                                                  Value="0">
                                <EasingDoubleKeyFrame.EasingFunction>
                                    <ExponentialEase EasingMode="EaseInOut" />
                                </EasingDoubleKeyFrame.EasingFunction>
                            </EasingDoubleKeyFrame>
                        </DoubleAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_FZButton_FestivalSiteOption2"
                                                       Storyboard.TargetProperty="(UIElement.Visibility)">
                            <DiscreteObjectKeyFrame KeyTime="0:0:0.7" Value="{x:Static Visibility.Collapsed}" />
                        </ObjectAnimationUsingKeyFrames>
                        <StringAnimationUsingKeyFrames Storyboard.TargetProperty="(local:EventFire.EventName)" Storyboard.TargetName="EventFire" FillBehavior="Stop">
                            <DiscreteStringKeyFrame KeyTime="0:0:0" Value="UnlockSelectedItem"/>
                            <DiscreteStringKeyFrame KeyTime="0:0:1.1" Value="UnlockComplete"/>
                            <DiscreteStringKeyFrame KeyTime="0:0:3" Value=""/>
                        </StringAnimationUsingKeyFrames>
                    </Storyboard>
                </VisualState>
                <VisualState x:Name="SecondItemSelectedNoStats">
                    <Storyboard>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_FZButton_FestivalSiteOption2"
                                                       Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)">
                            <EasingDoubleKeyFrame KeyTime="0:0:0.6"
                                                  Value="0">
                                <EasingDoubleKeyFrame.EasingFunction>
                                    <ExponentialEase EasingMode="EaseInOut" />
                                </EasingDoubleKeyFrame.EasingFunction>
                            </EasingDoubleKeyFrame>
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_FZButton_FestivalSiteOption1"
                                                       Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)">
                            <EasingDoubleKeyFrame KeyTime="0:0:0.6"
                                                  Value="0">
                                <EasingDoubleKeyFrame.EasingFunction>
                                    <ExponentialEase EasingMode="EaseInOut" />
                                </EasingDoubleKeyFrame.EasingFunction>
                            </EasingDoubleKeyFrame>
                        </DoubleAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_FZButton_FestivalSiteOption1"
                                                       Storyboard.TargetProperty="(UIElement.Visibility)">
                            <DiscreteObjectKeyFrame KeyTime="0:0:0.7" Value="{x:Static Visibility.Collapsed}" />
                        </ObjectAnimationUsingKeyFrames>
                        <StringAnimationUsingKeyFrames Storyboard.TargetProperty="(local:EventFire.EventName)" Storyboard.TargetName="EventFire" FillBehavior="Stop">
                            <DiscreteStringKeyFrame KeyTime="0:0:0" Value="UnlockSelectedItem"/>
                            <DiscreteStringKeyFrame KeyTime="0:0:1.1" Value="UnlockComplete"/>
                            <DiscreteStringKeyFrame KeyTime="0:0:3" Value=""/>
                        </StringAnimationUsingKeyFrames>
                    </Storyboard>
                </VisualState>
            </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>

        <local:FZMaterialGlassCapture />
        <local:FZMaterial Color="{StaticResource A_Color_ClearGlass}" Preset="{StaticResource A_FZMaterialPresetGlass_ScreenBlurLow}"/>
        
        <ContentControl x:Name="BottomBar" Style="{StaticResource A_Style_ButtonBar}">
            <Grid>
                <ContentControl x:Name="DefaultHelpPanel"
                    local:ControllerButtonPanel.ADescription="{local:Loc HelpButtons.IDS_UnlockNewFestivalSite}"
                    Style="{StaticResource A_Style_ContentControl_DefaultButtonBar}" />
            </Grid>
        </ContentControl>

        <Border Style="{StaticResource A_Style_Border_ScenePadding}">
            <Grid Style="{StaticResource A_Style_FrameworkElement_DefaultTransition_0}">
                <Grid HorizontalAlignment="Center" 
                      KeyboardNavigation.DirectionalNavigation="Contained">
                    <local:FZButton x:Name="PART_FZButton_FestivalSiteOption1"
                                    Style="{StaticResource A_Style_FZButton_FestivalSiteOption}"
                                    DataContext="{Binding FestivalSiteOption1}"/>
                    <local:FZButton x:Name="PART_FZButton_FestivalSiteOption2"
                                    Style="{StaticResource A_Style_FZButton_FestivalSiteOption}"
                                    DataContext="{Binding FestivalSiteOption2}"/>
                </Grid>

                <local:EventFire x:Name="EventFire" />

                <DockPanel x:Name="StatsPanel"
                           Panel.ZIndex="-10" 
                           Width="361" Height="744" 
                           Visibility="Collapsed">
                    <DockPanel.RenderTransform>
                        <TranslateTransform />
                    </DockPanel.RenderTransform>
                    
                    <ContentControl Style="{StaticResource A_Style_DescriptionPanelHeader}" 
                                        Content="{local:Loc Festival.IDS_FestivalUnlock_CommunityBreakDownTitle}"
                                        DockPanel.Dock="Top" />

                    <Grid DockPanel.Dock="Bottom" 
                          Style="{StaticResource A_Style_FrameworkElement_HideWhenNoFriends}">
                        <WrapPanel Margin="0,0,-3,0">
                            <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_FriendGamerpic_Empty}" />
                            <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_FriendGamerpic_Empty}" />
                            <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_FriendGamerpic_Empty}" />
                            <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_FriendGamerpic_Empty}" />
                            <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_FriendGamerpic_Empty}" />
                            <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_FriendGamerpic_Empty}" />
                            <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_FriendGamerpic_Empty}" />
                            <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_FriendGamerpic_Empty}" />
                        </WrapPanel>

                        <local:CommonListBox Style="{StaticResource A_Style_CommonListBox_FriendGamerpics}"
                                         ItemsSource="{Binding UnlockedFestivalSite.Friends}" />

                        <Decorator x:Name="AdditionalFriendCountContainer"
                                   HorizontalAlignment="Right" VerticalAlignment="Bottom"
                                   Height="88" Width="88"
                                   Visibility="{Binding AdditionalFriendCountText, Converter={StaticResource A_StringVisConverter}}">
                            <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_StatValueText}"
                                               FontSize="34"
                                               Text="{Binding AdditionalFriendCountText}"
                                               VerticalAlignment="Center" HorizontalAlignment="Center"
                                               Margin="8,9,15,12" />
                        </Decorator>
                    </Grid>

                    <Decorator Style="{StaticResource A_Style_FrameworkElement_HideWhenNoFriends}"
                               DockPanel.Dock="Bottom"
                               Margin="0,5,0,0" Height="163">

                        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_AcrylicPanel_BodyPanel}">
                            <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_StatText}"
                                           local:TextBlockInlineMarkup.Markup="{Binding FriendsMakingSameChoiceText}"
                                           VerticalAlignment="Center" HorizontalAlignment="Center"
                                           Margin="30" />
                        </local:FZMaterial>
                    </Decorator>

                    <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_AcrylicPanel_BodyPanel}">
                        <StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Margin="30">
                            <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_StatValueText}"
                                            Text="{Binding PercentageValueText}"
                                            FontSize="80"/>

                            <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_StatText}"
                                            local:TextBlockInlineMarkup.Markup="{Binding PercentageDescriptionText}"
                                            Margin="0,30,0,0" />
                        </StackPanel>
                    </local:FZMaterial>
                </DockPanel>
            </Grid>
        </Border>
    </Grid>
</Page>
