<Application x:Class="DataFormBugDemo.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:local="clr-namespace:DataFormBugDemo"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             StartupUri="MainWindow.xaml">
    <Application.Resources>
        <ResourceDictionary>
            <ControlTemplate x:Key="HotKeyInputBoxTemplate" TargetType="local:HotKeyInputBox">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <Border Grid.Column="0" BorderBrush="{Binding BorderBrush, RelativeSource={RelativeSource TemplatedParent}}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"
                  Padding="0" Name="PART_Border" VerticalAlignment="Center">
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="{TemplateBinding DisplayText}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Foreground="{TemplateBinding Foreground}"
                         MinWidth="150" Margin="0" />
                        </StackPanel>
                    </Border>
                </Grid>
            </ControlTemplate>

            <Style TargetType="local:HotKeyInputBox" >
                <Setter Property="Template" Value="{StaticResource HotKeyInputBoxTemplate}" />
                <Setter Property="HorizontalAlignment" Value="Stretch" />
                <Setter Property="HorizontalContentAlignment" Value="Left" />
                <Setter Property="BorderBrush" Value="{telerik:Office2019Resource ResourceKey=MainBorderBrush}" />
                <Setter Property="BorderThickness" Value="1" />
                <Setter Property="Background" Value="{telerik:Office2019Resource ResourceKey=SecondaryBackgroundBrush}" />
                <Setter Property="Foreground" Value="{telerik:Office2019Resource ResourceKey=MainForegroundBrush}" />
                <Setter Property="FocusVisualStyle" Value="{x:Null}" />

            </Style>
        </ResourceDictionary>

     
    </Application.Resources>
</Application>
