<Page x:Class="ForzaUI.A_CreatorInfo"
      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"
      mc:Ignorable="d"
      xmlns:local="clr-namespace:ForzaUI"
      Style="{StaticResource A_Style_Page_Generic}"
      DataContext="{Binding RelativeSource={RelativeSource Self}}">


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


    <Page.Resources>
        <ResourceDictionary>

            <Style x:Key="A_Style_Text_Label" TargetType="{x:Type local:FZTextBlock}" BasedOn="{StaticResource A_Style_FZTextBlock_HorizonB}">
                <Setter Property="VerticalAlignment" Value="Center" />
                <Setter Property="Color" Value="#FF2F2F2F" />
                <Setter Property="Color"
                        Value="{StaticResource A_Color_Tile_Title_Alternate}" />
                <Setter Property="CapHeight" Value="20"/>
                <Setter Property="FontFamily"
                        Value="Horizon_A" />
            </Style>

            <Style x:Key="A_Style_Text_Gamertag" TargetType="{x:Type local:FZTextBlock}" BasedOn="{StaticResource A_Style_FZTextBlock_HorizonA}">
                <Setter Property="VerticalAlignment" Value="Center" />
                <Setter Property="Color"
                        Value="{StaticResource A_Color_Tile_Title_Alternate}" />
                <Setter Property="CapHeight" Value="27"/>
                <Setter Property="FontFamily"
                        Value="Horizon_B" />
                <Setter Property="Opacity"
                        Value="0.5" />
            </Style>

        </ResourceDictionary>
    </Page.Resources>


    <Grid>
        <!-- Background Blur -->
        <local:FZMaterialGlassCapture />
        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_Popup_Background}"/>

        <!-- Help Button Bar -->
        <ContentControl x:Name="BottomBar" Style="{StaticResource A_Style_ButtonBar}">
            <ContentControl x:Name="DefaultHelpPanel"
            Style="{StaticResource A_Style_ContentControl_DefaultButtonBar}" />
        </ContentControl>

        <Grid Style="{StaticResource A_Style_FrameworkElement_LayoutRoot}">
            <StackPanel x:Name="MainContent"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Width="{StaticResource A_Double_MessageBox_Width}"
                        Style="{StaticResource A_Style_FrameworkElement_DefaultTransition_0}">

                <ContentControl x:Name="LiveryTitle" Content="{local:Loc Livery.IDS_CreatorInfo}"
                    Style="{StaticResource A_Style_ContentControl_PopupTitleBlock}"/>

                <ContentControl Style="{StaticResource A_Style_ContentControl_PopupContentBlock}" Tag="/ForzaUI;component/Textures/Anthem/Icons/Titles/PopupSettings.png">
                    <StackPanel Orientation="Vertical">
                        <StackPanel Orientation="Horizontal" VerticalAlignment="Top" Margin="0,3,0,24">
                            <Grid Width="118"
                                Height="118">
                                <local:FZMaterial x:Name="GamerPicMaterial"
                                    ImageSource="{Binding UserProfile, Converter={StaticResource A_GamerPicConverter}, ConverterParameter={StaticResource A_Size_JoinFriendGamerPicSizeParams}}"
                                    Preset="{StaticResource A_FZMaterialPresetRoundtangle_FlatPanel_OuterAll}"
                                    Visibility="{Binding Downloaded, RelativeSource={RelativeSource Self}, Converter={StaticResource A_FZBooleanToVisibilityConverter_UseHidden}}"/>
                                <ProgressBar Style="{StaticResource A_Style_ProgressBar_WaitSpinner}"
                                                HorizontalAlignment="Center"
                                                VerticalAlignment="Center"
                                                Visibility="{Binding Downloaded, ElementName=GamerPicMaterial, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}}"/>
                            </Grid>
                            <StackPanel Margin="24,0" VerticalAlignment="Center">
                                <local:FZTextBlock Text="{Binding Tag, RelativeSource={RelativeSource Self}, Converter={StaticResource A_StringToUpper}}"
                                                   Style="{StaticResource A_Style_Text_Label}"
                                                   VerticalAlignment="Top"
                                                   Margin="0,0,0,16"
                                                   Tag="{local:Loc Livery.IDS_Creator}"/>
                                <local:FZTextBlock Text="{Binding UserProfile.FormattedGamertag, Converter={StaticResource A_StringToUpper}}"
                                                   Style="{StaticResource A_Style_Text_Gamertag}"
                                                   VerticalAlignment="Bottom"
                                                   MaxWidth="380"/>

                            </StackPanel>
                            <!--Text area-->
                        </StackPanel>
                        <!--Horizontal-->

                        <Decorator VerticalAlignment="Bottom">
                            <local:CommonListBox x:Name="Menu"
                                 Style="{StaticResource A_Style_ListBox_TextMenu_Default}"
                                 local:FocusOnPageFocusGained.SelectorSelectedItem="True"
                                 ItemsSource="{Binding Options}" Margin="0,0,0,-3"/>
                        </Decorator>
                    </StackPanel>
                </ContentControl>

            </StackPanel>
        </Grid>
    </Grid>
</Page>