<Page xmlns:local="clr-namespace:ForzaUI"
      xmlns:System="clr-namespace:System;assembly=mscorlib"
      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"
      x:Class="ForzaUI.A_AdvancedControllerOptions"
      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>
            <local:TileMenuDataItem x:Key="A_DataItem_SteeringAxisI" Heading="{local:Loc MyProfile.IDS_AdvancedOption_SteeringAxisDeadzoneInside}"
                                    Description="{local:Loc MyProfile.IDS_AdvancedOption_Description_SteeringAxisDeadzoneInside}"/>
            <local:TileMenuDataItem x:Key="A_DataItem_SteeringAxisO"
                                    Heading="{local:Loc MyProfile.IDS_AdvancedOption_SteeringAxisDeadzoneOutside}"
                                    Description="{local:Loc MyProfile.IDS_AdvancedOption_Description_SteeringAxisDeadzoneOutside}" />
            <local:TileMenuDataItem x:Key="A_DataItem_ThrottleI"
                                    Heading="{local:Loc MyProfile.IDS_AdvancedOption_ThrottleDeadzoneInside}"
                                    Description="{local:Loc MyProfile.IDS_AdvancedOption_Description_ThrottleDeadzoneInside}" />
            <local:TileMenuDataItem x:Key="A_DataItem_ThrottleO"
                                    Heading="{local:Loc MyProfile.IDS_AdvancedOption_ThrottleDeadzoneOutside}"
                                    Description="{local:Loc MyProfile.IDS_AdvancedOption_Description_ThrottleDeadzoneOutside}" />
            <local:TileMenuDataItem x:Key="A_DataItem_BrakeI"
                                    Heading="{local:Loc MyProfile.IDS_AdvancedOption_BrakeDeadzoneInside}"
                                    Description="{local:Loc MyProfile.IDS_AdvancedOption_Description_BrakeDeadzoneInside}" />
            <local:TileMenuDataItem x:Key="A_DataItem_BrakeO"
                                    Heading="{local:Loc MyProfile.IDS_AdvancedOption_BrakeDeadzoneOutside}"
                                    Description="{local:Loc MyProfile.IDS_AdvancedOption_Description_BrakeDeadzoneOutside}" />

            <local:TileMenuDataItem x:Key="A_DataItem_ClutchI"
                                    Heading="{local:Loc MyProfile.IDS_AdvancedOption_ClutchDeadzoneInside}"
                                    Description="{local:Loc MyProfile.IDS_AdvancedOption_Description_ClutchDeadzoneInside}" />
            <local:TileMenuDataItem x:Key="A_DataItem_ClutchO"
                                    Heading="{local:Loc MyProfile.IDS_AdvancedOption_ClutchDeadzoneOutside}"
                                    Description="{local:Loc MyProfile.IDS_AdvancedOption_Description_ClutchDeadzoneOutside}" />

            <local:TileMenuDataItem x:Key="A_DataItem_HandbrakeI"
                                    Heading="{local:Loc MyProfile.IDS_AdvancedOption_HandbrakeDeadzoneInside}"
                                    Description="{local:Loc MyProfile.IDS_AdvancedOption_Description_HandbrakeDeadzoneInside}" />
            <local:TileMenuDataItem x:Key="A_DataItem_HandbrakeO"
                                    Heading="{local:Loc MyProfile.IDS_AdvancedOption_HandbrakeDeadzoneOutside}"
                                    Description="{local:Loc MyProfile.IDS_AdvancedOption_Description_HandbrakeDeadzoneOutside}" />

            <local:TileMenuDataItem x:Key="A_DataItem_SteeringLinearity"
                                    Heading="{local:Loc MyProfile.IDS_AdvancedOption_SteeringLinearity}"
                                    Description="{local:Loc MyProfile.IDS_AdvancedOption_Description_SteeringLinearity}" />

            <local:TileMenuDataItem x:Key="A_DataItem_RumbleScale"
                                    Heading="{local:Loc MyProfile.IDS_AdvancedOption_RumbleScale}"
                                    Description="{local:Loc MyProfile.IDS_AdvancedOption_Description_RumbleScale}" />
            <local:TileMenuDataItem x:Key="A_DataItem_ForceFeedback"
                                    Heading="{local:Loc MyProfile.IDS_AdvancedOption_ForceFeedbackScale}"
                                    Description="{local:Loc MyProfile.IDS_AdvancedOption_Description_ForceFeedbackScale}" />

            <local:TileMenuDataItem x:Key="A_DataItem_ForceFeedbackUndersteerFactor"
                                    Heading="{local:Loc MyProfile.IDS_AdvancedOption_ForceFeedbackUndersteerFactor}"
                                    Description="{local:Loc MyProfile.IDS_AdvancedOption_Description_ForceFeedbackUndersteerFactor}" />

            <local:TileMenuDataItem x:Key="A_DataItem_ForceFeedbackLinearityFactor"
                                    Heading="{local:Loc MyProfile.IDS_AdvancedOption_ForceFeedbackLinearityFactor}"
                                    Description="{local:Loc MyProfile.IDS_AdvancedOption_Description_ForceFeedbackLinearityFactor}" />

            <local:TileMenuDataItem x:Key="A_DataItem_SteeringWheelSteeringSensitivity"
                                    Heading="{local:Loc MyProfile.IDS_AdvancedOption_SteeringSensitivity}"
                                    Description="{local:Loc MyProfile.IDS_Description_WheelAdvanced}" />

            <local:TileMenuDataItem x:Key="A_DataItem_ForceFeedbackInvert"
                                    Heading="{local:Loc MyProfile.IDS_AdvancedOption_ForceFeedbackInvert}"
                                    Description="{local:Loc MyProfile.IDS_Description_WheelAdvanced}" />

            <local:TileMenuDataItem x:Key="A_DataItem_SteeringWheelCenterSpringScale"
                                    Heading="{local:Loc MyProfile.IDS_AdvancedOption_CenterSpringScale}"
                                    Description="{local:Loc MyProfile.IDS_AdvancedOption_Description_SpringScale}" />

            <local:TileMenuDataItem x:Key="A_DataItem_SteeringWheelDamperScale"
                                    Heading="{local:Loc MyProfile.IDS_AdvancedOption_WheelDamperScale}"
                                    Description="{local:Loc MyProfile.IDS_AdvancedOption_Description_DampingScale}" />

            <local:TileMenuDataItem x:Key="A_DataItem_SteeringWheelRotationAngle"
                                    Heading="{local:Loc MyProfile.IDS_AdvancedOption_WheelRotationAngle}"
                                    Description="{local:Loc MyProfile.IDS_AdvancedOption_Description_WheelRotationAngle}" />

            <local:TileMenuDataItem x:Key="A_DataItem_MouseFreeLook"
                                    Heading="{local:Loc MyProfile.IDS_AdvancedOption_MouseFreeLook}"
                                    Description="{local:Loc MyProfile.IDS_AdvancedOption_Description_MouseFreeLook}" />

            <local:TileMenuDataItem x:Key="A_DataItem_RumbleSetting"
                                    Heading="{local:Loc MyProfile.IDS_Option_RumbleSetting}"
                                    Description="{local:Loc MyProfile.IDS_AdvancedOption_Description_RumbleSetting}" />

            <local:TileMenuDataItem x:Key="A_DataItem_InvertGearUpDown"
                                    Heading="{local:Loc MyProfile.IDS_Option_InvertGearUpDown}"
                                    Description="{local:Loc MyProfile.IDS_AdvancedOption_Description_InvertGearUpDown}" />

            <local:TileMenuDataItem x:Key="A_DataItem_InvertHandbreakClutch"
                                    Heading="{local:Loc MyProfile.IDS_Option_InvertHandbrakeClutch}"
                                    Description="{local:Loc MyProfile.IDS_AdvancedOption_Description_InvertHandbrakeClutch}" />

            <local:TileMenuDataItem x:Key="A_DataItem_InvertCameraLookBack"
                                    Heading="{local:Loc MyProfile.IDS_Option_InvertCameraLookBack}"
                                    Description="{local:Loc MyProfile.IDS_AdvancedOption_Description_InvertCameraLookBack}" />

            <local:TileMenuDataItem x:Key="A_DataItem_InvertCameraVertical"
                                    Heading="{local:Loc MyProfile.IDS_Option_InvertCameraVertical}"
                                    Description="{local:Loc MyProfile.IDS_AdvancedOption_Description_InvertCameraVertical}" />

            <local:TileMenuDataItem x:Key="A_DataItem_InvertAnnaTelemetry"
                                    Heading="{local:Loc MyProfile.IDS_Option_InvertAnnaTelemetry}"
                                    Description="{local:Loc MyProfile.IDS_AdvancedOption_Description_InvertAnnaTelemetry}" />

            <local:TileMenuDataItem x:Key="A_DataItem_InvertHornPhotoMode"
                                    Heading="{local:Loc MyProfile.IDS_Option_InvertHornPhotoMode}"
                                    Description="{local:Loc MyProfile.IDS_AdvancedOption_Description_InvertHornPhotoMode}" />

            <Style x:Key="A_Style_SpinnerControl_AdvancedController"
                   BasedOn="{StaticResource A_Style_SpinnerControl_Default_InItemsList}"
                   TargetType="local:SpinnerControl">
                <Setter Property="DataContext"
                        Value="{Binding ControllerOptionsDataSource, RelativeSource={RelativeSource AncestorType=Page}}" />
            </Style>

            <Style x:Key="A_Style_SpinnerControl_AdvancedController_PCOnly"
                   BasedOn="{StaticResource A_Style_SpinnerControl_AdvancedController}"
                   TargetType="local:SpinnerControl">
                <Setter Property="Visibility"
                        Value="{Binding IsPC, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_FZBooleanToVisibilityConverter}}" />
            </Style>

            <Style x:Key="A_Style_SpinnerControl_AdvancedController_XboxOnly"
                   BasedOn="{StaticResource A_Style_SpinnerControl_AdvancedController}"
                   TargetType="local:SpinnerControl">
                <Setter Property="Visibility"
                        Value="{Binding IsPC, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}}" />
            </Style>

            <Style x:Key="A_Style_SpinnerControl_AdvancedController_DefaultProfilesOnly"
                   BasedOn="{StaticResource A_Style_SpinnerControl_AdvancedController}"
                   TargetType="local:SpinnerControl">
                <Setter Property="Visibility"
                        Value="{Binding IsProfileDefault, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_FZBooleanToVisibilityConverter}}" />
            </Style>

            <Style x:Key="A_Style_SpinnerControl_AdvancedController_XboxOnly_DefaultProfilesOnly"
                   BasedOn="{StaticResource A_Style_SpinnerControl_AdvancedController}"
                   TargetType="local:SpinnerControl">
                <Setter Property="Visibility" Value="Collapsed"/>
                <Style.Triggers>
                    <MultiDataTrigger>
                        <MultiDataTrigger.Conditions>
                            <Condition Binding="{Binding IsPC, RelativeSource={RelativeSource AncestorType=Page}}" Value="False" />
                            <Condition Binding="{Binding IsProfileDefault, RelativeSource={RelativeSource AncestorType=Page}}" Value="True" />
                        </MultiDataTrigger.Conditions>
                        <Setter Property="Visibility" Value="Visible" />
                    </MultiDataTrigger>
                </Style.Triggers>
            </Style>

            <Style x:Key="A_Style_Slider_Options_WheelRotationAngle_Custom"
                   BasedOn="{StaticResource A_Style_Slider_Options_WheelRotationAngle}"
                   TargetType="Slider">
                <Setter Property="Visibility"
                    Value="{Binding IsPC, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}}" />

                <Style.Triggers>
                    <DataTrigger Binding="{Binding CanChangeSteeringWheelRotationAngle}" Value="False">
                        <Setter Property="SmallChange" Value="0" />
                    </DataTrigger>
                </Style.Triggers>
            </Style>

            <Style x:Key="A_Style_Slider_AdvancedController_PCOnly"
                   BasedOn="{StaticResource A_Style_Slider_Options_InItemsList}"
                   TargetType="Slider">
                <Setter Property="Visibility"
                        Value="{Binding IsPC, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_FZBooleanToVisibilityConverter}}" />
            </Style>

            <Style x:Key="A_Style_Slider_AdvancedController_ExtendedRange"
                   BasedOn="{StaticResource A_Style_Slider_Options_InItemsList}"
                   TargetType="Slider">
                <Setter Property="Minimum" Value="0" />
                <Setter Property="Maximum" Value="2" />
            </Style>

            <Style x:Key="A_Style_CommonListBox_AdvancedControllerOptions"
                   TargetType="{x:Type local:CommonListBox}"
                   BasedOn="{StaticResource A_Style_ListBox_List_Default_ScrollBar}">
                <Setter Property="SelectedIndex" Value="0" />
            </Style>

            <Style x:Key="A_Style_DescriptionPanel_AdvancedControllerOptions" BasedOn="{StaticResource A_Style_DescriptionPanel_Options}" TargetType="ContentControl">
                <Style.Triggers>
                    <DataTrigger Binding="{Binding Visibility, ElementName=AdvancedOptions_Controller_Container}" Value="{x:Static Visibility.Visible}">
                        <Setter Property="DataContext" Value="{Binding SelectedItem, ElementName=AdvancedOptions_Controller}" />
                    </DataTrigger>
                    <DataTrigger Binding="{Binding Visibility, ElementName=AdvancedOptions_Wheel_Container}" Value="{x:Static Visibility.Visible}">
                        <Setter Property="DataContext" Value="{Binding SelectedItem, ElementName=AdvancedOptions_Wheel}" />
                    </DataTrigger>
                </Style.Triggers>
            </Style>
        </ResourceDictionary>
    </Page.Resources>

    <Grid>
        <!-- Background Blur -->
       <Control Style="{StaticResource A_Style_Control_ScreenBackground}" />

        <local:PlayerBarControl x:Name="TopBar" Style="{StaticResource A_Style_PlayerBarControl}" />
        <ContentControl x:Name="BottomBar" Style="{StaticResource A_Style_ButtonBar}">
            <local:ControllerButtonPanel x:Name="HelpPanel" HorizontalAlignment="Left" VerticalAlignment="Bottom" Background="{x:Null}">
                <local:ControllerButtonControl Button="A" Description="{local:Loc HelpButtons.IDS_Accept}" Reusable="True" />
                <local:ControllerButtonControl Button="B" Description="{local:Loc HelpButtons.IDS_Cancel}" Reusable="True" />
                <local:ControllerButtonControl x:Name="ButtonX" Button="X" Description="{local:Loc HelpButtons.IDS_Basic}" Reusable="True" />
                <local:ControllerButtonControl Button="Y" Description="{local:Loc HelpButtons.IDS_ResetDefault}" Reusable="True" />
            </local:ControllerButtonPanel>
        </ContentControl>

        <Border Style="{StaticResource A_Style_Border_ScenePadding}" SnapsToDevicePixels="True" UseLayoutRounding="True">
            <Grid x:Name="LayoutRoot">
                <VisualStateManager.VisualStateGroups>
                    <VisualStateGroup x:Name="ControllerOptionsStates">
                        <VisualState x:Name="AdvancedOptionsState">
                            <Storyboard>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="AdvancedOptions_Wheel_Container">
                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Collapsed}"/>
                                </ObjectAnimationUsingKeyFrames>
                            </Storyboard>
                        </VisualState>
                        <VisualState x:Name="WheelAdvancedOptionsState">
                            <Storyboard>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="AdvancedOptions_Controller_Container">
                                    <DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Collapsed}"/>
                                </ObjectAnimationUsingKeyFrames>
                            </Storyboard>
                        </VisualState>
                    </VisualStateGroup>
                </VisualStateManager.VisualStateGroups>

                <Grid Style="{StaticResource A_Style_FrameworkElement_ScreenTilt}"
                  Focusable="False">
                    <StackPanel Orientation="Vertical" VerticalAlignment="Center" HorizontalAlignment="Center">
                        <Grid Style="{StaticResource A_Style_FrameworkElement_DefaultTransition_0}" HorizontalAlignment="Left">
                            <ContentControl Tag="{local:Loc ScreenTitles.IDS_MyProfile}" Content="{local:Loc ScreenTitles.IDS_AdvancedControllerOptions}" Style="{StaticResource A_Style_ContentControl_ScreenTitleBlock}" local:BindingProxy.A="/ForzaUI;component/Textures/Anthem/Icons/Titles/Options.png" />
                        </Grid>

                        <DockPanel Style="{StaticResource A_Style_FrameworkElement_DefaultTransition_0}"
                               VerticalAlignment="Top">

                            <ContentControl Content="{Binding (local:BindingProxy.C).Description}"
                                        Style="{StaticResource A_Style_DescriptionPanel_AdvancedControllerOptions}"
                                        local:UIPageTransitionManager.TransitionIndex="1"
                                        DockPanel.Dock="Right"
                                        VerticalAlignment="Top"/>

                            <Grid Style="{StaticResource A_Style_FrameworkElement_DefaultTransition_0}"
                              DockPanel.Dock="Left">

                                <Decorator x:Name="AdvancedOptions_Controller_Container">
                                    <local:CommonListBox x:Name="AdvancedOptions_Controller"
                                                     local:UIPageTransitionManager.TransitionIndex="0"
                                                     KeyboardNavigation.DirectionalNavigation="Contained"
                                                     Style="{StaticResource A_Style_CommonListBox_AdvancedControllerOptions}"
                                                     ItemContainerStyle="{StaticResource A_Style_ListBoxItem_TextMenu_NotFocusable}"
                                                     HorizontalAlignment="Stretch"
                                                     VerticalAlignment="Top"
                                                     Width="824"
                                                     DataContext="{Binding AdvancedControllerOptionsDataSource, RelativeSource={RelativeSource AncestorType=Page}}"
                                                     local:FocusOnPageFocusGained.VirtualizingSelectorSelectedItem="True">
                                        <local:SpinnerControl Style="{StaticResource A_Style_SpinnerControl_AdvancedController}"
                                                              Label="{local:Loc MyProfile.IDS_Option_RumbleSetting}"
                                                              SelectedIndex="{Binding RumbleSetting}"
                                                              ItemsSource="{Binding OnOffOptions}"
                                                              Tag="{Binding RumbleSetting}"
                                                              local:BindingProxy.C="{StaticResource A_DataItem_RumbleSetting}" />
                                        <local:SpinnerControl Style="{StaticResource A_Style_SpinnerControl_AdvancedController_DefaultProfilesOnly}"
                                                              Label="{local:Loc MyProfile.IDS_Option_InvertGearUpDown}"
                                                              SelectedIndex="{Binding InvertGearUpDown}"
                                                              ItemsSource="{Binding OnOffOptions}"
                                                              Tag="{Binding InvertGearUpDown}"
                                                              local:BindingProxy.C="{StaticResource A_DataItem_InvertGearUpDown}" />
                                        <local:SpinnerControl Style="{StaticResource A_Style_SpinnerControl_AdvancedController_DefaultProfilesOnly}"
                                                              Label="{Binding InvertHandbrakeLabel, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}"
                                                              SelectedIndex="{Binding InvertHandbrakeClutch}"
                                                              ItemsSource="{Binding OnOffOptions}"
                                                              Tag="{Binding InvertHandbrakeClutch}"
                                                              local:BindingProxy.C="{StaticResource A_DataItem_InvertHandbreakClutch}" />
                                        <local:SpinnerControl Style="{StaticResource A_Style_SpinnerControl_AdvancedController_DefaultProfilesOnly}"
                                                              Label="{local:Loc MyProfile.IDS_Option_InvertCameraLookBack}"
                                                              SelectedIndex="{Binding InvertCameraLookBack}"
                                                              ItemsSource="{Binding OnOffOptions}"
                                                              local:BindingProxy.C="{StaticResource A_DataItem_InvertCameraLookBack}" />
                                        <local:SpinnerControl Style="{StaticResource A_Style_SpinnerControl_AdvancedController}"
                                                              Label="{local:Loc MyProfile.IDS_Option_InvertCameraVertical}"
                                                              SelectedIndex="{Binding InvertVerticalCamera}"
                                                              ItemsSource="{Binding OnOffOptions}"
                                                              local:BindingProxy.C="{StaticResource A_DataItem_InvertCameraVertical}" />
                                        <local:SpinnerControl Style="{StaticResource A_Style_SpinnerControl_AdvancedController_DefaultProfilesOnly}"
                                                              Label="{local:Loc MyProfile.IDS_Option_InvertAnnaTelemetry}"
                                                              SelectedIndex="{Binding InvertAnnaTelemetry}"
                                                              ItemsSource="{Binding ANNATelemetryTTSOptions}"
                                                              local:BindingProxy.C="{StaticResource A_DataItem_InvertAnnaTelemetry}" />
                                        <local:SpinnerControl Style="{StaticResource A_Style_SpinnerControl_AdvancedController_DefaultProfilesOnly}"
                                                              Label="{local:Loc MyProfile.IDS_Option_InvertHornPhotoMode}"
                                                              SelectedIndex="{Binding InvertHornPhotoMode}"
                                                              ItemsSource="{Binding OnOffOptions}"
                                                              local:BindingProxy.C="{StaticResource A_DataItem_InvertHornPhotoMode}" />
                                        <local:SpinnerControl Style="{StaticResource A_Style_SpinnerControl_AdvancedController_PCOnly}"
                                                              Label="{local:Loc MyProfile.IDS_AdvancedOption_MouseFreeLook}"
                                                              SelectedIndex="{Binding MouseFreeLook}"
                                                              ItemsSource="{Binding OnOffOptions}"
                                                              DataContext="{Binding AdvancedControllerOptionsDataSource, RelativeSource={RelativeSource AncestorType=Page}}"
                                                              local:BindingProxy.C="{StaticResource A_DataItem_MouseFreeLook}" />
                                        <Slider Maximum="0.8"
                                                Value="{Binding SteeringAxisDeadzone.DeadzoneInside}"
                                                local:BindingProxy.C="{StaticResource A_DataItem_SteeringAxisI}"
                                                Tag="{StaticResource A_DataItem_SteeringAxisI}"
                                                Style="{StaticResource A_Style_Slider_Options_InItemsList}" />
                                        <Slider Minimum="0.2"
                                                Value="{Binding SteeringAxisDeadzone.DeadzoneOutside}"
                                                local:BindingProxy.C="{StaticResource A_DataItem_SteeringAxisO}"
                                                Tag="{StaticResource A_DataItem_SteeringAxisO}"
                                                Style="{StaticResource A_Style_Slider_Options_InItemsList}" />
                                        <Slider Value="{Binding SteeringLinearity}"
                                                local:BindingProxy.C="{StaticResource A_DataItem_SteeringLinearity}"
                                                Tag="{StaticResource A_DataItem_SteeringLinearity}"
                                                Style="{StaticResource A_Style_Slider_Options_InItemsList}" />
                                        <Slider Maximum="0.8"
                                                Value="{Binding ThrottleDeadzone.DeadzoneInside}"
                                                local:BindingProxy.C="{StaticResource A_DataItem_ThrottleI}"
                                                Tag="{StaticResource A_DataItem_ThrottleI}"
                                                Style="{StaticResource A_Style_Slider_Options_InItemsList}" />
                                        <Slider Minimum="0.2"
                                                Value="{Binding ThrottleDeadzone.DeadzoneOutside}"
                                                local:BindingProxy.C="{StaticResource A_DataItem_ThrottleO}"
                                                Tag="{StaticResource A_DataItem_ThrottleO}"
                                                Style="{StaticResource A_Style_Slider_Options_InItemsList}" />
                                        <Slider Maximum="0.8"
                                                Value="{Binding BrakeDeadzone.DeadzoneInside}"
                                                local:BindingProxy.C="{StaticResource A_DataItem_BrakeI}"
                                                Tag="{StaticResource A_DataItem_BrakeI}"
                                                Style="{StaticResource A_Style_Slider_Options_InItemsList}" />
                                        <Slider Minimum="0.2"
                                                Value="{Binding BrakeDeadzone.DeadzoneOutside}"
                                                local:BindingProxy.C="{StaticResource A_DataItem_BrakeO}"
                                                Tag="{StaticResource A_DataItem_BrakeO}"
                                                Style="{StaticResource A_Style_Slider_Options_InItemsList}" />
                                        <Slider Maximum="0.8"
                                                Value="{Binding ClutchDeadzone.DeadzoneInside}"
                                                local:BindingProxy.C="{StaticResource A_DataItem_ClutchI}"
                                                Tag="{StaticResource A_DataItem_ClutchI}"
                                                Style="{StaticResource A_Style_Slider_Options_InItemsList}" />
                                        <Slider Minimum="0.2"
                                                Value="{Binding ClutchDeadzone.DeadzoneOutside}"
                                                local:BindingProxy.C="{StaticResource A_DataItem_ClutchO}"
                                                Tag="{StaticResource A_DataItem_ClutchO}"
                                                Style="{StaticResource A_Style_Slider_Options_InItemsList}" />
                                        <Slider Maximum="0.8"
                                                Value="{Binding HandbrakeDeadzone.DeadzoneInside}"
                                                local:BindingProxy.C="{StaticResource A_DataItem_HandbrakeI}"
                                                Tag="{StaticResource A_DataItem_HandbrakeI}"
                                                Style="{StaticResource A_Style_Slider_Options_InItemsList}" />
                                        <Slider Minimum="0.2"
                                                Value="{Binding HandbrakeDeadzone.DeadzoneOutside}"
                                                local:BindingProxy.C="{StaticResource A_DataItem_HandbrakeO}"
                                                Tag="{StaticResource A_DataItem_HandbrakeO}"
                                                Style="{StaticResource A_Style_Slider_Options_InItemsList}" />
                                        <Slider Value="{Binding RumbleScale}"
                                                local:BindingProxy.C="{StaticResource A_DataItem_RumbleScale}"
                                                Tag="{StaticResource A_DataItem_RumbleScale}"
                                                Style="{StaticResource A_Style_Slider_Options_InItemsList}" />
                                    </local:CommonListBox>
                                </Decorator>

                                <Decorator x:Name="AdvancedOptions_Wheel_Container">
                                    <local:CommonListBox x:Name="AdvancedOptions_Wheel"
                                                     local:UIPageTransitionManager.TransitionIndex="0"
                                                     KeyboardNavigation.DirectionalNavigation="Contained"
                                                     Style="{StaticResource A_Style_CommonListBox_AdvancedControllerOptions}"
                                                     ItemContainerStyle="{StaticResource A_Style_ListBoxItem_TextMenu_NotFocusable}"
                                                     HorizontalAlignment="Stretch"
                                                     VerticalAlignment="Top"
                                                     Width="824"
                                                     DataContext="{Binding AdvancedControllerOptionsDataSource, RelativeSource={RelativeSource AncestorType=Page}}"
                                                     local:FocusOnPageFocusGained.VirtualizingSelectorSelectedItem="True">
                                        <local:SpinnerControl Style="{StaticResource A_Style_SpinnerControl_AdvancedController}"
                                                              Label="{local:Loc MyProfile.IDS_Option_RumbleSetting}"
                                                              SelectedIndex="{Binding RumbleSetting}"
                                                              ItemsSource="{Binding OnOffOptions}"
                                                              Tag="{Binding RumbleSetting}"
                                                              local:BindingProxy.C="{StaticResource A_DataItem_RumbleSetting}" />
                                        <local:SpinnerControl Style="{StaticResource A_Style_SpinnerControl_AdvancedController_XboxOnly_DefaultProfilesOnly}"
                                                              Label="{local:Loc MyProfile.IDS_Option_InvertGearUpDown}"
                                                              SelectedIndex="{Binding InvertGearUpDown}"
                                                              ItemsSource="{Binding OnOffOptions}"
                                                              Tag="{Binding InvertGearUpDown}"
                                                              local:BindingProxy.C="{StaticResource A_DataItem_InvertGearUpDown}" />
                                        <local:SpinnerControl Style="{StaticResource A_Style_SpinnerControl_AdvancedController_XboxOnly_DefaultProfilesOnly}"
                                                              Label="{Binding InvertHandbrakeLabel, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}"
                                                              SelectedIndex="{Binding InvertHandbrakeClutch}"
                                                              ItemsSource="{Binding OnOffOptions}"
                                                              Tag="{Binding InvertHandbrakeClutch}"
                                                              local:BindingProxy.C="{StaticResource A_DataItem_InvertHandbreakClutch}" />
                                        <local:SpinnerControl Style="{StaticResource A_Style_SpinnerControl_AdvancedController_XboxOnly_DefaultProfilesOnly}"
                                                              Label="{local:Loc MyProfile.IDS_Option_InvertCameraLookBack}"
                                                              SelectedIndex="{Binding InvertCameraLookBack}"
                                                              ItemsSource="{Binding OnOffOptions}"
                                                              local:BindingProxy.C="{StaticResource A_DataItem_InvertCameraLookBack}" />
                                        <local:SpinnerControl Style="{StaticResource A_Style_SpinnerControl_AdvancedController_XboxOnly}"
                                                              Label="{local:Loc MyProfile.IDS_Option_InvertCameraVertical}"
                                                              SelectedIndex="{Binding InvertVerticalCamera}"
                                                              ItemsSource="{Binding OnOffOptions}"
                                                              local:BindingProxy.C="{StaticResource A_DataItem_InvertCameraVertical}" />
                                        <local:SpinnerControl Style="{StaticResource A_Style_SpinnerControl_AdvancedController_XboxOnly_DefaultProfilesOnly}"
                                                              Label="{local:Loc MyProfile.IDS_Option_InvertAnnaTelemetry}"
                                                              SelectedIndex="{Binding InvertAnnaTelemetry}"
                                                              ItemsSource="{Binding ANNATelemetryTTSOptions}"
                                                              local:BindingProxy.C="{StaticResource A_DataItem_InvertAnnaTelemetry}" />
                                        <local:SpinnerControl Style="{StaticResource A_Style_SpinnerControl_AdvancedController_XboxOnly_DefaultProfilesOnly}"
                                                              Label="{local:Loc MyProfile.IDS_Option_InvertHornPhotoMode}"
                                                              SelectedIndex="{Binding InvertHornPhotoMode}"
                                                              ItemsSource="{Binding OnOffOptions}"
                                                              local:BindingProxy.C="{StaticResource A_DataItem_InvertHornPhotoMode}" />
                                        <local:SpinnerControl x:Name="MouseFreeLook"
                                                              Style="{StaticResource A_Style_SpinnerControl_AdvancedController_PCOnly}"
                                                              Label="{local:Loc MyProfile.IDS_AdvancedOption_MouseFreeLook}"
                                                              SelectedIndex="{Binding MouseFreeLook}"
                                                              ItemsSource="{Binding OnOffOptions}"
                                                              DataContext="{Binding AdvancedControllerOptionsDataSource, RelativeSource={RelativeSource AncestorType=Page}}"
                                                              local:BindingProxy.C="{StaticResource A_DataItem_MouseFreeLook}" />
                                        <local:SpinnerControl Style="{StaticResource A_Style_SpinnerControl_AdvancedController_PCOnly}"
                                                              Label="{local:Loc MyProfile.IDS_AdvancedOption_ForceFeedbackInvert}"
                                                              SelectedIndex="{Binding ForceFeedbackInvert}"
                                                              ItemsSource="{Binding OnOffOptions}"
                                                              Tag="{Binding ForceFeedbackInvert}"
                                                              DataContext="{Binding AdvancedControllerOptionsDataSource, RelativeSource={RelativeSource AncestorType=Page}}"
                                                              local:BindingProxy.C="{StaticResource A_DataItem_ForceFeedbackInvert}" />
                                        <Slider Maximum="0.8"
                                                Value="{Binding SteeringAxisDeadzone.DeadzoneInside}"
                                                local:BindingProxy.C="{StaticResource A_DataItem_SteeringAxisI}"
                                                Tag="{StaticResource A_DataItem_SteeringAxisI}"
                                                Style="{StaticResource A_Style_Slider_Options_InItemsList}" />
                                        <Slider Minimum="0.2"
                                                Value="{Binding SteeringAxisDeadzone.DeadzoneOutside}"
                                                local:BindingProxy.C="{StaticResource A_DataItem_SteeringAxisO}"
                                                Tag="{StaticResource A_DataItem_SteeringAxisO}"
                                                Style="{StaticResource A_Style_Slider_Options_InItemsList}" />
                                        <Slider Value="{Binding SteeringLinearity}"
                                                local:BindingProxy.C="{StaticResource A_DataItem_SteeringLinearity}"
                                                Tag="{StaticResource A_DataItem_SteeringLinearity}"
                                                Style="{StaticResource A_Style_Slider_Options_InItemsList}" />
                                        <Slider Maximum="0.8"
                                                Value="{Binding ThrottleDeadzone.DeadzoneInside}"
                                                local:BindingProxy.C="{StaticResource A_DataItem_ThrottleI}"
                                                Tag="{StaticResource A_DataItem_ThrottleI}"
                                                Style="{StaticResource A_Style_Slider_Options_InItemsList}" />
                                        <Slider Minimum="0.2"
                                                Value="{Binding ThrottleDeadzone.DeadzoneOutside}"
                                                local:BindingProxy.C="{StaticResource A_DataItem_ThrottleO}"
                                                Tag="{StaticResource A_DataItem_ThrottleO}"
                                                Style="{StaticResource A_Style_Slider_Options_InItemsList}" />
                                        <Slider Maximum="0.8"
                                                Value="{Binding BrakeDeadzone.DeadzoneInside}"
                                                local:BindingProxy.C="{StaticResource A_DataItem_BrakeI}"
                                                Tag="{StaticResource A_DataItem_BrakeI}"
                                                Style="{StaticResource A_Style_Slider_Options_InItemsList}" />
                                        <Slider Minimum="0.2"
                                                Value="{Binding BrakeDeadzone.DeadzoneOutside}"
                                                local:BindingProxy.C="{StaticResource A_DataItem_BrakeO}"
                                                Tag="{StaticResource A_DataItem_BrakeO}"
                                                Style="{StaticResource A_Style_Slider_Options_InItemsList}" />
                                        <Slider Maximum="0.8"
                                                Value="{Binding ClutchDeadzone.DeadzoneInside}"
                                                local:BindingProxy.C="{StaticResource A_DataItem_ClutchI}"
                                                Tag="{StaticResource A_DataItem_ClutchI}"
                                                Style="{StaticResource A_Style_Slider_Options_InItemsList}" />
                                        <Slider Minimum="0.2"
                                                Value="{Binding ClutchDeadzone.DeadzoneOutside}"
                                                local:BindingProxy.C="{StaticResource A_DataItem_ClutchO}"
                                                Tag="{StaticResource A_DataItem_ClutchO}"
                                                Style="{StaticResource A_Style_Slider_Options_InItemsList}" />
                                        <Slider Maximum="0.8"
                                                Value="{Binding HandbrakeDeadzone.DeadzoneInside}"
                                                local:BindingProxy.C="{StaticResource A_DataItem_HandbrakeI}"
                                                Tag="{StaticResource A_DataItem_HandbrakeI}"
                                                Style="{StaticResource A_Style_Slider_Options_InItemsList}" />
                                        <Slider Minimum="0.2"
                                                Value="{Binding HandbrakeDeadzone.DeadzoneOutside}"
                                                local:BindingProxy.C="{StaticResource A_DataItem_HandbrakeO}"
                                                Tag="{StaticResource A_DataItem_HandbrakeO}"
                                                Style="{StaticResource A_Style_Slider_Options_InItemsList}" />
                                        <Slider Value="{Binding RumbleScale}"
                                                local:BindingProxy.C="{StaticResource A_DataItem_RumbleScale}"
                                                Tag="{StaticResource A_DataItem_RumbleScale}"
                                                Style="{StaticResource A_Style_Slider_Options_InItemsList}" />
                                        <Slider Value="{Binding ForceFeedbackScale}"
                                                local:BindingProxy.C="{StaticResource A_DataItem_ForceFeedback}"
                                                Tag="{StaticResource A_DataItem_ForceFeedback}"
                                                Style="{StaticResource A_Style_Slider_Options_InItemsList}" />
                                        <Slider Value="{Binding SteeringWheelCenterSpringScale}"
                                                local:BindingProxy.C="{StaticResource A_DataItem_SteeringWheelCenterSpringScale}"
                                                Tag="{StaticResource A_DataItem_SteeringWheelCenterSpringScale}"
                                                Style="{StaticResource A_Style_Slider_AdvancedController_ExtendedRange}" />
                                        <Slider Value="{Binding SteeringWheelDamperScale}"
                                                local:BindingProxy.C="{StaticResource A_DataItem_SteeringWheelDamperScale}"
                                                Tag="{StaticResource A_DataItem_SteeringWheelDamperScale}"
                                                Style="{StaticResource A_Style_Slider_AdvancedController_ExtendedRange}" />
                                        <Slider Value="{Binding ForceFeedbackUndersteerFactor}"
                                                local:BindingProxy.C="{StaticResource A_DataItem_ForceFeedbackUndersteerFactor}"
                                                Tag="{StaticResource A_DataItem_ForceFeedbackUndersteerFactor}"
                                                Style="{StaticResource A_Style_Slider_Options_InItemsList}" />
                                        <Slider Value="{Binding ForceFeedbackLinearityFactor}"
                                                local:BindingProxy.C="{StaticResource A_DataItem_ForceFeedbackLinearityFactor}"
                                                Tag="{StaticResource A_DataItem_ForceFeedbackLinearityFactor}"
                                                Style="{StaticResource A_Style_Slider_Options_InItemsList}" />
                                        <Slider Value="{Binding SteeringWheelSteeringSensitivity}"
                                                local:BindingProxy.C="{StaticResource A_DataItem_SteeringWheelSteeringSensitivity}"
                                                Tag="{StaticResource A_DataItem_SteeringWheelSteeringSensitivity}"
                                                Style="{StaticResource A_Style_Slider_AdvancedController_PCOnly}" />
                                        <Slider x:Name="SteeringWheelRotationAngle"
                                                Value="{Binding SteeringWheelRotationAngle}"
                                                local:BindingProxy.C="{StaticResource A_DataItem_SteeringWheelRotationAngle}"
                                                Tag="{StaticResource A_DataItem_SteeringWheelRotationAngle}"
                                                Style="{StaticResource A_Style_Slider_Options_WheelRotationAngle_Custom}"/>
                                    </local:CommonListBox>
                                </Decorator>
                            </Grid>
                        </DockPanel>
                    </StackPanel>
                </Grid>

                <local:EventFire x:Name="EventFireStoryboard" TargetName="LayoutRoot"/>
            </Grid>
        </Border>
    </Grid>
</Page>