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

Custom Property in Rad State Editor

1 Answer 47 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Dan
Top achievements
Rank 1
Dan asked on 29 Aug 2008, 03:12 PM
  We would like to assign our own property to a rad UI control that we could then examine in the Rad State Editor.  For instance we could have a property added to the RadTextBox that could be called something like errorState.  We could then set errorState to true at either design time or run time to indicate the error state of the text box.  The controls default theme would then examine this property in a custom state created with the Rad State Editor in the Visual Style Builder. This would then dynamically apply the proper visual styles to the textbox for the custom error state.  This would allow us to encapsulate all visual elements of our application into a single master theme.

1 Answer, 1 is accepted

Sort by
0
Angel
Telerik team
answered on 01 Sep 2008, 04:15 PM
Hi Dan,

I attached a sample control library with a text box that has an ErrorState property. The text box (CustomTextBox) can be themed with Visual Style Builder - just use "Load Control" -> "From Assembly" menu and select the control library's assembly.

In the sample, the default theme is in CustomTextBoxDefault.xml. In that theme, when ErrorState is IncorrectText the background color becomes red.

 
Regards,
Angel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
General Discussions
Asked by
Dan
Top achievements
Rank 1
Answers by
Angel
Telerik team
Share this question
or