<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                    xmlns:sys="clr-namespace:System;assembly=mscorlib">

    <Style TargetType="{x:Type SearchBox}">
        <Setter Property="HorizontalAlignment" Value="Stretch" />
        <Setter Property="VerticalAlignment" Value="Stretch" />
        <Setter Property="MinHeight" Value="24" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type SearchBox}">
                    <Grid>
                        <ContentControl x:Name="PART_SeachIcon"
                                        ContentTemplate="{DynamicResource SearchTextIconTemplate}"
                                        VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5,0,0,0"
                                        Foreground="{DynamicResource TextBrushDarker}" />
                        <TextBox x:Name="PART_TextInpuText"
                                 VerticalContentAlignment="Center" Padding="5,0,25,0"/>
                        <ContentControl x:Name="PART_ClearTextIcon"
                                        ContentTemplate="{DynamicResource ClearTextIconTemplate}" 
                                        FontSize="18" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,5,0" 
                                        Foreground="{DynamicResource TextBrushDarker}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>