更新整理

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

View File

@@ -143,7 +143,7 @@ public abstract class IconElementEx : IconElement
Background = Brushes.Transparent,
SnapsToDevicePixels = true,
};
_ = InitializeChildren();
InitializeChildren();
AddVisualChild(_layoutRoot);
}

View File

@@ -1,9 +1,8 @@
using WPFluent.Interop;
using WPFluent.Interop.WinDef;
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.InteropServices;
@@ -11,9 +10,10 @@ using System.Windows;
using System.Windows.Controls.Primitives;
using System.Windows.Interop;
using System.Windows.Media;
using System.Windows.Threading;
using WPFluent.Interop;
namespace WPFluent.Controls.Primitives;
internal class PopupPositioner : DependencyObject, IDisposable
@@ -628,14 +628,14 @@ internal class PopupPositioner : DependencyObject, IDisposable
internal unsafe Rect GetWindowRect()
{
RECT rect = new(0, 0, 0, 0);
Rect rect = new(0, 0, 0, 0);
if (IsWindowAlive())
{
GetWindowRect(_window.CreateHandleRef(), ref rect);
}
return rect.ToRect();
return rect;
}
internal Matrix GetTransformToDevice()
@@ -672,7 +672,7 @@ internal class PopupPositioner : DependencyObject, IDisposable
return Matrix.Identity;
}
private static void GetWindowRect(HandleRef hWnd, [In, Out] ref RECT rect)
private static void GetWindowRect(HandleRef hWnd, [In, Out] ref Rect rect)
{
if (!_GetWindowRect(hWnd, ref rect))
{
@@ -681,7 +681,7 @@ internal class PopupPositioner : DependencyObject, IDisposable
}
[DllImport("user32.dll", EntryPoint = "GetWindowRect", ExactSpelling = true, CharSet = CharSet.Auto, SetLastError = true)]
private static extern bool _GetWindowRect(HandleRef hWnd, [In, Out] ref RECT rect);
private static extern bool _GetWindowRect(HandleRef hWnd, [In, Out] ref Rect rect);
private static IntPtr GetHandle(HwndSource hwnd)
{
@@ -845,7 +845,7 @@ public static class DoubleUtil
internal static class PointUtil
{
internal static Rect ToRect(this RECT rc)
internal static Rect ToRect(this Rect rc)
{
Rect rect = new()
{