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

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

    <Page.Resources>
        <Style x:Key="A_Style_ListBox_Placeholder" TargetType="{x:Type ListBox}">
            <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ListBox}">
                        <Border Background="{x:Null}">
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="ValidationStates">
                                    <VisualState x:Name="Valid"/>
                                    <VisualState x:Name="InvalidFocused"/>
                                    <VisualState x:Name="InvalidUnfocused"/>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <ScrollViewer Focusable="false" CanContentScroll="True" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Disabled">
                                <VirtualizingStackPanel Orientation="Vertical" IsItemsHost="True" VirtualizingStackPanel.VirtualizationMode="Recycling"/>
                            </ScrollViewer>
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style x:Key="A_Style_ListBoxItem_Placeholder" TargetType="{x:Type ListBoxItem}">
            <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
            <Setter Property="Height" Value="35"/>
            <Setter Property="Margin" Value="0,0,2,2"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type ListBoxItem}">
                        <Grid x:Name="Background" Height="{TemplateBinding Height}" HorizontalAlignment="Left">
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Normal"/>
                                    <VisualState x:Name="MouseOver"/>
                                    <VisualState x:Name="Disabled"/>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="SelectionStates">
                                    <VisualState x:Name="Unselected"/>
                                    <VisualState x:Name="Selected"/>
                                    <VisualState x:Name="SelectedUnfocused"/>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="FocusStates">
                                    <VisualState x:Name="Unfocused"/>
                                    <VisualState x:Name="Focused">
                                        <local:UIStoryboard DurationOverride="{StaticResource A_Duration_Button_Select}" >
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="FocusIndicator">
                                                <EasingDoubleKeyFrame KeyTime="0:0:0" Value="1"/>
                                            </DoubleAnimationUsingKeyFrames>
                                            <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="MenuItem">
                                                <EasingColorKeyFrame KeyTime="0:0:0" Value="{StaticResource A_Color_TileSelected_Text}"/>
                                            </ColorAnimationUsingKeyFrames>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Indicator">
                                                <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="0"/>
                                            </DoubleAnimationUsingKeyFrames>
                                        </local:UIStoryboard>
                                    </VisualState>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>

                            <local:FZMaterial x:Name="Indicator" Style="{StaticResource A_Style_FZMaterial_Tile_Background}" Opacity="1" />
                            <local:FZMaterial x:Name="FocusIndicator" Style="{StaticResource A_Style_FZMaterial_TileSelected_Background}" Opacity="0" />

                            <ContentPresenter x:Name="MenuItem">
                                <TextElement.Foreground>
                                    <SolidColorBrush Color="{StaticResource A_Color_Bar_Text}"/>
                                </TextElement.Foreground>
                            </ContentPresenter>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style x:Key="A_Style_TextBlock_ScreenTitle_Placeholder" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource A_Style_TextBlock_Title}" />
        <System:Double x:Key="A_Double_FontSize_Heading_Button_Placeholder">29.333</System:Double>
        <Style x:Key="A_Style_TextBlock_Button_Placeholder" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource A_Style_TextBlock_Heading_Button}" >
            <Setter Property="FontSize" Value="{StaticResource A_Double_FontSize_Heading_Button_Placeholder}"/>
        </Style>
        <Style x:Key="A_Style_TextBlock_InactiveTitle_Placeholder" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource A_Style_TextBlock_SubHeading_Button}" >
        </Style>
    </Page.Resources>

    <Grid x:Name="LayoutRoot" Style="{StaticResource A_Style_FrameworkElement_LayoutRoot}">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width=".1*"/>
            <ColumnDefinition/>
            <ColumnDefinition Width=".1*"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height=".3*"/>
            <RowDefinition/>
            <RowDefinition Height=".3*"/>
        </Grid.RowDefinitions>

        <Grid Grid.RowSpan="3" Grid.ColumnSpan="3" Style="{StaticResource A_Style_FrameworkElement_FadeOnlyTransition_0}" >
            <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_InactiveDescription_Background}" Preset="{StaticResource A_FZMaterialPresetGlass_Standard}"  />
        </Grid>

        <Grid Grid.Row="1" Grid.Column="1" Style="{StaticResource A_Style_FrameworkElement_DefaultTransition_2}" >
            <ListBox x:Name="List"
			ItemsSource="{Binding MenuItems}"
			ItemContainerStyle="{StaticResource A_Style_ListBoxItem_Placeholder}"
			Style="{StaticResource A_Style_ListBox_Placeholder}"
			SelectedItem="{Binding SelectedItem, Mode=OneWayToSource}" >
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding Text}" Style="{StaticResource A_Style_TextBlock_Button_Placeholder}" Margin="15,0"/>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
        </Grid>

        <Grid Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Center" Style="{StaticResource A_Style_FrameworkElement_DefaultTransition_1}">
            <ContentControl x:Name="ContentControl_SceneTitle"
                        Content="{Binding MenuTitle}" 
                        Style="{StaticResource A_Style_ContentControl_ScreenTitleBlock}" />
        </Grid>

        <Grid Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="2" HorizontalAlignment="Right" VerticalAlignment="Center" Style="{StaticResource A_Style_FrameworkElement_DefaultTransition_3}">
            <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_InactiveTitle_Background}" />

            <TextBlock Text="Placeholder" Style="{StaticResource A_Style_TextBlock_InactiveTitle_Placeholder}" Margin="15,0">
                <TextBlock.Foreground>
                    <SolidColorBrush Color="{StaticResource A_Color_InactiveTitle_Text}"/>
                </TextBlock.Foreground>
            </TextBlock>
        </Grid>
    </Grid>
</Page>
