<UserControl>
	<Grid
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:vsm="using:Windows.UI.Xaml"
    RequestedTheme="Default"
    x:Name="PageEditBox"
    x:Uid="Layout">
		<Grid.Resources>
			<ResourceDictionary>
				<ResourceDictionary.ThemeDictionaries>
					<ResourceDictionary x:Key="Default">
						<!-- Default theme resources -->
						<SolidColorBrush x:Key="ReaderPageLabelBorderBrush" Color="#FF1D1D1D"/>
						<SolidColorBrush x:Key="ReaderPageLabelBackgroundBrush" Color="#891D1D1D"/>
						<SolidColorBrush x:Key="ReaderPageLabelPointerOverBrush" Color="#33FFFFFF"/>
						<SolidColorBrush x:Key="ReaderPageLabelForegroundBrush" Color="#FFFFFFFF"/>
						<SolidColorBrush x:Key="ReaderPageLabelSecondaryForegroundBrush" Color="#FF909090"/>
						<SolidColorBrush x:Key="ReaderPageLabelSecondaryBackgroundBrush" Color="#66909090"/>
						<SolidColorBrush x:Key="ReaderPageLabelPressedBackgroundThemeBrush" Color="#FFFFFFFF" />						
					</ResourceDictionary>
					<ResourceDictionary x:Key="HighContrast">
						<!-- High Contrast theme resources -->
						<SolidColorBrush x:Key="ReaderPageLabelBorderBrush" Color="{StaticResource SystemColorButtonTextColor}"/>
						<SolidColorBrush x:Key="ReaderPageLabelBackgroundBrush" Color="{StaticResource SystemColorButtonFaceColor}"/>
						<SolidColorBrush x:Key="ReaderPageLabelPointerOverBrush" Color="{StaticResource SystemColorHighlightColor}" />
						<SolidColorBrush x:Key="ReaderPageLabelForegroundBrush" Color="{StaticResource SystemColorButtonTextColor}"/>
						<SolidColorBrush x:Key="ReaderPageLabelSecondaryForegroundBrush" Color="{StaticResource SystemColorWindowTextColor}"/>
						<SolidColorBrush x:Key="ReaderPageLabelSecondaryBackgroundBrush" Color="{StaticResource SystemColorWindowTextColor}"/>
						<SolidColorBrush x:Key="ReaderPageLabelPressedBackgroundThemeBrush" Color="{StaticResource SystemColorButtonTextColor}" />		
					</ResourceDictionary>
				</ResourceDictionary.ThemeDictionaries>
			</ResourceDictionary>
			<Style x:Key="BackToPageButtonStyle" TargetType="Button">
				<Setter Property="Template">
					<Setter.Value>
						<ControlTemplate TargetType="Button">
							<Grid MinWidth="40" MinHeight="40" Height="40" Width="40">
								<VisualStateManager.VisualStateGroups>
									<VisualStateGroup x:Name="CommonStates">
										<VisualState x:Name="Normal"/>
										<VisualState x:Name="PointerOver">
											<Storyboard>
												<ObjectAnimationUsingKeyFrames Storyboard.TargetName="IconGlyph" Storyboard.TargetProperty="Foreground">
													<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource AppBarItemPointerOverForegroundThemeBrush}"/>
												</ObjectAnimationUsingKeyFrames>
												<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PointerOverEllipse" Storyboard.TargetProperty="Fill">
													<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ReaderPageLabelPointerOverBrush}" />
												</ObjectAnimationUsingKeyFrames>
											</Storyboard>
										</VisualState>
										<VisualState x:Name="Pressed">
											<Storyboard>
												<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundEllipse" Storyboard.TargetProperty="Fill">
													<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ReaderPageLabelPressedBackgroundThemeBrush}"/>
												</ObjectAnimationUsingKeyFrames>
												<ObjectAnimationUsingKeyFrames Storyboard.TargetName="IconGlyph" Storyboard.TargetProperty="Foreground">
													<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource AppBarItemPressedForegroundThemeBrush}"/>
												</ObjectAnimationUsingKeyFrames>
											</Storyboard>
										</VisualState>
										<VisualState x:Name="Disabled"/>
									</VisualStateGroup>
									<VisualStateGroup x:Name="FocusStates">
										<VisualState x:Name="Focused">
											<Storyboard>
												<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisualWhite"/>
												<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisualBlack"/>
											</Storyboard>
										</VisualState>
										<VisualState x:Name="Unfocused"/>
										<VisualState x:Name="PointerFocused"/>
									</VisualStateGroup>
								</VisualStateManager.VisualStateGroups>
								<Ellipse x:Name="BackgroundEllipse" HorizontalAlignment="Left" Height="40" VerticalAlignment="Top" Width="40" StrokeThickness="2" Stroke="{ThemeResource ReaderPageLabelForegroundBrush}" Fill="{ThemeResource ReaderPageLabelBackgroundBrush}"/>
								<Ellipse x:Name="PointerOverEllipse" HorizontalAlignment="Left" Height="40" VerticalAlignment="Top" Width="40" Fill="Transparent" Stroke="Transparent" StrokeThickness="2"/>
								<Rectangle x:Name="FocusVisualWhite" IsHitTestVisible="False" Opacity="0" StrokeDashOffset="1.5" StrokeEndLineCap="Square" Stroke="{StaticResource FocusVisualWhiteStrokeThemeBrush}" StrokeDashArray="1,1" Margin="-3"/>
								<Rectangle x:Name="FocusVisualBlack" IsHitTestVisible="False" Opacity="0" StrokeDashOffset="0.5" StrokeEndLineCap="Square" Stroke="{StaticResource FocusVisualBlackStrokeThemeBrush}" StrokeDashArray="1,1" Margin="-3"/>
								<!--<Path x:Name="IconGlyph" Fill="{ThemeResource ReaderPageLabelForegroundBrush}" Width="19.162" HorizontalAlignment="Center" Data="M13.4023,9.2327 C13.8727,9.2327 14.3217,9.14377 14.7477,8.96448 C15.1507,8.78519 15.5308,8.51554 15.8449,8.20286 C16.159,7.88875 16.4057,7.53017 16.585,7.10417 C16.7643,6.67818 16.8532,6.23067 16.8532,5.73727 C16.8532,5.26681 16.7643,4.81787 16.585,4.39188 C16.4057,3.98884 16.159,3.60731 15.8449,3.29463 C15.5308,2.98051 15.1507,2.73381 14.7477,2.55452 C14.3217,2.37523 13.8727,2.2863 13.4023,2.2863 L13.0437,2.33077 L13.0437,0 L13.4023,0 C14.1868,0 14.9269,0.156341 15.6441,0.447507 C16.3383,0.761623 16.9436,1.16467 17.4815,1.68102 C17.9964,2.21889 18.3994,2.82417 18.7135,3.51838 C19.0047,4.21259 19.1625,4.9527 19.1625,5.73727 C19.1625,6.54336 19.0047,7.28346 18.7135,7.97767 C18.3994,8.69483 17.9964,9.30011 17.4815,9.81647 C16.9436,10.3543 16.3383,10.7574 15.6441,11.0485 C14.9269,11.3627 14.1868,11.4961 13.4023,11.4961 L4.52814,11.4961 L8.44956,15.3515 L5.35718,15.3515 L0,10.3084 L5.35718,5.37869 L8.44956,5.37869 L4.52814,9.2327 L13.4023,9.2327" RenderTransformOrigin="0.5,0.5" Stretch="Fill" UseLayoutRounding="False" VerticalAlignment="Center" Height="15.352"/>-->
								<!--<Path x:Name="IconGlyph" Fill="{ThemeResource ReaderPageLabelForegroundBrush}" Width="15.613" HorizontalAlignment="Left" Data="M0.321022,0 L11.9849,0 L11.9849,11.6634 L7.66445,7.35649 C6.67461,8.29279 5.89655,9.3985 5.33033,10.6736 C4.76407,11.9487 4.48094,13.322 4.48094,14.7933 C4.48094,16.2557 4.75736,17.6288 5.31026,18.9129 C5.86312,20.197 6.61663,21.3227 7.5708,22.2901 C8.52502,23.2577 9.64186,24.0268 10.9215,24.5974 C12.2012,25.1681 13.5677,25.4624 15.0213,25.4802 L15.1684,25.4802 C16.4525,25.4802 17.663,25.2618 18.8,24.8248 C19.937,24.3879 20.9558,23.7905 21.8564,23.0325 L25.08,26.256 C23.7781,27.4152 22.2933,28.3225 20.6258,28.9779 C18.9582,29.6333 17.1837,29.961 15.3022,29.961 L15.0213,29.961 C13.648,29.9343 12.3215,29.7336 11.0419,29.3591 C9.76223,28.9846 8.56735,28.4629 7.45713,27.7941 C6.34691,27.1255 5.33252,26.3296 4.41407,25.4067 C3.4956,24.4838 2.71089,23.4605 2.05992,22.337 C1.40894,21.2135 0.902879,20.0097 0.541727,18.7256 C0.180575,17.4416 0,16.104 0,14.713 C0,12.6175 0.39682,10.6714 1.19046,8.87463 C1.98411,7.07784 3.07202,5.50624 4.45416,4.15978 z" RenderTransformOrigin="0.5,0.5" Stretch="Fill" UseLayoutRounding="False" VerticalAlignment="Top" Height="18.651" Margin="11,11.5,0,0"/>-->
								<TextBlock x:Name="IconGlyph" Foreground="{ThemeResource ReaderPageLabelForegroundBrush}" HorizontalAlignment="Center" RenderTransformOrigin="0.5,0.5" VerticalAlignment="Center" FontSize="21.333" FontFamily="{StaticResource SymbolThemeFontFamily}" Text="&#x21A9;"/>
							</Grid>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
			</Style>
			<Style x:Key="PageNumTextBoxStyle" TargetType="TextBox">
				<Setter Property="Foreground" Value="{ThemeResource TextBoxForegroundThemeBrush}" />
				<Setter Property="Background" Value="{ThemeResource TextBoxBackgroundThemeBrush}" />
				<Setter Property="BorderBrush" Value="{ThemeResource TextBoxBorderThemeBrush}" />
				<Setter Property="Template">
					<Setter.Value>
						<ControlTemplate TargetType="TextBox">
							<Grid x:Name="grid">
								<Grid.ColumnDefinitions>
									<ColumnDefinition Width="40"/>
									<ColumnDefinition Width="Auto"/>
								</Grid.ColumnDefinitions>
								<VisualStateManager.VisualStateGroups>
									<VisualStateGroup x:Name="CommonStates">
										<VisualState x:Name="Disabled"/>
										<VisualState x:Name="Normal">
											<Storyboard>
												<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentElement" Storyboard.TargetProperty="Foreground">
													<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ReaderPageLabelForegroundBrush}" />
												</ObjectAnimationUsingKeyFrames>
											</Storyboard>
										</VisualState>
										<VisualState x:Name="PointerOver">
											<Storyboard>
												<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PointerOverEllipse" Storyboard.TargetProperty="Fill">
													<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ReaderPageLabelPointerOverBrush}" />
												</ObjectAnimationUsingKeyFrames>
												<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentElement" Storyboard.TargetProperty="Foreground">
													<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource AppBarItemPointerOverForegroundThemeBrush}" />
												</ObjectAnimationUsingKeyFrames>
											</Storyboard>
										</VisualState>
										<VisualState x:Name="Focused">
											<Storyboard>
												<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="BackgroundEllipse"/>
												<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="BackgroundElement"/>
												<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="BorderElement"/>
												<DoubleAnimation Duration="0" To="30" Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="viewbox"/>
												<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentElement" Storyboard.TargetProperty="Foreground">
													<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxForegroundThemeBrush}" />
												</ObjectAnimationUsingKeyFrames>
												<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="viewbox">
													<DiscreteObjectKeyFrame KeyTime="0">
														<DiscreteObjectKeyFrame.Value>
															<Thickness>5,0</Thickness>
														</DiscreteObjectKeyFrame.Value>
													</DiscreteObjectKeyFrame>
												</ObjectAnimationUsingKeyFrames>
											</Storyboard>
										</VisualState>
									</VisualStateGroup>
									<VisualStateGroup x:Name="ButtonStates">
										<VisualState x:Name="ButtonVisible"/>
										<VisualState x:Name="ButtonCollapsed"/>
									</VisualStateGroup>
								</VisualStateManager.VisualStateGroups>
								<Border x:Name="BackgroundElement" Background="{TemplateBinding Background}" Margin="2" Opacity="0"/>
								<Border x:Name="BorderElement" BorderBrush="{StaticResource ReaderPageLabelBorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Opacity="0"/>
								<Ellipse x:Name="BackgroundEllipse" HorizontalAlignment="Left" Height="40" VerticalAlignment="Top" Width="40" StrokeThickness="2" Stroke="{ThemeResource ReaderPageLabelForegroundBrush}" Fill="{ThemeResource ReaderPageLabelBackgroundBrush}"/>
								<Ellipse x:Name="PointerOverEllipse" HorizontalAlignment="Left" Height="40" VerticalAlignment="Top" Width="40" Fill="Transparent" Stroke="Transparent" StrokeThickness="2"/>
								<Viewbox x:Name="viewbox" Width="28" Height="28" ScrollViewer.VerticalScrollBarVisibility="Disabled" Margin="-1,-2,0,0">
									<ScrollViewer x:Name="ContentElement" HorizontalScrollMode="{TemplateBinding ScrollViewer.HorizontalScrollMode}" HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}" IsTabStop="False" IsHorizontalRailEnabled="{TemplateBinding ScrollViewer.IsHorizontalRailEnabled}" IsVerticalRailEnabled="{TemplateBinding ScrollViewer.IsVerticalRailEnabled}" IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}" VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}" VerticalScrollMode="{TemplateBinding ScrollViewer.VerticalScrollMode}" ZoomMode="Disabled"
                      HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Padding="0,3" MinWidth="20" MinHeight="20" FontFamily="{ThemeResource ContentControlThemeFontFamily}" FontSize="14.667" Foreground="{ThemeResource ReaderPageLabelForegroundBrush}"/>
								</Viewbox>
								<Border x:Name="border" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Center" BorderThickness="0" Margin="3,0,0,0" >
									<TextBlock TextWrapping="Wrap" Text="{TemplateBinding Tag}" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="4,-2,4,0" Foreground="{ThemeResource ReaderPageLabelSecondaryForegroundBrush}" FontSize="14.667" FontFamily="{ThemeResource ContentControlThemeFontFamily}"/>
								</Border>
							</Grid>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
			</Style>
			<Storyboard x:Name="HideUI" x:Uid="HideUI">
				<FadeOutThemeAnimation BeginTime="0:0:5" TargetName="PageStackPanel"/>
			</Storyboard>
		</Grid.Resources>
		<VisualStateManager.VisualStateGroups>
			<VisualStateGroup x:Name="ShowHideStates">
				<VisualState x:Name="LabelShow">
					<Storyboard>
						<FadeInThemeAnimation TargetName="PageEditText" />
					</Storyboard>
				</VisualState>
				<VisualState x:Name="LabelHide">
					<StaticResource ResourceKey="HideUI"/>
				</VisualState>
				<VisualState x:Name="FinalLabelShowAndHide">
					<Storyboard>
						<DoubleAnimation Storyboard.TargetName="PageEditText" Storyboard.TargetProperty="Opacity" To="0" Duration="0"/>
					</Storyboard>
				</VisualState>
			</VisualStateGroup>
		</VisualStateManager.VisualStateGroups>
		<StackPanel x:Uid="PageStackPanel" x:Name="PageStackPanel" Margin="30,10,30,0" HorizontalAlignment="Left" VerticalAlignment="Top">
			<TextBox x:Uid="PageEditText" x:Name="PageEditText" Style="{StaticResource PageNumTextBoxStyle}" Margin="10,10,10,10"
          IsReadOnly="False" IsTextPredictionEnabled="False" IsSpellCheckEnabled="False" IsHitTestVisible="True" TextWrapping="NoWrap" AcceptsReturn="False"
          MaxLength="4" TextAlignment="Center" InputScope="Number" AutomationProperties.Name="Go to page"/>
			<Button x:Name="PageNavigateBackButton" x:Uid="PageNavigateBackButton" Style="{StaticResource BackToPageButtonStyle}" VerticalAlignment="Top" Margin="10,10,10,10" AutomationProperties.Name="Page Navigate Back"/>
		</StackPanel>
	</Grid>
</UserControl>
