<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.Scenes.Anthem.A_AssistOptions"
      mc:Ignorable="d"
      Style="{StaticResource A_Style_Page_Generic}"
      FlowDirection="LeftToRight"
      DataContext="{Binding RelativeSource={RelativeSource Self}}"
      >

    <local:UIPageTransitionManager.TransitionManager>
        <local:UIPageTransitionManager DurationSpread="{StaticResource A_Duration_Transition_Spread}" TransitionDelay="{StaticResource A_Duration_Transition_Delay}"/>
    </local:UIPageTransitionManager.TransitionManager>

    <Page.Resources>
        <ResourceDictionary>
            <local:NumUnitConverter x:Key="A_Assist_NumUnitConverter_TotalRaceBonus" FractionDigits="0" ShowUnit="True" PositiveSign="True"/>

            <Style x:Key="A_Style_StackPanel_Assists_DescriptionBlock" TargetType="StackPanel" BasedOn="{StaticResource A_Style_StackPanel_DescriptionBlock}">
                <Setter Property="Width" Value="380" />
                <Setter Property="Orientation" Value="Vertical" />
            </Style>

            <Style x:Key="A_Style_ContentControl_Assists_Description_Header" TargetType="ContentControl" BasedOn="{StaticResource A_Style_ContentControl_Header}">
                <Setter Property="Height" Value="84" />
            </Style>
        
            <Style x:Key="A_Style_FZMaterial_AssistsDescriptionBlockContent" BasedOn="{StaticResource A_Style_FZMaterial_Panel_Background}" TargetType="local:FZMaterial">
                <Setter Property="Height" Value="247" />
                <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetGlass_Standard}" />
            </Style>

            <Style x:Key="A_Style_FZTextBlock_AssistsDescriptionBlockBody" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_Body}" >
                <Setter Property="Color" Value="{StaticResource A_Color_Header_Text}" />
            </Style>

            <Style x:Key="A_Style_FZTextBlock_TotalRaceBonusBody" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_Heading_Large}" >
                <Setter Property="Color" Value="{StaticResource A_Color_Header_Text}"/>
                <Setter Property="HorizontalAlignment" Value="Center"/>
                <Setter Property="VerticalAlignment" Value="Center"/>
            </Style>

            <Style x:Key="A_Style_Grid_AssistList" TargetType="{x:Type Grid}">
                <Setter Property="Height" Value="550"/>
                <Setter Property="Width" Value="734"/>
                <Setter Property="HorizontalAlignment" Value="Left" />
                <Setter Property="Margin" Value="0, 0, 6, 0"/>
            </Style>

            <Style x:Key="A_Style_Assist_TotalRaceBonus_Circle" 
                   TargetType="{x:Type Control}" 
                   BasedOn="{StaticResource A_Style_Control_Circle}">
                <Setter Property="Tag" Value="{StaticResource A_Color_TileSelected_Background}"/>
                <Setter Property="HorizontalAlignment" Value="Center"/>
                <Setter Property="VerticalAlignment" Value="Center"/>
                <Setter Property="Width" Value="132"/>
                <Setter Property="Height" Value="132"/>
            </Style>
        </ResourceDictionary>
    </Page.Resources>

    <Grid>
        <ContentControl x:Name="BottomBar" Style="{StaticResource A_Style_ButtonBar}">
            <ContentControl x:Name="DefaultHelpPanel"
				    local:ControllerButtonPanel.ADescription="{local:Loc HelpButtons.IDS_Accept}"
				    local:ControllerButtonPanel.BDescription="{local:Loc HelpButtons.IDS_Back}"
				    Style="{StaticResource A_Style_ContentControl_DefaultButtonBar}" />
        </ContentControl>
        
    <Border x:Name="LayoutRoot" Style="{StaticResource A_Style_Border_ScenePadding}">
        <Grid>
            <StackPanel Margin="0,-86,0,0" VerticalAlignment="Center" HorizontalAlignment="Center">
                <ContentControl Style="{StaticResource A_Style_ContentControl_ScreenTilt}" >
                    <StackPanel Orientation="Vertical">
                        <StackPanel Orientation="Horizontal" Margin="0,0,3,9" Style="{StaticResource A_Style_FrameworkElement_DefaultTransition_0}">
                            <ContentControl Content="{local:Loc ScreenTitles.IDS_Difficulty}" Style="{StaticResource A_Style_ContentControl_ScreenTitleBlock}" />
                        </StackPanel>

                        <StackPanel Orientation="Horizontal" Style="{StaticResource A_Style_FrameworkElement_DefaultTransition_0}">
                            
                            <Grid Style="{StaticResource A_Style_Grid_AssistList}" local:UIPageTransitionManager.TransitionIndex="0" >
                                <local:CommonListBox x:Name="ListBox_Assists"
                                             KeyboardNavigation.DirectionalNavigation="Contained" 
                                             Style="{StaticResource A_Style_ListBox_List_Default}" 
                                             ItemContainerStyle="{StaticResource A_Style_ListBoxItem_TextMenu_NotFocusable}" 
                                             Margin="0,0,0,0"
                                             HorizontalAlignment="Stretch"
                                             VerticalAlignment="Stretch">
									<local:SpinnerControl x:Name="Shifting"
                                                  Label="{local:Loc Assists.IDS_Shifting}"
                                                  ItemsSource="{Binding ShiftingOptions}"
                                                  Style="{StaticResource A_Style_SpinnerControl_Default}"
                                                  SelectedIndex="{Binding Shifting}"
                                                  Tag="{local:Loc Assists.IDS_Desc_Shifting}"/>
                                    <local:SpinnerControl x:Name="SuggestedLine"
                                                  Label="{local:Loc Assists.IDS_DrivingLine}"
                                                  ItemsSource="{Binding SuggestedLineOptions}"
                                                  Style="{StaticResource A_Style_SpinnerControl_Default}"
                                                  SelectedIndex="{Binding SuggestedLine}"
                                                  Tag="{local:Loc Assists.IDS_Desc_SuggestedLine}"/>		
									<local:SpinnerControl x:Name="Braking"
                                                  Label="{local:Loc Assists.IDS_Braking}"
                                                  ItemsSource="{Binding BrakingOptions}"
                                                  Style="{StaticResource A_Style_SpinnerControl_Default}"
                                                  SelectedIndex="{Binding Braking}"
                                                  Tag="{local:Loc Assists.IDS_Desc_Braking}"/>
                                    <local:SpinnerControl x:Name="TractionControl"
                                                  Label="{local:Loc Assists.IDS_TractionControl}"
                                                  ItemsSource="{Binding TractionControlOptions}"
                                                  Style="{StaticResource A_Style_SpinnerControl_Default}"
                                                  SelectedIndex="{Binding TractionControl}"
                                                  Tag="{local:Loc Assists.IDS_Desc_TractionControl}"/>
                                    <local:SpinnerControl x:Name="StabilityControl"
                                                  Label="{local:Loc Assists.IDS_StabilityControl}"
                                                  ItemsSource="{Binding StabilityControlOptions}"
                                                  Style="{StaticResource A_Style_SpinnerControl_Default}"
                                                  SelectedIndex="{Binding StabilityControl}"
                                                  Tag="{local:Loc Assists.IDS_Desc_StabilityControl}"/>												  
                                    <local:SpinnerControl x:Name="Steering"
                                                  Label="{local:Loc Assists.IDS_Steering}"
                                                  ItemsSource="{Binding SteeringOptions}"
                                                  Style="{StaticResource A_Style_SpinnerControl_Default}"
                                                  SelectedIndex="{Binding Steering}"
                                                  Tag="{local:Loc Assists.IDS_Desc_Steering}"/>
                                </local:CommonListBox>
                            </Grid>
                            <StackPanel Orientation="Vertical">
                                
                                <StackPanel Style="{StaticResource A_Style_StackPanel_Assists_DescriptionBlock}" local:UIPageTransitionManager.TransitionIndex="0" >
                                    <ContentControl Content="{local:Loc Assists.IDS_Title_Description}" Style="{StaticResource A_Style_ContentControl_Assists_Description_Header}" />
                                    
                                    <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_AssistsDescriptionBlockContent}">
                                        <local:AutoScrollPanel Style="{StaticResource A_Style_AutoScrollPanel_Masked}" Margin="30, 20" DataContext="{Binding SelectedItem, ElementName=ListBox_Assists}" >
                                            <local:FZTextBlock x:Name="TextBlock_FocusedDescription" Style="{StaticResource A_Style_FZTextBlock_AssistsDescriptionBlockBody}" Text="{Binding Tag}" TextWrapping="Wrap" />
                                        </local:AutoScrollPanel>
                                    </local:FZMaterial>
                                </StackPanel>
                                
                            </StackPanel>
                        </StackPanel>
                    </StackPanel>
                </ContentControl>
            </StackPanel>
        </Grid>
    </Border>
    </Grid>
</Page>