<UserControl x:Class="StreamingSample.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:sdox="clr-namespace:PDFTron.SilverDox.Controls;assembly=SilverDox"
    mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="400">

    <Grid x:Name="LayoutRoot" Background="White">
        <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">

            <StackPanel>
                <sdox:DocumentViewer x:Name="MyDocumentViewer" 
                             Margin="5"
                             Background="LightGray"
                             Height="500"
                             Width="500"/>
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                    <TextBox x:Name="CurrentPageNumberTextBox" VerticalAlignment="Center" 
                           HorizontalAlignment="Left" Width="30" 
                           Text="{Binding CurrentPageNumber, ElementName=MyDocumentViewer,Mode=TwoWay}"/>
                    <TextBlock Text=" of " VerticalAlignment="Center"/>
                    <TextBlock x:Name="PageCountTextBox" VerticalAlignment="Center"
                           HorizontalAlignment="Left" Width="30"
                           Text="{Binding PageCount, ElementName=MyDocumentViewer}"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                    <Button x:Name="PreviousPageButton" Content="Previous Page" Width="100" Click="PreviousPageButton_Click"/>
                    <Button x:Name="NextPageButton" Content="Next Page" Width="100" Click="NextPageButton_Click"/>
                </StackPanel>
            </StackPanel>
        </StackPanel>
    </Grid>
</UserControl>
