Browse Source

Move TryGetPlatformHandle to TopLevel

pull/11474/head
FitDev 3 years ago
parent
commit
4d67f3230c
  1. 18
      src/Avalonia.Controls/TopLevel.cs
  2. 8
      src/Avalonia.Controls/WindowBase.cs

18
src/Avalonia.Controls/TopLevel.cs

@ -376,6 +376,24 @@ namespace Avalonia.Controls
/// </summary>
public ITopLevelImpl? PlatformImpl { get; private set; }
/// <summary>
/// Trys to get the platform handle for the TopLevel-derived control.
/// </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>
/// Trys to get the platform handle for the TopLevel-derived control.
/// </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>
/// Gets the renderer for the window.
/// </summary>

8
src/Avalonia.Controls/WindowBase.cs

@ -178,14 +178,6 @@ 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>
/// Ensures that the window is initialized.

Loading…
Cancel
Save