<Page
    x:Class="RichTextBoxSamples.FindAndReplace"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:RichTextBoxSamples"
    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="50" />
            <RowDefinition Height="50" />
            <RowDefinition />
        </Grid.RowDefinitions>
        <StackPanel Orientation="Horizontal" >
            <TextBlock x:Uid="/RichTextBoxSamplesLib/Resources/FindText" VerticalAlignment="Center" FontSize="16" Margin="5,0" Width="100"/>
            <TextBox x:Name="txtFindText" Width="200" Height="32" Margin="5,0" AcceptsReturn="False" TextChanged="txtFindText_TextChanged" />
            <Button x:Name="btnNext" x:Uid="/RichTextBoxSamplesLib/Resources/Next" Click="btnNext_Click" Margin="5,0" IsEnabled="False" Width="120"/>
            <Button x:Name="btnPrevious" x:Uid="/RichTextBoxSamplesLib/Resources/Previous" Margin="5,0" Click="btnPrevious_Click" IsEnabled="False" Width="120" />
        </StackPanel>
        <StackPanel Orientation="Horizontal" Grid.Row="1">
            <TextBlock x:Uid="/RichTextBoxSamplesLib/Resources/ReplaceText" VerticalAlignment="Center" FontSize="16" Margin="5,0" Width="100"/>
            <TextBox x:Name="tbxReplaceText" Width="200" Height="32" Margin="5,0" AcceptsReturn="False" IsEnabled="False"/>
            <Button x:Name="btnReplace" x:Uid="/RichTextBoxSamplesLib/Resources/Replace" IsEnabled="False" Click="btnReplace_Click" Margin="5,0" Width="120" />
            <Button x:Name="btnReplaceAll" x:Uid="/RichTextBoxSamplesLib/Resources/ReplaceAll" Margin="5,0" IsEnabled="False" Click="btnReplaceAll_Click" Width="120"/>
        </StackPanel>
        <c1RTB:C1RichTextBox x:Name="rtb"  BorderThickness="2" BorderBrush="DarkGray" Grid.Row="2"/>
    </Grid>
</Page>