<Page x:Class="ForzaUI.Resources.Anthem.InlineMarkupTest"
      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"
      xmlns:local="clr-namespace:ForzaUI"
      mc:Ignorable="d" 
      Style="{StaticResource A_Style_Page_Generic}">

   <Page.Resources>
        <ControlTemplate x:Key="A_ControlTemplate_InlineMarkupTest_Button" TargetType="{x:Type Control}">
            <Grid>
                <local:ControllerButtonControl Height="41"
                                               UseLargeIcon="True"
                                               Margin="0,0,0,0"
                                               Style="{StaticResource A_Style_ControllerButtonControl_ActivationButton}" />
            </Grid>
        </ControlTemplate>

        <Style x:Key="A_Style_InlineMarkupTest_Button" TargetType="{x:Type Control}">
            <Setter Property="Template" Value="{StaticResource A_ControlTemplate_InlineMarkupTest_Button}"/>
            <Setter Property="Height" Value="21"/>
        </Style>
        
        <Style x:Key="A_Style_InlineMarkupTest_Button_Bigger" TargetType="{x:Type Control}" BasedOn="{StaticResource A_Style_InlineMarkupTest_Button}">
            <Setter Property="Height" Value="61"/>
        </Style>

        <Style x:Key="A_Style_InlineMarkupTest_Button_Biggest" TargetType="{x:Type Control}" BasedOn="{StaticResource A_Style_InlineMarkupTest_Button}">
            <Setter Property="Height" Value="101"/>
        </Style>

        <Style x:Key="A_Style_InlineMarkupTest_0" TargetType="{x:Type local:FZRun}">
            <Setter Property="Color" Value="Blue"/>
            <Setter Property="FontFamily" Value="Horizon_A"/>
            <Setter Property="FontSize" Value="50"/>
        </Style>

        <Style x:Key="A_Style_InlineMarkupTest_1" TargetType="{x:Type local:FZRun}">
            <Setter Property="FontFamily" Value="Horizon_B"/>
            <Setter Property="FontSize" Value="35"/>
        </Style>

        <Style x:Key="A_Style_InlineMarkupTest_2" TargetType="{x:Type local:FZRun}">
            <Setter Property="FontFamily" Value="Horizon_C"/>
            <Setter Property="FontSize" Value="25"/>
        </Style>

        <Style x:Key="A_Style_InlineMarkupTest_3" TargetType="{x:Type local:FZRun}">
            <Setter Property="FontFamily" Value="Horizon_D"/>
            <Setter Property="FontSize" Value="16"/>
        </Style>
        
        <MappingConverter x:Key="A_MappingConverter_InlineTest">
            <MappingConverterEntry Key="{NoCase BUTTON}" Value="{StaticResource A_Style_InlineMarkupTest_Button}" />
            <MappingConverterEntry Key="{NoCase BUTTON_BIGGER}" Value="{StaticResource A_Style_InlineMarkupTest_Button_Bigger}" />
            <MappingConverterEntry Key="{NoCase BUTTON_BIGGEST}" Value="{StaticResource A_Style_InlineMarkupTest_Button_Biggest}" />
            <MappingConverterEntry Key="{NoCase 0}" Value="{StaticResource A_Style_InlineMarkupTest_0}" />
            <MappingConverterEntry Key="{NoCase 1}" Value="{StaticResource A_Style_InlineMarkupTest_1}" />
            <MappingConverterEntry Key="{NoCase 2}" Value="{StaticResource A_Style_InlineMarkupTest_2}" />
            <MappingConverterEntry Key="{NoCase 3}" Value="{StaticResource A_Style_InlineMarkupTest_3}" />
        </MappingConverter>
    </Page.Resources>
    
    <Grid>
        <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Background="White">
                <local:FZTextBlock FontSize="75"
                                   FontFamily="Horizon_C"
                                   Color="Magenta"
                                   HorizontalAlignment="Center"
                                   Text="Text[0:Text][1:Text][2:Text][3:Text][Button][Button_Bigger][Button_Biggest]"
                                   MarkupConverter="{StaticResource A_MappingConverter_InlineTest}"/>

                <local:FZTextBlock FontSize="75"
                                   FontFamily="Horizon_C"
                                   Color="Magenta"
                                   Text="Text[0:Text][1:Text][2:Text][3:Text][Button]&#x0a;Text[0:Text][1:Text][2:Text][3:Text][Button_Bigger]&#x0a;Text[0:Text][1:Text][2:Text][3:Text][Button_Biggest]"
                                    MarkupConverter="{StaticResource A_MappingConverter_InlineTest}"/>

                <local:FZTextBlock FontSize="75"
                                   FontFamily="Horizon_C"
                                   Color="Magenta"
                                   HorizontalAlignment="Center"
                                   MaxWidth="450"
                                   TextWrapping="Wrap"
                                   TextAlignment="Left"
                                   TextTrimming="None"
                                   Stretch="None" 
                                   Text="Text[0:Text][1:Text][2:Text][3:Text][Button][Button_Bigger][Button_Biggest]Text[0:Text][1:Text][2:Text][3:Text][Button][Button_Bigger][Button_Biggest]"
                                    MarkupConverter="{StaticResource A_MappingConverter_InlineTest}"/>
        </StackPanel>
    </Grid>
</Page>
