-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Automation improvements #2381 #2386
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
Conversation
@petvetbr you don't use the latest source from develop branch |
…mation # Conflicts: # MahApps.Metro/Themes/WindowButtonCommands.xaml
I have looked into it a bit and found that the UI Elements should get exposed by AutomationPeer Class. So it is done with ButtonAutomationPeer, TextBoxAutomationPeer. Therefore I think it should be done also with NumericUpDown. Create a class NumericUpDownAutomationPeer and implement the exposure there UI Automation of a WPF Custom Control If the default behavior is the one shown in the link above I think we should follow this guidances. See example at TextBlock and TextBlockAutomationPeer Furthermore I think the by this PR used attached properties should be used on third party controls, when overriding the template. Since we own this code we should use the suggestion from microsoft and implement XXXAutomationPeer classes for the MahApps controls. /cc @punker76 |
I have tried it with DateTimePicker of MahApps
To work the controls like _secondInput in DateTimePicker must be exposed as internal property SecondInput. According that I suggest to revert #2381 to use the default design provided by Microsoft. |
@xxMUROxx Ok. I'll start implementing automation peers for the controls. The first solution I proposed was faster to implement, but you are right, we should try to follow the same patterns recomended by MS and when ready I'll submit a new PR. |
@petvetbr I close this and will wait for a new PR, thx |
Improved automation support with AutomationId and Name automatically set according with control Name property.
Following @xxMUROxx sugestion on issue #2381:
Implemented an AutomationHelper, so that the AutomationId and Name are setted based on the Name of the Control for most of the custom controls components. The goal is to eventually obtain full automation coverage for UI Automated Testing and Accessibility purposes.
#2381