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

How to theme an inherited control

3 Answers 137 Views
Themes and Visual Style Builder
This is a migrated thread and some comments may be shown as answers.
Andrei
Top achievements
Rank 1
Andrei asked on 06 Dec 2016, 04:22 PM

Hello.

I need to extend RadTextBoxControl element by inheritance. Basically I need to add IsRequired property (this is simple).

Next I need to be able to see the control in Visual Style Builder and define how it will look when this IsRequired property is set to true.

 

I could not get this information from documentation.

Thank you!

3 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 07 Dec 2016, 09:02 AM
Hi Andrei,

Thank you for writing.

Visual Style Builder is a prebuilt application, and this is why this scenario is not supported (the controls are not dynamically loaded). In this case, you will need to style your custom controls in the code. 

Please do not hesitate to contact us with any additional questions or concerns. 
 
Regards,
Dimitar
Telerik by Progress
Telerik UI for WinForms is ready for Visual Studio 2017 RC! Learn more.
0
Andrei
Top achievements
Rank 1
answered on 07 Dec 2016, 09:09 AM

Thank you for prompt reply.

Do you have an example or documentation about how to style control in code?

0
Accepted
Dimitar
Telerik team
answered on 07 Dec 2016, 11:29 AM
Hello Andrei,

We do not have such example, generally, you will need to set the same properties as in Visual Style Builder but access them in code. If you have something specific in mind just let me know and I will suggest a solution. 

Actually, you can edit the custom controls at design time as well, but I believe that this is not suitable for you since you will need to change each control separately.

Let me know if you need further assistance.

Regards,
Dimitar
Telerik by Progress
Telerik UI for WinForms is ready for Visual Studio 2017 RC! Learn more.
Tags
Themes and Visual Style Builder
Asked by
Andrei
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Andrei
Top achievements
Rank 1
Share this question
or