<Page x:Class="ForzaUI.Scenes.Anthem.A_IconTestMapFilterPopup"
      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;assembly="
      Style="{StaticResource A_Style_Page_Generic}"
      DataContext="{Binding RelativeSource={RelativeSource Self}}"
      xmlns:System="clr-namespace:System;assembly=mscorlib">

    <Page.Resources>
        <ResourceDictionary>

            <Style x:Key="A_Style_ListBoxItem_CarFilterItem" BasedOn="{StaticResource A_Style_ListBoxItem_TextMenu_Default}" TargetType="ListBoxItem">
                <Style.Triggers>
                    <DataTrigger Binding="{Binding IsToggle}" Value="False">
                        <Setter Property="Focusable"
                                Value="False" />
                        <Setter Property="Tag"
                                Value="GroupHeader" />
                    </DataTrigger>
                </Style.Triggers>
            </Style>

            <DataTemplate x:Key="A_DataTemplate_ListBoxItem_CarFilterItem">
                <Grid IsHitTestVisible="False">
                    <local:FZTextBlock x:Name="Text" Text="{Binding Title, FallbackValue={x:Null}}" Style="{StaticResource A_Style_FZTextBlock_OptionText}" />
                    <Grid HorizontalAlignment="Right" Height="25" Width="200" Visibility="{Binding IsToggle, Converter={StaticResource A_Converter_BoolToVis}}">
                        <local:FZTextBlock x:Name="Value" Text="{Binding Value, FallbackValue={x:Null}}" Style="{StaticResource A_Style_FZTextBlock_OptionText}" />
                    </Grid>
                </Grid>
            </DataTemplate>

        </ResourceDictionary>
    </Page.Resources>

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

    <Grid>
        <Grid>
			<!-- Background Blur -->
			<local:FZMaterialGlassCapture />
          <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_Popup_Background}"
                            MinWidth="{Binding ActualWidth, ElementName=MainContent}"
                            MinHeight="{Binding ActualHeight, ElementName=MainContent}" />

			<!-- Help Button Bar -->
            <ContentControl x:Name="BottomBar"
                            Style="{StaticResource A_Style_ButtonBar}">
                <ContentControl x:Name="DefaultHelpPanel"
                                local:ControllerButtonPanel.BDescription="Confirm Filters"
                                local:ControllerButtonPanel.XDescription="{local:Loc HelpButtons.IDS_ClearAll}"
                                Style="{StaticResource A_Style_ContentControl_DefaultButtonBar}" />
            </ContentControl>
        </Grid>

        <Grid Style="{StaticResource A_Style_FrameworkElement_LayoutRoot}"
              Focusable="False">
            <StackPanel x:Name="MainContent"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Style="{StaticResource A_Style_FrameworkElement_DefaultTransition_0}">
                
                <ContentControl Content="{Binding Title, Converter={StaticResource A_StringToUpper}}"
                        Style="{StaticResource A_Style_ContentControl_PopupTitleBlock}"
						local:BindingProxy.A="/ForzaUI;component/Textures/Anthem/Icons/Titles/Options.png"/>

                <local:CommonListBox x:Name="Menu"
                                        Width="550"
                                        Grid.Column="1"
                                        Grid.Row="1"
                                        Style="{StaticResource A_Style_ListBox_TextMenu}"
                                        ItemContainerStyle="{StaticResource A_Style_ListBoxItem_CarFilterItem}"
                                        ItemTemplate="{StaticResource A_DataTemplate_ListBoxItem_CarFilterItem}"
                                        ItemsSource="{Binding Collection}"
                                        MaxHeight="689"
                                        SelectedItem="{Binding SelectedItem}">
                </local:CommonListBox>
            </StackPanel>
        </Grid>
    </Grid>
</Page>
