Skip to content

Commit

Permalink
Added WindowButtonDefinition.
Browse files Browse the repository at this point in the history
  • Loading branch information
TheHeadmaster committed Jul 27, 2024
1 parent 8e12b23 commit 49bc9d5
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style TargetType="{x:Type Button}" x:Key="WindowButtonStyle">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ButtonBase}">
<Border
x:Name="Chrome"
BorderBrush="{TemplateBinding BorderBrush}"
Margin="0"
Background="{TemplateBinding Background}"
SnapsToDevicePixels="True">
<ContentPresenter
ContentTemplate="{TemplateBinding ContentTemplate}"
Content="{TemplateBinding Content}"
ContentStringFormat="{TemplateBinding ContentStringFormat}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
Margin="{TemplateBinding Padding}"
RecognizesAccessKey="True"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="Background" Value="Transparent" />
<Setter Property="FontFamily" Value="Webdings" />
<Setter Property="FontSize" Value="13.333" />
<Setter Property="Foreground" Value="{DynamicResource BaseFontColor}" />
<Setter Property="Margin" Value="0,2,3,0" />
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Foreground" Value="{DynamicResource BaseHighlightColor}" />
</Trigger>
</Style.Triggers>
</Style>
</ResourceDictionary>
1 change: 1 addition & 0 deletions Horizon/Resources/UI/Controls.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="ControlDefinitions/WindowButtonDefinition.xaml" />
<ResourceDictionary Source="ControlDefinitions/WindowDefinition.xaml" />
</ResourceDictionary.MergedDictionaries>

Expand Down

0 comments on commit 49bc9d5

Please sign in to comment.