<Window x:Class="RibbonThemes.FindReplaceDialog"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Find and Replace" MinHeight="242" MinWidth="480" Width="480" Height="242"
        WindowStartupLocation="CenterScreen" Topmost="True" 
        xmlns:shell="clr-namespace:System.Windows.Shell;assembly=PresentationFramework"
        xmlns:ribbon="clr-namespace:System.Windows.Controls.Ribbon;assembly=System.Windows.Controls.Ribbon">
    <Grid VerticalAlignment="Stretch">
        <TabControl Name="_tab" SelectionChanged="_tab_SelectionChanged" VerticalAlignment="Stretch" >
            <TabItem Header="Find" />
            <TabItem Header="Replace" />
        </TabControl>
        <DockPanel Margin="0,24,0,0">
            <Grid DockPanel.Dock="Top" Margin="5,5,5,0" >
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="100"/>
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>

                <Label Content="Find what:" Grid.Row="0" Grid.Column="0" VerticalAlignment="Center"/>
                <ComboBox IsEditable="True" Grid.Row="0" Grid.Column="1" Margin="5"/>

                <Label Name="_lbReplace" Content="Replace with:" Grid.Row="1" Grid.Column="0" VerticalAlignment="Center"/>
                <ComboBox Name="_comboReplace" IsEditable="True" Grid.Row="1" Grid.Column="1" Margin="5"/>
            </Grid>

            <StackPanel DockPanel.Dock="Bottom" Orientation="Horizontal" Margin="5,0,5,0" HorizontalAlignment="Right" >
                <Button Name="_btnReplaceAll" Content="Replace All" Width="75" Height="25" Margin="5"/>
                <Button Name="_btnReplace" Content="Replace" Width="75" Height="25" Margin="5"/>
                <Button Content="Find All" Width="75" Height="25" Margin="20,5,5,5"/>
                <Button Content="Find Next" Width="75" Height="25" Margin="5" />
                <Button Name="_btnClose" Content="Close" Width="75" Height="25" Margin="20,5,0,5" Click="_btnClose_Click"/>
            </StackPanel>

            <Grid Margin="5,5,5,0" >
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition />
                </Grid.RowDefinitions>

                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition />
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>

                <Label Content="Within:" Grid.Row="0" Grid.Column="0" VerticalAlignment="Center"/>
                <ComboBox Width="90" Grid.Row="0" Grid.Column="1" Margin="5">
                    <ComboBoxItem Content="Sheet" IsSelected="True"/>
                    <ComboBoxItem Content="Workbook"/>
                </ComboBox>
                <CheckBox Grid.Row="0" Grid.Column="2" Content="Match case" VerticalAlignment="Center"/>

                <Label Content="Search:" Grid.Row="1" Grid.Column="0" VerticalAlignment="Center"/>
                <ComboBox Width="90" Grid.Row="1" Grid.Column="1" Margin="5">
                    <ComboBoxItem Content="By Rows" IsSelected="True"/>
                    <ComboBoxItem Content="By Columns"/>
                </ComboBox>
                <CheckBox Grid.Row="1" Grid.Column="2" Content="Match entire cell contents" VerticalAlignment="Center"/>
            </Grid>
        </DockPanel>

    </Grid>
</Window>
