<Page
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
	mc:Ignorable="d"
    xmlns:local="clr-namespace:ForzaUI"
	x:Class="ForzaUI.SceneList" 
	Width="1920" 
	Height="1080" >

	<Page.Resources>
		<local:SceneListViewModel x:Key="SceneListViewModel"/>
		<DataTemplate x:Key="ItemTemplate">
			<StackPanel Margin="0,0,0,8">
				<TextBlock Text="{Binding}" Margin="0" FontSize="24" Foreground="#FFED4A4A" VerticalAlignment="Stretch"/>
			</StackPanel>
		</DataTemplate>
		<Style x:Key="ListBoxStyle" TargetType="{x:Type ListBox}">
			<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="{x:Type ListBox}">
						<Grid>
							<Rectangle Fill="Black" />
							<ScrollViewer CanContentScroll="True" Focusable="false"  VerticalScrollBarVisibility="Disabled" HorizontalScrollBarVisibility="Disabled" Margin="4">
								<VirtualizingStackPanel  Orientation="Vertical" IsItemsHost="true" />
							</ScrollViewer>          
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
    

		</Style>
		<Style x:Key="ListBoxItemStyle" TargetType="{x:Type ListBoxItem}">
			<Setter Property="Background" Value="Transparent"/>
			<Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
			<Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
			<Setter Property="Padding" Value="2,0,0,0"/>
			<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="{x:Type ListBoxItem}">
						<Grid x:Name="Bd" SnapsToDevicePixels="true" >
							<VisualStateManager.VisualStateGroups>
								<VisualStateGroup x:Name="CommonStates">
									<VisualState x:Name="Normal"/>
									<VisualState x:Name="MouseOver"/>
									<VisualState x:Name="Disabled"/>
									<VisualState x:Name="Selected"/>
									<VisualState x:Name="Unselected"/>
								</VisualStateGroup>
								<VisualStateGroup x:Name="FocusStates">
									<VisualState x:Name="SelectedUnfocused"/>
									<VisualState x:Name="Unfocused"/>
									<VisualState x:Name="Focused">
										<Storyboard>
											<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Background">
												<EasingDoubleKeyFrame KeyTime="0" Value="1"/>
											</DoubleAnimationUsingKeyFrames>
										</Storyboard>
									</VisualState>
								</VisualStateGroup>
							</VisualStateManager.VisualStateGroups>
							<Rectangle x:Name="Background" Fill="#FF6E0E0E" Opacity="0" />
							<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<Storyboard x:Key="Intro"/>
		<Storyboard x:Key="Outro"/>
		<Storyboard x:Key="Expand"/>
		<Storyboard x:Key="Collapse"/>
	</Page.Resources>

	<Grid x:Name="LayoutRoot" DataContext="{StaticResource SceneListViewModel}" >
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="1*"/>
			<ColumnDefinition Width="1*"/>
			<ColumnDefinition Width="1*"/>
		</Grid.ColumnDefinitions>
		<local:CommonListBox x:Name="ListBox_Menu"
                             VirtualizingStackPanel.VirtualizationMode="Recycling" Margin="0,100"  
                             ItemsSource="{Binding MenuItems}" 
                             Style="{StaticResource ListBoxStyle}" 
                             ItemTemplate="{StaticResource ItemTemplate}" 
                             ItemContainerStyle="{StaticResource ListBoxItemStyle}" 
                             VerticalAlignment="Top" 
                             SelectedValuePath="Text" 
                             Grid.Column="1"/>
	</Grid>
</Page>