更新整理
This commit is contained in:
@@ -143,7 +143,7 @@ public abstract class IconElementEx : IconElement
|
||||
Background = Brushes.Transparent,
|
||||
SnapsToDevicePixels = true,
|
||||
};
|
||||
_ = InitializeChildren();
|
||||
InitializeChildren();
|
||||
|
||||
AddVisualChild(_layoutRoot);
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user