<UserControl x:Class="PixiEditor.Views.Shortcuts.KeyCombinationBox"
             x:ClassModifier="internal"
             xmlns="https://github.com/avaloniaui"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             mc:Ignorable="d" 
             d:DesignHeight="30" d:DesignWidth="80">
    <Grid Focusable="True" Name="focusGrid">
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition Width="20"/>
        </Grid.ColumnDefinitions>
        <TextBox
                 KeyDown="TextBox_PreviewKeyDown"
                 KeyUp="TextBox_PreviewKeyUp"
                 x:Name="textBox"
                 CaretBrush="Transparent"
                 GotFocus="TextBox_GotKeyboardFocus"
                 LostFocus="TextBox_LostKeyboardFocus">
            <TextBox.Styles>
                <Style Selector="Border">
                    <Setter Property="CornerRadius" Value="5,0,0,5"/>
                </Style>
            </TextBox.Styles>
        </TextBox>
        <Button Grid.Column="1" x:Name="button" Content="―"
                Click="Button_Click">
            <Button.Styles>
                <Style Selector="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"
                                                      ContentTemplate="{TemplateBinding ContentTemplate}"
                                                      Content="{TemplateBinding Content}"/>
                                </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.Styles>
        </Button>
    </Grid>
</UserControl>
