Browse Source

IInputRoot: IsPlatformEnabled

5940-dragdrop-modal
mat1jaczyyy 5 years ago
parent
commit
63f40ad4ec
  1. 3
      src/Avalonia.Controls/TopLevel.cs
  2. 5
      src/Avalonia.Input/IInputRoot.cs

3
src/Avalonia.Controls/TopLevel.cs

@ -268,6 +268,9 @@ namespace Avalonia.Controls
/// <inheritdoc/> /// <inheritdoc/>
IMouseDevice IInputRoot.MouseDevice => PlatformImpl?.MouseDevice; IMouseDevice IInputRoot.MouseDevice => PlatformImpl?.MouseDevice;
/// <inheritdoc/>
bool? IInputRoot.IsPlatformEnabled => PlatformImpl is IWindowImpl windowImpl? windowImpl.IsEnabled : null;
void IWeakSubscriber<ResourcesChangedEventArgs>.OnEvent(object sender, ResourcesChangedEventArgs e) void IWeakSubscriber<ResourcesChangedEventArgs>.OnEvent(object sender, ResourcesChangedEventArgs e)
{ {
((ILogical)this).NotifyResourcesChanged(e); ((ILogical)this).NotifyResourcesChanged(e);

5
src/Avalonia.Input/IInputRoot.cs

@ -32,5 +32,10 @@ namespace Avalonia.Input
/// </summary> /// </summary>
[CanBeNull] [CanBeNull]
IMouseDevice? MouseDevice { get; } IMouseDevice? MouseDevice { get; }
/// <summary>
/// If supported, gets a value indicating whether the element is enabled on the platform.
/// </summary>
bool? IsPlatformEnabled { get; }
} }
} }

Loading…
Cancel
Save