<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"
      xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing"
      x:Class="ForzaUI.A_PhotoMode"
      FlowDirection="LeftToRight"
      mc:Ignorable="d"
      Style="{StaticResource A_Style_Page_Generic}"
      DataContext="{Binding RelativeSource={RelativeSource Self}}">

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

    <Page.Resources>
        <ResourceDictionary>
            <!--Converters-->
            <local:NumUnitConverter x:Key="A_NumUnitConverter_OneDecimalConverter" FractionDigits="1"/>
            <local:NumUnitConverter x:Key="A_NumUnitConverter_TelephotoConverter" FractionDigits="1" FormatString="InGame.IDS_Photo_Mode_Zoom_Fmt"/>
            <local:NumUnitConverter x:Key="A_NumUnitConverter_EffectSettingScaleUp" FractionDigits="0" ShowUnit="False"/>

            <!--Colors -->
            <Color x:Key="A_Color_Slider_Foreground">#FFFFFFFF</Color>
            <Color x:Key="A_Color_Slider_Foreground_Deselected_Photomode">#40FFFFFF</Color>
            <Color x:Key="A_Color_Slider_Foreground_Selected_Photomode">#80000000</Color>
            <Color x:Key="A_Color_Text_Telemetry">#FFFFFFFF</Color>
            <Color x:Key="A_Color_Text_TelemetrySelected">#FFFFFFFF</Color>
            
            <!-- Presets -->
            <local:FZMaterialPresetGlassRoundtangle x:Key="A_FZMaterialPresetGlassRoundtangle_GlassPanel_PhotomodeTelemetry" BasedOn="{StaticResource A_FZMaterialPresetGlassRoundtangle_GlassPanel_Base}" CornerRadius="17.5"/>
            <local:FZMaterialPresetRoundtangle x:Key="A_FZMaterialPresetRoundtangle_FlatPanel_PhotomodeSliderTrack" BasedOn="{StaticResource A_FZMaterialPreset_FlatPanel_Base}" CornerRadius="2.5"/>
            <local:FZMaterialPresetRoundtangle x:Key="A_FZMaterialPresetRoundtangle_FlatPanel_PhotomodeSliderTrackRight" BasedOn="{StaticResource A_FZMaterialPreset_FlatPanel_Base}" CornerRadius="0,2.5,2.5,0"/>

            <!--Text Sizes-->
            <System:Double x:Key="A_Double_FontSize_TelemetryLabelSmall">14</System:Double>
            <System:Double x:Key="A_Double_FontSize_TelemetryValueSmall">14</System:Double>
            
            <Thickness x:Key="A_Thickness_ItemMargin">0,0,0,3</Thickness>

            <!-- TextBlocks -->
            <Style x:Key="A_Style_FZTextBlock_TelemetryLabelSmall" TargetType="{x:Type local:FZTextBlock}" BasedOn="{StaticResource A_Style_FZTextBlock_HorizonD}" >
                <Setter Property="CapHeight" Value="{StaticResource A_Double_FontSize_TelemetryLabelSmall}"/>
                <Setter Property="MaxWidth" Value="90" />
                <Setter Property="Color" Value="{StaticResource A_Color_Text_Telemetry}"/>
                <Setter Property="Margin" Value="0,0,6,0"/>
            </Style>

            <Style x:Key="A_Style_FZTextBlock_TelemetryValueSmall" TargetType="{x:Type local:FZTextBlock}" BasedOn="{StaticResource A_Style_FZTextBlock_HorizonC}" >
                <Setter Property="CapHeight" Value="{StaticResource A_Double_FontSize_TelemetryValueSmall}"/>
                <Setter Property="MaxWidth" Value="90" />
                <Setter Property="Color" Value="{StaticResource A_Color_Text_Telemetry}"/>
            </Style>

            <Style x:Key="A_Style_FZMaterial_SpinnerButtonBorder"
                   TargetType="local:FZMaterial">
                <Setter Property="Color"
                        Value="{DynamicResource A_Color_Spinner_ArrowUnselected}" />
                <Setter Property="GreedyMeasure"
                        Value="True" />
                <Setter Property="Preset"
                        Value="{StaticResource A_FZMaterialPresetRoundtangleStroke_Sliders_ArrowButtons_PC}" />
                <Setter Property="Visibility"
                        Value="{Binding IsControllerActiveInput, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_BoolToVis_Inverted}}" />
                <Style.Triggers>
                    <DataTrigger Binding="{Binding IsKeyboardFocusWithin, RelativeSource={RelativeSource AncestorType=local:SpinnerControl}}"
                                 Value="True">
                        <Setter Property="Color"
                                Value="{DynamicResource A_Color_Spinner_ArrowSelected}" />
                    </DataTrigger>
                    <DataTrigger Binding="{Binding Opacity, RelativeSource={RelativeSource AncestorType=local:FZButton}}"
                                 Value="0.5">
                        <Setter Property="Color"
                                Value="{DynamicResource A_Color_Spinner_ArrowPCBoxUnselected}" />
                    </DataTrigger>
                    <MultiDataTrigger>
                        <MultiDataTrigger.Conditions>
                            <Condition Binding="{Binding IsControllerActiveInput, RelativeSource={RelativeSource AncestorType=Page}}"
                                       Value="False" />
                            <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource AncestorType=local:FZButton}}"
                                       Value="False" />
                            <Condition Binding="{Binding IsKeyboardFocusWithin, RelativeSource={RelativeSource AncestorType=local:SpinnerControl}}"
                                       Value="True" />
                        </MultiDataTrigger.Conditions>
                        <Setter Property="Color"
                                Value="{DynamicResource A_Color_Spinner_ArrowPCBoxUnselected}" />
                    </MultiDataTrigger>
                </Style.Triggers>
            </Style>

            <Style x:Key="A_Style_FZTextBlock_SpinnerValue"
                   TargetType="local:FZTextBlock"
                   BasedOn="{StaticResource A_Style_FZTextBlock_TelemetryLabelSmall}">
                <Setter Property="MaxWidth"
                        Value="300" />
            </Style>

            <Style x:Key="A_Style_FZTextBlock_EffectValue" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_TelemetryValueSmall}" >
                <Setter Property="MaxWidth" Value="300" />
            </Style>

            <Style x:Key="A_Style_FZTextBlock_EffectLabel" TargetType="{x:Type local:FZTextBlock}" BasedOn="{StaticResource A_Style_FZTextBlock_TelemetryLabelSmall}" >
                <Setter Property="MaxWidth" Value="210" />
            </Style>

            <Style x:Key="A_Style_Button_PhotoModeSpinnerArrowButtons"
                   TargetType="local:FZButton"
                   BasedOn="{StaticResource A_Style_Button_SpinnerArrowButton}">
            </Style>

            <!-- Controls -->
            <Style x:Key="A_Style_ContentControl_EffectsSpinner" TargetType="{x:Type local:SpinnerControl}">
                <Style.Resources>
                    <Color x:Key="A_Color_Spinner_ArrowUnselected">#FFFFFFFF</Color> <!-- Dynamic Resource used by spinner arrows to override default grey style-->
                </Style.Resources>
                <Setter Property="Height" Value="48"/>
                <Setter Property="Margin" Value="0,0,0,3"/>
                <Setter Property="local:FocusOnMouseOverBehaviour.Self"
                        Value="True" />
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type local:SpinnerControl}">
                            <Grid x:Name="grid" RenderTransformOrigin="0.5,0.5">
                                <VisualStateManager.VisualStateGroups>
                                    <VisualStateGroup x:Name="LeftArrowStateGroup">
                                        <VisualState x:Name="PrevDisabled">
                                            <Storyboard>
                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="LeftArrow">
                                                    <DiscreteDoubleKeyFrame KeyTime="0" Value="0.5"/>
                                                </DoubleAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="PrevEnabled" />
                                    </VisualStateGroup>
                                    <VisualStateGroup x:Name="RightArrowStateGroup">
                                        <VisualState x:Name="NextDisabled">
                                            <Storyboard>
                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="RightArrow">
                                                    <DiscreteDoubleKeyFrame KeyTime="0" Value="0.5"/>
                                                </DoubleAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </VisualState>
                                        <VisualState x:Name="NextEnabled" />
                                    </VisualStateGroup>
                                </VisualStateManager.VisualStateGroups>
                                <Grid.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform/>
                                        <SkewTransform/>
                                        <RotateTransform/>
                                        <TranslateTransform/>
                                    </TransformGroup>
                                </Grid.RenderTransform>
                                <local:FZMaterial x:Name="Shadow" Style="{StaticResource A_Style_FZMaterial_ShadowBase}" Visibility="Hidden" />
                                <local:FZMaterial x:Name="Background" Style="{StaticResource A_Style_FZMaterial_GlassPanel_Pill}" />

                                <local:FZMaterial x:Name="Highlight" Style="{StaticResource A_Style_FZMaterial_HighlightShadow}" CaptureSubgraph="False">
                                    <Grid>
                                        <Grid VerticalAlignment="Bottom">
                                            <Grid>
                                                <Grid.ColumnDefinitions>
                                                    <ColumnDefinition Width="2*"/>
                                                    <ColumnDefinition Width="3*"/>
                                                </Grid.ColumnDefinitions>
                                                <Grid Grid.Column="0"
                                                      Margin="18,16">
                                                    <local:FZTextBlock x:Name="TextBlock_Label"
                                                                       Text="{Binding Label, RelativeSource={RelativeSource TemplatedParent}}"
                                                                       Style="{DynamicResource A_Style_FZTextBlock_SpinnerValue}"
                                                                       HorizontalAlignment="Left"
                                                                       VerticalAlignment="Center" />
                                                </Grid>
                                                <Grid Grid.Column="1">
                                                    <local:FZButton x:Name="LeftArrow"
                                                                    Command="{TemplateBinding PrevSelectCommand}"
                                                                    Style="{StaticResource A_Style_Button_PhotoModeSpinnerArrowButtons}"
                                                                    HorizontalAlignment="Left"
                                                                    Margin="5"
                                                                    VerticalAlignment="Center">
                                                        <ContentControl Style="{StaticResource A_Style_Arrow_Left}"
                                                                        Focusable="False"
                                                                        Margin="-2,0,0,0" />
                                                    </local:FZButton>
                                                    <local:FZTextBlock x:Name="TextBlock_Value"
                                                                       Text="{Binding SelectedItem, RelativeSource={RelativeSource TemplatedParent}}"
                                                                       Style="{DynamicResource A_Style_FZTextBlock_SpinnerValue}"
                                                                       HorizontalAlignment="Center"
                                                                       VerticalAlignment="Center" />
                                                    <local:FZButton x:Name="RightArrow"
                                                                    Margin="5"
                                                                    Command="{TemplateBinding NextSelectCommand}"
                                                                    Style="{StaticResource A_Style_Button_PhotoModeSpinnerArrowButtons}"
                                                                    HorizontalAlignment="Right"
                                                                    VerticalAlignment="Center">
                                                        <ContentControl Style="{StaticResource A_Style_Arrow_Right}"
                                                                        Margin="0,0,-3,0"
                                                                        Focusable="False" />
                                                    </local:FZButton>
                                                </Grid>
                                            </Grid>
                                        </Grid>
                                    </Grid>
                                </local:FZMaterial>
                                <local:AudioEvent x:Name="FocusAudioEvent" />
                            </Grid>
                            <ControlTemplate.Triggers>
                                <Trigger Property="IsKeyboardFocusWithin" Value="True">
                                    <Trigger.EnterActions>
                                        <BeginStoryboard>
                                            <BeginStoryboard.Storyboard>
                                                <Storyboard>
                                                    <StringAnimationUsingKeyFrames Storyboard.TargetProperty="(local:AudioEvent.SoundName)" Storyboard.TargetName="FocusAudioEvent">
                                                        <DiscreteStringKeyFrame KeyTime="0:0:0.0" Value="/Master/UI/PauseMenu/HZ2_SFX_UI_PauseMenu_Move_01" />
                                                        <DiscreteStringKeyFrame KeyTime="0:0:0.1" Value="" />
                                                    </StringAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </BeginStoryboard.Storyboard>
                                        </BeginStoryboard>
                                    </Trigger.EnterActions>
                                    <Setter TargetName="TextBlock_Label" Property="Color" Value="{StaticResource A_Color_Text_TelemetrySelected}"/>
                                    <Setter TargetName="TextBlock_Value" Property="Color" Value="{StaticResource A_Color_Text_TelemetrySelected}"/>
                                    <Setter TargetName="Highlight" Property="CaptureSubgraph" Value="True"/>
                                    <Setter TargetName="Background" Property="Style" Value="{StaticResource A_Style_FZMaterial_FlatPanel_HighlightPill}"/>
                                    <Setter Property="Panel.ZIndex" Value="1"/>
                                    <Setter Property="Visibility" TargetName="Shadow" Value="Visible"/>
                                    <Setter Property="RenderTransform" TargetName="grid">
                                        <Setter.Value>
                                            <TransformGroup>
                                                <ScaleTransform ScaleX="1.1" ScaleY="1.1"/>
                                                <SkewTransform/>
                                                <RotateTransform/>
                                                <TranslateTransform />
                                            </TransformGroup>
                                        </Setter.Value>
                                    </Setter>
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>

            <Style x:Key="A_Style_PhotoEffects_RepeatButton_Left" TargetType="{x:Type RepeatButton}" BasedOn="{StaticResource A_Style_RepeatButton}">
                <Setter Property="Height" Value="5" />
                <Setter Property="Margin" Value="0,0,-9,0" />
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type RepeatButton}">
                            <local:FZMaterial x:Name="material" Color="{StaticResource A_Color_Slider_Foreground}" Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_PhotomodeSliderTrack}"/>
                            <ControlTemplate.Triggers>
                                <DataTrigger Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Slider}, Path=IsKeyboardFocusWithin}" Value="True">
                                    <Setter TargetName="material" Property="Color" Value="{StaticResource A_Color_Slider_Selected}" />
                                </DataTrigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>

            <Style x:Key="A_Style_PhotoEffects_RepeatButton_Right" TargetType="{x:Type RepeatButton}" BasedOn="{StaticResource A_Style_RepeatButton}">
                <Setter Property="Height" Value="5" />
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type RepeatButton}">
                            <local:FZMaterial x:Name="material" Color="{StaticResource A_Color_Slider_Foreground_Deselected_Photomode}" Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_PhotomodeSliderTrackRight}"/>
                            <ControlTemplate.Triggers>
                                <DataTrigger Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Slider}, Path=IsKeyboardFocusWithin}" Value="True">
                                    <Setter TargetName="material" Property="Color" Value="{StaticResource A_Color_Slider_Foreground_Selected_Photomode}" />
                                </DataTrigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>

            <Style x:Key="A_Style_Thumb_PhotoEffectsSlider" TargetType="{x:Type Thumb}">
                <Setter Property="Width" Value="18" />
                <Setter Property="Height" Value="18" />
                <Setter Property="Margin" Value="0,0,0,0" />
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type Thumb}">
                            <local:FZMaterial x:Name="OuterMaterial" Color="{StaticResource A_Color_Slider_Foreground}" >
                                <local:FZMaterial.Preset>
                                    <local:FZMaterialPresetRoundtangle CornerRadius="9"/>
                                </local:FZMaterial.Preset>
                            </local:FZMaterial>

                            <ControlTemplate.Triggers>
                                <DataTrigger Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Slider}, Path=IsKeyboardFocusWithin}" Value="True">
                                    <Setter TargetName="OuterMaterial" Property="Color" Value="{StaticResource A_Color_Slider_Selected}" />
                                </DataTrigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>

            <Style x:Key="A_Style_Slider_PhotoEffects" TargetType="Slider">
                <Setter Property="SmallChange" Value="0.01" />
                <Setter Property="LargeChange" Value="0.1" />
                <Setter Property="Maximum" Value="1" />
                <Setter Property="Value" Value="{Binding Value}" />
                <Setter Property="IsMoveToPointEnabled" Value="True" />
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="Slider">
                            <Grid x:Name="grid" FocusManager.IsFocusScope="True" RenderTransformOrigin="0.5,0.5">
                                <Grid.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform/>
                                        <SkewTransform/>
                                        <RotateTransform/>
                                        <TranslateTransform/>
                                    </TransformGroup>
                                </Grid.RenderTransform>

                                <local:FZMaterial x:Name="Shadow"
                                                  Style="{StaticResource A_Style_FZMaterial_ShadowBase}" RenderTransformOrigin="0.5,0.5" Visibility="Hidden" IsHitTestVisible="False" >
                                    <local:FZMaterial.RenderTransform>
                                        <TransformGroup>
                                            <ScaleTransform/>
                                            <SkewTransform/>
                                            <RotateTransform/>
                                            <TranslateTransform X="10" Y="10"/>
                                        </TransformGroup>
                                    </local:FZMaterial.RenderTransform>
                                </local:FZMaterial>

                                <local:FZMaterial x:Name="Background" Style="{StaticResource A_Style_FZMaterial_GlassPanel_Pill}" Focusable="False" IsHitTestVisible="False"/>

                                <local:FZMaterial x:Name="Highlight"  Style="{StaticResource A_Style_FZMaterial_HighlightShadow}" CaptureSubgraph="False">
                                    <Grid VerticalAlignment="Center" Margin="18,16">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="*"/>
                                            <ColumnDefinition Width="153"/>
                                            <ColumnDefinition Width="50"/>
                                        </Grid.ColumnDefinitions>
                                        <local:FZTextBlock x:Name="PART_Label" Focusable="False" Text="{Binding Tag, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource A_StringToUpper}}"
                                               Style="{StaticResource A_Style_FZTextBlock_EffectLabel}" IsHitTestVisible="False" Grid.Column="0" HorizontalAlignment="Left" VerticalAlignment="Center"/>

                                        <Grid Grid.Column="1" VerticalAlignment="Center">
                                            <local:FZMaterial x:Name="MouseHitHelper" Height="22" Color="#00000000" VerticalAlignment="Center"/>
                                            <Track x:Name="PART_Track" Height="22" VerticalAlignment="Center">
                                                <Track.DecreaseRepeatButton>
                                                    <RepeatButton x:Name="Left" Style="{StaticResource A_Style_PhotoEffects_RepeatButton_Left}" />
                                                </Track.DecreaseRepeatButton>
                                                <Track.IncreaseRepeatButton>
                                                    <RepeatButton x:Name="Right" Style="{StaticResource A_Style_PhotoEffects_RepeatButton_Right}" />
                                                </Track.IncreaseRepeatButton>
                                                <Track.Thumb>
                                                    <Thumb x:Name="Thumb" Style="{StaticResource A_Style_Thumb_PhotoEffectsSlider}" />
                                                </Track.Thumb>
                                            </Track>
                                        </Grid>

                                        <local:FZTextBlock x:Name="TextBlock_Value" 
                                                       Text="{Binding Value, ConverterParameter=fracpercentage, Converter={StaticResource A_NumUnitConverter_EffectSettingScaleUp}}"
                                                       Style="{StaticResource A_Style_FZTextBlock_EffectValue}" HorizontalAlignment="Right" IsHitTestVisible="False" Grid.Column="2" VerticalAlignment="Center"/>
                                    </Grid>
                                </local:FZMaterial>
                                <local:AudioEvent x:Name="FocusAudioEvent" />
                            </Grid>
                            <ControlTemplate.Triggers>
                                <Trigger Property="IsKeyboardFocusWithin" Value="True">
                                    <Trigger.EnterActions>
                                        <BeginStoryboard>
                                            <BeginStoryboard.Storyboard>
                                                <Storyboard>
                                                    <StringAnimationUsingKeyFrames Storyboard.TargetProperty="(local:AudioEvent.SoundName)" Storyboard.TargetName="FocusAudioEvent">
                                                        <DiscreteStringKeyFrame KeyTime="0:0:0.0" Value="/Master/UI/PauseMenu/HZ2_SFX_UI_PauseMenu_Move_01" />
                                                        <DiscreteStringKeyFrame KeyTime="0:0:0.1" Value="" />
                                                    </StringAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </BeginStoryboard.Storyboard>
                                        </BeginStoryboard>
                                    </Trigger.EnterActions>
                                    <Setter TargetName="Background" Property="Style" Value="{StaticResource A_Style_FZMaterial_FlatPanel_HighlightPill}"/>
                                    <Setter TargetName="PART_Label" Property="Color" Value="{StaticResource A_Color_Text_TelemetrySelected}"/>
                                    <Setter TargetName="TextBlock_Value" Property="Color" Value="{StaticResource A_Color_Text_TelemetrySelected}"/>
                                    <Setter TargetName="Highlight" Property="CaptureSubgraph" Value="True"/>
                                    <Setter Property="Panel.ZIndex" Value="1"/>
                                    <Setter Property="RenderTransform" TargetName="grid">
                                        <Setter.Value>
                                            <TransformGroup>
                                                <ScaleTransform ScaleX="1.1" ScaleY="1.1"/>
                                                <SkewTransform/>
                                                <RotateTransform/>
                                                <TranslateTransform />
                                            </TransformGroup>
                                        </Setter.Value>
                                    </Setter>
                                    <Setter Property="Visibility" TargetName="Shadow" Value="Visible"/>
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>

            <Style x:Key="A_Style_Control_Slider" TargetType="Control">
                <Setter Property="Focusable" Value="False" />
                <Setter Property="Margin" Value="{StaticResource A_Thickness_ItemMargin}" />
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate>
                            <ControlTemplate.Resources>
                                <Style x:Key="A_Style_FZMaterial_MouseOverMaterial" TargetType="local:FZMaterial">
                                    <Setter Property="Color" Value="#00000000" />
                                    <Style.Triggers>
                                        <Trigger Property="IsMouseOver" Value="True">
                                            <Setter Property="FocusManager.FocusedElement"
                                                    Value="{Binding ElementName=SliderElement}" />
                                    	</Trigger>
                                    </Style.Triggers>
                                </Style>
                            </ControlTemplate.Resources>
                            <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_MouseOverMaterial}">
                                <Slider x:Name="SliderElement" Tag="{TemplateBinding Tag}" Style="{StaticResource A_Style_Slider_PhotoEffects}" Height="48"/>
                            </local:FZMaterial>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
                <Style.Triggers>
                    <Trigger Property="IsKeyboardFocusWithin" Value="True">
                        <Setter Property="Panel.ZIndex" Value="1" />
                    </Trigger>
                </Style.Triggers>
            </Style>

            <Style x:Key="A_Style_ControllerButtonControl_ControllerOnly"
                   BasedOn="{StaticResource A_Style_ControllerButtonControl_Default}"
                   TargetType="{x:Type local:ControllerButtonControl}">
                <Setter Property="Visibility"
                        Value="Collapsed" />
                <Style.Triggers>
                    <DataTrigger Binding="{Binding IsControllerActiveInput, RelativeSource={RelativeSource AncestorType=Page}}"
                                 Value="True" >
                        <Setter Property="Visibility"
                                Value="{Binding Description, RelativeSource={RelativeSource Self}, Converter={StaticResource A_StringVisConverter}}" />
                    </DataTrigger>
                </Style.Triggers>
            </Style>

            <Style x:Key="A_Style_ControllerButtonControl_KeyboardOnly"
                   BasedOn="{StaticResource A_Style_ControllerButtonControl_Default}"
                   TargetType="{x:Type local:ControllerButtonControl}">
                <Setter Property="Visibility"
                        Value="Collapsed" />
                <Style.Triggers>
                    <DataTrigger Binding="{Binding IsControllerActiveInput, RelativeSource={RelativeSource AncestorType=Page}}"
                                 Value="False" >
                        <Setter Property="Visibility"
                                Value="{Binding Description, RelativeSource={RelativeSource Self}, Converter={StaticResource A_StringVisConverter}}" />
                    </DataTrigger>
                </Style.Triggers>
            </Style>
        </ResourceDictionary>
    </Page.Resources>

    <Grid>
        <Grid x:Name="LayoutRoot">
            <!-- Page States-->
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup>
                    <VisualState x:Name="InvisibleMode">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="CameraEffects">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Grid_CameraTelemetry">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="BottomBar">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="FZMaterial_CameraReticle">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="PictureMode">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="CameraEffects">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="EffectsMode">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="FZMaterial_CameraTelemetryInternal">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="FullScreenMode">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="CameraEffects">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Grid_CameraTelemetry">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="BottomBar">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)"
        						Storyboard.TargetName="FZMaterial_CameraReticle">
                                <DiscreteObjectKeyFrame KeyTime="0"
        							Value="{x:Static Visibility.Hidden}" />
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="PreSaveMode">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="CameraEffects">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Grid_CameraTelemetry">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="FZMaterial_CameraReticle">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Canvas_Watermark">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}" />
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="WatermarkMode">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="CameraEffects">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Grid_CameraTelemetry">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="FZMaterial_CameraReticle">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="BottomBar">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
                            </ObjectAnimationUsingKeyFrames>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Canvas_Watermark">
                                <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}" />
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>

            <!-- Effects Panel -->
            <Grid Style="{StaticResource A_Style_FrameworkElement_LayoutRoot}"
                  HorizontalAlignment="Left"
                  VerticalAlignment="Top">
                <StackPanel Width="465" x:Name="CameraEffects" Style="{StaticResource A_Style_FrameworkElement_DefaultTransition_0}" HorizontalAlignment="Left" Margin="75,50,0,0" >
                    <StackPanel x:Name="PART_StackPanel_CameraEffects" IsEnabled="False" KeyboardNavigation.DirectionalNavigation="Contained" >
                        <local:SpinnerControl x:Name="PresetSpinner"
                                              Margin="0,0,0,9"
                                               Label="{Binding Source={local:Loc InGame.IDS_Label_Preset}, Converter={StaticResource A_StringToUpper}}"
                                              ItemsSource="{Binding Presets}"
                                              SelectedIndex="{Binding SelectedPresetIndex}"
                                              Style="{StaticResource A_Style_ContentControl_EffectsSpinner}"
                                              RenderTransformOrigin="0.5,0.5">
                            <FrameworkElement.Resources>
                                <Style x:Key="A_Style_FZTextBlock_SpinnerValue"
                                       TargetType="local:FZTextBlock"
                                       BasedOn="{StaticResource A_Style_FZTextBlock_TelemetryValueSmall}">
                                    <Setter Property="MaxWidth"
                                            Value="300" />
                                </Style>
                            </FrameworkElement.Resources>
                        </local:SpinnerControl>
                        <Control Style="{StaticResource A_Style_Control_Slider}"
                                 Tag="{local:Loc InGame.IDS_Label_ShutterSpeed}"
                                 DataContext="{Binding CurrentSettings.ShutterSpeed}" />
                        <local:SpinnerControl Label="{Binding Source={local:Loc InGame.IDS_Label_FocusMode}, Converter={StaticResource A_StringToUpper}}"
                                              ItemsSource="{Binding CurrentSettings.FocusMode.Collection}"
                                              SelectedIndex="{Binding CurrentSettings.FocusMode.Value}"
                                              local:FocusOnMouseOverBehaviour.Self="True"
                                              Style="{StaticResource A_Style_ContentControl_EffectsSpinner}"
                                              RenderTransformOrigin="0.5,0.5" />
                        <Control Style="{StaticResource A_Style_Control_Slider}"
                                 Tag="{local:Loc InGame.IDS_Label_Focus}"
                                 DataContext="{Binding CurrentSettings.Focus}" />
                        <Control Style="{StaticResource A_Style_Control_Slider}"
                                 Tag="{local:Loc InGame.IDS_Label_Exposure}"
                                 DataContext="{Binding CurrentSettings.Exposure}" />
                        <Control Style="{StaticResource A_Style_Control_Slider}"
                                 Tag="{local:Loc InGame.IDS_Label_Aperture}"
                                 DataContext="{Binding CurrentSettings.Aperture}" />
                        <local:SpinnerControl Label="{Binding Source={local:Loc InGame.IDS_Label_BokehShape}, Converter={StaticResource A_StringToUpper}}"
                                              ItemsSource="{Binding CurrentSettings.BokehShape.Collection}"
                                              SelectedIndex="{Binding CurrentSettings.BokehShape.Value}"
                                              Style="{StaticResource A_Style_ContentControl_EffectsSpinner}"
                                              RenderTransformOrigin="0.5,0.5" />
                        <local:SpinnerControl Label="{Binding Source={local:Loc InGame.IDS_Label_Sampling}, Converter={StaticResource A_StringToUpper}}"
                                              ItemsSource="{Binding CurrentSettings.SamplingMode.Collection}"
                                              SelectedIndex="{Binding CurrentSettings.SamplingMode.Value}"
                                              Style="{StaticResource A_Style_ContentControl_EffectsSpinner}"
                                              RenderTransformOrigin="0.5,0.5" />
                        <Control Style="{StaticResource A_Style_Control_Slider}"
                                 Tag="{local:Loc InGame.IDS_Label_Contrast}"
                                 DataContext="{Binding CurrentSettings.Contrast}" />
                        <Control Style="{StaticResource A_Style_Control_Slider}"
                                 Tag="{local:Loc InGame.IDS_Label_Color}"
                                 DataContext="{Binding CurrentSettings.Color}" />
                        <Control Style="{StaticResource A_Style_Control_Slider}"
                                 Tag="{local:Loc InGame.IDS_Label_Brightness}"
                                 DataContext="{Binding CurrentSettings.Brightness}" />
                        <Control Style="{StaticResource A_Style_Control_Slider}"
                                 Tag="{local:Loc InGame.IDS_Label_Sepia}"
                                 DataContext="{Binding CurrentSettings.Sepia}" />
                        <Control Style="{StaticResource A_Style_Control_Slider}"
                                 Tag="{local:Loc InGame.IDS_Label_Vignette}"
                                 DataContext="{Binding CurrentSettings.Vignette}" />
                        <Control Style="{StaticResource A_Style_Control_Slider}"
                                 Tag="{local:Loc InGame.IDS_Label_Temperature}"
                                 DataContext="{Binding CurrentSettings.Temperature}" />

                        <local:SpinnerControl Label="{Binding Source={local:Loc InGame.IDS_Label_CarLights}, Converter={StaticResource A_StringToUpper}}"
                                 ItemsSource="{Binding CurrentSettings.CarLights.Collection}" 
                                 SelectedIndex="{Binding CurrentSettings.CarLights.Value}" 
                                 Style="{StaticResource A_Style_ContentControl_EffectsSpinner}" 
                                 RenderTransformOrigin="0.5,0.5" />
                        <local:SpinnerControl Label="{Binding Source={local:Loc InGame.IDS_Label_Drivers}, Converter={StaticResource A_StringToUpper}}"
                                 ItemsSource="{Binding CurrentSettings.Drivers.Collection}" 
                                 SelectedIndex="{Binding CurrentSettings.Drivers.Value}" 
                                 Style="{StaticResource A_Style_ContentControl_EffectsSpinner}" 
                                 RenderTransformOrigin="0.5,0.5" 
                                 Visibility="{Binding InInterior, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}}"/>
                        <local:SpinnerControl Label="{Binding Source={local:Loc InGame.IDS_Label_Crowd}, Converter={StaticResource A_StringToUpper}}"
                                 ItemsSource="{Binding CurrentSettings.Crowds.Collection}" 
                                 SelectedIndex="{Binding CurrentSettings.Crowds.Value}" 
                                 Style="{StaticResource A_Style_ContentControl_EffectsSpinner}" 
                                 RenderTransformOrigin="0.5,0.5" 
                                 Visibility="{Binding InAutovista, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}}"/>
                        <local:SpinnerControl Label="{Binding Source={local:Loc InGame.IDS_Label_Creatures}, Converter={StaticResource A_StringToUpper}}"
                                 ItemsSource="{Binding CurrentSettings.Creatures.Collection}" 
                                 SelectedIndex="{Binding CurrentSettings.Creatures.Value}" 
                                 Style="{StaticResource A_Style_ContentControl_EffectsSpinner}"
                                 RenderTransformOrigin="0.5,0.5"
                                 Margin="0,0,0,9"
                                 Visibility="{Binding InAutovista, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}}"/>
                    </StackPanel>
                </StackPanel>
            </Grid>


            <!-- Camera Panel -->
            <Grid Style="{StaticResource A_Style_FrameworkElement_LayoutRoot}"
                  HorizontalAlignment="Center"
                  VerticalAlignment="Center">
                <Grid x:Name="Grid_CameraTelemetry" Style="{StaticResource A_Style_FrameworkElement_DefaultTransition_0}" HorizontalAlignment="Center" VerticalAlignment="Bottom">
                    <local:FZMaterial x:Name="FZMaterial_CameraTelemetryInternal" Style="{StaticResource A_Style_FZMaterial_GlassPanel_Pill}" Preset="{StaticResource A_FZMaterialPresetGlassRoundtangle_GlassPanel_PhotomodeTelemetry}" Height="35" Width="1134"  Margin="0,0,0,192">
                        <UniformGrid Rows="1" VerticalAlignment="Center" Margin="18,0">
                            <StackPanel Orientation="Horizontal">
                                <local:FZTextBlock Text="{local:Loc InGame.IDS_Photo_Mode_Altitude_Label}" Style="{StaticResource A_Style_FZTextBlock_TelemetryLabelSmall}" />
                                <local:FZTextBlock Text="{Binding CurrentSettings.Altitude, ConverterParameter=length, Converter={StaticResource A_NumUnitConverter_OneDecimalConverter}}" Style="{StaticResource A_Style_FZTextBlock_TelemetryValueSmall}" />
                            </StackPanel>
                            <StackPanel Orientation="Horizontal">
                                <local:FZTextBlock Text="{local:Loc InGame.IDS_Photo_Mode_XZoom_Label}" Style="{StaticResource A_Style_FZTextBlock_TelemetryLabelSmall}" />
                                <local:FZTextBlock Text="{Binding CurrentSettings.TelephotoMultiplier, Converter={StaticResource A_NumUnitConverter_TelephotoConverter}}" Style="{StaticResource A_Style_FZTextBlock_TelemetryValueSmall}" />
                            </StackPanel>
                            <StackPanel Orientation="Horizontal">
                                <local:FZTextBlock Text="{local:Loc InGame.IDS_Photo_Mode_Pitch_Label}" Style="{StaticResource A_Style_FZTextBlock_TelemetryLabelSmall}" />
                                <local:FZTextBlock Text="{Binding CurrentSettings.Pitch, ConverterParameter=angle, Converter={StaticResource A_NumUnitConverter_OneDecimalConverter}}" Style="{StaticResource A_Style_FZTextBlock_TelemetryValueSmall}" />
                            </StackPanel>
                            <StackPanel Orientation="Horizontal">
                                <local:FZTextBlock Text="{local:Loc InGame.IDS_Photo_Mode_Yaw_Label}" Style="{StaticResource A_Style_FZTextBlock_TelemetryLabelSmall}" />
                                <local:FZTextBlock Text="{Binding CurrentSettings.Yaw, ConverterParameter=angle, Converter={StaticResource A_NumUnitConverter_OneDecimalConverter}}" Style="{StaticResource A_Style_FZTextBlock_TelemetryValueSmall}" />
                            </StackPanel>
                            <StackPanel Orientation="Horizontal">
                                <local:FZTextBlock Text="{local:Loc InGame.IDS_Photo_Mode_Roll_Label}" Style="{StaticResource A_Style_FZTextBlock_TelemetryLabelSmall}" />
                                <local:FZTextBlock Text="{Binding CurrentSettings.Roll, ConverterParameter=angle, Converter={StaticResource A_NumUnitConverter_OneDecimalConverter}}" Style="{StaticResource A_Style_FZTextBlock_TelemetryValueSmall}" />
                            </StackPanel>
                        </UniformGrid>
                    </local:FZMaterial>
                </Grid>
            </Grid>

            <!-- Photo Reticle -->
            <Decorator Style="{StaticResource A_Style_FrameworkElement_LayoutRoot}"
                       HorizontalAlignment="Center"
                       VerticalAlignment="Center">
                <Grid x:Name="FZMaterial_CameraReticle" Style="{StaticResource A_Style_FrameworkElement_FadeOnlyTransition_0}" Width="256" Height="256" >
                    <local:FZMaterial ImageSource="/ForzaUI;component/Textures/Anthem/A_PhotoMode_Reticle_Glassmask.png" Preset="{StaticResource A_FZMaterialPresetGlass_Standard}" Color="#0f000000" />
                    <local:FZMaterial ImageSource="/ForzaUI;component/Textures/Anthem/A_PhotoMode_Reticle.png" />
                </Grid>
            </Decorator>

            <Decorator x:Name="Canvas_Watermark"
                    Visibility="Collapsed"
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Stretch"
                    Width="Auto"
                    Height="Auto"
                    Style="{StaticResource A_Style_FrameworkElement_LayoutRoot}" >
                <local:FZMaterial x:Name="FZMaterial_Watermark"
                                  ImageSource="/ForzaUI;component/Textures/Anthem/PhotomodeWatermark.png"
                                  Width="300"
                                  Height="128"
                                  Style="{StaticResource A_Style_FrameworkElement_DefaultTransition_0}"
                                  HorizontalAlignment="{Binding WatermarkHorizontalAlignment}"
                                  VerticalAlignment="{Binding WatermarkVerticalAlignment}"
                                  Margin="96,54" />
            </Decorator>
            <ContentControl Style="{StaticResource A_Style_ButtonBar}"
                        x:Name="BottomBar">
                <local:ControllerButtonPanel x:Name="HelpPanel"
                                             Style="{StaticResource A_Style_ControllerButtonPanel_Default}">
                    <local:ControllerButtonControl Button="A" />
                    <local:ControllerButtonControl Button="B" />
                    <local:ControllerButtonControl Button="X" />
                    <local:ControllerButtonControl Button="Y" />
                    <local:ControllerButtonControl x:Name="RBumperButton"
                                                   Button="RBumper"
                                                   Style="{StaticResource A_Style_ControllerButtonControl_ControllerOnly}" />
                    <local:ControllerButtonControl x:Name="LBumperButton"
                                                   Button="LBumper"
                                                   Style="{StaticResource A_Style_ControllerButtonControl_ControllerOnly}" />
                    <local:ControllerButtonControl Button="R3"
                                                   Description="{Binding Description, ElementName=RBumperButton}"
                                                   Style="{StaticResource A_Style_ControllerButtonControl_KeyboardOnly}" />
                    <local:ControllerButtonControl Button="L3"
                                                   Description="{Binding Description, ElementName=LBumperButton}"
                                                   Style="{StaticResource A_Style_ControllerButtonControl_KeyboardOnly}" />
                    <local:ControllerButtonControl Button="Back" />
                </local:ControllerButtonPanel>
            </ContentControl>
        </Grid>
    </Grid>
</Page>
