This is a migrated thread and some comments may be shown as answers.

How to add automation id property in Radbutton

1 Answer 369 Views
Buttons
This is a migrated thread and some comments may be shown as answers.
Gaurav
Top achievements
Rank 1
Gaurav asked on 09 Jul 2015, 12:11 PM

Hi,

in my application we are creating rad button like this: 

var tool = new RadRibbonButton()
            {
                
                Text = caption,
                Size = ButtonSize.Large,
                LargeImage = img
            };

 

I am automation engineer. I have to add automation id here. How can I add it? Need help

 

Regards,

Gaurav

1 Answer, 1 is accepted

Sort by
0
Kiril Vandov
Telerik team
answered on 14 Jul 2015, 11:35 AM
Hello Gaurav,

The AutomationId property is attached one and in order to set it from code you will need to access them through the static class that holds them. Here is an example with the AutomationId property:
var tool = new RadRibbonButton()
            {
                 
                Text = caption,
                Size = ButtonSize.Large,
                LargeImage = img
            };
 
AutomationProperties.SetAutomationId(tool, "SomeId");
You can find more information on how to set attached properties in this article.

Kind regards,
Kiril Vandov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Buttons
Asked by
Gaurav
Top achievements
Rank 1
Answers by
Kiril Vandov
Telerik team
Share this question
or