Windows Presentation Foundation (WPF) Question:
How you can get Automation IDs of items in a ItemsControl?
Answer:
The best way to do this is by setting it Name property as it is utilized for automation purposes by default. But if you require to give an ID to an element, other than it's name, then the AutomationProperties.AutomationID property can be set as per need.
Previous Question | Next Question |
Is it better to wrap items in ComboBoxItem? | How to command-line arguments be retrieved in a WPF application? |