CommunityToolkit / WindowsCommunityToolkit

The Windows Community Toolkit is a collection of helpers, extensions, and custom controls. It simplifies and demonstrates common developer tasks building .NET apps with UWP and the Windows App SDK / WinUI 3 for Windows 10 and Windows 11. The toolkit is part of the .NET Foundation.
https://docs.microsoft.com/windows/communitytoolkit/
Other
5.88k stars 1.38k forks source link

AutomationID not binding to control when set in XAML #3204

Open James-Matthews opened 4 years ago

James-Matthews commented 4 years ago

Describe the bug

A clear and concise description of what the bug is.

Setting the AutomationProperties.AutomationID in the XAML does not actually set the AutomationID of the control.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Create a MarkdownTextBlock
  2. Set the AutomationProperties.AutomationID
  3. Observe using any testing framework or inspection tool to see the value is not set

Expected behavior

A clear and concise description of what you expected to happen.

I would expect the AutomationID to properly be set

Screenshots

If applicable, add screenshots to help explain your problem. This image shows the use of MarkdownTextBlock with the AutomationID set, but the inspection tool shows the property is not present image

This images shows that the inspection tool does properly work, as the AutomationID for the overview TextBlock is set, and you can see it present in the inspection tool window image

Environment

NuGet Package(s): 

Package Version(s): 

Windows 10 Build Number:
- [ ] Fall Creators Update (16299)
- [ ] April 2018 Update (17134)
- [ ] October 2018 Update (17763)
- [ X ] May 2019 Update (18362)
- [ ] Insider Build (build number: )

App min and target version:
- [ ] Fall Creators Update (16299)
- [ min ] April 2018 Update (17134)
- [ X ] October 2018 Update (17763)
- [ X ] May 2019 Update (18362)
- [ X ] Insider Build (xxxxx)

Device form factor:
- [ X ] Desktop
- [ ] Xbox
- [ ] Surface Hub
- [ ] IoT

Visual Studio 
- [ ] 2017 (version: )
- [ X ] 2019 (version: ) 
- [ ] 2019 Preview (version: )

Additional context

Add any other context about the problem here.

ghost commented 4 years ago

Hello James-Matthews, thank you for opening an issue with us!

I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌