<Grid
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Name="PreferencesPane" x:Uid="Layout"
    Width="346"
		RequestedTheme="Light">
  <Grid.Resources>
    <ResourceDictionary>
      <ResourceDictionary.ThemeDictionaries>
        <ResourceDictionary x:Key="Default">
          <!-- Default theme resources -->
          <SolidColorBrush x:Key="ReaderAccentBrush" Color="#FFD24726"/>
          <SolidColorBrush x:Key="ReaderControlForegroundBrush" Color="White"/>
          <SolidColorBrush x:Key="ReaderControlBackgroundBrush" Color="#FF111111"/>
          <SolidColorBrush x:Key="ReaderControlPointerOverBrush" Color="#3DFFFFFF"/>
          <SolidColorBrush x:Key="ReaderDarkPrimaryTextColor" Color="White"/>
          <SolidColorBrush x:Key="ReaderLightPrimaryTextColor" Color="Black"/>
          <SolidColorBrush x:Key="ReaderFlyoutBorderStrokeBrush" Color="#FF2A2A2A"/>
          <SolidColorBrush x:Key="ReaderFlyoutBorderFillBrush" Color="White"/>
					<SolidColorBrush x:Key="ReaderControlPointerOverForegroundBrush" Color="#FFFFFFFF" />
        </ResourceDictionary>
        <ResourceDictionary x:Key="HighContrast">
          <!-- High Contrast theme resources -->
          <SolidColorBrush x:Key="ReaderAccentBrush" Color="{StaticResource SystemColorHighlightColor}"/>
          <SolidColorBrush x:Key="ReaderControlForegroundBrush" Color="{StaticResource SystemColorButtonFaceColor}"/>
          <SolidColorBrush x:Key="ReaderControlBackgroundBrush" Color="{StaticResource SystemColorButtonTextColor}"/>
          <SolidColorBrush x:Key="ReaderControlPointerOverBrush" Color="{StaticResource SystemColorHighlightColor}"/>
          <SolidColorBrush x:Key="ReaderDarkPrimaryTextColor" Color="{StaticResource SystemColorHighlightTextColor}"/>
          <SolidColorBrush x:Key="ReaderLightPrimaryTextColor" Color="{StaticResource SystemColorButtonTextColor}"/>
          <SolidColorBrush x:Key="ReaderFlyoutBorderStrokeBrush" Color="{StaticResource SystemColorHighlightColor}"/>
          <SolidColorBrush x:Key="ReaderFlyoutBorderFillBrush" Color="{StaticResource SystemColorWindowColor}"/>
					<SolidColorBrush x:Key="ReaderControlPointerOverForegroundBrush" Color="{StaticResource SystemColorHighlightTextColor}" />
        </ResourceDictionary>
      </ResourceDictionary.ThemeDictionaries>
    </ResourceDictionary>
		
		<Style x:Key="BackButtonStyle" TargetType="Button">
		<Setter Property="RequestedTheme" Value="Dark" />
    <Setter Property="FontFamily" Value="{StaticResource SymbolThemeFontFamily}" />
    <Setter Property="FontSize" Value="39" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="Button">
          <Grid x:Name="RootGrid">
            <Grid Margin="-12,-16,-10,-10" Background="Transparent">
              <Ellipse x:Name="Background"
                  Fill="Transparent"
                  Stroke="{TemplateBinding Foreground}"
                  StrokeThickness="2"
                  Height="30"
                  Width="30"
                  Margin="12,0,0,0"
                  HorizontalAlignment="Left" />
							<Path x:Name="NormalGlyph" Data="M5.96038,0 L10.3021,0 L5.73188,4.83686 L16.015,4.83686 L16.015,8.05514 L5.73188,8.05514 L10.3021,12.911 L5.96038,12.911 L0,6.47455 L0,6.41745 z" Fill="{TemplateBinding Foreground}" Margin="19,0,0,0" Stretch="None" Width="16.015" Height="12.911" HorizontalAlignment="Left" VerticalAlignment="Center"/>
              <Ellipse x:Name="PressedBackground"
                  Fill="{TemplateBinding Foreground}"
                  StrokeThickness="0"
                  Height="30"
                  Width="30"
                  Margin="12,0,0,0"
                  HorizontalAlignment="Left"
                  Opacity="0" />
							<Path x:Name="PressedGlyph" Opacity="0" Data="M5.96038,0 L10.3021,0 L5.73188,4.83686 L16.015,4.83686 L16.015,8.05514 L5.73188,8.05514 L10.3021,12.911 L5.96038,12.911 L0,6.47455 L0,6.41745 z" Fill="{StaticResource SettingsFlyoutBackgroundThemeBrush}" Margin="19,0,0,0" Stretch="None" Width="16.015" Height="12.911" HorizontalAlignment="Left" VerticalAlignment="Center"/>
            </Grid>
            <Rectangle x:Name="FocusVisualWhite"
                  Margin="-3,-6,-3,0"
                  IsHitTestVisible="False"
                  Stroke="{StaticResource FocusVisualWhiteStrokeThemeBrush}"
                  StrokeEndLineCap="Square"
                  StrokeDashArray="1,1"
                  Opacity="0"
                  StrokeDashOffset="1.5" />
            <Rectangle x:Name="FocusVisualBlack"
                  Margin="-3,-6,-3,0"
                  IsHitTestVisible="False"
                  Stroke="{StaticResource FocusVisualBlackStrokeThemeBrush}"
                  StrokeEndLineCap="Square"
                  StrokeDashArray="1,1"
                  Opacity="0"
                  StrokeDashOffset="0.5" />
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal" />
                <VisualState x:Name="PointerOver">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background" Storyboard.TargetProperty="Fill">
                      <DiscreteObjectKeyFrame Value="{StaticResource SettingsFlyoutBackButtonPointerOverBackgroundThemeBrush}" KeyTime="0" />
                    </ObjectAnimationUsingKeyFrames>
										<ObjectAnimationUsingKeyFrames Storyboard.TargetName="NormalGlyph" Storyboard.TargetProperty="Fill">
                      <DiscreteObjectKeyFrame Value="{StaticResource ReaderControlPointerOverForegroundBrush}" KeyTime="0" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Pressed">
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="PressedBackground"
                        Storyboard.TargetProperty="Opacity"
                        To="1"
                        Duration="0" />
                    <DoubleAnimation Storyboard.TargetName="PressedGlyph"
                        Storyboard.TargetProperty="Opacity"
                        To="1"
                        Duration="0" />
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Disabled">
                  <Storyboard>
                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="RootGrid" Storyboard.TargetProperty="Visibility">
                      <DiscreteObjectKeyFrame Value="Collapsed" KeyTime="0" />
                    </ObjectAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused">
                  <Storyboard>
                    <DoubleAnimation Storyboard.TargetName="FocusVisualWhite"
                        Storyboard.TargetProperty="Opacity"
                        To="1"
                        Duration="0" />
                    <DoubleAnimation Storyboard.TargetName="FocusVisualBlack"
                        Storyboard.TargetProperty="Opacity"
                        To="1"
                        Duration="0" />
                  </Storyboard>
                </VisualState>
                <VisualState x:Name="Unfocused" />
                <VisualState x:Name="PointerFocused" />
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  </Grid.Resources>
  <Grid.Transitions>
    <TransitionCollection>
      <PaneThemeTransition Edge="Right"/>
    </TransitionCollection>
  </Grid.Transitions>
  <Border BorderThickness="1,0,0,0" Background="{StaticResource ReaderFlyoutBorderFillBrush}" BorderBrush="{StaticResource ReaderFlyoutBorderStrokeBrush}">
    <StackPanel Orientation="Vertical">
      <StackPanel x:Name="PreferencesHeader" Orientation="Horizontal" Margin="0" Background="{StaticResource ReaderAccentBrush}" VerticalAlignment="Top" Height="80">
        <Button x:Name="PreferencesBackButton" Style="{StaticResource BackButtonStyle}" Width="36" Height="36" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="37,35,0,0"  AutomationProperties.AutomationId="Preferences.BackButton" AutomationProperties.Name="Go Back"/>
        <TextBlock x:Uid="PreferencesHeader" x:Name="PreferencesHeader" Foreground="{StaticResource ReaderDarkPrimaryTextColor}" FontFamily="{StaticResource ContentControlThemeFontFamily}" FontWeight="Light" FontSize="26.667" Margin="3,31,0,0"  AutomationProperties.AutomationId="Preferences.HeaderText"/>
      </StackPanel>
      <StackPanel x:Name="PreferencesContent" Orientation="Vertical" Margin="32,34,0,0">
        <TextBlock x:Uid="ReadingSectionLabel" x:Name="ReadingSectionLabel" Foreground="{StaticResource ReaderLightPrimaryTextColor}" FontFamily="{StaticResource ContentControlThemeFontFamily}" FontWeight="Semibold" FontSize="14.667" Margin="6,0,0,0" AutomationProperties.AutomationId="Preferences.ForceRTLText"/>
        <ToggleSwitch x:Uid="ForceRTL" x:Name="ForceRTL" Margin="0,-7,0,0" AutomationProperties.AutomationId="Preferences.ForceRTLToggleSwitch" AutomationProperties.Name="Toggle RTL Setting">
          <ToggleSwitch.Header>
            <TextBlock x:Uid="ForceRTLHeader" x:Name="ForceRTLHeader" Foreground="{StaticResource ReaderLightPrimaryTextColor}" FontFamily="{StaticResource ContentControlThemeFontFamily}" FontWeight="SemiLight" FontSize="14.667" Margin="0,1,20,0" TextWrapping="Wrap" LineStackingStrategy="BlockLineHeight" LineHeight="20"  AutomationProperties.AutomationId="Preferences.ForceRTLValueText"/>
          </ToggleSwitch.Header>
        </ToggleSwitch>
      </StackPanel>
      <StackPanel x:Name="LayoutSettings" Orientation="Vertical" Margin="32,43,0,0">
        <TextBlock x:Uid="LayoutSettingsLabel" x:Name="LayoutSettingsLabel" Foreground="{StaticResource ReaderLightPrimaryTextColor}" FontFamily="{StaticResource ContentControlThemeFontFamily}" FontWeight="SemiBold" FontSize="14.667" Margin="6,0,0,0" AutomationProperties.AutomationId="Preferences.LayoutText"/>
        <ComboBox Name="LayoutComboBox" Height="30" MinWidth="220" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="7,8,0,0">
          <ComboBoxItem  Name="cbDocument" IsSelected="True" x:Uid="cbDocument"></ComboBoxItem>
          <ComboBoxItem  Name="cbContinuous" x:Uid="cbContinuous"></ComboBoxItem>
          <ComboBoxItem  Name="cbOnePage" x:Uid="cbOnePage"></ComboBoxItem>
          <ComboBoxItem  Name="cbTwoPage" x:Uid="cbTwoPage"></ComboBoxItem>
        </ComboBox>
      </StackPanel>
      <StackPanel x:Name="ScriptExecutionSettings" Orientation="Vertical" Margin="32,62,0,0">
        <TextBlock x:Uid="ScriptExecutionEnabledLabel" x:Name="ScriptExecutionEnabledLabel" Foreground="{StaticResource ReaderLightPrimaryTextColor}" FontFamily="{StaticResource ContentControlThemeFontFamily}" FontWeight="SemiBold" FontSize="14.667" Margin="6,0,0,0" AutomationProperties.AutomationId="Preferences.ScriptExecutionEnabledText"/>
        <ToggleSwitch x:Uid="EnableScripts" x:Name="EnableScripts" Margin="0,-7,0,0" AutomationProperties.AutomationId="Preferences.EnableScriptsToggleSwitch" AutomationProperties.Name="Enable Scripts">
          <ToggleSwitch.Header>
            <TextBlock x:Uid="DocumentReloadNeededInfoLabel" x:Name="DocumentReloadNeededInfoLabel" Foreground="{StaticResource ReaderLightPrimaryTextColor}" FontFamily="{StaticResource ContentControlThemeFontFamily}" FontWeight="SemiLight" FontSize="14.667" Margin="0,6,20,0" TextWrapping="Wrap" LineStackingStrategy="BlockLineHeight" LineHeight="20"  AutomationProperties.AutomationId="Preferences.DocumentReloadNeededInfoText"/>
          </ToggleSwitch.Header>
        </ToggleSwitch>
      </StackPanel>
    </StackPanel>
  </Border>
</Grid>