Files
ShrlAlgoToolkit/Wpf.Ui.Extend/Controls/FluentWindowEx/FluentWindowEx.xaml

43 lines
2.4 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="http://schemas.lepo.co/wpfui/2022/xaml"
xmlns:exc="clr-namespace:Wpf.Ui.Extend.Controls">
<Style x:Key="DefaultFluentWindowExStyle" TargetType="{x:Type exc:FluentWindowEx}">
<Setter Property="Background" Value="{DynamicResource WindowBackground}" />
<Setter Property="Foreground" Value="{DynamicResource WindowForeground}" />
<Setter Property="BorderBrush" Value="Transparent" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="MinWidth" Value="280" />
<Setter Property="Margin" Value="0" />
<Setter Property="Padding" Value="0" />
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
<Setter Property="FontWeight" Value="Normal" />
<Setter Property="UseLayoutRounding" Value="True" />
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="OverridesDefaultStyle" Value="True" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type exc:FluentWindowEx}">
<DockPanel>
<controls:TitleBar
Title="{TemplateBinding Title}"
Background="{TemplateBinding Background}"
DockPanel.Dock="Top"
Icon="{TemplateBinding TitleIcon}" />
<AdornerDecorator>
<controls:ClientAreaBorder
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}">
<ContentPresenter x:Name="ContentPresenter" />
</controls:ClientAreaBorder>
</AdornerDecorator>
<!--<controls:SnackbarPresenter x:Name="SnackbarPresenter" DockPanel.Dock="Bottom" />-->
</DockPanel>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style BasedOn="{StaticResource DefaultFluentWindowExStyle}" TargetType="{x:Type exc:FluentWindowEx}" />
</ResourceDictionary>