<UserControl x:Class="F4SDicons.User_Controls.SearchBar"
             x:Name="_this"
             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:F4SDicons.User_Controls"
             xmlns:ico="clr-namespace:FasdDesktopUi.Basics.UserControls.AdaptableIcon;assembly=F4SD-AdaptableIcon"
             mc:Ignorable="d" 
             d:DesignHeight="100" d:DesignWidth="500">
    <Border Grid.Row="0" Background="{DynamicResource colorF7FAFA}" CornerRadius="17.5" VerticalAlignment="Center" Margin="10,0,15,5" Height="35">

        <Border.Resources>
            <Style TargetType="ico:AdaptableIcon">
                <Setter Property="PrimaryIconColor" Value="{DynamicResource color3D3C3C}"/>

                <Style.Triggers>
                    <Trigger Property="IsMouseOver" Value="True">
                        <Setter Property="PrimaryIconColor" Value="{DynamicResource color1F92EE}"/>
                    </Trigger>
                </Style.Triggers>
            </Style>
        </Border.Resources>

        <Grid VerticalAlignment="Center">

            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="10"/>
                <ColumnDefinition Width="20"/>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="20"/>
                <ColumnDefinition Width="10"/>
            </Grid.ColumnDefinitions>

            <ico:AdaptableIcon Grid.Column="1" x:Name="SearchIcon" BorderPadding="0" IconHeight="20" IconWidth="20" SelectedInternIcon="menuBar_search">

            </ico:AdaptableIcon>

            <TextBlock Grid.Column="2"  Name="previewTextBlock" Foreground="{DynamicResource color3D3C3C}" Background="Transparent" VerticalAlignment="Center" Margin="10,0,0,0">
                            Suchbegriff eingeben...
            </TextBlock>

            <TextBox Name="bindingTextBox" Grid.Column="2" Foreground="{DynamicResource color3D3C3C}" Background="Transparent" BorderThickness="0" VerticalAlignment="Center" GotFocus="TextBoxGotFocus" LostFocus="TextBoxLostFocus" Margin="10,0,0,0"
                        Text = "{Binding SearchValue, Mode = OneWayToSource, UpdateSourceTrigger = PropertyChanged}" Grid.ColumnSpan="2">

            </TextBox>

            <ico:AdaptableIcon Grid.Column="3" x:Name="clearSearchIcon" BorderPadding="0" IconHeight="12" IconWidth="12" MouseLeftButtonUp="ClearSearchButtonUp" Cursor="Hand" ToolTip="Eingabe löschen" SelectedInternIcon="window_close">

            </ico:AdaptableIcon>

        </Grid>
    </Border>
</UserControl>
