How to theme an inherited control

4 posts, 0 answers
  1. Andrei
    Andrei avatar
    2 posts
    Member since:
    Sep 2016

    Posted 06 Dec 2016 Link to this post

    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!

  2. Dimitar
    Admin
    Dimitar avatar
    1871 posts

    Posted 07 Dec 2016 Link to this post

    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.
  3. Andrei
    Andrei avatar
    2 posts
    Member since:
    Sep 2016

    Posted 07 Dec 2016 in reply to Dimitar Link to this post

    Thank you for prompt reply.

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

  4. Dimitar
    Admin
    Dimitar avatar
    1871 posts

    Posted 07 Dec 2016 Link to this post

    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.
Back to Top