Skip to content

add automation peer for UserControl #17480

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

Merged
merged 5 commits into from
Nov 13, 2024

Conversation

baochenw
Copy link
Contributor

@baochenw baochenw commented Nov 12, 2024

This patch adds automation peer for UserControl.

What does the pull request do?

As #17423 described, Windows UI automation can not determine the correct control type of UserControl. The root cause is that no corresponding automation peer for it.

What is the current behavior?

LocalizedControlType is "none".

What is the updated/expected behavior with this PR?

LocalizedControlType is "custom".

Checklist

Breaking changes

None

Obsoletions / Deprecations

Fixed issues

Fixes #17423

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.3.999-cibuild0053217-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@cla-avalonia
Copy link
Collaborator

cla-avalonia commented Nov 12, 2024

  • All contributors have signed the CLA.

@baochenw
Copy link
Contributor Author

@cla-avalonia agree

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.3.999-cibuild0053225-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.3.999-cibuild0053245-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.3.999-cibuild0053249-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@baochenw baochenw marked this pull request as ready for review November 13, 2024 04:36
@baochenw
Copy link
Contributor Author

cibuild0053249

Verified with this build:

Name:	"TestName"
ControlType:	UIA_CustomControlTypeId (0xC369)
LocalizedControlType:	"custom"
BoundingRectangle:	{l:1234 t:866 r:1909 b:1316}
IsEnabled:	true
IsOffscreen:	false
IsKeyboardFocusable:	false
HasKeyboardFocus:	false
ProcessId:	24224
RuntimeId:	[2A.150A7E.4.2B86539]
AutomationId:	"TestCustomControl"
FrameworkId:	"Avalonia"
ClassName:	"MyControl"

@maxkatz6 maxkatz6 added this pull request to the merge queue Nov 13, 2024
Merged via the queue into AvaloniaUI:master with commit b35fd5a Nov 13, 2024
11 checks passed
@baochenw baochenw deleted the topic/baochenw/fix-issue-17423 branch November 27, 2024 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The LocalizedControlType is 'none' for customized UserControl on Windows
4 participants