<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_InputOptions"
      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>
        <local:FZMaterialPresetRoundtangle x:Key="A_FZMaterialPreset_RequiredMappingBackground"
                                           BasedOn="{StaticResource A_FZMaterialPreset_FlatPanel_Base}"
                                           CornerRadius="20" />

        <Style x:Key="A_Style_Control_RequiredMappingIcon"
               TargetType="Control">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Control">
                        <local:FZMaterial x:Name="Breadcrumb"
                                          HorizontalAlignment="Right"
                                          VerticalAlignment="Center"
                                          Width="40"
                                          Height="40"
                                          Color="{StaticResource A_Color_Header_Background}"
                                          Preset="{StaticResource A_FZMaterialPreset_RequiredMappingBackground}">
                            <local:FZTextBlock Text="!"
                                               Style="{StaticResource A_Style_FZTextBlock_HorizonA}"
                                               Color="{StaticResource A_Color_TextMenu_Text_Highlighted}"
                                               FontSize="30"
                                               Margin="-1,0,0,0"
                                               HorizontalAlignment="Center"
                                               VerticalAlignment="Center" />
                        </local:FZMaterial>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style x:Key="A_Style_Control_RequiredMappingIcon_Perm"
               TargetType="Control"
               BasedOn="{StaticResource A_Style_Control_RequiredMappingIcon}">
            <Setter Property="Visibility" Value="Collapsed" />
            <Style.Triggers>
                <MultiDataTrigger>
                    <MultiDataTrigger.Conditions>
                        <Condition Binding="{Binding IsRequiredForController}" Value="True" />
                        <Condition Binding="{Binding SelectedItem.DataSource.IsControllerDataSource, ElementName=PART_GroupList}" Value="True" />
                        <Condition Binding="{Binding ShouldShowRemapButton, RelativeSource={RelativeSource AncestorType=Page}}" Value="True" />
                        <Condition Binding="{Binding IsRemapped}" Value="False" />
                        <Condition Binding="{Binding SelectedItem.DataSource.Options.CurrentItem.SelectedItem.IsDefaultProfile, ElementName=PART_GroupList}" Value="False" />
                    </MultiDataTrigger.Conditions>
                    <Setter Property="Visibility"
                            Value="Visible" />
                </MultiDataTrigger>
                <MultiDataTrigger>
                    <MultiDataTrigger.Conditions>
                        <Condition Binding="{Binding SelectedItem.DataSource.IsKeyboardDataSource, ElementName=PART_GroupList}" Value="True"/>
                        <Condition Binding="{Binding ShouldShowRemapButton, RelativeSource={RelativeSource AncestorType=Page}}" Value="True" />
                        <Condition Binding="{Binding IsRemapped}" Value="False" />
                        <Condition Binding="{Binding SelectedItem.DataSource.Options.CurrentItem.SelectedItem.IsDefaultProfile, ElementName=PART_GroupList}" Value="False" />
                    </MultiDataTrigger.Conditions>
                    <Setter Property="Visibility"
                            Value="Visible" />
                </MultiDataTrigger>
                <MultiDataTrigger>
                    <MultiDataTrigger.Conditions>
                        <Condition Binding="{Binding IsRequiredForWheel}" Value="True" />
                        <Condition Binding="{Binding SelectedItem.DataSource.IsWheelDataSource, ElementName=PART_GroupList}" Value="True" />
                        <Condition Binding="{Binding ShouldShowRemapButton, RelativeSource={RelativeSource AncestorType=Page}}" Value="True" />
                        <Condition Binding="{Binding IsRemapped}" Value="False" />
                        <Condition Binding="{Binding SelectedItem.DataSource.Options.CurrentItem.SelectedItem.IsDefaultProfile, ElementName=PART_GroupList}" Value="False" />
                    </MultiDataTrigger.Conditions>
                    <Setter Property="Visibility"
                            Value="Visible" />
                </MultiDataTrigger>
            </Style.Triggers>
        </Style>

        <Style x:Key="A_Style_StackPanel_ShowRemappingRequirement"
               TargetType="StackPanel">
            <Setter Property="Visibility" Value="Collapsed" />
            <Style.Triggers>
                <MultiDataTrigger>
                    <MultiDataTrigger.Conditions>
                        <Condition Binding="{Binding SelectedItem.IsRequiredForController, ElementName=PART_OptionsList}" Value="True" />
                        <Condition Binding="{Binding SelectedItem.DataSource.IsControllerDataSource, ElementName=PART_GroupList}" Value="True" />
                        <Condition Binding="{Binding ShouldShowRemapButton, RelativeSource={RelativeSource AncestorType=Page}}" Value="True" />
                        <Condition Binding="{Binding SelectedItem.IsRemapped, ElementName=PART_OptionsList}" Value="False" />
                        <Condition Binding="{Binding SelectedItem.DataSource.Options.CurrentItem.SelectedItem.IsDefaultProfile, ElementName=PART_GroupList}" Value="False" />
                    </MultiDataTrigger.Conditions>
                        <Setter Property="Visibility"
                                Value="Visible" />
                </MultiDataTrigger>

                <MultiDataTrigger>
                    <MultiDataTrigger.Conditions>
                        <Condition Binding="{Binding SelectedItem.DataSource.IsKeyboardDataSource, ElementName=PART_GroupList}" Value="True"/>
                        <Condition Binding="{Binding ShouldShowRemapButton, RelativeSource={RelativeSource AncestorType=Page}}" Value="True" />
                        <Condition Binding="{Binding SelectedItem.IsRemapped, ElementName=PART_OptionsList}" Value="False" />
                        <Condition Binding="{Binding SelectedItem.DataSource.Options.CurrentItem.SelectedItem.IsDefaultProfile, ElementName=PART_GroupList}" Value="False" />
                    </MultiDataTrigger.Conditions>
                    <Setter Property="Visibility"
                            Value="Visible" />
                </MultiDataTrigger>

                <MultiDataTrigger>
                    <MultiDataTrigger.Conditions>
                        <Condition Binding="{Binding SelectedItem.IsRequiredForWheel, ElementName=PART_OptionsList}" Value="True" />
                        <Condition Binding="{Binding SelectedItem.DataSource.IsWheelDataSource, ElementName=PART_GroupList}" Value="True" />
                        <Condition Binding="{Binding ShouldShowRemapButton, RelativeSource={RelativeSource AncestorType=Page}}" Value="True" />
                        <Condition Binding="{Binding SelectedItem.IsRemapped, ElementName=PART_OptionsList}" Value="False" />
                        <Condition Binding="{Binding SelectedItem.DataSource.Options.CurrentItem.SelectedItem.IsDefaultProfile, ElementName=PART_GroupList}" Value="False" />
                    </MultiDataTrigger.Conditions>
                    <Setter Property="Visibility"
                            Value="Visible" />
                </MultiDataTrigger>
            </Style.Triggers>
        </Style>

        <Style x:Key="A_Style_InputOptions_PresetSpinner"
               BasedOn="{StaticResource A_Style_SpinnerControl_Default_InItemsList_AltStyle}"
               TargetType="local:SpinnerControl">
            <Setter Property="Label"
                    Value="{local:Loc MyProfile.IDS_InputPreset}" />
            <Style.Triggers>
                <DataTrigger Binding="{Binding SelectedItem.DataSource.IsControllerDataSource, ElementName=PART_GroupList}"
                             Value="True">
                    <Setter Property="Label"
                            Value="{local:Loc MyProfile.IDS_Option_Layout}" />
                </DataTrigger>
                <DataTrigger Binding="{Binding SelectedItem.DataSource.IsWheelDataSource, ElementName=PART_GroupList}"
                             Value="True">
                    <Setter Property="Label"
                            Value="{local:Loc MyProfile.IDS_Option_Layout}" />
                </DataTrigger>
                <EventTrigger RoutedEvent="PreviewNextSel">
                    <local:CommandAction CommandPropertyName="ProfileSpinnerPreviewNextSel" AncestorType="Page" />
                </EventTrigger>
                <EventTrigger RoutedEvent="PreviewPrevSel">
                    <local:CommandAction CommandPropertyName="ProfileSpinnerPreviewPrevSel" AncestorType="Page" />
                </EventTrigger>
                <EventTrigger RoutedEvent="LostKeyboardFocus">
                    <local:CommandAction CommandPropertyName="ProfileSpinnerKeyboardFocusLost" AncestorType="Page" />
                </EventTrigger>
                <EventTrigger RoutedEvent="GotKeyboardFocus">
                    <local:CommandAction CommandPropertyName="ProfileSpinnerKeyboardFocusGained" AncestorType="Page" />
                </EventTrigger>
            </Style.Triggers>
        </Style>

        <Style x:Key="A_Style_InputOptions_ToggleSpinner"
               BasedOn="{StaticResource A_Style_SpinnerControl_Default_InItemsList}"
               TargetType="local:SpinnerControl">
            <Setter Property="Label"
                    Value="{Binding Name}" />
            <Setter Property="SelectedIndex"
                    Value="{Binding Selection}" />
        </Style>

        <DataTemplate DataType="{x:Type local:InputProfilesList}">
            <local:SpinnerControl Style="{StaticResource A_Style_InputOptions_PresetSpinner}"
                                  SelectedItem="{Binding SelectedItem}"
                                  ItemsSource="{Binding Profiles}"
                                  Focusable="True"
                                  IsLocked="{Binding SelectedItem.DataSource.IsLockedToCurrentProfile, ElementName=PART_GroupList}"/>
        </DataTemplate>

        <DataTemplate DataType="{x:Type local:PCInputCombineInputsToggle}">
            <local:SpinnerControl Style="{StaticResource A_Style_InputOptions_ToggleSpinner}"
                                  ItemsSource="{Binding OnOffOptions}"
                                  Focusable="True" />
        </DataTemplate>

        <DataTemplate DataType="{x:Type local:CPInputCommand}">
            <local:FZButton x:Name="RemapButton"
                            Style="{StaticResource A_Style_Button_EmptyButton}"
                            Command="{Binding SelectedItem.DataSource.RemapInput, ElementName=PART_GroupList}"
                            CommandParameter="{Binding DataContext, RelativeSource={RelativeSource Self}}"
                            local:FocusOnMouseOverBehaviour.Self="True"
                            Focusable="True"
                            ClickMode="Release"
                            Height="{StaticResource A_Double_TextMenu_Height_Default}">
                <local:FZMaterial x:Name="MouseHitHelper" Color="#00FFFFFF">
                    <Grid>
                        <Viewbox Width="25"
                                 Height="25"
                                 HorizontalAlignment="Right"
                                 Margin="0,0,12,0">
                            <Control x:Name="Breadcrumb"
                                     Style="{StaticResource A_Style_Control_RequiredMappingIcon_Perm}" />
                        </Viewbox>
                        <Grid Margin="30,0">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="0.535*"/>
                                <ColumnDefinition Width="0.465*"/>
                            </Grid.ColumnDefinitions>
                            <local:FZTextBlock x:Name="RemapButtonNameText"
                                               Text="{Binding Name}"
                                               Style="{StaticResource A_Style_FZTextBlock_SpinnerTitle}"
                                               HorizontalAlignment="Left" 
                                               local:ScreenReader.Event="OnChange"
                                               local:ScreenReader.ControlType="Button"
                                               local:ScreenReader.LineType="SelectedItem"
                                               local:ScreenReader.SelectedNumber="{Binding (ItemsControl.AlternationIndex), RelativeSource={RelativeSource AncestorType={x:Type ListBoxItem}}, Converter={StaticResource A_IndexToNumberConverter}}"
                                               local:ScreenReader.SelectedCount="{Binding Items.Count, RelativeSource={RelativeSource AncestorType={x:Type Selector}}}"/>
                            <local:FZTextBlock x:Name="RemapButtonValueText"
                                               Text="{Binding Value, Converter={StaticResource A_StringToUpper}}"
                                               Style="{StaticResource A_Style_FZTextBlock_SpinnerItem}"
                                               Grid.Column="1"
                                               HorizontalAlignment="Center"
                                               local:ScreenReader.Event="OnChange"
                                               local:ScreenReader.LineType="SelectedValue" />
                        </Grid>
                    </Grid>
                </local:FZMaterial>
            </local:FZButton>
            <DataTemplate.Triggers>
                <DataTrigger Binding="{Binding IsKeyboardFocusWithin, ElementName=RemapButton}"
                             Value="True">
                    <Setter TargetName="RemapButtonNameText" Property="Color" Value="{StaticResource A_Color_TextMenu_Text_Highlighted}" />
                    <Setter TargetName="RemapButtonValueText" Property="Color" Value="{StaticResource A_Color_TextMenu_Text_Highlighted}" />
                    <Setter TargetName="RemapButtonNameText" Property="local:ScreenReader.Line" Value="{Binding Name}" />
                    <Setter TargetName="RemapButtonValueText" Property="local:ScreenReader.Line" Value="{Binding ValueScreenReader}" />
                </DataTrigger>
            </DataTemplate.Triggers>
        </DataTemplate>

        <Style x:Key="A_Style_ControllerButtonControl_YKey"
               BasedOn="{StaticResource A_Style_ControllerButtonControl_Default}"
               TargetType="local:ControllerButtonControl">
            <Setter Property="Description"
                    Value="{local:Loc HelpButtons.IDS_ResetDefault}" />
            <Setter Property="Visibility"
                    Value="{Binding ShouldShowResetToDefaultButton, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_FZBooleanToVisibilityConverter}}" />
        </Style>

        <Style x:Key="A_Style_ControllerButtonControl_StartKey"
               BasedOn="{StaticResource A_Style_ControllerButtonControl_Default}"
               TargetType="local:ControllerButtonControl">
            <Setter Property="Description"
                    Value="{local:Loc HelpButtons.IDS_Advanced}" />
            <Setter Property="Visibility"
                    Value="Collapsed" />
            <Style.Triggers>
                <DataTrigger Binding="{Binding SelectedItem.DataSource.IsControllerDataSource, ElementName=PART_GroupList}"
                             Value="True">
                    <Setter Property="Visibility"
                            Value="Visible" />
                </DataTrigger>
                <DataTrigger Binding="{Binding SelectedItem.DataSource.IsWheelDataSource, ElementName=PART_GroupList}"
                             Value="True">
                    <Setter Property="Visibility"
                            Value="Visible" />
                </DataTrigger>
            </Style.Triggers>
        </Style>

        <Style x:Key="A_Style_ControllerButtonControl_ClearProfileKey"
               BasedOn="{StaticResource A_Style_ControllerButtonControl_Default}"
               TargetType="local:ControllerButtonControl">
            <Setter Property="Description"
                    Value="{local:Loc HelpButtons.IDS_ClearProfile}" />
            <Setter Property="Visibility"
                    Value="Collapsed" />
            <Style.Triggers>
                <MultiDataTrigger>
                    <MultiDataTrigger.Conditions>
                        <Condition Binding="{Binding SelectedItem.DataSource.IsWheelDataSource, ElementName=PART_GroupList}" Value="True" />
                        <Condition Binding="{Binding SelectedItem.DataSource.Options.CurrentItem.SelectedItem.IsDefaultProfile, ElementName=PART_GroupList}" Value="False" />
                        <Condition Binding="{Binding ShouldShowClearProfileButton, RelativeSource={RelativeSource AncestorType=Page}}" Value="True" />
                    </MultiDataTrigger.Conditions>
                    <Setter Property="Visibility" Value="Visible" />
                </MultiDataTrigger>
                <MultiDataTrigger>
                    <MultiDataTrigger.Conditions>
                        <Condition Binding="{Binding SelectedItem.DataSource.IsControllerDataSource, ElementName=PART_GroupList}" Value="True" />
                        <Condition Binding="{Binding SelectedItem.DataSource.Options.CurrentItem.SelectedItem.IsDefaultProfile, ElementName=PART_GroupList}" Value="False" />
                        <Condition Binding="{Binding ShouldShowClearProfileButton, RelativeSource={RelativeSource AncestorType=Page}}" Value="True" />
                    </MultiDataTrigger.Conditions>
                    <Setter Property="Visibility" Value="Visible" />
                </MultiDataTrigger>
            </Style.Triggers>
        </Style>

        <Style x:Key="A_Style_FZTextBlock_RequiredMapping"
               TargetType="local:FZTextBlock"
               BasedOn="{StaticResource A_Style_FZTextBlock_DescriptionBlockBody}">
            <Setter Property="Visibility"
                    Value="Collapsed" />
            <Style.Triggers>
                <MultiDataTrigger>
                    <MultiDataTrigger.Conditions>
                        <Condition Binding="{Binding SelectedItem.IsRequiredForController, ElementName=PART_OptionsList}" Value="True" />
                        <Condition Binding="{Binding SelectedItem.DataSource.IsControllerDataSource, ElementName=PART_GroupList}" Value="True" />
                        <Condition Binding="{Binding ShouldShowRemapButton, RelativeSource={RelativeSource AncestorType=Page}}" Value="True" />
                        <Condition Binding="{Binding SelectedItem.IsRemapped, ElementName=PART_OptionsList}" Value="False" />
                    </MultiDataTrigger.Conditions>
                    <Setter Property="Text"
                            Value="{local:Loc MyProfile.IDS_ControllerMappingRequired}" />
                    <Setter Property="Visibility"
                            Value="Visible" />
                </MultiDataTrigger>
                <MultiDataTrigger>
                    <MultiDataTrigger.Conditions>
                        <Condition Binding="{Binding SelectedItem.DataSource.IsKeyboardDataSource, ElementName=PART_GroupList}" Value="True"/>
                        <Condition Binding="{Binding ShouldShowRemapButton, RelativeSource={RelativeSource AncestorType=Page}}" Value="True" />
                        <Condition Binding="{Binding SelectedItem.IsRemapped, ElementName=PART_OptionsList}" Value="False" />
                    </MultiDataTrigger.Conditions>
                    <Setter Property="Text"
                            Value="{local:Loc MyProfile.IDS_KeyboardMappingRequired}" />
                    <Setter Property="Visibility"
                            Value="Visible" />
                </MultiDataTrigger>
                <MultiDataTrigger>
                    <MultiDataTrigger.Conditions>
                        <Condition Binding="{Binding SelectedItem.IsRequiredForWheel, ElementName=PART_OptionsList}" Value="True" />
                        <Condition Binding="{Binding SelectedItem.DataSource.IsWheelDataSource, ElementName=PART_GroupList}" Value="True" />
                        <Condition Binding="{Binding ShouldShowRemapButton, RelativeSource={RelativeSource AncestorType=Page}}" Value="True" />
                        <Condition Binding="{Binding SelectedItem.IsRemapped, ElementName=PART_OptionsList}" Value="False" />
                    </MultiDataTrigger.Conditions>
                    <Setter Property="Text"
                            Value="{local:Loc MyProfile.IDS_WheelMappingRequired}" />
                    <Setter Property="Visibility"
                            Value="Visible" />
                </MultiDataTrigger>
            </Style.Triggers>
        </Style>

    </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"
                                         Style="{StaticResource A_Style_ControllerButtonPanel_Default}">
                <local:ControllerButtonControl Button="A"
                                               Description="{local:Loc HelpButtons.IDS_Select}"
                                               Visibility="{Binding ShouldShowRemapButton, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_FZBooleanToVisibilityConverter}}" />
                <local:ControllerButtonControl Button="B"
                                               Description="{local:Loc HelpButtons.IDS_Back}" />
                <local:ControllerButtonControl Button="X"
                                               Description="{local:Loc HelpButtons.IDS_Save}" />
                <local:ControllerButtonControl Button="Y"
                                               Style="{StaticResource A_Style_ControllerButtonControl_YKey}" />
                <local:ControllerButtonControl Button="Start"
                                               Style="{StaticResource A_Style_ControllerButtonControl_StartKey}" /> 
                <local:ControllerButtonControl Button="Back"
                                               Style="{StaticResource A_Style_ControllerButtonControl_ClearProfileKey}" /> 
            </local:ControllerButtonPanel>
        </ContentControl>

        <Border Style="{StaticResource A_Style_Border_ScenePadding}"
                SnapsToDevicePixels="True"
                UseLayoutRounding="True" >
            <Grid x:Name="LayoutRoot" Margin="0,40,0,0">
                <StackPanel Name="BasicOptions" Orientation="Vertical" VerticalAlignment="Top" HorizontalAlignment="Center" >
                    <StackPanel Orientation="Horizontal" Style="{StaticResource A_Style_FrameworkElement_DefaultTransition_0}">
                        <ContentControl Tag="{local:Loc ScreenTitles.IDS_MyProfile}" 
                                        Content="{local:Loc ScreenTitles.IDS_ControllerOptions}" 
                                        Style="{StaticResource A_Style_ContentControl_ScreenTitleBlock}" 
                                        local:BindingProxy.A="/ForzaUI;component/Textures/Anthem/Icons/Titles/Options.png" 
                                        Focusable="False" />
                    </StackPanel>
                    
                    <DockPanel Style="{StaticResource A_Style_FrameworkElement_DefaultTransition_0}" >
                        <Grid DockPanel.Dock="Top">
                            <local:ItemsSelector x:Name="PART_GroupList"
                                                 Style="{StaticResource A_Style_ItemsSelector_TabTitle}"
                                                 SelectedIndex="0"
                                                 ItemsSource="{Binding Categories, RelativeSource={RelativeSource AncestorType=Page}}"
                                                 IsLocked="{Binding ChangesMadeInThisTab, RelativeSource={RelativeSource AncestorType=Page}}"
                                                 Margin="0,0,0,10" />
                        </Grid>
                        <Grid DockPanel.Dock="Right"
                              VerticalAlignment="Top">
                            <ContentControl Style="{StaticResource A_Style_DescriptionPanel_Options}"
                                            DataContext="{Binding SelectedItem, ElementName=PART_OptionsList}"
                                            Visibility="Visible"
                                            Content="{Binding Description}"
                                            Width="412" />
                            <StackPanel Style="{StaticResource A_Style_StackPanel_ShowRemappingRequirement}"
                                        HorizontalAlignment="Left"
                                        VerticalAlignment="Bottom"
                                        Margin="35,0,0,25"
                                        Orientation="Horizontal">
                                <Control Style="{StaticResource A_Style_Control_RequiredMappingIcon}" />
                                <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_RequiredMapping}"
                                                   Color="{StaticResource A_Color_Body_Text}"
                                                   Margin="10,0,0,2"
                                                   VerticalAlignment="Center" />
                            </StackPanel>
                        </Grid>
                        <Decorator local:UIPageTransitionManager.TransitionIndex="0"
                                   DockPanel.Dock="Left"
                                   VerticalAlignment="Top"
                                   DataContext="{Binding SelectedItem.DataSource, ElementName=PART_GroupList}">
                            <local:CommonListBox x:Name="PART_OptionsList"
                                                 Style="{StaticResource A_Style_ListBox_List_Default_ScrollBar}" 
                                                 ItemContainerStyle="{StaticResource A_Style_ListBoxItem_TextMenu_NotFocusable}"
                                                 Width="834"
                                                 AllowMouseWheelScrolling="False"
                                                 ItemsSource="{Binding Options}" />
                        </Decorator>
                    </DockPanel>
                </StackPanel>
            </Grid>
        </Border>

        <Decorator Style="{Binding A_Style_FrameworkElement_LayoutRoot}">
            <local:FZTextBlock Color="#FF888888" FontSize="15" Text="{Binding TestPackageMessage}" HorizontalAlignment="Left" VerticalAlignment="Bottom" />
        </Decorator>
    </Grid>
</Page>
