<?xml version="1.0" encoding="utf-8"?>
<UserControl x:Class="Annotations.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:c1="http://schemas.componentone.com/winfx/2006/xaml">
  <Grid x:Name="LayoutRoot">
    <Grid.RowDefinitions>
      <RowDefinition Height="Auto" />
      <RowDefinition />
    </Grid.RowDefinitions>
    <c1:C1RichTextBoxToolbar RichTextBox="{Binding ElementName=richTextBox}">
      <c1:C1RichTextBoxToolbar.Template>
        <ControlTemplate TargetType="c1:C1RichTextBoxToolbar">
          <c1:C1Toolbar>
            <c1:C1ToolbarStrip>
              <c1:C1FontFamilyTool />
              <c1:C1FontSizeTool />

              <c1:C1Separator />

              <c1:C1BoldTool />
              <c1:C1ItalicTool />
              <c1:C1UnderlineTool />

              <c1:C1Separator />

              <c1:C1ToolbarButton Click="AddHighlightButton" ToolTipService.ToolTip="Add Highlight">
                <c1:C1ToolbarButton.Content>
                  <Image Height="16" Width="16" Source="Resources/highlight-note.png" Stretch="Fill" />
                </c1:C1ToolbarButton.Content>
              </c1:C1ToolbarButton>
              <c1:C1ToolbarButton ToolTipService.ToolTip="Add Note" Click="AddNoteButton">
                <c1:C1ToolbarButton.Content>
                  <Image Height="16" Width="16" Source="Resources/add-note.png" Stretch="Fill" />
                </c1:C1ToolbarButton.Content>
              </c1:C1ToolbarButton>
            </c1:C1ToolbarStrip>
          </c1:C1Toolbar>
        </ControlTemplate>
      </c1:C1RichTextBoxToolbar.Template>
    </c1:C1RichTextBoxToolbar>
    <c1:C1RichTextBox x:Name="richTextBox" Grid.Row="1">
      <c1:C1ContextMenuService.ContextMenu>
        <c1:C1ContextMenu>
          <c1:C1MenuItem Name="addHighlight" Header="Add Highlight" Click="AddHighlight" />
          <c1:C1MenuItem Name="addNote" Header="Add Note" Click="AddNote" />
          <c1:C1Separator />
          <c1:C1MenuItem Header="Remove Highlights" Click="RemoveHighlights" />
          <c1:C1MenuItem Header="Remove Notes" Click="RemoveNotes" />
        </c1:C1ContextMenu>
      </c1:C1ContextMenuService.ContextMenu>
    </c1:C1RichTextBox>
  </Grid>
</UserControl>