<UserControl x:Class="Controls.SearchTextBoxUserControl"
             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:mpvnet="clr-namespace:mpvnet"
             mc:Ignorable="d" 
             d:DesignHeight="450"
             d:DesignWidth="800">
    
    <Grid Name="SearchTextBoxUserControl1"
          Background="{x:Static mpvnet:Theme.Background}">
        
        <TextBlock Name="HintTextBlock"
                   Margin="5,2"
                   Text="Find a setting"
                   VerticalAlignment="Center"
                   Foreground="{x:Static mpvnet:Theme.Foreground2}"
                   Background="{x:Static mpvnet:Theme.Background}" />
        
        <TextBox Name="SearchTextBox"
                 Height="25"
                 Padding="1,2,0,0"
                 BorderThickness="2"
                 Background="Transparent"
                 TextChanged="SearchTextBox_TextChanged"
                 Foreground="{x:Static mpvnet:Theme.Foreground}"
                 CaretBrush="{x:Static mpvnet:Theme.Foreground}" />
        
        <Button Name="SearchClearButton"
                Background="Transparent"
                HorizontalAlignment="Right"
                FontFamily="Marlett"
                FontSize="10"
                Width="17"
                Height="17"
                Margin="2,0,4,0"
                Visibility="Hidden"
                Click="SearchClearButton_Click" >r

            <Button.Style>
                <Style TargetType="Button">
                    <Setter Property="Background" Value="{x:Static mpvnet:Theme.Background}"/>
                    <Setter Property="Foreground" Value="{x:Static mpvnet:Theme.Foreground2}"/>
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="Button">
                                <Border BorderThickness="1"
                                        BorderBrush="{TemplateBinding Foreground}"
                                        SnapsToDevicePixels="True">
                                    
                                    <ContentPresenter HorizontalAlignment="Center"
                                                      VerticalAlignment="Center" />
                                </Border>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                    
                    <Style.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Foreground" Value="{x:Static mpvnet:Theme.Heading}"/>
                        </Trigger>
                    </Style.Triggers>
                </Style>
            </Button.Style>
        </Button>
    </Grid>
</UserControl>