From ee1ef13ff259f4f976358d99673406c1df82df10 Mon Sep 17 00:00:00 2001 From: FitDev Date: Mon, 22 May 2023 11:43:55 +0300 Subject: [PATCH] Move TryGetPlatformHandle to TopLevel Fix --- src/Avalonia.Controls/TopLevel.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Avalonia.Controls/TopLevel.cs b/src/Avalonia.Controls/TopLevel.cs index d3733e3da5..dc15ba2a6f 100644 --- a/src/Avalonia.Controls/TopLevel.cs +++ b/src/Avalonia.Controls/TopLevel.cs @@ -383,7 +383,7 @@ namespace Avalonia.Controls /// An describing the window handle, or null if the handle /// could not be retrieved. /// - public IPlatformHandle? TryGetPlatformHandle() => PlatformImpl?.Handle; + public IPlatformHandle? TryGetPlatformHandle() => ((IWindowBaseImpl?) PlatformImpl)?.Handle; /// /// Trys to get the platform handle for the TopLevel-derived control.