<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_AuctionHouseMenuTiled"
      mc:Ignorable="d"
      Style="{StaticResource A_Style_Page_Generic}"
      DataContext="{Binding RelativeSource={RelativeSource Self}}"
      local:AttachedTileMenu.TileMenuNavigationManager="{local:TileMenuNavigationManager}">

    <Page.Resources>
        <ResourceDictionary>
            <Style x:Key="A_Style_FZButton_Tiled_TextMenu_AuctionHouse" BasedOn="{StaticResource A_Style_FZButton_Tiled_TextMenu}" TargetType="FZButton">
                <Setter Property="Tag" Value="Numeric" />
            </Style>
        </ResourceDictionary>
    </Page.Resources>

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

    <Grid x:Name="PART_LayoutRoot">
        <Control Template="{StaticResource A_ControlTemplate_PatternedBackground}"/>
        <!-- Bars -->
        <local:PlayerBarControl x:Name="TopBar" Style="{StaticResource A_Style_PlayerBarControl}" />
        <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>
        <Grid Style="{StaticResource A_Style_FrameworkElement_LayoutRoot}">
            <Grid Style="{StaticResource A_Style_FrameworkElement_TiledMenuTransition_0}">
               
                <ContentControl Content="{Binding Source={local:Loc DestinationMenu.IDS_AuctionHouse}}"
                        Style="{StaticResource A_Style_ContentControl_ScreenTitleBlock_Tile_TextMenu}"/>

                <Decorator x:Name="PART_MenuContent">
                    <Grid Style="{StaticResource A_Style_Grid_Tiled_TextMenu}" 
                          x:Name="PART_SCOPE_Home">
                        <Grid.RowDefinitions>
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                        </Grid.RowDefinitions>
                        <local:FZButton x:Name="PART_Button_SearchAuctions" 
                                        Style="{StaticResource A_Style_FZButton_Tiled_TextMenu_AuctionHouse}" 
                                        TileMenuNavigationManager.InitialSelection="True"
                                        Grid.Row="0" 
                                        Command="{Binding GoToAuctionSearchCommand, RelativeSource={RelativeSource AncestorType=Page}}">
                            <local:FZButton.DataContext>
                                <local:TileMenuDataItem Heading="{local:Loc AuctionHouse.IDS_Search}"
                                                        Description="{local:Loc AuctionHouse.IDS_Search_Sub}"/>
                            </local:FZButton.DataContext>
                        </local:FZButton>

                        <local:FZButton x:Name="PART_Button_StartAuction" 
                                        Style="{StaticResource A_Style_FZButton_Tiled_TextMenu_AuctionHouse}" 
                                        Grid.Row="1"
                                        Command="{Binding GoToStartAuctionCommand, RelativeSource={RelativeSource AncestorType=Page}}">
                            <local:FZButton.DataContext>
                                <local:TileMenuDataItem Heading="{local:Loc AuctionHouse.IDS_StartAuction}"
                                                        Description="{local:Loc AuctionHouse.IDS_StartAuction_Sub}" />
                            </local:FZButton.DataContext>
                        </local:FZButton>

                        <local:FZButton x:Name="PART_Button_MyBids" 
                                        Style="{StaticResource A_Style_FZButton_Tiled_TextMenu_AuctionHouse}" 
                                        Grid.Row="2" 
                                        BindingProxy.A="{Binding MyBidsNotificationBadge, RelativeSource={RelativeSource AncestorType=Page, Mode=FindAncestor}}" 
                                        Command="{Binding GoToMyBidsCommand, RelativeSource={RelativeSource AncestorType=Page}}">
                            <local:FZButton.DataContext>
                                <local:TileMenuDataItem Heading="{local:Loc AuctionHouse.IDS_MyBids}" Description="{local:Loc AuctionHouse.IDS_MyBids_Sub}"/>
                            </local:FZButton.DataContext>
                        </local:FZButton>

                        <local:FZButton x:Name="PART_Button_MyAuctions" 
                                        Style="{StaticResource A_Style_FZButton_Tiled_TextMenu_AuctionHouse}" 
                                        BindingProxy.A="{Binding MyAuctionsNotificationBadge, RelativeSource={RelativeSource AncestorType=Page, Mode=FindAncestor}}"
                                        Command="{Binding GoToMyAuctionsCommand, RelativeSource={RelativeSource AncestorType=Page}}"
                                        Grid.Row="3">
                            <local:FZButton.DataContext>
                                <local:TileMenuDataItem Heading="{local:Loc AuctionHouse.IDS_MyAuctions}"/>
                            </local:FZButton.DataContext>
                        </local:FZButton>

                        <local:FZButton x:Name="PART_Button_AuctionAlerts"
                                        Style="{StaticResource A_Style_FZButton_Tiled_TextMenu_AuctionHouse}"
                                        BindingProxy.A="{Binding AuctionAlertsNotificationBadge, RelativeSource={RelativeSource FindAncestor, AncestorType=Page}}"
                                        Command="{Binding GoToAuctionAlertsCommand, RelativeSource={RelativeSource AncestorType=Page}}"
                                        Grid.Row="4">
                            <local:FZButton.DataContext>
                                <local:TileMenuDataItem Heading="{local:Loc AuctionHouse.IDS_AuctionAlerts}"/>
                            </local:FZButton.DataContext>
                        </local:FZButton>
                    </Grid>
                </Decorator>
            </Grid>
        </Grid>
    </Grid>
</Page>
