Files
ShrlAlgoToolkit/WPFluent/Controls/FluentWindowEx/FluentWindowEx.xaml
ShrlAlgo 4d35cadb56 更新
2025-07-11 09:20:23 +08:00

43 lines
2.6 KiB
XML

<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">
<!--<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/WPFluent;component/Themes/Dark.xaml"/>
</ResourceDictionary.MergedDictionaries>-->
<Style x:Key="DefaultFluentWindowExStyle" TargetType="{x:Type controls:FluentWindowEx}">
<Setter Property="Background" Value="{DynamicResource ApplicationBackgroundColorBrush}" />
<Setter Property="BorderBrush" Value="Transparent" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
<Setter Property="FontWeight" Value="Normal" />
<Setter Property="Foreground" Value="{DynamicResource TextFillColorPrimaryBrush}" />
<Setter Property="Height" Value="600" />
<Setter Property="Margin" Value="0" />
<Setter Property="MinHeight" Value="320" />
<Setter Property="MinWidth" Value="460" />
<Setter Property="OverridesDefaultStyle" Value="True" />
<Setter Property="Padding" Value="0" />
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type controls:FluentWindowEx}">
<StackPanel>
<controls:TitleBar
Background="{TemplateBinding Background}"
Foreground="{TemplateBinding Foreground}"
Icon="{Binding Icon,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=controls:FluentWindowEx}}"
Title="{Binding Title,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=controls:FluentWindowEx}}" />
<AdornerDecorator>
<controls:ClientAreaBorder Background="{DynamicResource ApplicationBackgroundColorBrush}" BorderBrush="Transparent">
<ContentPresenter x:Name="ContentPresenter" TextElement.Foreground="{TemplateBinding Foreground}" />
</controls:ClientAreaBorder>
</AdornerDecorator>
</StackPanel>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="UseLayoutRounding" Value="True" />
</Style>
<Style TargetType="{x:Type controls:FluentWindowEx}" BasedOn="{StaticResource DefaultFluentWindowExStyle}"/>
</ResourceDictionary>