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

    <Page.Resources>
        <Color x:Key="ForzaBlueColor">#FF0EB8FF</Color>
        <Color x:Key="AlmostWhite90Color">#E5FFFFFF</Color>
        <Color x:Key="AlmostBlack70Color">#B2000000</Color>

        <SolidColorBrush x:Key="AlmostBlack70Brush" Color="{StaticResource AlmostBlack70Color}"/>

        <Style x:Key="A_Style_ChatTextBlock_HorizonA" TargetType="local:ChatTextBlock">
            <Setter Property="GamertagColor" Value="{StaticResource ForzaBlueColor}" />
            <Setter Property="MessageColor" Value="{StaticResource AlmostWhite90Color}" />
            <Setter Property="FontFamily" Value="Horizon_A" />
            <Setter Property="FontSize" Value="24" />
            <Setter Property="Margin" Value="8" />
            <Setter Property="IsHitTestVisible" Value="False" />
        </Style>
    </Page.Resources>

    <Grid x:Name="PART_LayoutRoot"
          HorizontalAlignment="Stretch"
          VerticalAlignment="Stretch"
          Height="Auto"
          Width="Auto">
        <VisualStateManager.VisualStateGroups>
            <VisualStateGroup x:Name="Opacity">
                <VisualStateGroup.Transitions>
                    <VisualTransition GeneratedDuration="0"/>
                </VisualStateGroup.Transitions>
                <VisualState x:Name="PART_Hidden">
                    <Storyboard>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="InnerBorder">
                            <EasingDoubleKeyFrame KeyTime="0:0:0.075" Value="0"/>
                        </DoubleAnimationUsingKeyFrames>
                    </Storyboard>
                </VisualState>
                <VisualState x:Name="PART_Shown">
                    <Storyboard>
                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="InnerBorder">
                            <EasingDoubleKeyFrame KeyTime="0:0:0.075" Value="1"/>
                        </DoubleAnimationUsingKeyFrames>
                    </Storyboard>
                </VisualState>
            </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>

        <Grid Height="225"
              Width="350"
              Margin="10"
              HorizontalAlignment="Right"
              VerticalAlignment="Center">
            <Border x:Name="InnerBorder" Background="{StaticResource AlmostBlack70Brush}" Opacity="0">
                <local:ChatTextBlock MsgList="{Binding ChatMessages}" Style="{StaticResource A_Style_ChatTextBlock_HorizonA}" />
            </Border>
        </Grid>
    </Grid>
</Page>