<UserControl x:Class="ControlExplorer.Controls.RichTextBox.RichTextBoxFormatting"
    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"
    mc:Ignorable="d"
    xmlns:c1="using:C1.Xaml"
    xmlns:c1RTB="using:C1.Xaml.RichTextBox"
    xmlns:c1Doc="using:C1.Xaml.RichTextBox.Documents"
    xmlns:local="using:ControlExplorer.Controls.RichTextBox"
    d:DesignHeight="480" d:DesignWidth="480">

    <Grid x:Name="LayoutRoot">
        <c1RTB:C1RichTextBox x:Name="rtb">
            <c1Doc:C1Document>
                <c1Doc:C1List MarkerStyle="Decimal">
                    <c1Doc:C1List.Children>
                        <c1Doc:C1ListItem FontSize="20">
                            <c1Doc:C1Paragraph FontSize="20">
                                <c1Doc:C1Run Text="Text formatting:" />
                            </c1Doc:C1Paragraph>
                        </c1Doc:C1ListItem>
                        <c1Doc:C1List FontSize="20" MarkerStyle="Disc">
                            <c1Doc:C1ListItem>
                                <c1Doc:C1Paragraph FontSize="20">
                                    <c1Doc:C1Run Text="Font" FontFamily="Times New Roman"/>
                                    <c1Doc:C1Run Text=" " />
                                    <c1Doc:C1Run Text="families" FontFamily="Comic Sans MS"/>
                                </c1Doc:C1Paragraph>
                            </c1Doc:C1ListItem>

                            <c1Doc:C1ListItem>
                                <c1Doc:C1Paragraph FontSize="20">
                                    <c1Doc:C1Run Text="Italic" FontStyle="Italic" />
                                </c1Doc:C1Paragraph>
                            </c1Doc:C1ListItem>

                            <c1Doc:C1ListItem>
                                <c1Doc:C1Paragraph FontSize="20">
                                    <c1Doc:C1Run Text="F" FontSize="20" />
                                    <c1Doc:C1Run Text="o" FontSize="16" />
                                    <c1Doc:C1Run Text="n" FontSize="13" />
                                    <c1Doc:C1Run Text="t" FontSize="10" />
                                    <c1Doc:C1Run Text=" " />
                                    <c1Doc:C1Run Text="s" FontSize="7"/>
                                    <c1Doc:C1Run Text="i" FontSize="10"/>
                                    <c1Doc:C1Run Text="z" FontSize="13"/>
                                    <c1Doc:C1Run Text="e" FontSize="16"/>
                                    <c1Doc:C1Run Text="s" FontSize="20"/>
                                </c1Doc:C1Paragraph>
                            </c1Doc:C1ListItem>

                            <c1Doc:C1ListItem>
                                <c1Doc:C1Paragraph FontSize="20">
                                    <c1Doc:C1Run Text="Foreground" Foreground="Blue" />
                                    <c1Doc:C1Run Text=", " />
                                    <c1Doc:C1Run Text="round borders" BorderBrush="Green" BorderThickness="1" CornerRadius="4" />
                                    <c1Doc:C1Run Text=" and " />
                                    <c1Doc:C1Run Text="background" Background="Yellow" />
                                </c1Doc:C1Paragraph>
                            </c1Doc:C1ListItem>

                            <c1Doc:C1ListItem>
                                <c1Doc:C1Paragraph FontSize="20">
                                    <c1Doc:C1Run Text="Super" />
                                    <c1Doc:C1Run Text="script" VerticalAlignment="Super"  FontSize="15"/>
                                    <c1Doc:C1Run Text=" and " />
                                    <c1Doc:C1Run Text="Sub" />
                                    <c1Doc:C1Run Text="script" VerticalAlignment="Sub"  FontSize="15"/>
                                </c1Doc:C1Paragraph>
                            </c1Doc:C1ListItem>
                        </c1Doc:C1List>

                        <c1Doc:C1ListItem FontSize="20">
                            <c1Doc:C1Paragraph FontSize="20">
                                <c1Doc:C1Run Text="Paragraph formatting:" />
                            </c1Doc:C1Paragraph>
                            <c1Doc:C1List FontSize="18" MarkerStyle="Disc">
                                <c1Doc:C1ListItem>
                                    <c1Doc:C1Paragraph FontSize="18">
                                        <c1Doc:C1Run Text="Left, center, right and justify alignments:" />
                                    </c1Doc:C1Paragraph>
                                    <c1Doc:C1Paragraph FontSize="18" TextAlignment="Left" Margin="30 0 50 10">
                                        <c1Doc:C1Run Text="Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. " />
                                    </c1Doc:C1Paragraph>
                                    <c1Doc:C1Paragraph FontSize="18" TextAlignment="Center" Margin="30 0 50 10">
                                        <c1Doc:C1Run Text="Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. " />
                                    </c1Doc:C1Paragraph>
                                    <c1Doc:C1Paragraph FontSize="18" TextAlignment="Right" Margin="30 0 50 10">
                                        <c1Doc:C1Run Text="Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. " />
                                    </c1Doc:C1Paragraph>
                                    <c1Doc:C1Paragraph FontSize="18" TextAlignment="Justify" Margin="30 0 50 10">
                                        <c1Doc:C1Run Text="Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. " />
                                    </c1Doc:C1Paragraph>
                                </c1Doc:C1ListItem>

                                <c1Doc:C1ListItem>
                                    <c1Doc:C1Paragraph FontSize="20">
                                        <c1Doc:C1Run Text="Margins, border, padding and background:" />
                                    </c1Doc:C1Paragraph>
                                    <c1Doc:C1Paragraph FontSize="20" Margin="30 0 50 10" Padding="30" BorderBrush="Blue" BorderThickness="5" Background="Beige">
                                        <c1Doc:C1Run Text="Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. " />
                                    </c1Doc:C1Paragraph>
                                </c1Doc:C1ListItem>

                                <c1Doc:C1ListItem>
                                    <c1Doc:C1Paragraph FontSize="20">
                                        <c1Doc:C1Run Text="Indent and line height:" />
                                    </c1Doc:C1Paragraph>
                                    <c1Doc:C1Paragraph FontSize="20" Margin="30 0 50 10" TextIndent="40" LineHeight="2">
                                        <c1Doc:C1Run Text="Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. " />
                                    </c1Doc:C1Paragraph>
                                </c1Doc:C1ListItem>

                            </c1Doc:C1List>
                        </c1Doc:C1ListItem>

                        <c1Doc:C1ListItem FontSize="20">
                            <c1Doc:C1Paragraph FontSize="20">
                                <c1Doc:C1Run Text="Table formatting:" />
                            </c1Doc:C1Paragraph>
                            <c1Doc:C1List FontSize="20" MarkerStyle="Disc">
                                <c1Doc:C1ListItem>
                                    <c1Doc:C1Paragraph FontSize="20">
                                        <c1Doc:C1Run Text="Collapsible borders:"/>
                                    </c1Doc:C1Paragraph>
                                    <c1Doc:C1Table BorderCollapse="True" Margin="30 0 50 10">
                                        <c1Doc:C1TableRowGroup>
                                            <c1Doc:C1TableRow>
                                                <c1Doc:C1TableCell BorderBrush="Black" BorderThickness="2">
                                                    <c1Doc:C1Paragraph FontSize="20" Margin="2">
                                                        <c1Doc:C1Run Text="Cell"/>
                                                    </c1Doc:C1Paragraph>
                                                </c1Doc:C1TableCell>
                                                <c1Doc:C1TableCell BorderBrush="Blue" BorderThickness="6">
                                                    <c1Doc:C1Paragraph FontSize="20" Margin="2">
                                                        <c1Doc:C1Run Text="Cell"/>
                                                    </c1Doc:C1Paragraph>
                                                </c1Doc:C1TableCell>
                                                <c1Doc:C1TableCell BorderBrush="Black" BorderThickness="2">
                                                    <c1Doc:C1Paragraph FontSize="20" Margin="2">
                                                        <c1Doc:C1Run Text="Cell"/>
                                                    </c1Doc:C1Paragraph>
                                                </c1Doc:C1TableCell>
                                            </c1Doc:C1TableRow>
                                            <c1Doc:C1TableRow>
                                                <c1Doc:C1TableCell BorderBrush="Black" BorderThickness="2">
                                                    <c1Doc:C1Paragraph FontSize="20" Margin="2">
                                                        <c1Doc:C1Run Text="Cell"/>
                                                    </c1Doc:C1Paragraph>
                                                </c1Doc:C1TableCell>
                                                <c1Doc:C1TableCell BorderBrush="Black" BorderThickness="2">
                                                    <c1Doc:C1Paragraph FontSize="20" Margin="2">
                                                        <c1Doc:C1Run Text="Cell"/>
                                                    </c1Doc:C1Paragraph>
                                                </c1Doc:C1TableCell>
                                                <c1Doc:C1TableCell BorderBrush="Black" BorderThickness="2">
                                                    <c1Doc:C1Paragraph FontSize="20" Margin="2">
                                                        <c1Doc:C1Run Text="Cell"/>
                                                    </c1Doc:C1Paragraph>
                                                </c1Doc:C1TableCell>
                                            </c1Doc:C1TableRow>
                                        </c1Doc:C1TableRowGroup>
                                    </c1Doc:C1Table>
                                </c1Doc:C1ListItem>

                                <c1Doc:C1ListItem>
                                    <c1Doc:C1Paragraph FontSize="20" >
                                        <c1Doc:C1Run Text="Border spacing:"/>
                                    </c1Doc:C1Paragraph>
                                    <c1Doc:C1Table BorderSpacing="3 3" Margin="30 0 50 10">
                                        <c1Doc:C1TableRowGroup>
                                            <c1Doc:C1TableRow>
                                                <c1Doc:C1TableCell BorderBrush="Black" BorderThickness="2">
                                                    <c1Doc:C1Paragraph FontSize="20" Margin="2">
                                                        <c1Doc:C1Run Text="Cell"/>
                                                    </c1Doc:C1Paragraph>
                                                </c1Doc:C1TableCell>
                                                <c1Doc:C1TableCell BorderBrush="Blue" BorderThickness="6">
                                                    <c1Doc:C1Paragraph FontSize="20" Margin="2">
                                                        <c1Doc:C1Run Text="Cell"/>
                                                    </c1Doc:C1Paragraph>
                                                </c1Doc:C1TableCell>
                                                <c1Doc:C1TableCell BorderBrush="Black" BorderThickness="2">
                                                    <c1Doc:C1Paragraph FontSize="20" Margin="2">
                                                        <c1Doc:C1Run Text="Cell"/>
                                                    </c1Doc:C1Paragraph>
                                                </c1Doc:C1TableCell>
                                            </c1Doc:C1TableRow>
                                            <c1Doc:C1TableRow>
                                                <c1Doc:C1TableCell BorderBrush="Black" BorderThickness="2">
                                                    <c1Doc:C1Paragraph FontSize="20" Margin="2">
                                                        <c1Doc:C1Run Text="Cell"/>
                                                    </c1Doc:C1Paragraph>
                                                </c1Doc:C1TableCell>
                                                <c1Doc:C1TableCell BorderBrush="Black" BorderThickness="2">
                                                    <c1Doc:C1Paragraph FontSize="20" Margin="2">
                                                        <c1Doc:C1Run Text="Cell"/>
                                                    </c1Doc:C1Paragraph>
                                                </c1Doc:C1TableCell>
                                                <c1Doc:C1TableCell BorderBrush="Black" BorderThickness="2">
                                                    <c1Doc:C1Paragraph FontSize="20" Margin="2">
                                                        <c1Doc:C1Run Text="Cell"/>
                                                    </c1Doc:C1Paragraph>
                                                </c1Doc:C1TableCell>
                                            </c1Doc:C1TableRow>
                                        </c1Doc:C1TableRowGroup>
                                    </c1Doc:C1Table>
                                </c1Doc:C1ListItem>

                                <c1Doc:C1ListItem>
                                    <c1Doc:C1Paragraph FontSize="20">
                                        <c1Doc:C1Run Text="Column and row spans:"/>
                                    </c1Doc:C1Paragraph>
                                    <c1Doc:C1Table BorderCollapse="True" Margin="30 0 50 10">
                                        <c1Doc:C1TableRowGroup>
                                            <c1Doc:C1TableRow>
                                                <c1Doc:C1TableCell BorderBrush="Black" BorderThickness="2" RowSpan="2">
                                                    <c1Doc:C1Paragraph FontSize="20" Margin="2">
                                                        <c1Doc:C1Run Text="Cell"/>
                                                    </c1Doc:C1Paragraph>
                                                </c1Doc:C1TableCell>
                                                <c1Doc:C1TableCell BorderBrush="Black" BorderThickness="2" ColumnSpan="2">
                                                    <c1Doc:C1Paragraph FontSize="20" Margin="2">
                                                        <c1Doc:C1Run Text="Cell"/>
                                                    </c1Doc:C1Paragraph>
                                                </c1Doc:C1TableCell>
                                            </c1Doc:C1TableRow>
                                            <c1Doc:C1TableRow>
                                                <c1Doc:C1TableCell BorderBrush="Black" BorderThickness="2">
                                                    <c1Doc:C1Paragraph FontSize="20" Margin="2">
                                                        <c1Doc:C1Run Text="Cell"/>
                                                    </c1Doc:C1Paragraph>
                                                </c1Doc:C1TableCell>
                                                <c1Doc:C1TableCell BorderBrush="Black" BorderThickness="2">
                                                    <c1Doc:C1Paragraph FontSize="20" Margin="2">
                                                        <c1Doc:C1Run Text="Cell"/>
                                                    </c1Doc:C1Paragraph>
                                                </c1Doc:C1TableCell>
                                            </c1Doc:C1TableRow>
                                        </c1Doc:C1TableRowGroup>
                                    </c1Doc:C1Table>
                                </c1Doc:C1ListItem>

                                <c1Doc:C1ListItem>
                                    <c1Doc:C1Paragraph FontSize="20">
                                        <c1Doc:C1Run Text="Row and column backgrounds:"/>
                                    </c1Doc:C1Paragraph>
                                    <c1Doc:C1Table BorderCollapse="True" Margin="30 0 50 10">
                                        <c1Doc:C1Table.Columns>
                                            <c1Doc:C1TableColumn />
                                            <c1Doc:C1TableColumn Background="Salmon"/>
                                        </c1Doc:C1Table.Columns>
                                        <c1Doc:C1TableRowGroup>
                                            <c1Doc:C1TableRow>
                                                <c1Doc:C1TableCell BorderBrush="Black" BorderThickness="2">
                                                    <c1Doc:C1Paragraph FontSize="20" Margin="2">
                                                        <c1Doc:C1Run Text="Cell"/>
                                                    </c1Doc:C1Paragraph>
                                                </c1Doc:C1TableCell>
                                                <c1Doc:C1TableCell BorderBrush="Black" BorderThickness="2">
                                                    <c1Doc:C1Paragraph FontSize="20" Margin="2">
                                                        <c1Doc:C1Run Text="Cell"/>
                                                    </c1Doc:C1Paragraph>
                                                </c1Doc:C1TableCell>
                                                <c1Doc:C1TableCell BorderBrush="Black" BorderThickness="2">
                                                    <c1Doc:C1Paragraph FontSize="20" Margin="2">
                                                        <c1Doc:C1Run Text="Cell"/>
                                                    </c1Doc:C1Paragraph>
                                                </c1Doc:C1TableCell>
                                            </c1Doc:C1TableRow>
                                            <c1Doc:C1TableRow Background="LightBlue">
                                                <c1Doc:C1TableCell BorderBrush="Black" BorderThickness="2">
                                                    <c1Doc:C1Paragraph FontSize="20" Margin="2">
                                                        <c1Doc:C1Run Text="Cell"/>
                                                    </c1Doc:C1Paragraph>
                                                </c1Doc:C1TableCell>
                                                <c1Doc:C1TableCell BorderBrush="Black" BorderThickness="2">
                                                    <c1Doc:C1Paragraph FontSize="20" Margin="2">
                                                        <c1Doc:C1Run Text="Cell"/>
                                                    </c1Doc:C1Paragraph>
                                                </c1Doc:C1TableCell>
                                                <c1Doc:C1TableCell BorderBrush="Black" BorderThickness="2">
                                                    <c1Doc:C1Paragraph FontSize="20" Margin="2">
                                                        <c1Doc:C1Run Text="Cell"/>
                                                    </c1Doc:C1Paragraph>
                                                </c1Doc:C1TableCell>
                                            </c1Doc:C1TableRow>
                                            <c1Doc:C1TableRow>
                                                <c1Doc:C1TableCell BorderBrush="Black" BorderThickness="2">
                                                    <c1Doc:C1Paragraph FontSize="20" Margin="2">
                                                        <c1Doc:C1Run Text="Cell"/>
                                                    </c1Doc:C1Paragraph>
                                                </c1Doc:C1TableCell>
                                                <c1Doc:C1TableCell BorderBrush="Black" BorderThickness="2">
                                                    <c1Doc:C1Paragraph FontSize="20" Margin="2">
                                                        <c1Doc:C1Run Text="Cell"/>
                                                    </c1Doc:C1Paragraph>
                                                </c1Doc:C1TableCell>
                                                <c1Doc:C1TableCell BorderBrush="Black" BorderThickness="2">
                                                    <c1Doc:C1Paragraph FontSize="20" Margin="2">
                                                        <c1Doc:C1Run Text="Cell"/>
                                                    </c1Doc:C1Paragraph>
                                                </c1Doc:C1TableCell>
                                            </c1Doc:C1TableRow>
                                        </c1Doc:C1TableRowGroup>
                                    </c1Doc:C1Table>
                                </c1Doc:C1ListItem>

                                <c1Doc:C1ListItem>
                                    <c1Doc:C1Paragraph FontSize="20">
                                        <c1Doc:C1Run Text="Column widths:"/>
                                    </c1Doc:C1Paragraph>
                                    <c1Doc:C1Table BorderCollapse="True" Margin="30 0 50 10">
                                        <c1Doc:C1Table.Columns>
                                            <c1Doc:C1TableColumn />
                                            <c1Doc:C1TableColumn />
                                        </c1Doc:C1Table.Columns>
                                        <c1Doc:C1TableRowGroup>
                                            <c1Doc:C1TableRow>
                                                <c1Doc:C1TableCell BorderBrush="Black" BorderThickness="2">
                                                    <c1Doc:C1Paragraph FontSize="20" Margin="2">
                                                        <c1Doc:C1Run Text="50%"/>
                                                    </c1Doc:C1Paragraph>
                                                </c1Doc:C1TableCell>
                                                <c1Doc:C1TableCell BorderBrush="Black" BorderThickness="2">
                                                    <c1Doc:C1Paragraph FontSize="20" Margin="2">
                                                        <c1Doc:C1Run Text="50px"/>
                                                    </c1Doc:C1Paragraph>
                                                </c1Doc:C1TableCell>
                                                <c1Doc:C1TableCell BorderBrush="Black" BorderThickness="2">
                                                    <c1Doc:C1Paragraph FontSize="20" Margin="2">
                                                        <c1Doc:C1Run Text="Auto"/>
                                                    </c1Doc:C1Paragraph>
                                                </c1Doc:C1TableCell>
                                            </c1Doc:C1TableRow>
                                        </c1Doc:C1TableRowGroup>
                                    </c1Doc:C1Table>
                                </c1Doc:C1ListItem>

                                <c1Doc:C1ListItem>
                                    <c1Doc:C1Paragraph FontSize="20">
                                        <c1Doc:C1Run Text="Vertical alignment:"/>
                                    </c1Doc:C1Paragraph>
                                    <c1Doc:C1Table BorderCollapse="True" Margin="30 0 50 10">
                                        <c1Doc:C1TableRowGroup>
                                            <c1Doc:C1TableRow>
                                                <c1Doc:C1TableCell BorderBrush="Black" BorderThickness="2">
                                                    <c1Doc:C1Paragraph FontSize="20" Margin="2">
                                                        <c1Doc:C1Run Text="Top&#xA;&#xA;&#xA;&#xA;&#xA;"/>
                                                    </c1Doc:C1Paragraph>
                                                </c1Doc:C1TableCell>
                                                <c1Doc:C1TableCell BorderBrush="Black" BorderThickness="2" VerticalAlignment="Middle">
                                                    <c1Doc:C1Paragraph FontSize="20" Margin="2">
                                                        <c1Doc:C1Run Text="Middle"/>
                                                    </c1Doc:C1Paragraph>
                                                </c1Doc:C1TableCell>
                                                <c1Doc:C1TableCell BorderBrush="Black" BorderThickness="2" VerticalAlignment="Bottom">
                                                    <c1Doc:C1Paragraph FontSize="20" Margin="2">
                                                        <c1Doc:C1Run Text="Bottom"/>
                                                    </c1Doc:C1Paragraph>
                                                </c1Doc:C1TableCell>
                                            </c1Doc:C1TableRow>
                                        </c1Doc:C1TableRowGroup>
                                    </c1Doc:C1Table>
                                </c1Doc:C1ListItem>

                            </c1Doc:C1List>
                        </c1Doc:C1ListItem>

                        <c1Doc:C1ListItem FontSize="20">
                            <c1Doc:C1Paragraph FontSize="20">
                                <c1Doc:C1Run Text="Miscellaneous:" />
                            </c1Doc:C1Paragraph>
                            <c1Doc:C1List FontSize="20" MarkerStyle="Disc">
                                <c1Doc:C1ListItem>
                                    <c1Doc:C1Paragraph FontSize="20">
                                        <c1Doc:C1Run Text="Inline" />
                                        <c1Doc:C1InlineUIContainer IsEditable="False">
                                            <c1Doc:C1InlineUIContainer.Child>
                                                <Image Source="/Resources/c1logo.png" />
                                            </c1Doc:C1InlineUIContainer.Child>
                                        </c1Doc:C1InlineUIContainer>
                                        <c1Doc:C1Run Text="images" />
                                    </c1Doc:C1Paragraph>
                                </c1Doc:C1ListItem>
                                <c1Doc:C1ListItem>
                                    <c1Doc:C1Paragraph FontSize="20">
                                        <c1Doc:C1Run />
                                        <c1Doc:C1Run Text="Uneditable, but deletable, elements" IsEditable="False" />
                                        <c1Doc:C1Run />
                                    </c1Doc:C1Paragraph>
                                </c1Doc:C1ListItem>
                            </c1Doc:C1List>
                        </c1Doc:C1ListItem>
                    </c1Doc:C1List.Children>
                </c1Doc:C1List>
            </c1Doc:C1Document>
        </c1RTB:C1RichTextBox>
        <Popup x:Name="Popup">
            <local:FormatPopup x:Name="FormatPopup"/>
        </Popup>
    </Grid>
</UserControl>
