How to get an object for button when there are multiple instances of it in WPF form?

Oct 16, 2012 at 9:34 AM

I have a usercontrol which is used multiple times in a WPF form.. So the text, AutomationID of the buttons in form is same.

I don't know how to get an object of a particular button.

I used 

        private White.Core.UIItems.Button programButton; 
And it didnt help.
Please help me in this regard.