Добавлен example

This commit is contained in:
2026-01-25 07:56:35 +03:00
parent a902474345
commit 33abd94f6e
20 changed files with 1052 additions and 1 deletions

View File

@@ -0,0 +1,15 @@
using Microsoft.UI.Xaml;
namespace Lattice.Example.DragDrop;
public static class WindowExtensions
{
public static void SetWindowSize(this Window window, int width, int height)
{
var hwnd = WinRT.Interop.WindowNative.GetWindowHandle(window);
var windowId = Microsoft.UI.Win32Interop.GetWindowIdFromWindow(hwnd);
var appWindow = Microsoft.UI.Windowing.AppWindow.GetFromWindowId(windowId);
appWindow.Resize(new Windows.Graphics.SizeInt32(width, height));
}
}