<Page
    x:Class="LookAtFontMetrics.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:LookAtFontMetrics"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>

        <ListBox Name="lstbox"
                 Grid.Column="0"
                 Width="300"
                 SelectionChanged="OnListBoxSelectionChanged">
            <ListBox.ItemTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding}"
                               FontFamily="{Binding}"
                               FontSize="24" />
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
        
        <Grid Grid.Column="1"
              HorizontalAlignment="Center"
              VerticalAlignment="Center">
            <Border BorderBrush="{StaticResource ApplicationForegroundThemeBrush}"
                    BorderThickness="1">
                <Grid>
                    <Grid.Resources>
                        <Style TargetType="Line">
                            <Setter Property="Stroke" Value="Red" />
                            <Setter Property="StrokeThickness" Value="2" />
                            <Setter Property="X1" Value="0" />
                        </Style>
                    </Grid.Resources>
                    
                    <TextBlock Name="txtblk"
                               Text="Grzegżółka"
                               FontSize="192"
                               SizeChanged="OnTextBlockSizeChanged" />
                    
                    <Line x:Name="ascenderLine" Y1="0" Y2="0" />
                    <Line x:Name="capsHeightLine" />
                    <Line x:Name="xHeightLine" />
                    <Line x:Name="baselineLine" Stroke="Blue" />
                    <Line x:Name="descenderLine" />
                    <Line x:Name="lineGapLine" />
                </Grid>
            </Border>
        </Grid>
    </Grid>
</Page>
