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

    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition/>
        </Grid.RowDefinitions>
        <Pivot ItemsSource="{Binding DocumentList}" Grid.Row="0" SelectedItem="{Binding CurrentDocument,Mode=TwoWay}">
            <Pivot.HeaderTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding Title}"/>
                </DataTemplate>
            </Pivot.HeaderTemplate>
            <Pivot.ItemTemplate>
                <DataTemplate>
                    <foo:FooTextBox Name="fooTextBox" Document="{Binding }" AllowFocusOnInteraction="True"></foo:FooTextBox>
                </DataTemplate>
            </Pivot.ItemTemplate>
        </Pivot>
        <StackPanel Grid.Row="1" >
            <Button Content="Load" Click="Button_Click"/>
            <Button Content="Print" Click="Print_Button_Click"/>
            <Button Content="New" Click="Button_Click_New"/>
        </StackPanel>
    </Grid>
</Page>
