<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:System="clr-namespace:System;assembly=mscorlib"
      xmlns:local="clr-namespace:ForzaUI;assembly="
      x:Class="ForzaUI.A_RouteBlueprintHud"
      x:Name="Page"
      WindowTitle="Page"
      FlowDirection="LeftToRight"
      Style="{StaticResource A_Style_Page_Generic}"
      DataContext="{Binding RelativeSource={x:Static RelativeSource.Self}}">

    <Page.Resources>
        <ResourceDictionary>

            <local:LinearTransformConverter x:Key="A_TransformConverter_LengthRatio" Scale="356"/>

            <Color x:Key="A_Color_Green_Bar">#3AA679</Color>
            <Color x:Key="A_Color_Red_Bar">#B8546C</Color>
            <Color x:Key="A_Color_Orange_Bar">#D9A43B</Color>
            <Color x:Key="A_Color_LayerNumberText">#FF444444</Color>
            <Color x:Key="A_Color_Prop_IconBackground">#FF00B592</Color>
            <Color x:Key="A_Color_Prop_NoMemBackground">#00FFFFFF</Color>

            <Style x:Key="A_Style_FZRun_HIGHLIGHT" TargetType="{x:Type local:FZRun}">
                <Setter Property="Color" Value="{StaticResource A_Color_HUD_HighlightText}"/>
            </Style>

            <Style x:Key="A_Style_FZMaterial_PropBar" TargetType="local:FZMaterial">
                <Style.Triggers>
                    <DataTrigger Binding="{Binding PropsPlacedRatio, Converter={CompareConverter}, ConverterParameter=0.5}" Value="{Static CompareResult.LessThan}">
                        <Setter Property="Color" Value="{StaticResource A_Color_Green_Bar}"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding PropsPlacedRatio, Converter={CompareConverter}, ConverterParameter=0.5}" Value="{Static CompareResult.Equal}">
                        <Setter Property="Color" Value="{StaticResource A_Color_Orange_Bar}"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding PropsPlacedRatio, Converter={CompareConverter}, ConverterParameter=0.5}" Value="{Static CompareResult.GreaterThan}">
                        <Setter Property="Color" Value="{StaticResource A_Color_Orange_Bar}"/>
                    </DataTrigger>
                    <DataTrigger Binding="{Binding PropsPlacedRatio, Converter={CompareConverter}, ConverterParameter=0.94}" Value="{Static CompareResult.GreaterThan}">
                        <Setter Property="Color" Value="{StaticResource A_Color_Red_Bar}"/>
                    </DataTrigger>
                </Style.Triggers>
            </Style>

            <Style x:Key="A_Style_FZMaterial_FlatPanel_IconBackground" TargetType="{x:Type local:FZMaterial}" BasedOn="{StaticResource A_Style_FZMaterial_FlatPanel_Tile}">
                <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_InnerAll}"/>
                <Setter Property="Color" Value="{StaticResource A_Color_Prop_IconBackground}"/>
            </Style>

            <Style x:Key="A_Style_FZMaterial_FlatPanel_NoMemBackground" TargetType="{x:Type local:FZMaterial}" BasedOn="{StaticResource A_Style_FZMaterial_FlatPanel_Tile}">
                <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_InnerAll}"/>
                <Setter Property="Color" Value="{StaticResource A_Color_Prop_NoMemBackground}"/>
            </Style>

            <!-- prop item style -->
            <local:MappingConverter x:Key="A_MappingConverter_NoPropMemory_Visibility" Default="Collapsed">
                <local:MappingConverterEntry Key="{x:Static local:PropState.NoMoreMemory}" Value="{x:Static Visibility.Visible}" />
            </local:MappingConverter>

            <local:MappingConverter x:Key="A_MappingConverter_PrecisionToggle_Color" Default="{StaticResource A_Color_Prop_NoMemBackground}">
                <local:MappingConverterEntry Key="True" Value="{StaticResource A_Color_Prop_IconBackground}"/>
                <local:MappingConverterEntry Key="False" Value="{StaticResource A_Color_Prop_NoMemBackground}"/>
            </local:MappingConverter>            

            <DataTemplate x:Key="A_DataTemplate_Layer">
                <Grid x:Name="Grid_Container">
                    <Grid RenderTransformOrigin="0.5,0.5" local:ZPanel.ZOffset="0">
                        <Grid Visibility="{Binding IsCreateNew, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}}">
                            <local:FZMaterial x:Name="Checkerboard" ImageSource="/ForzaUI;component/Textures/Anthem/Paintshop/Checkerboard.png" Opacity="0.15" Color="Black" Style="{StaticResource A_Style_FZMaterial_FlatPanel_Tile}"/>
                        </Grid>

                        <Grid>
                            <!-- Visibility="{Binding IsLayer, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"> -->
                            <local:FZMaterial x:Name="FzMaterial_LiveryShape"
                                          Margin="0">
                                <local:FZMaterial.Effect>
                                    <local:LinearToSRGBEffect>
                                        <local:LinearToSRGBEffect.Input>
                                            <ImageBrush ImageSource="{Binding Image}"/>
                                        </local:LinearToSRGBEffect.Input>
                                    </local:LinearToSRGBEffect>
                                </local:FZMaterial.Effect>
                            </local:FZMaterial>

                            <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Bottom">
                                <local:FZMaterial Margin="0,0,4,4" Style="{StaticResource A_Style_FZMaterial_FlatPanel_NoMemBackground}"
                                    Visibility="{Binding State, Converter={StaticResource A_MappingConverter_NoPropMemory_Visibility}}">
                                    <local:FZMaterial Width="56" Height="56" ImageSource="/ForzaUI;component/Textures/Data_Bound/PropPlacement/Cross_Icon.png" />                                    
                                </local:FZMaterial>
                            </StackPanel>

                            <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Bottom">
                                <local:FZMaterial Margin="0,0,4,4" Style="{StaticResource A_Style_FZMaterial_FlatPanel_IconBackground}" Visibility="{Binding IsLocked, Converter={StaticResource A_FZBooleanToVisibilityConverter}}">
                                    <local:FZMaterial Width="32" Height="32" ImageSource="/ForzaUI;component/Textures/Anthem/Paintshop/Lock.png" />                                    
                                </local:FZMaterial>
                            </StackPanel>
                        </Grid>
                    </Grid>
                </Grid>
            </DataTemplate>

            <!-- clipboard style -->
            <ControlTemplate x:Key="A_ControlTemplate_ClipboardItem">
                <Grid Height="193" Width="193"
                      Visibility="{Binding IsVisible, Converter={StaticResource A_FZBooleanToVisibilityConverter}}">

                    <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_GlassPanel_NonInteractive}"  Preset="{StaticResource A_FZMaterialPresetGlassRoundtangle_GlassPanel_OuterAll}"/>

                    <local:FZMaterial x:Name="Checkerboard"
                                      ImageSource="/ForzaUI;component/Textures/Anthem/Paintshop/Checkerboard.png"
                                      Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterAll}"
                                      Opacity="0.2" />

                    <local:FZMaterial x:Name="FzMaterial_LiveryShape" Margin="30">
                        <local:FZMaterial.Effect>
                            <local:LinearToSRGBEffect>
                                <local:LinearToSRGBEffect.Input>
                                    <ImageBrush ImageSource="{Binding Image}"/>
                                </local:LinearToSRGBEffect.Input>
                            </local:LinearToSRGBEffect>
                        </local:FZMaterial.Effect>
                    </local:FZMaterial>

                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,0,4">
                        <local:FZMaterial Margin="0,0,4,0" Style="{StaticResource A_Style_FZMaterial_FlatPanel_IconBackground}">
                            <local:FZMaterial Width="32" Height="32" ImageSource="/ForzaUI;component/Textures/Anthem/Paintshop/Lock.png"
                                                    Visibility="{Binding IsLocked, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"/>
                        </local:FZMaterial>
                    </StackPanel>
                </Grid>
            </ControlTemplate>

            <local:MappingConverter x:Key="A_MappingConverter_SelectionControls_Visibility" Default="Collapsed">
                <local:MappingConverterEntry Key="{x:Static local:PropHudState.SelectingProp}" Value="{x:Static Visibility.Visible}" />
            </local:MappingConverter>

            <local:MappingConverter x:Key="A_MappingConverter_TransformControls_Visibility" Default="Collapsed">
                <local:MappingConverterEntry Key="{x:Static local:PropHudState.TransformingProp}" Value="{x:Static Visibility.Visible}" />
            </local:MappingConverter>

            <local:MappingConverter x:Key="A_MappingConverter_BrowsingProps_Visibility" Default="Collapsed">
                <local:MappingConverterEntry Key="{x:Static local:PropHudState.BrowsingPropItems}" Value="{x:Static Visibility.Visible}" />
            </local:MappingConverter>
                        
            <local:MappingConverter x:Key="A_MappingConverter_Reticule_Image" Default="/ForzaUI;component/Textures/Data_Bound/PropPlacement/HUD_Reticle_Active.png">
                <local:MappingConverterEntry Key="{x:Static local:HUDReticuleState.Idle}" Value="/ForzaUI;component/Textures/Data_Bound/PropPlacement/HUD_Reticle_Active.png"/>
                <local:MappingConverterEntry Key="{x:Static local:HUDReticuleState.CantPlace}" Value="/ForzaUI;component/Textures/Data_Bound/PropPlacement/HUD_Reticle_Blocked.png"/>
                <local:MappingConverterEntry Key="{x:Static local:HUDReticuleState.Highlighting}" Value="/ForzaUI;component/Textures/Data_Bound/PropPlacement/HUD_Reticle_Pickup.png"/>
            </local:MappingConverter>
            
            <local:MappingConverter x:Key="A_MappingConverter_ReticuleIdle_Visibility" Default="Collapsed">
                <local:MappingConverterEntry Key="{x:Static local:HUDReticuleState.Idle}" Value="{x:Static Visibility.Visible}"/>
            </local:MappingConverter>            
            <local:MappingConverter x:Key="A_MappingConverter_ReticuleCantPlace_Visibility" Default="Collapsed">
                <local:MappingConverterEntry Key="{x:Static local:HUDReticuleState.CantPlace}" Value="{x:Static Visibility.Visible}"/>
            </local:MappingConverter>            
            <local:MappingConverter x:Key="A_MappingConverter_ReticuleHighlight_Visibility" Default="Collapsed">
                <local:MappingConverterEntry Key="{x:Static local:HUDReticuleState.Highlighting}" Value="{x:Static Visibility.Visible}"/>
            </local:MappingConverter>

            <local:MappingConverter x:Key="A_Converter_BooleanToToggleIconImageSource" Default="/ForzaUI;component/Textures/Anthem/Icons/TiledMenus/Toggle_Disabled.png">
                <local:MappingConverterEntry Key="True" Value="/ForzaUI;component/Textures/Anthem/Icons/TiledMenus/Toggle_Enabled.png"/>
                <local:MappingConverterEntry Key="False" Value="/ForzaUI;component/Textures/Anthem/Icons/TiledMenus/Toggle_Disabled.png"/>
            </local:MappingConverter>

            <Style x:Key="A_Style_ControllerButtonControl_CollapsedDescription"
                   TargetType="{x:Type local:ControllerButtonControl}"
                   BasedOn="{StaticResource A_Style_ControllerButtonControl_Default_ShowAlways}">
                <Setter Property="Margin" Value="0" />
                <Style.Triggers>
                    <DataTrigger Binding="{Binding IsControllerActiveInput, RelativeSource={RelativeSource AncestorType=Page}}"
                                 Value="True">
                        <Setter Property="Margin" Value="0,0,5,0" />
                    </DataTrigger>
                </Style.Triggers>
            </Style>
        </ResourceDictionary>
    </Page.Resources>

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

    <Grid x:Name="LayoutRoot">

        <!-- button bars  -->
        <ContentControl Style="{StaticResource A_Style_ButtonBar}">
            <local:ControllerButtonPanel x:Name="PlacementMenu" Style="{StaticResource A_Style_ControllerButtonPanel_Default}"
                                         Visibility="{Binding HudState, Converter={StaticResource A_MappingConverter_SelectionControls_Visibility}}">

                <local:ControllerButtonControl x:Name="OpenLibButton" InputOverride="{local:Input Command=INPUTCMD_PP_OPEN_LIBRARY, Context=INPUTCONTEXT_PROP_PLACEMENT_UI}"
                                   Description="{local:Loc HelpButtons.IDS_PropPlacement_Open_Lib}"/>

                <local:ControllerButtonControl x:Name="ExitButton" InputOverride="{local:Input Command=INPUTCMD_PP_SAVE_AND_EXIT, Context=INPUTCONTEXT_PROP_PLACEMENT_UI}"
                                   Description="{local:Loc HelpButtons.IDS_PropPlacement_SaveExit}" />

                <local:ControllerButtonControl x:Name="PlaceEditButton" InputOverride="{local:Input Command=INPUTCMD_PP_PLACE_EDIT_PROP, Context=INPUTCONTEXT_PROP_PLACEMENT_UI}"
                                   Visibility="{Binding IsPropHighlighted, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"
                                   Description="{local:Loc HelpButtons.IDS_PropPlacement_Edit}"/>

                <local:ControllerButtonControl x:Name="DeleteButton" InputOverride="{local:Input Command=INPUTCMD_PP_DELETE_PROP, Context=INPUTCONTEXT_PROP_PLACEMENT_UI}"
                                   Visibility="{Binding IsPropHighlighted, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"
                                   Description="{local:Loc HelpButtons.IDS_PropPlacement_Delete_Prop}"/>

                <local:ControllerButtonControl x:Name="CloneButton" InputOverride="{local:Input Command=INPUTCMD_PP_CLONE_PROP, Context=INPUTCONTEXT_PROP_PLACEMENT_UI}"
                                   Visibility="{Binding CanCloneHighlightedProp, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"
                                   Description="{local:Loc HelpButtons.IDS_PropPlacement_Clone_Prop}"/>

            </local:ControllerButtonPanel>
        </ContentControl>

        <!-- selection mode -->
        <ContentControl Style="{StaticResource A_Style_ButtonBar}">
            <local:ControllerButtonPanel x:Name="SelectionMenu" Style="{StaticResource A_Style_ControllerButtonPanel_Default}"
                                         Visibility="{Binding HudState, Converter={StaticResource A_MappingConverter_BrowsingProps_Visibility}}">

                <local:ControllerButtonControl InputOverride="{local:Input Command=INPUTCMD_PP_PLACE_PROP, Context=INPUTCONTEXT_PROP_PLACEMENT_UI}"
                                   Description="{local:Loc HelpButtons.IDS_PropPlacement_Select_Prop}"/>

                <local:ControllerButtonControl InputOverride="{local:Input Command=INPUTCMD_PP_SAVE_AND_EXIT, Context=INPUTCONTEXT_PROP_PLACEMENT_UI}"
                                   Description="{local:Loc HelpButtons.IDS_Back}" />
            </local:ControllerButtonPanel>
        </ContentControl>

        <!-- edit mode -->
        <ContentControl Style="{StaticResource A_Style_ButtonBar}">
            <local:ControllerButtonPanel x:Name="EditingMenu" Style="{StaticResource A_Style_ControllerButtonPanel_Default}"
                                         Visibility="{Binding HudState, Converter={StaticResource A_MappingConverter_TransformControls_Visibility}}">

                <local:ControllerButtonControl InputOverride="{local:Input Command=INPUTCMD_PP_PLACE_PROP, Context=INPUTCONTEXT_PROP_PLACEMENT_UI}"
                                   Visibility="{Binding ShowPlacePropButton, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"
                                   Description="{Binding AButtonText}"/>

                <local:ControllerButtonControl InputOverride="{local:Input Command=INPUTCMD_PP_SAVE_AND_EXIT, Context=INPUTCONTEXT_PROP_PLACEMENT_UI}"
                                   Description="{local:Loc HelpButtons.IDS_Back}" /> 

                <local:ControllerButtonControl InputOverride="{local:Input Command=INPUTCMD_MOVE_UP, Context=INPUTCONTEXT_FREECAM}"
                                               Style="{StaticResource A_Style_ControllerButtonControl_CollapsedDescription}" />
                <local:ControllerButtonControl InputOverride="{local:Input Command=INPUTCMD_MOVE_DOWN, Context=INPUTCONTEXT_FREECAM}"
                                               Description="{local:Loc HelpButtons.IDS_PropPlacement_Height_Prop}" />

                <local:ControllerButtonControl Style="{StaticResource A_Style_ControllerButtonControl_CollapsedDescription}"
                                               InputOverride="{local:Input Command=INPUTCMD_PP_TRANSFORM_LEFT, Context=INPUTCONTEXT_PROP_PLACEMENT_UI}" />
                <local:ControllerButtonControl InputOverride="{local:Input Command=INPUTCMD_PP_TRANSFORM_RIGHT, Context=INPUTCONTEXT_PROP_PLACEMENT_UI}"
                                               Description="{local:Loc HelpButtons.IDS_PropPlacement_Rotate}" />

                <local:ControllerButtonControl Style="{StaticResource A_Style_ControllerButtonControl_CollapsedDescription}"
                                               InputOverride="{local:Input Command=INPUTCMD_PP_TRANSFORM_UP, Context=INPUTCONTEXT_PROP_PLACEMENT_UI}" />
                <local:ControllerButtonControl InputOverride="{local:Input Command=INPUTCMD_PP_TRANSFORM_DOWN, Context=INPUTCONTEXT_PROP_PLACEMENT_UI}"
                                               Description="{local:Loc HelpButtons.IDS_PropPlacement_Pitch}" />

                <local:ControllerButtonControl Style="{StaticResource A_Style_ControllerButtonControl_CollapsedDescription}"
                                               InputOverride="{local:Input Command=INPUTCMD_PP_ROLL_LEFT, Context=INPUTCONTEXT_PROP_PLACEMENT_UI}" />
                <local:ControllerButtonControl InputOverride="{local:Input Command=INPUTCMD_PP_ROLL_RIGHT, Context=INPUTCONTEXT_PROP_PLACEMENT_UI}"
                                               Description="{local:Loc HelpButtons.IDS_PropPlacement_Roll}" />

                <local:ControllerButtonControl InputOverride="{local:Input Command=INPUTCMD_PP_RESET_TRANSFORM, Context=INPUTCONTEXT_PROP_PLACEMENT_UI}"
                                   Description="{local:Loc HelpButtons.IDS_PropPlacement_Reset}" />

            </local:ControllerButtonPanel>
        </ContentControl>

        <Grid Style="{StaticResource A_Style_FrameworkElement_FadeOnlyTransition_0}">
            <!-- screen space shadow -->
            <local:FZMaterial Preset="{StaticResource A_FZMaterialPresetScreenShadow_ARUI}" />

            <Grid Style="{StaticResource A_Style_FrameworkElement_LayoutRoot}">
                <Grid x:Name="AdjustableSafeFrame"
                      Margin="{Binding SafeFrameMargin}">

                    <!-- Mini Map -->
                    <Decorator HorizontalAlignment="Left"
                               VerticalAlignment="Bottom"
                               Margin="0,0,0,83">
                        <local:HUDAnnaControl x:Name="HUDStatusAnna" 
                                              ElementToTrack="prop_placement_camera"
                                              CanShowDestination="False"/>
                    </Decorator>

                    <!-- props % top bar -->
                    <StackPanel HorizontalAlignment="Right" VerticalAlignment="Top">
                        <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_HudMediumLarge}" Text="{local:Loc HelpButtons.IDS_PropPlacement_Props}" HorizontalAlignment="Right"/>
                        <Decorator Height="12"/>
                        <Grid HorizontalAlignment="Right">
                            <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_GlassHudItem}"  Preset="{StaticResource A_FZMaterialPresetGlassRoundtangle_GlassPanel_OuterAll}"/>

                            <DockPanel Width="356" Height="36">
                                <Grid ClipToBounds="True" Width="{Binding PropsPlacedRatio, Converter={StaticResource A_TransformConverter_LengthRatio}}" HorizontalAlignment="Left">
                                    <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_PropBar}"
                                              Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterAll}"
                                              HorizontalAlignment="Left"
                                              Width="356"/>
                                </Grid>
                            </DockPanel>

                            <!-- percentage text -->
                            <local:FastTextBlock Text="{Binding PropsPlacedPercentage, ConverterParameter=percentage, Converter={StaticResource A_NumUnitConverter_ShowUnit_0dp}}" Style="{StaticResource A_Style_FastTextBlock_HudMedium}" HorizontalAlignment="Center" VerticalAlignment="Center" />
                        </Grid>

                        <!-- prop clipboard -->
                        <Grid x:Name="Grid_Clipboard" Margin="15,15,15,15" HorizontalAlignment="Right" VerticalAlignment="Bottom" DataContext="{Binding PropClipboard}"
                                Visibility="{Binding IsVisible, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"
                                Style="{StaticResource A_Style_FrameworkElement_DefaultTransition_1}">
                            <Control x:Name="ClipboardElement" Template="{StaticResource A_ControlTemplate_ClipboardItem}"/>
                        </Grid>
                    </StackPanel>

                    <!-- Network Controls -->
                    <local:HUDNetworkStatusControl x:Name="HUDStatusNetworkStatus" />

                    <Decorator Margin="0,0,0,24" VerticalAlignment="Bottom">
                        <StackPanel>
                            <local:HUDPressButtonControl x:Name="HUDStatusPressButton" Margin="0,0,0,0"/>
                            <Decorator Style="{StaticResource A_Style_FrameworkElement_SubtitlesSpaceMaker}" />
                        </StackPanel>
                    </Decorator>

                    <!-- Precission Toggle -->
                    <Grid HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="275,50,50,50"
                          IsHitTestVisible="false"
                          Visibility="{Binding HudState, Converter={StaticResource A_MappingConverter_TransformControls_Visibility}}">
                                                
                        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_GlassHudItem}" 
                                        Preset="{StaticResource A_FZMaterialPresetGlassRoundtangle_GlassPanel_OuterAll}" 
                                        Color="{Binding IsPrecisionInput, Converter={StaticResource A_MappingConverter_PrecisionToggle_Color}}"
                                        Height="50"/>

                        <StackPanel Orientation ="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="15,15,0,15">
                            
                            <local:ControllerButtonControl InputOverride="{local:Input Command=INPUTCMD_PP_PRECISION_MODE, Context=INPUTCONTEXT_PROP_PLACEMENT_UI}"
                                   Height="37"
                                   Style="{StaticResource A_Style_ControllerButtonControl_CollapsedDescription}"/>

                            <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_HudMedium}" Text="{local:Loc HelpButtons.IDS_PropPlacement_Precision}" 
                                                FontSize="29"
                                                Margin="5,0,0,0"
                                                VerticalAlignment="Center"
                                                HorizontalAlignment="Left"/>

                            <local:FZMaterial ImageSource="{Binding IsPrecisionInput, Converter={StaticResource A_Converter_BooleanToToggleIconImageSource}}" 
                                                Margin ="5,15,5,0"
                                                Stretch="Fill"
                                                MinHeight="40"
                                                MinWidth="55"
                                                VerticalAlignment="Center"/>
                        </StackPanel>
                    </Grid>                    

                </Grid>
            </Grid>
        </Grid>

        <!-- Reticle -->
        <Decorator x:Name="Decorator_CameraReticle" Style="{StaticResource A_Style_FrameworkElement_LayoutRoot}" HorizontalAlignment="Center" VerticalAlignment="Center">
            <StackPanel Orientation="Vertical" VerticalAlignment="Center"  HorizontalAlignment="Center">
                <Grid x:Name="FZMaterial_CameraReticle" Style="{StaticResource A_Style_FrameworkElement_FadeOnlyTransition_0}" Width="128" Height="128" >                
                                      
                    <!-- <local:FZMaterial x:Name="ReticuleImage" ImageSource="{Binding ReticuleState, Converter={StaticResource A_MappingConverter_Reticule_Image_Visibility}}" /> -->                                   
                    
                    <local:FZMaterial  ImageSource="/ForzaUI;component/Textures/Data_Bound/PropPlacement/HUD_Reticle_Active.png"
                    Visibility="{Binding ReticuleState, Converter={StaticResource A_MappingConverter_ReticuleIdle_Visibility}}"/>

                    <local:FZMaterial  ImageSource="/ForzaUI;component/Textures/Data_Bound/PropPlacement/HUD_Reticle_Blocked.png"
                    Visibility="{Binding ReticuleState, Converter={StaticResource A_MappingConverter_ReticuleCantPlace_Visibility}}"/>
                    
                    <local:FZMaterial  ImageSource="/ForzaUI;component/Textures/Data_Bound/PropPlacement/HUD_Reticle_Pickup.png"
                    Visibility="{Binding ReticuleState, Converter={StaticResource A_MappingConverter_ReticuleHighlight_Visibility}}"/>                    
                </Grid>                                  
                                                      
            </StackPanel>
        </Decorator>
        
        <Decorator x:Name="Decorator_ReticleMessage" HorizontalAlignment="Center" VerticalAlignment="Center" Height="700">
            <!-- info message reticle -->
            <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_HudMediumLarge}"                     
                    Opacity="0.75"
                    FontSize="60"
                    VerticalAlignment="Bottom"
                    Text="{Binding ReticuleMessage}" HorizontalAlignment="Center"/> 
                    
        </Decorator>

        <Border x:Name="PropSelection" Style="{StaticResource A_Style_Border_ScenePadding_Opus_BottomAnchor}"
            Visibility="{Binding HudState, Converter={StaticResource A_MappingConverter_BrowsingProps_Visibility}}">
            <Grid>
                <StackPanel Orientation="Vertical" VerticalAlignment="Bottom">
                    <Grid Style="{StaticResource A_Style_FrameworkElement_DefaultTransition_1}">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" MaxWidth="1403"/>
                            <ColumnDefinition Width="14"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>

                        <!-- CATEGORIES -->
                        <Grid x:Name="PART_CategoryRibbon" VerticalAlignment="Bottom" Style="{StaticResource A_Style_FrameworkElement_DefaultTransition_1}"
                            Margin="15,0,0,0">
                            <Viewbox MaxWidth="1450" Stretch="Fill" StretchDirection="DownOnly">
                                <local:ItemsSelector x:Name="PART_PropCatList"
                                                     Style="{StaticResource A_Style_TextTabMenuList}"
                                                     Focusable="False"
                                                     SelectedIndex="{Binding SelectedCategoryIndex, Mode=TwoWay}"
                                                     SelectedItem="{Binding SelectedCategory, Mode=TwoWay}"
                                                     ItemsSource="{Binding Categories}"
                                                     PageSize="1"/>
                            </Viewbox>
                        </Grid>
                    </Grid>

                    <!-- PROP LIST ? -->
                    <Grid Style="{StaticResource A_Style_FrameworkElement_DefaultTransition_2}" VerticalAlignment="Bottom"
                          HorizontalAlignment="Center"
                          KeyboardNavigation.DirectionalNavigation="Contained"
                          Width="{StaticResource A_Double_Carousel_Square_10Item_Total_Width}"
                          Margin="0,20">
                        <ContentControl Template="{StaticResource A_Template_ContentControl_SelectorContainer_PageButtons}">
                            <local:WrapListBox x:Name="PART_PropsItemList"
                                               Focusable="False"
                                               Style="{StaticResource A_Style_Carousel_Square_10Item}"
                                               ItemTemplate="{StaticResource A_DataTemplate_Layer}"
                                               SelectedIndex="0"
                                               ItemsSource="{Binding SelectedItem.Items, ElementName=PART_PropCatList}"
                                               SelectedItem="{Binding SelectedItem.SelectedItem, ElementName=PART_PropCatList, Mode=TwoWay}"
                                               local:RoutedEventCommand.Action="{Binding ElementName=ButtonBarDisableMouseCursorMovement}"
                                               local:RoutedEventCommand.Action2="{Binding ElementName=ButtonBarEnableMouseCursorMovement}" />
                        </ContentControl>
                    </Grid>
                </StackPanel>
            </Grid>
        </Border>
    </Grid>
</Page>
