<!--
	Copyright (c) Microsoft. All rights reserved.
-->

<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:core="using:Office.UI.Xaml.Core"
  TabNavigation="Cycle">
  <UserControl.Resources>
    <DataTemplate x:Key="ONSharePathTemplate">
      <Grid>
        <Grid>
          <Grid.RowDefinitions>
            <RowDefinition Height="26" />
            <RowDefinition Height="20" />
          </Grid.RowDefinitions>
          <Grid.ColumnDefinitions>
            <ColumnDefinition Width="26" />
            <ColumnDefinition Width="*" />
          </Grid.ColumnDefinitions>
          <TextBlock
            Grid.Column="1"
            Grid.Row="0"
            Text="{Binding Name}"
            VerticalAlignment="Center"
            Style="{StaticResource MsoTextBlockStandard}"
            Padding="0, 3, 0, 0"
            TextTrimming="WordEllipsis"/>
          <TextBlock
            Grid.Column="1"
            Grid.Row="1"
            Text="{Binding Path}"
            VerticalAlignment="Center"
            Style="{StaticResource MsoTextBlockSmall}"
            TextTrimming="WordEllipsis"
            Padding="0, 0, 0, 7"/>
          <Grid x:Name="PageIcon" Height="14" Width="11"  Grid.Row="0" Grid.Column="0"
              Visibility="{Binding IsPage, Converter={StaticResource BoolToVisibility}}">
            <Path Data="F1M300,388L300,402L311,402L311,392L307,392L307,388z" Fill="{CustomResource :mso_brush:3016}" Height="14" Width="11" Stretch="Fill"/>
            <Path Data="F1M309,389L308,389L308,390L308,391L310,391L310,390L309,390z" Fill="{CustomResource :mso_brush:3016}" Height="2" Width="2" Margin="8,1,0,0" Stretch="Fill" />
          </Grid>
          <Grid x:Name="SectionIcon" Height="17" Width="11"
              Grid.Row="0"
              Grid.Column="0"
              HorizontalAlignment="Center" VerticalAlignment="Center"
              Visibility="{Binding IsPage, Converter={StaticResource NotBoolToVisibility}}" Margin="0, 3, 3, 0">
            <Path Data="F1M682,448.75L687,451.464L687,434L682,436.036z" Fill="{CustomResource :mso_brush:3016}" Height="17.464" Width="5" Stretch="Fill"/>
          </Grid>
        </Grid>
      </Grid>
    </DataTemplate>
    <ControlTemplate x:Key="ONShareComboStyle" TargetType="ComboBox">
      <Grid>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="*" />
          <ColumnDefinition Width="32" />
        </Grid.ColumnDefinitions>
        <VisualStateManager.VisualStateGroups>
          <VisualStateGroup x:Name="CommonStates">
            <VisualState x:Name="Normal" />
            <VisualState x:Name="PointerOver">
              <Storyboard>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownGlyph"
                        Storyboard.TargetProperty="Foreground">
                  <DiscreteObjectKeyFrame KeyTime="0" Value="{CustomResource :mso_brush:1955}" />
                </ObjectAnimationUsingKeyFrames>
              </Storyboard>
            </VisualState>
            <VisualState x:Name="Pressed">
              <Storyboard>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownGlyph"
                        Storyboard.TargetProperty="Foreground">
                  <DiscreteObjectKeyFrame KeyTime="0" Value="{CustomResource :mso_brush:1955}" />
                </ObjectAnimationUsingKeyFrames>
              </Storyboard>
            </VisualState>
            <VisualState x:Name="Disabled">
              <Storyboard>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background"
                        Storyboard.TargetProperty="Background">
                  <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ComboBoxDisabledBackgroundThemeBrush}" />
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background"
                        Storyboard.TargetProperty="BorderBrush">
                  <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ComboBoxDisabledBorderThemeBrush}" />
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
                        Storyboard.TargetProperty="Foreground">
                  <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ComboBoxDisabledForegroundThemeBrush}" />
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownGlyph"
                        Storyboard.TargetProperty="Foreground">
                  <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource ComboBoxArrowDisabledForegroundThemeBrush}" />
                </ObjectAnimationUsingKeyFrames>
              </Storyboard>
            </VisualState>
          </VisualStateGroup>
          <VisualStateGroup x:Name="FocusStates">
            <VisualState x:Name="Focused">
              <Storyboard>
                <DoubleAnimation Storyboard.TargetName="HighlightBackground"
                        Storyboard.TargetProperty="Opacity"
                        To="1"
                        Duration="0" />
              </Storyboard>
            </VisualState>
            <VisualState x:Name="PointerFocused">
              <Storyboard>
                <DoubleAnimation Storyboard.TargetName="HighlightBackground"
                        Storyboard.TargetProperty="Opacity"
                        To="1"
                        Duration="0" />
              </Storyboard>
            </VisualState>
            <VisualState x:Name="FocusedPressed" />
            <VisualState x:Name="Unfocused" />
            <VisualState x:Name="FocusedDropDown">
              <Storyboard>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PopupBorder"
                        Storyboard.TargetProperty="Visibility"
                        Duration="0">
                  <DiscreteObjectKeyFrame KeyTime="0">
                    <DiscreteObjectKeyFrame.Value>
                      <Visibility>Visible</Visibility>
                    </DiscreteObjectKeyFrame.Value>
                  </DiscreteObjectKeyFrame>
                </ObjectAnimationUsingKeyFrames>
              </Storyboard>
            </VisualState>
          </VisualStateGroup>
          <VisualStateGroup x:Name="DropDownStates">
            <VisualState x:Name="Opened">
              <Storyboard>
                <SplitOpenThemeAnimation
                        OpenedTargetName="PopupBorder"
                        ContentTargetName="ScrollViewer"
                        ClosedTargetName="ContentPresenter"
                        ContentTranslationOffset="0"
                        OffsetFromCenter="{Binding TemplateSettings.DropDownOffset, RelativeSource={RelativeSource Mode=TemplatedParent}}"
                        OpenedLength="{Binding TemplateSettings.DropDownOpenedHeight, RelativeSource={RelativeSource Mode=TemplatedParent}}"
                        ClosedLength="{Binding TemplateSettings.DropDownClosedHeight, RelativeSource={RelativeSource Mode=TemplatedParent}}" />
              </Storyboard>
            </VisualState>
            <VisualState x:Name="Closed">
              <Storyboard>
                <SplitCloseThemeAnimation
                        OpenedTargetName="PopupBorder"
                        ContentTargetName="ScrollViewer"
                        ClosedTargetName="ContentPresenter"
                        ContentTranslationOffset="40"
                        OffsetFromCenter="{Binding TemplateSettings.DropDownOffset, RelativeSource={RelativeSource Mode=TemplatedParent}}"
                        ContentTranslationDirection="{Binding TemplateSettings.SelectedItemDirection, RelativeSource={RelativeSource Mode=TemplatedParent}}"
                        OpenedLength="{Binding TemplateSettings.DropDownOpenedHeight, RelativeSource={RelativeSource Mode=TemplatedParent}}"
                        ClosedLength="{Binding TemplateSettings.DropDownClosedHeight, RelativeSource={RelativeSource Mode=TemplatedParent}}" />
              </Storyboard>
            </VisualState>
          </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>
        <Border x:Name="Background"
           Grid.ColumnSpan="2"
           Background="{TemplateBinding Background}"
           BorderBrush="{TemplateBinding BorderBrush}"
          BorderThickness="{TemplateBinding BorderThickness}" />
        <Rectangle x:Name="PressedBackground"
           Fill="{StaticResource ComboBoxPressedHighlightThemeBrush}"
           Margin="{TemplateBinding BorderThickness}"
           Opacity="0" />
        <Border x:Name="HighlightBackground"
           Grid.ColumnSpan="2"
           Background="{StaticResource ComboBoxFocusedBackgroundThemeBrush}"
           BorderBrush="{StaticResource ComboBoxFocusedBorderThemeBrush}"
           BorderThickness="{TemplateBinding BorderThickness}"
           Opacity="0" />
        <ContentPresenter x:Name="ContentPresenter"
           Margin="{TemplateBinding Padding}"
           HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
           VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
        <TextBlock x:Name="DropDownGlyph"
           Text="{CustomResource :appstring:0xBE1E42F5L}"
           Grid.Column="1"
           IsHitTestVisible="False"
           Margin="0,0,6,4"
           Foreground="{CustomResource :mso_brush:1955}"
           FontWeight="Bold"
           FontSize="{StaticResource ComboBoxArrowThemeFontSize}"
           FontFamily="{StaticResource SymbolThemeFontFamily}"
           HorizontalAlignment="Right"
           VerticalAlignment="Center" />
        <Popup x:Name="Popup">
          <Border x:Name="PopupBorder"
              BorderBrush ="{CustomResource :mso_brush:1956}"
              BorderThickness="2"
              HorizontalAlignment="Stretch">
            <ScrollViewer x:Name="ScrollViewer" Foreground="{StaticResource ComboBoxPopupForegroundThemeBrush}"
                  Background="{CustomResource :mso_brush:2885}"
                  VerticalSnapPointsType="OptionalSingle"
                  VerticalSnapPointsAlignment="Near"
                  HorizontalScrollMode="{TemplateBinding ScrollViewer.HorizontalScrollMode}"
                  HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                  VerticalScrollMode="{TemplateBinding ScrollViewer.VerticalScrollMode}"
                  VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
                  IsHorizontalRailEnabled="{TemplateBinding ScrollViewer.IsHorizontalRailEnabled}"
                  IsVerticalRailEnabled="{TemplateBinding ScrollViewer.IsVerticalRailEnabled}"
                  IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}"
                  BringIntoViewOnFocusChange="{TemplateBinding ScrollViewer.BringIntoViewOnFocusChange}"
                  ZoomMode="Disabled">
              <ItemsPresenter/>
            </ScrollViewer>
          </Border>
        </Popup>
      </Grid>
    </ControlTemplate>
    <ControlTemplate x:Key="ShareButtonStyle" TargetType="Button">
      <Grid>
        <VisualStateManager.VisualStateGroups>
          <VisualStateGroup x:Name="CommonStates">
            <VisualState x:Name="Normal"/>
            <VisualState x:Name="PointerOver">
              <Storyboard>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="shareButtonCanvas" Storyboard.TargetProperty="Background">
                  <DiscreteObjectKeyFrame KeyTime="0" Value="{CustomResource :mso_brush:1950}"/>
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="shareLabel" Storyboard.TargetProperty="Foreground">
                  <DiscreteObjectKeyFrame KeyTime="0" Value="{CustomResource :mso_brush:1954}" />
                </ObjectAnimationUsingKeyFrames>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="shareLabelArrow" Storyboard.TargetProperty="Foreground">
                  <DiscreteObjectKeyFrame KeyTime="0" Value="{CustomResource :mso_brush:1954}" />
                </ObjectAnimationUsingKeyFrames>
              </Storyboard>
            </VisualState>
            <VisualState x:Name="Pressed">
              <Storyboard>
                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="shareButtonCanvas" Storyboard.TargetProperty="Background">
                  <DiscreteObjectKeyFrame KeyTime="0" Value="{CustomResource :mso_brush:1951}"/>
                </ObjectAnimationUsingKeyFrames>
                  <ObjectAnimationUsingKeyFrames Storyboard.TargetName="shareLabel" Storyboard.TargetProperty="Foreground">
                  <DiscreteObjectKeyFrame KeyTime="0" Value="{CustomResource :mso_brush:1954}" />
                </ObjectAnimationUsingKeyFrames>
                  <ObjectAnimationUsingKeyFrames Storyboard.TargetName="shareLabelArrow" Storyboard.TargetProperty="Foreground">
                  <DiscreteObjectKeyFrame KeyTime="0" Value="{CustomResource :mso_brush:1954}" />
                </ObjectAnimationUsingKeyFrames>
              </Storyboard>
            </VisualState>
          </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>
        <Canvas x:Name="shareButtonCanvas" Background="{CustomResource :mso_brush:1948}" />
        <Grid VerticalAlignment="Center" HorizontalAlignment="Center">
          <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="*"/>
          </Grid.ColumnDefinitions>
          <TextBlock
            x:Name="shareLabel"
            Text="{CustomResource :appstring:0x05641B66L}"
            Foreground="{CustomResource :mso_brush:1952}"
            VerticalAlignment="Center"
            FontFamily="{StaticResource MsoFontFamilyStandard}"
            FontSize="{StaticResource MsoFontSizeLarge}"
            FontWeight="{StaticResource MsoFontWeightStandard}"
            Margin="20, 0, 7, 0"
            Grid.Column="0" />
          <TextBlock
            x:Name="shareLabelArrow"
            Text="{CustomResource :appstring:0x9EC3FC22L}"
            Foreground="{CustomResource :mso_brush:1952}"
            VerticalAlignment="Center"
            FontFamily="{StaticResource SymbolThemeFontFamily}"
            FontWeight="{StaticResource MsoFontWeightStandard}"
            FontSize="18"
            Grid.Column="1"
            Margin="0, 0, 20, 0"/>
        </Grid>
        <Border x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Margin="0">
          <ContentPresenter x:Name="ContentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" ContentTransitions="{TemplateBinding ContentTransitions}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
        </Border>
        <Rectangle x:Name="FocusVisualWhite" IsHitTestVisible="False" Opacity="0" StrokeDashOffset="1.5" StrokeEndLineCap="Square" Stroke="{StaticResource FocusVisualWhiteStrokeThemeBrush}" StrokeDashArray="1,1"/>
        <Rectangle x:Name="FocusVisualBlack" IsHitTestVisible="False" Opacity="0" StrokeDashOffset="0.5" StrokeEndLineCap="Square" Stroke="{StaticResource FocusVisualBlackStrokeThemeBrush}" StrokeDashArray="1,1"/>
      </Grid>
    </ControlTemplate>
  </UserControl.Resources>
  <Grid>
    <Grid.RowDefinitions>
      <RowDefinition Height="52"/>
      <RowDefinition Height="Auto"/>
      <RowDefinition Height="*"/>
      <RowDefinition Height="Auto"/>
    </Grid.RowDefinitions>
    <Canvas Grid.RowSpan="3" Background="{CustomResource :mso_brush:2885}"/>
    <!-- Sending Progress Display -->
    <Grid
      x:Name="sendingDisplayGrid"
      Grid.RowSpan="2"
      Margin="0,100,0,0"
      VerticalAlignment="Top"
      HorizontalAlignment="Center"
      Visibility="{Binding SendingContent, Converter={StaticResource BoolToVisibility}}">
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="Auto"/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <ProgressRing
        x:Name="webViewProgressRing"
        Grid.Column="0"
        Margin="0,0,6,0"
        IsActive="true"
        Width="40"
        Height="40"
        Foreground="{CustomResource :mso_brush:1957}"
        VerticalAlignment="Center"
        HorizontalAlignment="Left"/>
      <TextBlock
        x:Name="sendingLabel"
        Grid.Column="1"
        Margin="6,-2,0,0"
        Style="{StaticResource MsoTextBlockExtraLarge}"
        Foreground="{CustomResource :mso_brush:1958}"
        VerticalAlignment="Center"
        HorizontalAlignment="Left"
        Text="{CustomResource :appstring:0xDE5274B5L}"/>
    </Grid>
    <!-- User Controls -->
    <Grid
      x:Name="userControlGrid"
      Grid.Row="0"
      Visibility="{Binding SendingContent, Converter={StaticResource NotBoolToVisibility}}">
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="36"/>
        <ColumnDefinition Width="*"/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <Canvas Grid.Column="0" Background="{CustomResource :mso_brush:1946}" />
      <ComboBox
        x:Name="location"
        Background="{CustomResource :mso_brush:1944}"
        BorderBrush="{CustomResource :mso_brush:1945}"
        ItemTemplate="{StaticResource ONSharePathTemplate}"
        ItemsSource="{Binding ShareLocations}"
        SelectedIndex="{Binding SelectedLocation, Mode=TwoWay}"
        Template="{StaticResource ONShareComboStyle}"
        Grid.Column="1">
      </ComboBox>
      <Button
        x:Name="btnShare"
        Grid.Column="2"
        HorizontalAlignment="Stretch"
        VerticalAlignment="Stretch"
        Command="{Binding ShareCommand}"
        IsEnabled="{Binding ShareButtonEnabled}"
        BorderThickness="0"
        Foreground="{CustomResource :mso_brush:1952}"
        Template="{StaticResource ShareButtonStyle}"
        AutomationProperties.Name="{CustomResource :appstring:0x05641B66L}"
        AutomationProperties.AutomationId="Send">
      </Button>
    </Grid>
    <!-- Preview Area -->
    <Grid
      x:Name="userContentGrid"
      Grid.Column="2"
      Grid.Row="1"
      Margin="48,0,48,0"
      Visibility="{Binding SendingContent, Converter={StaticResource NotBoolToVisibility}}">
      <Grid.RowDefinitions>
        <RowDefinition Height="35" />
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="1"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="27"/>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="11"/>
        <RowDefinition Height="Auto"/>
      </Grid.RowDefinitions>
      <core:OneNoteTextBox
        x:Name="contenttitle"
        Grid.Row="1"
        Margin="-10,0,0,0"
        VerticalAlignment="Bottom"
        BorderThickness="0"
        FontSize="{StaticResource MsoFontSizeExtraLarge}"
        FontFamily="{StaticResource MsoFontFamilyLight}"
        FontWeight="{StaticResource MsoFontWeightStandard}"
        Text="{Binding Title, Mode=TwoWay}" />
      <Rectangle
        Grid.Row="3"
        Height="1"
        Fill="{CustomResource :mso_brush:1959}"
        HorizontalAlignment="Stretch"
        VerticalAlignment="Top" />
      <core:OneNoteTextBox
        x:Name="notesBox"
        Grid.Row="5"
        AcceptsReturn="true"
        Height="68"
        Margin="-10,-20,0,0"
        TextWrapping="Wrap"
        Text="{Binding Note, Mode=TwoWay}"
        FontFamily="{StaticResource MsoFontFamilyStandard}"
        FontSize="{StaticResource MsoFontSizeNormal}"
        FontWeight="{StaticResource MsoFontWeightStandard}"
        Foreground="{CustomResource :mso_brush:1960}"
        BorderThickness="0"
        ScrollViewer.VerticalScrollBarVisibility="Auto"
        BoilerplateText="{CustomResource :appstring:0x3CB66F51L}"
        BoilerplateForeground="{CustomResource :mso_brush:1966}"
        AutomationProperties.Name="{CustomResource :appstring:0x3CB66F51L}"
        VerticalAlignment="Top" />
      <TextBlock
        Text="{CustomResource :appstring:0x13912420L}"
        HorizontalAlignment="Left"
        Grid.Row="7"
        Margin="0,-17,0,1"
        Width="28"
        VerticalAlignment="Top"
        Foreground="{CustomResource :mso_brush:1961}"/>
    </Grid>
    <ScrollViewer
      x:Name="mainScrollViewer"
      Background="{CustomResource :mso_brush:2885}"
      Grid.Row="2"
      Margin="48,0,48,0"
      VerticalScrollBarVisibility="Auto"
      MinZoomFactor="1"
      MaxZoomFactor="1"
      Visibility="{Binding SendingContent, Converter={StaticResource NotBoolToVisibility}}">
      <Grid>
        <Grid.RowDefinitions>
          <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <StackPanel Grid.Row="0">
          <Canvas Height ="60" Background="{CustomResource :mso_brush:2885}"/>
          <ProgressRing
             x:Name="loadingProgressRing"
             HorizontalAlignment="Center"
             IsActive="True"
             Visibility="{Binding PreviewReady, Converter={StaticResource NotBoolToVisibility}}"/>
        </StackPanel>
        <!-- We don't actually want to use the WebView control because a user can navigate
             what we do instead is use a webviewbrush, this won't be created unless it actually renders
             so we move it off screen, let it render and then use the brush -->
        <!-- FlowDirection for this rect is always set to LeftToRight explicitly. Otherwise it would be
             set RightToLeft for RTL languages, which mirrors the image horizontally. This is not what
             we want as the WebView control itself did the proper RTL alignment. -->
        <Rectangle x:Name="webViewRect" Grid.Row="0" Visibility="{Binding HtmlPreviewReady, Converter={StaticResource BoolToVisibility}}" FlowDirection="LeftToRight">
          <Rectangle.Fill>
            <WebViewBrush x:Name="webViewRectBrush" Stretch="None" AlignmentY="Top">
              <WebViewBrush.Transform>
                <ScaleTransform ScaleX="1" ScaleY="1" />
              </WebViewBrush.Transform>
            </WebViewBrush>
          </Rectangle.Fill>
        </Rectangle>
        <Image
          x:Name="previewImage"
          Grid.Row="0"
          Visibility="{Binding BitmapPreviewReady, Converter={StaticResource BoolToVisibility}}"/>
        <TextBlock
          x:Name="previewTextBlock"
          Grid.Row="0"
          HorizontalAlignment="Left"
          VerticalAlignment="Top"
          Margin="0,17,0,1"
          Visibility="{Binding TextPreviewReady, Converter={StaticResource BoolToVisibility}}"
          TextWrapping="Wrap"/>
      </Grid>
    </ScrollViewer>
    <!-- Put the web view in a canvas and move it off screen -->
    <Canvas Grid.Row="2">
      <!-- Putting it inside a disabled content control removes it from the tab order.
           We cannot simply use Control.IsTabStop="false" on the webview because it does not derive from Control -->
      <ContentControl IsEnabled="false" Canvas.Left="9999">
        <WebView x:Name="previewWebView" />
      </ContentControl>
    </Canvas>
    <!-- Debug menu -->
    <ComboBox x:Name="debugMenu" Grid.Row="3" Visibility="Collapsed" />
  </Grid>
</UserControl>
