Files
Shrlalgo.RvKits/WPFluent/Controls/FluentWindowEx/FluentWindowEx.xaml

43 lines
2.6 KiB
Plaintext
Raw Normal View History

2024-09-22 11:05:41 +08:00
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:WPFluent.Controls">
2025-07-11 09:20:23 +08:00
<!--<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/WPFluent;component/Themes/Dark.xaml"/>
</ResourceDictionary.MergedDictionaries>-->
<Style x:Key="DefaultFluentWindowExStyle" TargetType="{x:Type controls:FluentWindowEx}">
2025-07-11 09:20:23 +08:00
<Setter Property="Background" Value="{DynamicResource ApplicationBackgroundColorBrush}" />
2024-09-22 11:05:41 +08:00
<Setter Property="BorderBrush" Value="Transparent" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
<Setter Property="FontWeight" Value="Normal" />
2025-07-11 09:20:23 +08:00
<Setter Property="Foreground" Value="{DynamicResource TextFillColorPrimaryBrush}" />
2025-05-05 17:04:06 +08:00
<Setter Property="Height" Value="600" />
<Setter Property="Margin" Value="0" />
<Setter Property="MinHeight" Value="320" />
<Setter Property="MinWidth" Value="460" />
2024-09-22 11:05:41 +08:00
<Setter Property="OverridesDefaultStyle" Value="True" />
2025-05-05 17:04:06 +08:00
<Setter Property="Padding" Value="0" />
<Setter Property="SnapsToDevicePixels" Value="True" />
2024-09-22 11:05:41 +08:00
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type controls:FluentWindowEx}">
2025-05-05 17:04:06 +08:00
<StackPanel>
2024-09-22 11:05:41 +08:00
<controls:TitleBar
Background="{TemplateBinding Background}"
2025-05-05 17:04:06 +08:00
Foreground="{TemplateBinding Foreground}"
Icon="{Binding Icon,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=controls:FluentWindowEx}}"
Title="{Binding Title,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=controls:FluentWindowEx}}" />
2024-09-22 11:05:41 +08:00
<AdornerDecorator>
2025-07-11 09:20:23 +08:00
<controls:ClientAreaBorder Background="{DynamicResource ApplicationBackgroundColorBrush}" BorderBrush="Transparent">
2025-05-05 17:04:06 +08:00
<ContentPresenter x:Name="ContentPresenter" TextElement.Foreground="{TemplateBinding Foreground}" />
2024-09-22 11:05:41 +08:00
</controls:ClientAreaBorder>
</AdornerDecorator>
2025-05-05 17:04:06 +08:00
</StackPanel>
2024-09-22 11:05:41 +08:00
</ControlTemplate>
</Setter.Value>
</Setter>
2025-05-05 17:04:06 +08:00
<Setter Property="UseLayoutRounding" Value="True" />
2024-09-22 11:05:41 +08:00
</Style>
2025-07-11 09:20:23 +08:00
<Style TargetType="{x:Type controls:FluentWindowEx}" BasedOn="{StaticResource DefaultFluentWindowExStyle}"/>
2024-09-22 11:05:41 +08:00
</ResourceDictionary>