<UserControl
	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:tron="clr-namespace:PDFTron.SilverDox.Controls;assembly=SilverDox"	
	xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
	xmlns:hdt="clr-namespace:System.Windows;assembly=System.Windows.Controls"
	xmlns:docViewControl="clr-namespace:PDFTron.SilverDox.Samples"
    xmlns:input="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.Toolkit"
    xmlns:control="clr-namespace:PDFTron.SilverDox.Samples.Controls"
    xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"
	x:Class="PDFTron.SilverDox.Samples.ReaderControl"
	mc:Ignorable="d"

	d:DesignHeight="300" d:DesignWidth="800"
    x:Name="ReadControl"
	Loaded="UserControl_Loaded"
    KeyUp="UserControl_KeyUp">
<!--xmlns:control="clr-namespace:PDFTron.SilverDox.Samples.Controls"-->
    <UserControl.Resources>
        <ResourceDictionary Source="/ReaderControl;component/Resources/ResourceDictionary.xaml" />        
    </UserControl.Resources>

	<Grid x:Name="LayoutRoot">
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto" />
			<RowDefinition Height="*" />
		</Grid.RowDefinitions>

		<Grid.Resources>
			<Storyboard x:Name="FadeInBar">
				<DoubleAnimation Storyboard.TargetName="DocumentToolbar" Storyboard.TargetProperty="Opacity" From="0"
						To="1.0" Duration="0:0:1" SpeedRatio="5" />
			</Storyboard>
			<Storyboard x:Name="FadeOutBar">
				<DoubleAnimation Storyboard.TargetName="DocumentToolbar" Storyboard.TargetProperty="Opacity" From="1.0"
						To="0" Duration="0:0:1" SpeedRatio="5" />
			</Storyboard>
		</Grid.Resources>

			<Border Grid.Row="1" BorderThickness="1" BorderBrush="Black">
            <Grid x:Name="LowerGrid" >
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="200"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                
                <docViewControl:SideWindowControl x:Name="DocumentSideWindow"  DataContext="{Binding ElementName=FixedDocViewer}" 
											  SizeChanged="DocumentSideWindow_SizeChanged"
											  Grid.Column="0" HorizontalAlignment="Stretch" Visibility="Visible"
                                              Background="DarkGray" />

                <!--<docViewControl:AnnotationWindowControl x:Name="AnnotationWindow"  DocumentViewer="{Binding ElementName=FixedDocViewer}" 
											  Grid.Column="0" HorizontalAlignment="Stretch" Visibility="Collapsed"
                                              Background="DarkGray" />-->

                <sdk:GridSplitter x:Name="SideWindowSplitter" ShowsPreview="True" Width="4" Grid.Column="1" Visibility="Visible" 
                                  HorizontalAlignment="Left" IsTabStop="False" Background="WhiteSmoke"
								  Margin="0,0,1,0"/>

                <Border x:Name="DocViewerBorder" Grid.Column="1" Margin="5,0,0,0" BorderThickness="0" Background="DarkGray">
                    <!-- Templates availble for DocumentViewer defined in Resources/ResourceDictionary 
                            *HorizontalLayoutTemplate, VerticalLayoutTemplate or RadialLayoutTemplate -->
					<control:CustomDocumentViewer x:Name="FixedDocViewer" Background="DarkGray">
                    </control:CustomDocumentViewer>
				</Border>
			</Grid>
		</Border>
		<docViewControl:ToolbarControl x:Name="DocumentToolbar" DataContext="{Binding ElementName=FixedDocViewer}"
				Grid.Row="0" Height="Auto" VerticalAlignment="Top" IsPinnedChanged="DocumentToolbar_IsPinnedChanged"></docViewControl:ToolbarControl>
	</Grid>
</UserControl>
