<UserControl
    x:Class="FooEditor.DocumentControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:FooEditor"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:foo="using:FooEditEngine.Metro"
    mc:Ignorable="d"
    d:DesignHeight="300"
    d:DesignWidth="400">
    <UserControl.Resources>
        <ResourceDictionary>
            <local:TextPointConverter x:Key="TextPointConverter"/>
            <local:RateConverter x:Key="RateConverter"/>
        </ResourceDictionary>
    </UserControl.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="120" />
            <RowDefinition/>
            <RowDefinition Height="20"/>
        </Grid.RowDefinitions>
        <Grid Grid.Row="0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="20"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock Text="{Binding Title}" Grid.Column="1" Style="{StaticResource PageHeaderTextStyle}"/>
        </Grid>
        <foo:FooTextBox Grid.Row="1" Name="Textbox"/>
        <StackPanel Grid.Row="2" Orientation="Horizontal">
            <TextBlock Text="{Binding CaretPostion,ElementName=Textbox,Converter={StaticResource TextPointConverter}}"
                       Margin="0,0,10,0" Style="{StaticResource BasicTextStyle}"/>
            <TextBlock Text="{Binding MagnificationPower,ElementName=Textbox,Converter={StaticResource RateConverter}}"
                       Style="{StaticResource BasicTextStyle}"/>
        </StackPanel>
    </Grid>
</UserControl>
