<UserControl
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  Visibility="Collapsed" Height="Auto" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Name="FindBar" ManipulationMode="All" x:Uid="Layout">
  <UserControl.Resources>
    <ResourceDictionary>
      <ResourceDictionary.ThemeDictionaries>
                <ResourceDictionary x:Key="Default">
                    <!-- Default theme resources -->
                    <x:Double x:Key="ReaderAppBarButtonPointerOverStroke">0</x:Double>
                    <x:Double x:Key="ReaderTextBoxRestOpacity">0.8</x:Double>
                    <x:Double x:Key="ReaderTextBoxPointerOverOpacity">0.87</x:Double>
                    <SolidColorBrush x:Key="ReaderAccentBrush" Color="#FFD24726"/>
                    <SolidColorBrush x:Key="ReaderAccentHoverBrush" Color="#FFD96246"/>
                    <SolidColorBrush x:Key="ReaderAccentHoverFillBrush" Color="White"/>
                    <SolidColorBrush x:Key="ReaderDarkErrorTextColor" Color="#FFFF8033"/>
                    <SolidColorBrush x:Key="ReaderAppBarButtonForegroundBrush" Color="White"/>
                    <SolidColorBrush x:Key="ReaderAppBarButtonBackgroundBrush" Color="#FF2A2A2A"/>
                    <SolidColorBrush x:Key="ReaderAppBarButtonPointerOverBrush" Color="#3DFFFFFF"/>
                    <SolidColorBrush x:Key="ReaderAppBarButtonPointerOverFillBrush" Color="White"/>
                    <SolidColorBrush x:Key="ReaderAppBarButtonLightPointerOverBrush" Color="#FFA7A7A7"/>
                    <SolidColorBrush x:Key="ReaderAppBarHeaderLineBrush" Color="Transparent"/>
                    <SolidColorBrush x:Key="ReaderTextBoxTextBrush" Color="#FF212121"/>
                    <SolidColorBrush x:Key="ReaderTextBoxFillBrush" Color="White" />
                    <SolidColorBrush x:Key="ReaderTextBoxBorderBrush" Color="White" />
                    <SolidColorBrush x:Key="ReaderTextBoxDisabledTextBrush" Color="#FF7D7D7D" />
                    <SolidColorBrush x:Key="ReaderTextBoxButtonNormalBrush" Color="#FF7D7D7D" />
                    <SolidColorBrush x:Key="ReaderTextBoxButtonRestFillBrush" Color="Transparent" />
                    <SolidColorBrush x:Key="ReaderTextBoxButtonPointerOverFillBrush" Color="#FFDEDEDE" />
                    <SolidColorBrush x:Key="ReaderTextBoxButtonPressedFillBrush" Color="#FF212121" />
                    <SolidColorBrush x:Key="ReaderTextBoxButtonGlyphRestBrush" Color="#FF212121" />
                    <SolidColorBrush x:Key="ReaderTextBoxButtonGlyphPointerOverBrush" Color="#FF212121" />
                    <SolidColorBrush x:Key="ReaderTextBoxButtonGlyphFocusBrush" Color="White" />
                    <SolidColorBrush x:Key="ReaderTextBoxButtonGlyphPressedBrush" Color="White" />
                </ResourceDictionary>
        <ResourceDictionary x:Key="HighContrast">
          <!-- High Contrast theme resources -->
          <x:Double x:Key="ReaderAppBarButtonPointerOverStroke">2.25</x:Double>
          <x:Double x:Key="ReaderTextBoxRestOpacity">0.8</x:Double>
          <x:Double x:Key="ReaderTextBoxPointerOverOpacity">0.87</x:Double>
          <SolidColorBrush x:Key="ReaderAccentBrush" Color="{StaticResource SystemColorHighlightColor}"/>
          <SolidColorBrush x:Key="ReaderAccentHoverBrush" Color="{StaticResource SystemColorHighlightColor}"/>
          <SolidColorBrush x:Key="ReaderAccentHoverFillBrush" Color="{StaticResource SystemColorHighlightTextColor}"/>
          <SolidColorBrush x:Key="ReaderDarkErrorTextColor" Color="{StaticResource SystemColorGrayTextColor}"/>
          <SolidColorBrush x:Key="ReaderAppBarButtonForegroundBrush" Color="{StaticResource SystemColorButtonTextColor}"/>
          <SolidColorBrush x:Key="ReaderAppBarButtonBackgroundBrush" Color="{StaticResource SystemColorButtonFaceColor}"/>
          <SolidColorBrush x:Key="ReaderAppBarButtonPointerOverBrush" Color="{StaticResource SystemColorHighlightColor}"/>
          <SolidColorBrush x:Key="ReaderAppBarButtonPointerOverFillBrush" Color="{StaticResource SystemColorHighlightTextColor}"/>
          <SolidColorBrush x:Key="ReaderAppBarButtonLightPointerOverBrush" Color="{StaticResource SystemColorHighlightColor}"/>
          <SolidColorBrush x:Key="ReaderAppBarHeaderLineBrush" Color="{StaticResource SystemColorHighlightColor}"/>
          <SolidColorBrush x:Key="ReaderTextBoxTextBrush" Color="{StaticResource SystemColorWindowTextColor}" />
          <SolidColorBrush x:Key="ReaderTextBoxFillBrush" Color="{StaticResource SystemColorWindowColor}" />
          <SolidColorBrush x:Key="ReaderTextBoxBorderBrush" Color="{StaticResource SystemColorWindowTextColor}" />
          <SolidColorBrush x:Key="ReaderTextBoxDisabledTextBrush" Color="{StaticResource SystemColorGrayTextColor}" />
          <SolidColorBrush x:Key="ReaderTextBoxButtonNormalBrush" Color="{StaticResource SystemColorButtonTextColor}" />
          <SolidColorBrush x:Key="ReaderTextBoxButtonRestFillBrush" Color="{StaticResource SystemColorWindowColor}" />
          <SolidColorBrush x:Key="ReaderTextBoxButtonPointerOverFillBrush" Color="{StaticResource SystemColorHighlightColor}" />
          <SolidColorBrush x:Key="ReaderTextBoxButtonPressedFillBrush" Color="{StaticResource SystemColorButtonTextColor}" />
          <SolidColorBrush x:Key="ReaderTextBoxButtonGlyphRestBrush" Color="{StaticResource SystemColorButtonTextColor}" />
          <SolidColorBrush x:Key="ReaderTextBoxButtonGlyphPointerOverBrush" Color="{StaticResource SystemColorHighlightTextColor}" />
          <SolidColorBrush x:Key="ReaderTextBoxButtonGlyphFocusBrush" Color="{StaticResource SystemColorHighlightTextColor}" />
          <SolidColorBrush x:Key="ReaderTextBoxButtonGlyphPressedBrush" Color="{StaticResource SystemColorButtonFaceColor}" />
        </ResourceDictionary>
      </ResourceDictionary.ThemeDictionaries>
    </ResourceDictionary>

    <Style TargetType="Button" x:Name="FindButtonStyle">
      <Setter Property="Foreground" Value="{StaticResource ReaderAppBarButtonForegroundBrush}"/>
      <Setter Property="VerticalAlignment" Value="Stretch" />
      <Setter Property="Template">
        <Setter.Value>
          <ControlTemplate TargetType="Button">
            <Grid MinHeight="88" Width="100" Background="Transparent">
              <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                  <VisualState x:Name="Normal"/>
                  <VisualState x:Name="PointerOver">
                    <Storyboard>
                      <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CircleBase" Storyboard.TargetProperty="Fill">
                        <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ReaderAppBarButtonPointerOverBrush}" />
                      </ObjectAnimationUsingKeyFrames>
                      <ObjectAnimationUsingKeyFrames Storyboard.TargetName="IconShape" Storyboard.TargetProperty="Fill">
                        <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ReaderAppBarButtonPointerOverFillBrush}" />
                      </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                  </VisualState>
                  <VisualState x:Name="Pressed">
                    <Storyboard>
                      <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CircleBase" Storyboard.TargetProperty="Fill">
                        <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ReaderAppBarButtonForegroundBrush}" />
                      </ObjectAnimationUsingKeyFrames>
                      <ObjectAnimationUsingKeyFrames Storyboard.TargetName="IconShape" Storyboard.TargetProperty="Fill">
                        <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ReaderAppBarButtonBackgroundBrush}" />
                      </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                  </VisualState>
                  <VisualState x:Name="Disabled"/>
                </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"/>
                </VisualStateGroup>
              </VisualStateManager.VisualStateGroups>
              <Grid Margin="0,14,0,0" VerticalAlignment="Top" Height="40" Width="40" HorizontalAlignment="Center">
                <Ellipse x:Name="CircleBase" StrokeThickness="2.25" Width="40" Height="40" Stroke="{StaticResource ReaderAppBarButtonForegroundBrush}" Fill="Transparent"/>
                <Path FlowDirection="LeftToRight" x:Name="IconShape" Fill="{StaticResource ReaderAppBarButtonForegroundBrush}" Data="{TemplateBinding Content}" Height="{TemplateBinding MinHeight}" Width="{TemplateBinding MinWidth}" UseLayoutRounding="False"/>
              </Grid>
              <Rectangle x:Name="FocusVisualWhite" Stroke="White" StrokeEndLineCap="Square" StrokeDashArray="1,1" Opacity="0" StrokeDashOffset="1.5"/>
              <Rectangle x:Name="FocusVisualBlack" Stroke="Black" StrokeEndLineCap="Square" StrokeDashArray="1,1" Opacity="0" StrokeDashOffset="0.5"/>
              <TextBlock x:Name="ContentPresenter" Text="{TemplateBinding Tag}" TextAlignment="Center" TextWrapping="Wrap" MaxHeight="38" Foreground="{StaticResource ReaderAppBarButtonForegroundBrush}" x:Uid="AppBar" MaxWidth="88" Margin="0, 59, 0, 11" HorizontalAlignment="Center" VerticalAlignment="Top"/>
            </Grid>
          </ControlTemplate>
        </Setter.Value>
      </Setter>
    </Style>

    <Style TargetType="Button" x:Name="FindButtonNarrowStyle">
      <Setter Property="Foreground" Value="{StaticResource ReaderAppBarButtonForegroundBrush}"/>
      <Setter Property="Template">
        <Setter.Value>
          <ControlTemplate TargetType="Button">
            <Grid Width="60" Height="68" Background="Transparent">
              <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                  <VisualState x:Name="Normal"/>
                  <VisualState x:Name="PointerOver">
                    <Storyboard>
                      <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CircleBase" Storyboard.TargetProperty="Fill">
                        <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ReaderAppBarButtonPointerOverBrush}" />
                      </ObjectAnimationUsingKeyFrames>
                      <ObjectAnimationUsingKeyFrames Storyboard.TargetName="IconShape" Storyboard.TargetProperty="Fill">
                        <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ReaderAppBarButtonPointerOverFillBrush}" />
                      </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                  </VisualState>
                  <VisualState x:Name="Pressed">
                    <Storyboard>
                      <ObjectAnimationUsingKeyFrames Storyboard.TargetName="CircleBase" Storyboard.TargetProperty="Fill">
                        <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ReaderAppBarButtonForegroundBrush}" />
                      </ObjectAnimationUsingKeyFrames>
                      <ObjectAnimationUsingKeyFrames Storyboard.TargetName="IconShape" Storyboard.TargetProperty="Fill">
                        <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ReaderAppBarButtonBackgroundBrush}" />
                      </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                  </VisualState>
                  <VisualState x:Name="Disabled"/>
                </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"/>
                </VisualStateGroup>
              </VisualStateManager.VisualStateGroups>
              <Grid Margin="0,14,0,0" VerticalAlignment="Top" Height="40" Width="40" HorizontalAlignment="Center">
                <Ellipse x:Name="CircleBase" StrokeThickness="2.25" Width="40" Height="40" Stroke="{StaticResource ReaderAppBarButtonForegroundBrush}" Fill="Transparent"/>
                <Path FlowDirection="LeftToRight" x:Name="IconShape" Fill="{StaticResource ReaderAppBarButtonForegroundBrush}" Data="{TemplateBinding Content}" Height="{TemplateBinding MinHeight}" Width="{TemplateBinding MinWidth}" UseLayoutRounding="False"/>
              </Grid>
              <Rectangle x:Name="FocusVisualWhite" Stroke="White" StrokeEndLineCap="Square" StrokeDashArray="1,1" Opacity="0" StrokeDashOffset="1.5"/>
              <Rectangle x:Name="FocusVisualBlack" Stroke="Black" StrokeEndLineCap="Square" StrokeDashArray="1,1" Opacity="0" StrokeDashOffset="0.5"/>
            </Grid>
          </ControlTemplate>
        </Setter.Value>
      </Setter>
    </Style>

    <Style TargetType="ToggleButton" x:Name="OverflowFindButtonStyle">
      <Setter Property="Padding" Value="0" />
      <Setter Property="VerticalAlignment" Value="Stretch" />
      <Setter Property="Template">
        <Setter.Value>
          <ControlTemplate TargetType="ToggleButton">
            <Grid Width="100" MinHeight="88" Background="Transparent">
              <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                  <VisualState x:Name="Normal"/>
                  <VisualState x:Name="PointerOver">
                    <Storyboard>
                      <ObjectAnimationUsingKeyFrames Storyboard.TargetName="IconBase" Storyboard.TargetProperty="Fill">
                        <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ReaderAppBarButtonPointerOverBrush}" />
                      </ObjectAnimationUsingKeyFrames>
                      <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Icon" Storyboard.TargetProperty="Fill">
                        <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ReaderAppBarButtonPointerOverFillBrush}" />
                      </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                  </VisualState>
                  <VisualState x:Name="Pressed">
                    <Storyboard>
                      <ObjectAnimationUsingKeyFrames Storyboard.TargetName="IconBase" Storyboard.TargetProperty="Fill">
                        <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ReaderAppBarButtonForegroundBrush}" />
                      </ObjectAnimationUsingKeyFrames>
                      <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Icon" Storyboard.TargetProperty="Fill">
                        <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ReaderAppBarButtonBackgroundBrush}" />
                      </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                  </VisualState>
                  <VisualState x:Name="Checked">
                    <Storyboard>
                      <DoubleAnimation Storyboard.TargetName="IconBase" Storyboard.TargetProperty="Opacity" To="0" Duration="0" />
                      <DoubleAnimation Storyboard.TargetName="Icon" Storyboard.TargetProperty="Opacity" To="0" Duration="0" />
                      <DoubleAnimation Storyboard.TargetName="IconBaseChecked" Storyboard.TargetProperty="Opacity" To="1" Duration="0" />
                      <DoubleAnimation Storyboard.TargetName="IconChecked" Storyboard.TargetProperty="Opacity" To="1" Duration="0" />
                    </Storyboard>
                  </VisualState>
                  <VisualState x:Name="CheckedPointerOver">
                    <Storyboard>
                      <DoubleAnimation Storyboard.TargetName="IconBaseChecked" Storyboard.TargetProperty="Opacity" To="0" Duration="0" />
                      <DoubleAnimation Storyboard.TargetName="IconBase" Storyboard.TargetProperty="Opacity" To="0" Duration="0" />
                      <DoubleAnimation Storyboard.TargetName="Icon" Storyboard.TargetProperty="Opacity" To="0" Duration="0" />
                      <DoubleAnimation Storyboard.TargetName="IconChecked" Storyboard.TargetProperty="Opacity" To="1" Duration="0" />
                      <DoubleAnimation Storyboard.TargetName="IconBasePointerOver" Storyboard.TargetProperty="Opacity" To="1" Duration="0" />
                      <ObjectAnimationUsingKeyFrames Storyboard.TargetName="IconChecked" Storyboard.TargetProperty="Fill">
                        <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ReaderAppBarButtonPointerOverFillBrush}" />
                      </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                  </VisualState>
                  <VisualState x:Name="CheckedPressed">
                    <Storyboard>
                      <ObjectAnimationUsingKeyFrames Storyboard.TargetName="IconBase" Storyboard.TargetProperty="Fill">
                        <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ReaderAppBarButtonForegroundBrush}" />
                      </ObjectAnimationUsingKeyFrames>
                      <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Icon" Storyboard.TargetProperty="Fill">
                        <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ReaderAppBarButtonBackgroundBrush}" />
                      </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>
              <Rectangle x:Name="FocusVisualWhite" Stroke="White" StrokeEndLineCap="Square" StrokeDashArray="1,1" Opacity="0" StrokeDashOffset="1.5"/>
              <Rectangle x:Name="FocusVisualBlack" Stroke="Black" StrokeEndLineCap="Square" StrokeDashArray="1,1" Opacity="0" StrokeDashOffset="0.5"/>
              <TextBlock x:Name="ContentPresenter" Text="{TemplateBinding Tag}" TextAlignment="Center" TextWrapping="Wrap" MaxHeight="38" Foreground="{StaticResource ReaderAppBarButtonForegroundBrush}" x:Uid="AppBar" MaxWidth="88" Margin="0, 59, 0, 11" HorizontalAlignment="Center" VerticalAlignment="Top"/>
              <Grid Margin="0,14,0,0" Height="40" Width="40" VerticalAlignment="Top" HorizontalAlignment="Center">
                <Ellipse x:Name="IconBase" Fill="Transparent" Stroke="{StaticResource ReaderAppBarButtonForegroundBrush}" Opacity="1" StrokeThickness="2.25" Width="40" Height="40"/>
                <Ellipse x:Name="IconBaseChecked" Fill="{StaticResource ReaderAppBarButtonForegroundBrush}" Opacity="0" Width="40" Height="40"/>
                <Ellipse x:Name="IconBasePointerOver" StrokeThickness="{StaticResource ReaderAppBarButtonPointerOverStroke}" Stroke="{StaticResource ReaderAppBarButtonForegroundBrush}" Fill="{StaticResource ReaderAppBarButtonLightPointerOverBrush}" Opacity="0" Width="40" Height="40"/>
                <Path FlowDirection="LeftToRight" x:Name="Icon" Fill="{StaticResource ReaderAppBarButtonForegroundBrush}" Data="{TemplateBinding Content}" Height="{TemplateBinding MinHeight}" Width="{TemplateBinding MinWidth}"/>
                <Path FlowDirection="LeftToRight" x:Name="IconChecked" Fill="{StaticResource ReaderAppBarButtonBackgroundBrush}" Opacity="0" Data="{TemplateBinding Content}" Height="{TemplateBinding MinHeight}" Width="{TemplateBinding MinWidth}"/>
              </Grid>
            </Grid>
          </ControlTemplate>
        </Setter.Value>
      </Setter>
    </Style>

    <Style TargetType="ToggleButton" x:Name="OverflowFindButtonNarrowStyle">
      <Setter Property="Padding" Value="0" />
      <Setter Property="Template">
        <Setter.Value>
          <ControlTemplate TargetType="ToggleButton">
            <Grid Width="60" Height="68" Background="Transparent">
              <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                  <VisualState x:Name="Normal"/>
                  <VisualState x:Name="PointerOver">
                    <Storyboard>
                      <ObjectAnimationUsingKeyFrames Storyboard.TargetName="IconBase" Storyboard.TargetProperty="Fill">
                        <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ReaderAppBarButtonPointerOverBrush}" />
                      </ObjectAnimationUsingKeyFrames>
                      <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Icon" Storyboard.TargetProperty="Fill">
                        <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ReaderAppBarButtonPointerOverFillBrush}" />
                      </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                  </VisualState>
                  <VisualState x:Name="Pressed">
                    <Storyboard>
                      <ObjectAnimationUsingKeyFrames Storyboard.TargetName="IconBase" Storyboard.TargetProperty="Fill">
                        <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ReaderAppBarButtonForegroundBrush}" />
                      </ObjectAnimationUsingKeyFrames>
                      <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Icon" Storyboard.TargetProperty="Fill">
                        <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ReaderAppBarButtonBackgroundBrush}" />
                      </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                  </VisualState>
                  <VisualState x:Name="Checked">
                    <Storyboard>
                      <DoubleAnimation Storyboard.TargetName="IconBase" Storyboard.TargetProperty="Opacity" To="0" Duration="0" />
                      <DoubleAnimation Storyboard.TargetName="Icon" Storyboard.TargetProperty="Opacity" To="0" Duration="0" />
                      <DoubleAnimation Storyboard.TargetName="IconBaseChecked" Storyboard.TargetProperty="Opacity" To="1" Duration="0" />
                      <DoubleAnimation Storyboard.TargetName="IconChecked" Storyboard.TargetProperty="Opacity" To="1" Duration="0" />
                    </Storyboard>
                  </VisualState>
                  <VisualState x:Name="CheckedPointerOver">
                    <Storyboard>
                      <DoubleAnimation Storyboard.TargetName="IconBaseChecked" Storyboard.TargetProperty="Opacity" To="0" Duration="0" />
                      <DoubleAnimation Storyboard.TargetName="IconBase" Storyboard.TargetProperty="Opacity" To="0" Duration="0" />
                      <DoubleAnimation Storyboard.TargetName="Icon" Storyboard.TargetProperty="Opacity" To="0" Duration="0" />
                      <DoubleAnimation Storyboard.TargetName="IconChecked" Storyboard.TargetProperty="Opacity" To="1" Duration="0" />
                      <DoubleAnimation Storyboard.TargetName="IconBasePointerOver" Storyboard.TargetProperty="Opacity" To="1" Duration="0" />
                      <ObjectAnimationUsingKeyFrames Storyboard.TargetName="IconChecked" Storyboard.TargetProperty="Fill">
                        <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ReaderAppBarButtonPointerOverFillBrush}" />
                      </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                  </VisualState>
                  <VisualState x:Name="CheckedPressed">
                    <Storyboard>
                      <ObjectAnimationUsingKeyFrames Storyboard.TargetName="IconBase" Storyboard.TargetProperty="Fill">
                        <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ReaderAppBarButtonForegroundBrush}" />
                      </ObjectAnimationUsingKeyFrames>
                      <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Icon" Storyboard.TargetProperty="Fill">
                        <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ReaderAppBarButtonBackgroundBrush}" />
                      </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>
              <Rectangle x:Name="FocusVisualWhite" Stroke="White" StrokeEndLineCap="Square" StrokeDashArray="1,1" Opacity="0" StrokeDashOffset="1.5"/>
              <Rectangle x:Name="FocusVisualBlack" Stroke="Black" StrokeEndLineCap="Square" StrokeDashArray="1,1" Opacity="0" StrokeDashOffset="0.5"/>
              <Grid Margin="0,14,0,0" Height="40" Width="40" VerticalAlignment="Top" HorizontalAlignment="Center">
                <Ellipse x:Name="IconBase" Fill="Transparent" Stroke="{StaticResource ReaderAppBarButtonForegroundBrush}" Opacity="1" StrokeThickness="2.25" Width="40" Height="40"/>
                <Ellipse x:Name="IconBaseChecked" Fill="{StaticResource ReaderAppBarButtonForegroundBrush}" Opacity="0" Width="40" Height="40"/>
                <Ellipse x:Name="IconBasePointerOver" StrokeThickness="{StaticResource ReaderAppBarButtonPointerOverStroke}" Stroke="{StaticResource ReaderAppBarButtonForegroundBrush}" Fill="{StaticResource ReaderAppBarButtonLightPointerOverBrush}" Opacity="0" Width="40" Height="40"/>
                <Path FlowDirection="LeftToRight" x:Name="Icon" Fill="{StaticResource ReaderAppBarButtonForegroundBrush}" Data="{TemplateBinding Content}" Height="{TemplateBinding MinHeight}" Width="{TemplateBinding MinWidth}"/>
                <Path FlowDirection="LeftToRight" x:Name="IconChecked" Fill="{StaticResource ReaderAppBarButtonBackgroundBrush}" Opacity="0" Data="{TemplateBinding Content}" Height="{TemplateBinding MinHeight}" Width="{TemplateBinding MinWidth}"/>
              </Grid>
            </Grid>
          </ControlTemplate>
        </Setter.Value>
      </Setter>
    </Style>

    <Style TargetType="Grid" x:Name="FindBarGridWideStyle">
      <Setter Property="Margin" Value ="40, 0, 10, 0"/>
    </Style>

    <Style TargetType="Grid" x:Name="FindBarGridNarrowStyle">
      <Setter Property="Margin" Value ="20, 0, 10, 0"/>
    </Style>
   
    <Storyboard x:Name="FindButtonsToVisible">
      <FadeInThemeAnimation TargetName="FindPrev" />
            
            <DoubleAnimation Duration="0:0:0.22" To="1" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)" Storyboard.TargetName="FindPrev">
                <DoubleAnimation.EasingFunction>
                    <ExponentialEase EasingMode="EaseOut"/>
                </DoubleAnimation.EasingFunction>
            </DoubleAnimation>
            <DoubleAnimation Duration="0:0:0.22" To="1" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)" Storyboard.TargetName="FindPrev">
                <DoubleAnimation.EasingFunction>
                    <ExponentialEase EasingMode="EaseOut"/>
                </DoubleAnimation.EasingFunction>
            </DoubleAnimation>
            
            <FadeInThemeAnimation TargetName="FindNext" />
            <DoubleAnimation Duration="0:0:0.22" To="1" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)" Storyboard.TargetName="FindNext">
                <DoubleAnimation.EasingFunction>
                    <ExponentialEase EasingMode="EaseOut"/>
                </DoubleAnimation.EasingFunction>
            </DoubleAnimation>
            <DoubleAnimation Duration="0:0:0.22" To="1" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)" Storyboard.TargetName="FindNext">
                <DoubleAnimation.EasingFunction>
                    <ExponentialEase EasingMode="EaseOut"/>
                </DoubleAnimation.EasingFunction>
            </DoubleAnimation>
            
            <FadeInThemeAnimation TargetName="FindShowResults" />
            <DoubleAnimation Duration="0:0:0.22" To="1" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)" Storyboard.TargetName="FindShowResults">
                <DoubleAnimation.EasingFunction>
                    <ExponentialEase EasingMode="EaseOut"/>
                </DoubleAnimation.EasingFunction>
            </DoubleAnimation>
            <DoubleAnimation Duration="0:0:0.22" To="1" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)" Storyboard.TargetName="FindShowResults">
                <DoubleAnimation.EasingFunction>
                    <ExponentialEase EasingMode="EaseOut"/>
                </DoubleAnimation.EasingFunction>
            </DoubleAnimation>
            
        </Storyboard>
        <Storyboard x:Name="FindResultButtonsToCollapsed">
            <FadeOutThemeAnimation TargetName="FindPrev"/>
            <FadeOutThemeAnimation TargetName="FindNext" />
            <FadeOutThemeAnimation TargetName="FindShowResults" />
        </Storyboard>
  </UserControl.Resources>

  <Grid Background="{StaticResource ReaderAppBarButtonBackgroundBrush}">
    <Grid x:Name="FindBarGrid">
      <ProgressBar x:Name="SearchProgressBar" x:Uid="SearchProgressBar" IsIndeterminate="true" VerticalAlignment="Top"/>  
      <StackPanel Orientation="Horizontal" Height="Auto"  HorizontalAlignment="Left" Width="Auto">
        <StackPanel.Resources>
          <Style x:Name="FindTextGridStyle" TargetType="Grid">
            <Setter Property="Width" Value="280" />
                        <Setter Property="Margin" Value="0,25,30,0" />
          </Style>
          <Style x:Name="FindTextGridNarrowStyle" TargetType="Grid">
            <Setter Property="Width" Value="220" />
                        <Setter Property="Margin" Value="0,18,20,0" />
          </Style>
        </StackPanel.Resources>
        <Grid x:Name="FindTextBoxGrid">
            <SearchBox x:Uid="FindSearchBox" x:Name="FindSearchBox" VerticalAlignment="Top" SearchHistoryEnabled="False"/>
        </Grid>
        <TextBlock x:Uid="ZeroResults" x:Name="ZeroResults" TextWrapping="Wrap" MaxHeight="40" LineStackingStrategy="BlockLineHeight" LineHeight="20"  MaxWidth="360" Margin="-10,29,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" FontSize="14.667" FontFamily="{StaticResource ContentControlThemeFontFamily}" FontWeight="SemiLight"  Foreground="{StaticResource ReaderDarkErrorTextColor}"/>
        <Button RenderTransformOrigin="0.5,0.5" x:Uid="FindPrev" x:Name="FindPrev" Visibility="Collapsed" MinHeight="21" MinWidth="16" HorizontalAlignment="Left" VerticalAlignment="Top" Content="M10,7 L16,13 L16,8 L8,0 L0,8 L0,13 L6,7 L6,21 L10,21 z">
          <Button.RenderTransform>
            <CompositeTransform ScaleX="0.85" ScaleY="0.85"/>
          </Button.RenderTransform>
        </Button>
        <Button RenderTransformOrigin="0.5,0.5" x:Uid="FindNext" x:Name="FindNext" Visibility="Collapsed" MinHeight="21" MinWidth="16" HorizontalAlignment="Left" VerticalAlignment="Top" Content="M10,14 L16,8 L16,13 L8,21 L0,13 L0,8 L6,14 L6,0 L10,0 z">
          <Button.RenderTransform>
            <CompositeTransform ScaleX="0.85" ScaleY="0.85"/>
          </Button.RenderTransform>
        </Button>
      </StackPanel>
      <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
        <ToggleButton RenderTransformOrigin="0.5,0.5" x:Uid="FindShowResults" x:Name="FindShowResults" Visibility="Collapsed" MinHeight="17" MinWidth="18" HorizontalAlignment="Left" VerticalAlignment="Top" Content="M5.000001,15 L18,15 L18,17 L5.000001,17 z M5.000001,11 L18,11 L18,13 L5.000001,13 z M0,11 L1.9999999,11 L1.9999999,13 L0,13 z M5.000001,4 L18,4 L18,6 L5.000001,6 z M5.000001,0 L18,0 L18,2 L5.000001,2 z M8.046627E-07,0 L2.000001,0 L2.000001,2 L8.046627E-07,2 z">
          <ToggleButton.RenderTransform>
            <CompositeTransform ScaleX="0.85" ScaleY="0.85"/>
          </ToggleButton.RenderTransform>
        </ToggleButton>
        <Button x:Uid="FindClose" x:Name="FindClose" Visibility="Visible"  HorizontalAlignment="Right" MinHeight="17.679" MinWidth="17.679" VerticalAlignment="Top" Content="F1 M15.201983,0 L8.8389997,6.3640079 L2.4749784,0.0010375967 L0,2.476011 L6.3640213,8.8390427 L0,15.20299 L2.4740019,17.678024 L8.8389997,11.31304 L15.203021,17.679001 L17.677999,15.20299 L11.313002,8.8390427 L17.677023,2.476011 z"/>
      </StackPanel>
    </Grid>
    <Rectangle Height="2" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Top" Fill="{StaticResource ReaderAppBarHeaderLineBrush}"/>
  </Grid>
</UserControl>