Windows Presentation Foundation (WPF) Question:

How you can get Automation IDs of items in a ItemsControl?

Tweet Share WhatsApp

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.

Download WPF PDF Read All 57 WPF Questions
Previous QuestionNext Question
Is it better to wrap items in ComboBoxItem?How to command-line arguments be retrieved in a WPF application?