<Page x:Class="ForzaUI.Scenes.Anthem.A_PopupPCVideoOption"
      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>
            <DataTemplate x:Key="A_DataTemplate_ListBoxItem_OptionItem">
                <Grid IsHitTestVisible="False"
                      Height="{StaticResource A_Double_TextMenu_Height_Default}">
                    <local:FZTextBlock Text="{Binding Name, Converter={StaticResource A_StringToUpper}}"
                                       Style="{StaticResource A_Style_FZTextBlock_OptionText}" />
                    <Control x:Name="CheckBox"
                             Style="{StaticResource A_Style_Control_Checkbox}"
                             Tag="{Binding IsCurrentSelection}"
                             HorizontalAlignment="Right" />
                </Grid>
            </DataTemplate>
        </ResourceDictionary>
    </Page.Resources>

    <Grid>
        <local:FZMaterialGlassCapture />
        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_Popup_Background}"/>

        <!-- Bars -->
        <ContentControl x:Name="BottomBar"
                            Style="{StaticResource A_Style_ButtonBar}">
            <ContentControl x:Name="DefaultHelpPanel"
                            local:ControllerButtonPanel.ADescription="{local:Loc HelpButtons.IDS_Select}"
                            local:ControllerButtonPanel.BDescription="{local:Loc HelpButtons.IDS_Back}"
                            Style="{StaticResource A_Style_ContentControl_DefaultButtonBar}" />
        </ContentControl>

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

                <ContentControl Style="{StaticResource A_Style_ContentControl_PopupTitleBlock}"
                                Content="{Binding Title, Converter={StaticResource A_StringToUpper}}" />

                <ContentControl Style="{StaticResource A_Style_ContentControl_PopupContentBlock}">
                    <StackPanel>
                        <local:FZTextBlock Text="{Binding Message}"
                                           Margin="20,0"
                                           MaxWidth="400"
                                           Style="{StaticResource A_Style_FZTextBlock_PopupText}" />

                        <Decorator Height="30"/>

                        <local:CommonListBox x:Name="PopupItems"
                                             Style="{StaticResource A_Style_ListBox_List_Default_ScrollBar}"
                                             ItemsSource="{Binding Collection}"
                                             ItemTemplate="{StaticResource A_DataTemplate_ListBoxItem_OptionItem}"
                                             ItemContainerStyle="{StaticResource A_Style_ListBoxItem_TextMenu_Default}"
                                             SelectedItem="{Binding SelectedItem}"
                                             Height="561"
                                             local:FocusOnPageFocusGained.VirtualizingSelectorSelectedItem="True" />
                    </StackPanel>
                </ContentControl>
            </StackPanel>
        </Grid>
    </Grid>
</Page>
