重命名控件库

This commit is contained in:
GG Z
2026-01-02 17:30:41 +08:00
parent fa0d280130
commit 785e5de36e
277 changed files with 1068 additions and 1242 deletions

View File

@@ -8,10 +8,10 @@ using Melskin.Assists;
namespace Melskin.Controls;
/// <summary>
/// NeoWindow 类继承自 WPF 的 Window 类,用于创建具有特定样式和功能的窗口。
/// MelWindow 类继承自 WPF 的 Window 类,用于创建具有特定样式和功能的窗口。
/// 该类通过设置默认样式资源引用来自定义窗口外观,并提供属性来控制窗口的行为和内容布局。
/// </summary>
public class NeoWindow : Window
public class MelWindow : Window
{
private const string VbMinimizeButtonName = "minimizeButton";
private const string VbMaximizeRestoreButtonName = "maximizeRestoreButton";
@@ -23,9 +23,9 @@ public class NeoWindow : Window
/// <summary>
///
/// </summary>
public NeoWindow()
public MelWindow()
{
SetResourceReference(StyleProperty, typeof(NeoWindow)); //设置默认的样式资源引用
SetResourceReference(StyleProperty, typeof(MelWindow)); //设置默认的样式资源引用
}
#region
@@ -241,16 +241,16 @@ public class NeoWindow : Window
}
#endregion
static NeoWindow()
static MelWindow()
{
DefaultStyleKeyProperty.OverrideMetadata(typeof(NeoWindow), new FrameworkPropertyMetadata(typeof(NeoWindow)));
DefaultStyleKeyProperty.OverrideMetadata(typeof(MelWindow), new FrameworkPropertyMetadata(typeof(MelWindow)));
}
/// <summary>
/// 如果窗口不活动,请让窗口的内容淡出。
/// 默认值为真(已启用)。
/// </summary>
public static readonly DependencyProperty FadeContentIfInactiveProperty = DependencyProperty.Register(
nameof(FadeContentIfInactive), typeof(bool), typeof(NeoWindow), new FrameworkPropertyMetadata(true));
nameof(FadeContentIfInactive), typeof(bool), typeof(MelWindow), new FrameworkPropertyMetadata(true));
/// <summary>
/// 如果窗口不活动,请让窗口的内容淡出。
@@ -277,7 +277,7 @@ public class NeoWindow : Window
/// 此依赖属性允许开发者自定义左侧内容的布局和显示方式通过设置不同的DataTemplate来改变该区域的内容呈现形式。
/// </summary>
public static readonly DependencyProperty TitleBarLeftContentProperty =
DependencyProperty.Register(nameof(TitleBarLeftContent), typeof(object), typeof(NeoWindow));
DependencyProperty.Register(nameof(TitleBarLeftContent), typeof(object), typeof(MelWindow));
/// <summary>
/// 标题栏右侧内容模板
/// </summary>
@@ -292,7 +292,7 @@ public class NeoWindow : Window
/// 此依赖属性允许开发者自定义右侧内容的布局和显示方式通过设置不同的DataTemplate来改变该区域的内容呈现形式。
/// </summary>
public static readonly DependencyProperty TitleBarRightContentProperty =
DependencyProperty.Register(nameof(TitleBarRightContent), typeof(object), typeof(NeoWindow));
DependencyProperty.Register(nameof(TitleBarRightContent), typeof(object), typeof(MelWindow));
private Button? minimizeButton;
private Button? maximizeRestoreButton;
private Button? closeButton;