Windows Presentation Foundation (WPF) Question:

Download Job Interview Questions and Answers PDF

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

WPF Interview Question
WPF Interview Question

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 Interview Questions And Answers PDF

Previous QuestionNext Question
Is it better to wrap items in ComboBoxItem?How to command-line arguments be retrieved in a WPF application?