<Page
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:ForzaUI"
    xmlns:System="clr-namespace:System;assembly=mscorlib"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    mc:Ignorable="d"
	x:Class="ForzaUI.A_PopupInstalling"
	x:Name="Page"
    Style="{StaticResource A_Style_Page_Generic}"
    DataContext="{Binding RelativeSource={RelativeSource Self}}">

    <Page.Resources>
        <ResourceDictionary>
            <Style x:Key="A_Style_Decorator_Separator" TargetType="Decorator">
                <Setter Property="Visibility" Value="Collapsed"/>
                <Style.Triggers>
                    <MultiDataTrigger>
                        <MultiDataTrigger.Conditions>
                            <Condition Binding="{Binding HasOptions, FallbackValue=False}" Value="True"/>
                            <Condition Binding="{Binding HasMessage}" Value="True"/>
                        </MultiDataTrigger.Conditions>
                        <Setter Property="Visibility"
                                Value="Visible" />
                    </MultiDataTrigger>
                </Style.Triggers>
            </Style>

            <Style x:Key="A_Style_ContentControl_PopupTitleBlock_Adjustable" TargetType="ContentControl" BasedOn="{StaticResource A_Style_ContentControl_PopupTitleBlock}">
                 <Setter Property="Width" Value="auto"/>
            </Style>
        </ResourceDictionary>
    </Page.Resources>

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

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

        <!-- Bars -->
        <ContentControl x:Name="BottomBar" Style="{StaticResource A_Style_ButtonBar}">
            <local:ControllerButtonPanel x:Name="PART_HelpPanel"
                                         Style="{StaticResource A_Style_ControllerButtonPanel_Default}">
            </local:ControllerButtonPanel>
        </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 Style="{StaticResource A_Style_ContentControl_PopupTitleBlock_Adjustable}"
                                Content="{Binding Title, Converter={StaticResource A_StringToUpper}}" />
                <ContentControl Style="{StaticResource A_Style_ContentControl_PopupContentBlock}">
                    <StackPanel>
                        <Decorator Height="30"/>
                        <local:FZTextBlock Text="{Binding Message}"
                                           Margin="20,0"
                                           Width="auto"
                                           Style="{StaticResource A_Style_FZTextBlock_PopupText}"
                                           local:ScreenReader.Line="{Binding ScreenReaderMessage}"
                                           local:ScreenReader.Event="OnLoad"
                                           local:ScreenReader.LineType="ScreenDescription" />

                        <Decorator Height="30"/>

                            <local:FZTextBlock Text="{Binding Progress, ConverterParameter=fracpercentage, Converter={StaticResource A_NumUnitConverter_ShowUnit_0dp}}"
                                               Style="{StaticResource A_Style_FZTextBlock_PopupText}"
                                               FontFamily="Horizon_C"
                                               CapHeight="30"
                                               RenderTransform="{StaticResource A_Transform_Italic}"/>
                        <Decorator Style="{StaticResource A_Style_Decorator_Separator}" Height="30"/>

                        <local:CommonListBox x:Name="PART_Menu"
                                             Style="{StaticResource A_Style_ListBox_TextMenu_Default}"
                                             ItemsSource="{Binding Options}" Margin="0,0,0,-2"/>

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