<UserControl 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"
             xmlns:shared="clr-namespace:Artemis.UI.Shared"
             mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
             x:Class="Artemis.UI.Shared.HotkeyBox">

    <UserControl.Styles>
        <Style Selector="TextBox#DisplayTextBox:focus:not(TextBox:empty)">
            <Setter Property="InnerRightContent">
                <Template>
                    <Button Theme="{StaticResource TextBoxDeleteButtonStyle}"
                            Click="Button_OnClick"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            CornerRadius="{DynamicResource ControlCornerRadius}"
                            Padding="{StaticResource HelperButtonThemePadding}"
                            IsTabStop="False"
                            Focusable="False"
                            FontSize="{TemplateBinding FontSize}"
                            Width="30"
                            VerticalAlignment="Stretch" />
                </Template>
            </Setter>
        </Style>
    </UserControl.Styles>

    <shared:NoInputTextBox x:Name="DisplayTextBox"
             Watermark="{CompiledBinding $parent.Watermark}"
             UseFloatingWatermark="{CompiledBinding $parent.UseFloatingWatermark}"
             Classes="clearButton"
             IsReadOnly="True"
             HorizontalAlignment="Stretch" />
</UserControl>