■ AppWindow 클래스의 Presenter 속성을 사용해 OverlappedPresenter 객체를 구하는 방법을 보여준다.
▶ 예제 코드 (C#)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
using WinRT.Interop; using Microsoft.UI; using Microsoft.UI.Windowing; using Microsoft.UI.Xaml; // ... Window window; // ... nint windowHandle = WindowNative.GetWindowHandle(window); WindowId windowID = Win32Interop.GetWindowIdFromWindow(windowHandle); AppWindow appWindow = AppWindow.GetFromWindowId(windowID); OverlappedPresenter presenter = appWindow.Presenter as OverlappedPresenter; |