<UserControl x:Class="FooEditor.FindReplaceWindow"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:FooEditor"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="250">
    <StackPanel>
        <Grid Margin="10">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="1*"/>
                <ColumnDefinition Width="2*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition/>
            </Grid.RowDefinitions>
            <TextBlock Grid.Column="0" Grid.Row="0" Text="検索対象"/>
            <TextBlock Grid.Column="0" Grid.Row="1" Text="置換対象"/>
            <TextBox Grid.Column="1" Grid.Row="0" Text="{Binding FindPattern,Mode=TwoWay}"/>
            <TextBox Grid.Column="1" Grid.Row="1" Text="{Binding ReplacePattern,Mode=TwoWay}"/>
        </Grid>
        <StackPanel Margin="10,5,10,5">
            <CheckBox IsChecked="{Binding UseRegEx,Mode=TwoWay}">正規表現を使用する</CheckBox>
            <CheckBox IsChecked="{Binding RestrictSearch,Mode=TwoWay}">大文字と小文字を区別する</CheckBox>
            <CheckBox IsChecked="{Binding UseGroup,Mode=TwoWay}">置き換え時にグループ指定を行う</CheckBox>
            <CheckBox IsChecked="{Binding AllDocuments,Mode=TwoWay}">全てのドキュメントを対象にする</CheckBox>
        </StackPanel>
        <StackPanel Margin="10,5,10,5">
            <Button Margin="0,0,0,10" Command="{x:Static local:FindReplaceCommands.FindStart}">検索</Button>
            <Button Margin="0,0,0,10" Command="{x:Static local:FindReplaceCommands.ReplaceStart}">置き換え</Button>
            <Button Command="{x:Static local:FindReplaceCommands.ReplaceAllStart}">全て置き換え</Button>
        </StackPanel>
    </StackPanel>
</UserControl>
