<Page
    x:Class="AppBar.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:AppBar"
    xmlns:c1RTB="using:C1.Xaml.RichTextBox"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <Grid.RowDefinitions>
            <RowDefinition Height="140"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <TextBlock x:Name="pageTitle" Text="C1RichTextBox AppBar Sample" Margin="116,0, 0, 40" IsHitTestVisible="false" Style="{StaticResource PageHeaderTextStyle}"/>
        <c1RTB:C1RichTextBox x:Name="rtb" Grid.Row="1"  Margin="116,0,100,100" PointerPressed="rtb_PointerPressed"/>
    </Grid>
    <Page.TopAppBar>
        <AppBar x:Name="topAppBar" IsSticky="True" Padding="10,0,10,0">
            <Grid>
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
                    <Button x:Name="btnInsertImage" Style="{StaticResource PictureAppBarButtonStyle}" Click="btnInsertPicture_Click">
                        <Image Source="Resources/Photo.png" Margin="8" />
                    </Button>
                    <Button x:Name="btnInsertTable" Style="{StaticResource TableAppBarButtonStyle}" Click="btnInsertTable_Click">
                        <TextBlock Text="&#x25A6;" FontSize="26" FontWeight="Light" Margin="-1 -2 0 0"/>
                    </Button>
                    <Button x:Name="btnInsertHyperlink" Style="{StaticResource HyperlinkAppBarButtonStyle}" Click="btnInsertHyperlink_Click"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
                    <c1RTB:C1LeftAlignTool x:Name="btnLeftAlign" Style="{StaticResource AlignLeftAppBarButtonStyle}" />
                    <c1RTB:C1CenterAlignTool x:Name="btnCenterAlign" Style="{StaticResource AlignCenterAppBarButtonStyle}" />
                    <c1RTB:C1RightAlignTool x:Name="btnRightAlign" Style="{StaticResource AlignRightAppBarButtonStyle}" />
                </StackPanel>
            </Grid>
        </AppBar>
    </Page.TopAppBar>
        <Page.BottomAppBar>
        <AppBar x:Name="bottomAppBar" IsSticky="True" Padding="10,0,10,0" >
            <Grid>
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
                    <Button x:Name="btnCopy" Style="{StaticResource CopyAppBarButtonStyle}" Click="btnCopy_Click"/>
                    <Button x:Name="btnPaste" Style="{StaticResource PasteAppBarButtonStyle}" Click="btnPaste_Click"/>
                    <Button x:Name="btnCut" Style="{StaticResource CutAppBarButtonStyle}" Click="btnCut_Click"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
                    <c1RTB:C1IncreaseFontSizeTool x:Name="btnIncreaseFontSize" Style="{StaticResource FontIncreaseAppBarButtonStyle}"/>
                    <c1RTB:C1DecreaseFontSizeTool x:Name="btnDecreaseFontSize" Style="{StaticResource FontDecreaseAppBarButtonStyle}"/>
                    <c1RTB:C1BoldTool x:Name="btnBold" Style="{StaticResource BoldAppBarButtonStyle}" />
                    <c1RTB:C1ItalicTool x:Name="btnItalic" Style="{StaticResource ItalicAppBarButtonStyle}" />
                    <c1RTB:C1UnderlineTool x:Name="btnUnderline" Style="{StaticResource UnderlineAppBarButtonStyle}" />
                    <Button x:Name="btnFontColor" Style="{StaticResource FontColorAppBarButtonStyle}" Click="btnFontColor_Click"/>
                    <Button x:Name="btnHighlight" Style="{StaticResource HighlightAppBarButtonStyle}" Click="btnHighlight_Click"/>
                    <Button x:Name="btnMore" Style="{StaticResource MoreAppBarButtonStyle}" Click="btnMore_Click"/>
                </StackPanel>
            </Grid>
        </AppBar>
    </Page.BottomAppBar>
</Page>
