feat: initialize control.
This commit is contained in:
26
src/Ursa.Themes.Semi/Controls/KeyGestureInput.axaml
Normal file
26
src/Ursa.Themes.Semi/Controls/KeyGestureInput.axaml
Normal file
@@ -0,0 +1,26 @@
|
||||
<ResourceDictionary
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:converters="using:Avalonia.Controls.Converters"
|
||||
xmlns:u="https://irihi.tech/ursa">
|
||||
<!-- Add Resources Here -->
|
||||
<converters:PlatformKeyGestureConverter x:Key="KeyGestureConverter" />
|
||||
|
||||
<ControlTheme x:Key="{x:Type u:KeyGestureInput}" TargetType="u:KeyGestureInput">
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="u:KeyGestureInput">
|
||||
<Border
|
||||
Name="Background"
|
||||
Width="100"
|
||||
MinHeight="32"
|
||||
Background="LightBlue"
|
||||
BorderThickness="1">
|
||||
<TextBlock Text="{TemplateBinding Gesture, Converter={StaticResource KeyGestureConverter}}" />
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
<Style Selector="^:focus-within /template/ Border#Background">
|
||||
<Setter Property="BorderBrush" Value="Blue" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
</ResourceDictionary>
|
||||
Reference in New Issue
Block a user