更新整理

This commit is contained in:
GG Z
2025-04-24 20:56:44 +08:00
parent 155cef46f8
commit 5b6d67b571
813 changed files with 14437 additions and 12362 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 824 B

View File

@@ -4,14 +4,16 @@
// All Rights Reserved.
using WPFluent.Input;
using WPFluent.Interop;
using System.Reflection;
using WPFluent.Input;
using WPFluent.Interop;
using Size = System.Windows.Size;
#if NET8_0_OR_GREATER
using System.Runtime.CompilerServices;
using mscoSystem.RuntimepilerServices;
#endif
// ReSharper disable once CheckNamespace
@@ -237,7 +239,7 @@ public class MessageWindow : System.Windows.Window
/// <summary>
/// Gets the command triggered after clicking the button on the Footer.
/// </summary>
public IRelayCommand TemplateButtonCommand => (IRelayCommand)GetValue(TemplateButtonCommandProperty);
internal IRelayCommand TemplateButtonCommand => (IRelayCommand)GetValue(TemplateButtonCommandProperty);
#if !NET8_0_OR_GREATER
private static readonly PropertyInfo CanCenterOverWPFOwnerPropertyInfo = typeof(Window).GetProperty(
@@ -301,7 +303,7 @@ public class MessageWindow : System.Windows.Window
try
{
RemoveTitleBarAndApplyMica();
//RemoveTitleBarAndApplyMica();
if (showAsDialog)
{
@@ -400,7 +402,7 @@ public class MessageWindow : System.Windows.Window
return;
}
_ = Tcs?.TrySetResult(MessageBoxResult.None);
Tcs?.TrySetResult(MessageBoxResult.None);
}
protected virtual void CenterWindowOnScreen()
@@ -434,15 +436,15 @@ public class MessageWindow : System.Windows.Window
_ => MessageBoxResult.None,
};
_ = Tcs?.TrySetResult(result);
Tcs?.TrySetResult(result);
base.Close();
}
private void RemoveTitleBarAndApplyMica()
{
_ = UnsafeNativeMethods.RemoveWindowTitlebarContents(this);
_ = WindowBackdrop.ApplyBackdrop(this, WindowBackdropType.Mica);
}
//private void RemoveTitleBarAndApplyMica()
//{
// //UnsafeNativeMethods.RemoveWindowTitlebarContents(this);
// WindowBackdrop.ApplyBackdrop(this, WindowBackdropType.Mica);
//}
private void ResizeWidth(UIElement element)
{