Browse Source

Added WindowBase.TryGetPlatformHandle.

#11062 made `WindowBase.PlatformImpl` internal so we need to expose a different want to get the window handle.
pull/11091/head
Steven Kirk 3 years ago
parent
commit
cf52ab43cd
  1. 9
      src/Avalonia.Controls/WindowBase.cs

9
src/Avalonia.Controls/WindowBase.cs

@ -160,6 +160,15 @@ namespace Avalonia.Controls
} }
} }
/// <summary>
/// Trys to get the platform handle for the window.
/// </summary>
/// <returns>
/// An <see cref="IPlatformHandle"/> describing the window handle, or null if the handle
/// could not be retrieved.
/// </returns>
public IPlatformHandle? TryGetPlatformHandle() => PlatformImpl?.Handle;
/// <summary> /// <summary>
/// Ensures that the window is initialized. /// Ensures that the window is initialized.
/// </summary> /// </summary>

Loading…
Cancel
Save