<UserControl x:Class="ExcelBook.PageTemplate"
             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" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="600">
    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.RowDefinitions>
            <RowDefinition Height="96" />
            <RowDefinition Height="*"/>
            <RowDefinition Height="96" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="96"/>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="96"/>
        </Grid.ColumnDefinitions>

        <!-- header -->
        <Border Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" 
                Margin="0 12" 
                BorderBrush="Black"
                BorderThickness="0 0 0 1" >
            <Grid>
                <TextBlock Text="ComponentOne ExcelBook" FontWeight="Bold" FontSize="14"
                    VerticalAlignment="Bottom" HorizontalAlignment="Left" />
                <TextBlock Text="Pdf Demo" FontWeight="Bold" FontSize="14"
                    VerticalAlignment="Bottom" HorizontalAlignment="Right" />
            </Grid>
        </Border>

        <!-- footer -->
        <Border Grid.Column="1" Grid.Row="2" HorizontalAlignment="Stretch" VerticalAlignment="Top" 
                Margin="0 12" 
                BorderBrush="Black"
                BorderThickness="0 1 0 0" >
            <Grid>
                <TextBlock x:Name="FooterLeft" Text="Today" 
                    VerticalAlignment="Bottom" HorizontalAlignment="Left" />
                <TextBlock x:Name="FooterRight" Text="Page {0} of {1}" 
                    VerticalAlignment="Bottom" HorizontalAlignment="Right" />
            </Grid>
        </Border>

        <Viewbox x:Name="PageContent" Grid.Row="1" Grid.Column="1" 
            VerticalAlignment="Top" HorizontalAlignment="Left" />
    </Grid>
</UserControl>
