<UserControl x:Class="PixiEditor.Views.UserControls.KeyCombinationBox"
             x:ClassModifier="internal"
             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:PixiEditor.Views.UserControls"
             mc:Ignorable="d" 
             d:DesignHeight="30" d:DesignWidth="80">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition Width="20"/>
        </Grid.ColumnDefinitions>
        <TextBox Style="{StaticResource DarkTextBoxStyle}"
                 PreviewKeyDown="TextBox_PreviewKeyDown"
                 PreviewKeyUp="TextBox_PreviewKeyUp"
                 x:Name="textBox"
                 CaretBrush="Transparent"
                 GotKeyboardFocus="TextBox_GotKeyboardFocus"
                 LostKeyboardFocus="TextBox_LostKeyboardFocus">
            <TextBox.Resources>
                <Style TargetType="Border">
                    <Setter Property="CornerRadius" Value="5,0,0,5"/>
                </Style>
            </TextBox.Resources>
        </TextBox>
        <Button Grid.Column="1" x:Name="button" Content="&#xE711;" FontFamily="Segoe MDL2 Assets"
                Click="Button_Click">
            <Button.Style>
                <Style TargetType="Button">
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="Button">
                                <Border CornerRadius="0,5,5,0" BorderThickness="1"
                                        Background="{TemplateBinding Background}"
                                        BorderBrush="{TemplateBinding BorderBrush}">
                                    <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
                                </Border>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                    <Style.Triggers>
                        <Trigger Property="IsMouseOver" Value="False">
                            <Setter Property="Background" Value="{StaticResource BrighterAccentColor}"/>
                            <Setter Property="BorderBrush" Value="{StaticResource BrighterAccentColor}"/>
                            <Setter Property="Foreground" Value="White"/>
                        </Trigger>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Background" Value="{StaticResource AlmostLightModeAccentColor}"/>
                            <Setter Property="BorderBrush" Value="{StaticResource AlmostLightModeAccentColor}"/>
                            <Setter Property="Foreground" Value="White"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="False">
                            <Setter Property="Background" Value="{StaticResource AccentColor}"/>
                            <Setter Property="BorderBrush" Value="{StaticResource BrighterAccentColor}"/>
                            <Setter Property="Foreground" Value="Gray"/>
                        </Trigger>
                    </Style.Triggers>
                </Style>
            </Button.Style>
        </Button>
    </Grid>
</UserControl>
