优化更新代码,添加界面功能并整合

This commit is contained in:
GG Z
2025-02-10 20:53:40 +08:00
parent 83b846f15f
commit 978e03a67f
1389 changed files with 95739 additions and 22200 deletions

View File

@@ -0,0 +1,75 @@
<!--
This Source Code Form is subject to the terms of the MIT License.
If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
Copyright (C) Leszek Pomianowski and WPF UI Contributors.
All Rights Reserved.
Based on Microsoft XAML for Win UI
Copyright (c) Microsoft Corporation. All Rights Reserved.
-->
<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">
<Style x:Key="DefaultFlyoutStyle" TargetType="{x:Type controls:Flyout}">
<Setter Property="Background" Value="{DynamicResource FlyoutBackground}" />
<Setter Property="BorderBrush" Value="{DynamicResource FlyoutBorderBrush}" />
<Setter Property="Margin" Value="0" />
<Setter Property="MinWidth" Value="20" />
<Setter Property="MinHeight" Value="20" />
<Setter Property="Padding" Value="12" />
<Setter Property="VerticalAlignment" Value="Bottom" />
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="VerticalContentAlignment" Value="Stretch" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="Placement" Value="Top" />
<Setter Property="Popup.AllowsTransparency" Value="True" />
<Setter Property="Popup.StaysOpen" Value="False" />
<Setter Property="Popup.PopupAnimation" Value="Fade" />
<Setter Property="Popup.VerticalOffset" Value="1" />
<Setter Property="Focusable" Value="False" />
<Setter Property="KeyboardNavigation.IsTabStop" Value="False" />
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="OverridesDefaultStyle" Value="True" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type controls:Flyout}">
<Grid>
<Popup
x:Name="PART_Popup"
MinWidth="{TemplateBinding MinWidth}"
MinHeight="{TemplateBinding MinHeight}"
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
VerticalAlignment="{TemplateBinding VerticalAlignment}"
AllowsTransparency="{TemplateBinding Popup.AllowsTransparency}"
Focusable="False"
IsOpen="{TemplateBinding IsOpen}"
Placement="{TemplateBinding Placement}"
PopupAnimation="{TemplateBinding Popup.PopupAnimation}"
StaysOpen="{TemplateBinding Popup.StaysOpen}"
VerticalOffset="1">
<Border
x:Name="PopupBorder"
Margin="{TemplateBinding Margin}"
Padding="{TemplateBinding Padding}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="1"
CornerRadius="{DynamicResource PopupCornerRadius}"
SnapsToDevicePixels="True">
<ContentPresenter Content="{TemplateBinding Content}" />
</Border>
</Popup>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style BasedOn="{StaticResource DefaultFlyoutStyle}" TargetType="{x:Type controls:Flyout}" />
</ResourceDictionary>