<RivalsMenu xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    x:Class="ForzaUI.A_RivalsMenu"
    Style="{StaticResource A_Style_Page_Generic}"
    DataContext="{Binding RelativeSource={RelativeSource Self}}"
    AttachedTileMenu.TileMenuNavigationManager="{TileMenuNavigationManager}">

    <RivalsMenu.Resources>
        <Style
            x:Key="H_Run_ImageTile_HeadingText_COLOR"
            TargetType="{Type FZRun}">
            <Setter
                Property="Color"
                Value="{StaticResource H_Color_Primary_White}" />
        </Style>
    </RivalsMenu.Resources>
    
    <UIPageTransitionManager.TransitionManager>
        <UIPageTransitionManager Preset="{StaticResource A_UIPageTransitionManagerPreset_TiledSubMenu}" />
    </UIPageTransitionManager.TransitionManager>
    <Grid KeyboardNavigation.DirectionalNavigation="Contained"
          x:Name="PART_LayoutRoot">
        <!--Main Tile Content -->
       <Control Style="{StaticResource A_Style_Control_ScreenBackground}" />
        <!-- Bars -->
        <PlayerBarControl Style="{StaticResource A_Style_PlayerBarControl}"
                        x:Name="TopBar" />
        <ContentControl Style="{StaticResource A_Style_ButtonBar}"
                        x:Name="BottomBar">
            <ControllerButtonPanel x:Name="PART_HelpPanel"
                                 Style="{StaticResource A_Style_ControllerButtonPanel_Default}">
                <ControllerButtonControl Button="A"
                                         Description="{Loc HelpButtons.IDS_Select}" />
                <ControllerButtonControl Button="B"
                                         Description="{Loc HelpButtons.IDS_Back}" />
            </ControllerButtonPanel>
        </ContentControl>
        <Decorator
            Style="{StaticResource A_Style_FrameworkElement_LayoutRoot}"
            Width="Auto"
            Height="Auto"
            HorizontalAlignment="Center"
            VerticalAlignment="Center">
            <StackPanel
                Style="{StaticResource A_Style_FrameworkElement_TiledMenuTransition_0}">
                <ContentControl
                    Content="{Loc ScreenTitles.IDS_RivalsMenu}"
                    Style="{StaticResource A_Style_ContentControl_ScreenTitleBlock}"
                    HorizontalAlignment="Left"
                    Width="364"
                    Margin="0,0,0,20"/>
                <Decorator
                    x:Name="PART_MenuContent">
                    <Grid
                        Style="{StaticResource H_Style_Grid_4TileMenu}">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*" />
                            <RowDefinition Height="*" />
                            <RowDefinition Height="*" />
                            <RowDefinition Height="*" />
                            <RowDefinition Height="*" />
                            <RowDefinition Height="*" />
                            <RowDefinition Height="*" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>
                        <FZButton
                            x:Name="PART_Button_MyRivals"
                            Style="{StaticResource H_Style_ImageTile}"
                            BindingProxy.A="{Binding Path=NotificationBadgeMyRivals, RelativeSource={RelativeSource AncestorType=Page, Mode=FindAncestor}}"
                            Grid.Column="0"
                            Grid.Row="4"
                            Grid.RowSpan="4"
                            Grid.ColumnSpan="1" 
                            Command="{Binding MyRivalsCommand, RelativeSource={RelativeSource AncestorType=Page}}">
                            <FZButton.DataContext>
                                <TileMenuDataItem
                                    Heading="{Loc PauseMenu.IDS_TileTitle_MyRivals}" />
                            </FZButton.DataContext>
                        </FZButton>
                        <FZButton
                            x:Name="PART_Button_MonthlyRivals"
                            Style="{StaticResource H_Style_ImageTile}"
                            Grid.Column="3"
                            Grid.Row="0"
                            Grid.ColumnSpan="1"
                            Grid.RowSpan="8"
                            Command="{Binding MonthlyRivalsCommand, RelativeSource={RelativeSource AncestorType=Page}}">
                            <FZButton.DataContext>
                                <TileMenuDataItem
                                    Heading="{Loc PauseMenu.IDS_TileTitle_MonthlyRivals}"
                                    Description="{Loc PauseMenu.IDS_TileText_MonthlyRivals}"
                                    Icon="Textures\Data_Bound\PauseMenu_Images\Monthly_Rivals.png" />
                            </FZButton.DataContext>
                        </FZButton>
                        <FZButton
                            x:Name="PART_Button_FestivalRivals"
                            Style="{StaticResource H_Style_ImageTile}"
                            TileMenuNavigationManager.TextColorScheme="{Static TextColorScheme.Light}"
                            TileMenuNavigationManager.InitialSelection="True"
                            Grid.Column="0"
                            Grid.Row="0"
                            Grid.ColumnSpan="3"
                            Grid.RowSpan="4"
                            Command="{Binding FestivalRivalsCommand, RelativeSource={RelativeSource AncestorType=Page}}">
                            <FZButton.DataContext>
                                <TileMenuDataItem
                                    Heading="{Loc PauseMenu.IDS_TileTitle_FestivalRivals}"
                                    Description="{Loc PauseMenu.IDS_TileText_FestivalRivals}"
                                    Icon="Textures\Data_Bound\PauseMenu_Images\Horizon_Rivals.png" />
                            </FZButton.DataContext>
                        </FZButton>
                        <FZButton
                            x:Name="PART_Button_ShowcaseRivals"
                            Style="{StaticResource H_Style_ImageTile}"
                            Grid.Column="1"
                            Grid.Row="4"
                            Grid.ColumnSpan="2"
                            Grid.RowSpan="4"
                            Command="{Binding ShowcaseRivalsCommand, RelativeSource={RelativeSource AncestorType=Page}}">
                            <FZButton.DataContext>
                                <TileMenuDataItem
                                    Heading="{Loc PauseMenu.IDS_TileTitle_ShowcaseRivals}" 
                                    Icon="Textures\Data_Bound\PauseMenu_Images\Showcase_Rivals.png" />
                            </FZButton.DataContext>
                        </FZButton>
                    </Grid>
                </Decorator>
            </StackPanel>
        </Decorator>
    </Grid>
</RivalsMenu>
