<Window x:Class="Test.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:MyNamespace="clr-namespace:FooEditEngine.WPF;assembly=FooEditEngine.WPF"
        xmlns:local="clr-namespace:Test"
        Title="MainWindow" Height="350" Width="525">
    <Window.Resources>
        <local:TextRangeConveter x:Key="TextRangeConverter"/>
    </Window.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="24"/>
            <RowDefinition/>
            <RowDefinition Height="24"/>
        </Grid.RowDefinitions>
        <Menu Grid.Row="0">
            <MenuItem Header="Test">
                <MenuItem Header="Load" Click="MenuItem_Click_3"/>
                <MenuItem Header="Save" Click="MenuItem_Click_10"/>
                <MenuItem Header="Enable" Click="MenuItem_Click" IsCheckable="True" Name="Enable"/>
                <MenuItem Header="ShowLineMarker" Click="ShowLineMarker_Click" IsCheckable="True" Name="ShowLineMarker"/>
                <MenuItem Header="ShowLineNumber" Click="MenuItem_Click_1" IsCheckable="True" Name="ShowLineNumber"/>
                <MenuItem Header="ShowRuler" Click="MenuItem_Click_8" IsCheckable="True" Name="ShowRuler" />
                <MenuItem Header="WordRap By 10 chars" Click="MenuItem_Click_4" IsCheckable="True" Name="WordRap"/>
                <MenuItem Header="WordRap By Window" Click="MenuItem_Click_12" IsCheckable="True" Name="WordRapByWindow"/>
                <MenuItem Header="Print" Click="MenuItem_Click_2"/>
                <MenuItem Header="Marker" Click="MenuItem_Click_5"/>
                <MenuItem Header="RTL" Name="RTL" Click="MenuItem_Click_6" IsCheckable="True" />
                <MenuItem Header="XML Hilight" Name="XMLHilight" Click="MenuItem_Click_7" IsCheckable="True" />
                <MenuItem Header="URL Mark" Name="URLMark" Click="URLMark_Click" IsCheckable="True"/>
                <MenuItem Header="GenerateFolding" Click="MenuItem_Click_9"/>
                <MenuItem Header="Set Padding" Click="MenuItem_Click_11"/>
            </MenuItem>
        </Menu>
        <MyNamespace:FooTextBox x:Name="fooTextBox" Grid.Row="1"/>
        <StackPanel Grid.Row="2" Orientation="Horizontal">
            <TextBlock Text="{Binding Selection,ElementName=fooTextBox,Converter={StaticResource TextRangeConverter}}" Margin="10,0,0,0"/>
            <TextBlock Text="Find" Margin="10,0,0,0"/>
            <TextBox Name="FindPattern" TextChanged="FindPattern_TextChanged" Width="100"/>
            <TextBlock Text="Replace" Margin="10,0,0,0"/>
            <TextBox Name="ReplacePattern" Width="100"/>
            <Button Name="Find" Content="Find" Click="Find_Click" Margin="10,0,0,0"/>
            <Button Name="ReplaceAll" Content="ReplaceAll" Click="ReplaceAll_Click" Margin="10,0,0,0"/>
        </StackPanel>
    </Grid>
</Window>
