<local:FindViewBase 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">
    <local:FindViewBase.Resources>
        <Style x:Key="CommonMargin" TargetType="FrameworkElement">
            <Setter Property="Margin" Value="0,0,0,10"/>
        </Style>
        <Style x:Key="CommonCheckBoxStyle" TargetType="CheckBox" BasedOn="{StaticResource CommonMargin}"/>
        <Style x:Key="CommonTextBoxStyle" TargetType="TextBox" BasedOn="{StaticResource CommonMargin}"/>
        <Style x:Key="CommonComoboBoxStyle" TargetType="ComboBox" BasedOn="{StaticResource CommonMargin}"/>
        <Style x:Key="CommonButtonStyle" TargetType="Button">
            <Setter Property="Margin" Value="10,0,10,10"/>
        </Style>
    </local:FindViewBase.Resources>
    <StackPanel>
        <TextBlock Text="検索対象"/>
        <ComboBox Style="{StaticResource CommonComoboBoxStyle}" Name="FindParttern" IsEditable="True" IsTextSearchEnabled="False" ItemsSource="{Binding FindHistroy}" SelectedItem="{Binding SelectedFindPattern}"  Text="{Binding FindPattern,Mode=TwoWay}"/>
        <TextBlock Text="置換対象"/>
        <TextBox Style="{StaticResource CommonTextBoxStyle}" Text="{Binding ReplacePattern,Mode=TwoWay}"/>
        <CheckBox Style="{StaticResource CommonCheckBoxStyle}"  IsChecked="{Binding UseRegEx,Mode=TwoWay}">正規表現を使用する</CheckBox>
        <CheckBox Style="{StaticResource CommonCheckBoxStyle}"  IsChecked="{Binding RestrictSearch,Mode=TwoWay}">大文字と小文字を区別する</CheckBox>
        <CheckBox Style="{StaticResource CommonCheckBoxStyle}"  IsChecked="{Binding UseGroup,Mode=TwoWay}">置き換え時にグループ指定を行う</CheckBox>
        <CheckBox Style="{StaticResource CommonCheckBoxStyle}"  IsChecked="{Binding AllDocuments,Mode=TwoWay}">全てのドキュメントを対象にする</CheckBox>
        <Button Style="{StaticResource CommonButtonStyle}" Command="{Binding FindNextCommand}">検索</Button>
        <Button Style="{StaticResource CommonButtonStyle}" Command="{Binding ReplaceNextCommand}">置き換え</Button>
        <Button Style="{StaticResource CommonButtonStyle}" Command="{Binding ReplaceAllCommand}">全て置き換え</Button>
        <TextBlock Text="{Binding Result}"/>
    </StackPanel>
</local:FindViewBase>
