<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:reader="using:Windows.Reader.Controls"
    xmlns:mreader="using:Reader.Controls"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Height="Auto" Width="Auto">
	<UserControl.Resources>
		<ResourceDictionary>
			<ResourceDictionary.MergedDictionaries>
				<ResourceDictionary Source="PageTemplates.xaml"/>
			</ResourceDictionary.MergedDictionaries>
		</ResourceDictionary>
	</UserControl.Resources>
	<mreader:ReaderFlipView Style="{StaticResource ReaderNoMarginFlipView}" ScrollViewer.IsHorizontalScrollChainingEnabled="False" ScrollViewer.IsVerticalScrollChainingEnabled="False" x:Name="ReaderFlipView" BorderThickness="0" ItemTemplate="{StaticResource ReaderPageViewTemplate}">
		<mreader:ReaderFlipView.ItemContainerStyle>
			<Style TargetType="FlipViewItem">
				<Setter Property='Background' Value='Transparent' />
				<Setter Property="IsTabStop" Value="False" />
				<Setter Property='Template'>
					<Setter.Value>
						<ControlTemplate TargetType='FlipViewItem'>
							<ScrollViewer x:Name='ScrollViewer'
											Background="{StaticResource ReaderCanvasBackground}"
											Style="{StaticResource ReaderScrollViewerStyle}"
											IsTabStop="False"
											HorizontalScrollMode='Enabled'
											IsHorizontalRailEnabled='true'
											HorizontalScrollBarVisibility='Auto'
											VerticalScrollMode='Auto'
											IsVerticalRailEnabled='true'
											VerticalScrollBarVisibility='Auto'
											ZoomMode='Enabled'
											IsZoomChainingEnabled='true'
											IsVerticalScrollChainingEnabled='true'
											IsHorizontalScrollChainingEnabled='true'
											IsScrollInertiaEnabled='true'
											IsZoomInertiaEnabled='true'>
								<reader:DiscreteDocumentViewControl x:Name='DiscreteViewControl' IsTabStop="True" HorizontalAlignment='Center' VerticalAlignment='Center' >
									<Grid x:Name='parentPresenter' HorizontalAlignment='Center' VerticalAlignment='Center'>
										<ContentPresenter x:Name='contentPresenter'>
											<ContentPresenter.Transitions>
												<TransitionCollection>
													<EntranceThemeTransition IsStaggeringEnabled="True" FromHorizontalOffset="120" />
												</TransitionCollection>
											</ContentPresenter.Transitions>
										</ContentPresenter>
										<Border x:Name='pageBorder' BorderThickness="{StaticResource ReaderPageBorderThickness}" BorderBrush="{StaticResource ReaderPageBorderBrush}" IsHitTestVisible="True"/>
									</Grid>
								</reader:DiscreteDocumentViewControl>
							</ScrollViewer>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
			</Style>
		</mreader:ReaderFlipView.ItemContainerStyle>
	</mreader:ReaderFlipView>
</UserControl>
