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

    <Grid x:Name="PART_LayoutRoot">
        <!-- Grid outside the A_Style_FrameworkElement_LayoutRoot element for pillarboxing/letterboxing at non-16:9 ratios -->
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <FZMaterial Color="#FF000000" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3"/> <!-- top letterbox for taller resolutions like 16:10 -->
        <FZMaterial Color="#FF000000" Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="3"/> <!-- bottom letterbox -->
        <FZMaterial Color="#FF000000" Grid.Row="0" Grid.Column="0" Grid.RowSpan="3"/> <!-- left pillarbox for ultrawide resolutions like 21:9, 32:9, etc -->
        <FZMaterial Color="#FF000000" Grid.Row="0" Grid.Column="2" Grid.RowSpan="3"/> <!-- right pillarbox -->
        <Decorator Style="{StaticResource A_Style_FrameworkElement_LayoutRoot}" Grid.Row="1" Grid.Column="1">
            <FZMediaElement Name="PART_VideoPlayer" LoadedBehavior="Manual" UnloadedBehavior="Manual">
                <FZMediaElement.Preset>
                    <FZMaterialPreset AlphaMode="MultSrcAlpha"/>
                </FZMediaElement.Preset>
                <VideoSequence.Attached>
                    <VideoSequence SwitchMode="Manual">
                    </VideoSequence>
                </VideoSequence.Attached>
            </FZMediaElement>
        </Decorator>
    </Grid>
</Page>
