From a86ed1c6701c3aec8793c7177414c6ca42a95123 Mon Sep 17 00:00:00 2001 From: GG Z <903524121@qq.com> Date: Tue, 9 Sep 2025 21:41:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=AA=97=E5=8F=A3=E7=9A=84sn?= =?UTF-8?q?ap=20layouts=E5=92=8Ctab=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- NeoUI/NeoUI/Assists/WindowAssist.cs | 12 +-- NeoUI/NeoUI/Controls/Accordion.xaml | 5 +- NeoUI/NeoUI/Controls/ButtonsStyle.xaml | 94 ++++++++++++++++--- .../Controls/Decorations/EmbossBorder.xaml | 1 - .../Controls/Decorations/LightedSurface.xaml | 40 ++++---- NeoUI/NeoUI/Controls/ListBoxStyle.xaml | 50 +++++++--- NeoUI/NeoUI/Controls/WindowStyle.xaml | 7 +- NeoUI/NeoUI/Controls/WindowStyle.xaml.cs | 8 +- NeoUI/NeoUITest/MainWindow.xaml | 57 ++++++++--- 9 files changed, 199 insertions(+), 75 deletions(-) diff --git a/NeoUI/NeoUI/Assists/WindowAssist.cs b/NeoUI/NeoUI/Assists/WindowAssist.cs index 38fa963..a22b34b 100644 --- a/NeoUI/NeoUI/Assists/WindowAssist.cs +++ b/NeoUI/NeoUI/Assists/WindowAssist.cs @@ -35,21 +35,21 @@ public class WindowAssist /// 附加属性,用于手动控制控件的视觉状态。 /// XAML中的Triggers将绑定到此属性,而不是IsMouseOver或IsPressed。 /// - public static readonly DependencyProperty VisualStateProperty = + public static readonly DependencyProperty WindowButtonStateProperty = DependencyProperty.RegisterAttached( - "VisualState", // 属性名 + "WindowButtonState", // 属性名 typeof(WindowButtonState), // 属性类型 (我们定义的枚举) typeof(WindowAssist), // 拥有者类 new PropertyMetadata(WindowButtonState.Normal)); // 默认值 - public static WindowButtonState GetVisualState(DependencyObject obj) + public static WindowButtonState GetWindowButtonState(DependencyObject obj) { - return (WindowButtonState)obj.GetValue(VisualStateProperty); + return (WindowButtonState)obj.GetValue(WindowButtonStateProperty); } - public static void SetVisualState(DependencyObject obj, WindowButtonState value) + public static void SetWindowButtonState(DependencyObject obj, WindowButtonState value) { - obj.SetValue(VisualStateProperty, value); + obj.SetValue(WindowButtonStateProperty, value); } } diff --git a/NeoUI/NeoUI/Controls/Accordion.xaml b/NeoUI/NeoUI/Controls/Accordion.xaml index 5ce2c18..eca0821 100644 --- a/NeoUI/NeoUI/Controls/Accordion.xaml +++ b/NeoUI/NeoUI/Controls/Accordion.xaml @@ -20,10 +20,8 @@ + + xmlns:converters="clr-namespace:NeoUI.Converters" + xmlns:decorations="clr-namespace:NeoUI.Controls.Decorations" + xmlns:markup="clr-namespace:NeoUI.Markup"> @@ -74,11 +75,85 @@ To="0.5" Duration="0" /> + + + + - + @@ -1228,7 +1257,7 @@ - + @@ -1261,7 +1290,7 @@ Width="200" BorderBrush="Gray" BorderThickness="1"> - + @@ -1279,13 +1308,13 @@ - - + + - + -