Browse Source

Cast to interface instead of concrete type.

`PlatformImpl` may be a `ValidatingTopLevelImpl`.
add-integration-tests
Steven Kirk 4 years ago
parent
commit
72beb30f02
  1. 3
      src/Windows/Avalonia.Win32/Automation/RootAutomationNode.cs

3
src/Windows/Avalonia.Win32/Automation/RootAutomationNode.cs

@ -2,6 +2,7 @@
using System.Runtime.InteropServices;
using Avalonia.Automation.Peers;
using Avalonia.Automation.Provider;
using Avalonia.Platform;
using Avalonia.Win32.Interop.Automation;
#nullable enable
@ -21,7 +22,7 @@ namespace Avalonia.Win32.Automation
public override IRawElementProviderFragmentRoot? FragmentRoot => this;
public new IRootProvider Peer { get; }
public WindowImpl? WindowImpl => Peer.PlatformImpl as WindowImpl;
public IWindowImpl? WindowImpl => Peer.PlatformImpl as IWindowImpl;
public IRawElementProviderFragment? ElementProviderFromPoint(double x, double y)
{

Loading…
Cancel
Save