-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add basic integration tests for NativeControlHost and improve its automation/a11y support. #15542
Conversation
Currently embeds a lone native text box, and only when running on Windows.
Allows native controls to appear in the Avalonia automation tree as a child of the `NativeControlHost`. They also appear in the _wrong_ place - as a direct child of the `Window` - but this appears to be expected behavior as it happens when hosting a win32 control in WPF as well.
Implements special-casing of `InteropAutomationPeer`on macOS.
The test for the native control in a popup is disabled on macOS because we have a bug there.
You can test this PR using the following package version. |
|
@cla-avalonia agree |
You can test this PR using the following package version. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/microsoft/CsWin32
with NativeMethods.txt file:
CreateWindowEx
GetModuleHandle
DestroyWindow
You can test this PR using the following package version. |
You can test this PR using the following package version. |
…oniaUI/Avalonia into feature/embedding-integration-tests # Conflicts: # native/Avalonia.Native/src/OSX/automation.mm
You can test this PR using the following package version. |
892c7ef
to
1821c29
Compare
You can test this PR using the following package version. |
You can test this PR using the following package version. |
You can test this PR using the following package version. |
You can test this PR using the following package version. |
You can test this PR using the following package version. |
You can test this PR using the following package version. |
You can test this PR using the following package version. |
508bae9
to
6766763
Compare
You can test this PR using the following package version. |
What does the pull request do?
Adds a couple of basic integration tests for
NativeControlHost
. To do this I had to improve automation/a11y support for embedding native controls.The PR adds a new, internal,
InteropAutomationPeer
which is used by the newNativeControlHostPeer
as a sentinel value indicating "forward the a11y/automation to a native control. ThisInteropAutomationPeer
is then special-cased in the win32 and macOS backends.