Multiple styles for controls

2 posts, 0 answers
  1. Czeshirecat
    Czeshirecat avatar
    30 posts
    Member since:
    Jun 2016

    Posted 21 Nov 2016 Link to this post

    Hi. I understand that we need to create new themes for each different appearance of a control (eg button) unless it's done in the designer etc.

    It's of concern that each of the theme packets is pretty large eg 500k in size and seems an awful waste of disk space if a whole theme needs to be generated for the sake of a single control where, in my case, I'm using 4 - 5 different shaped/coloured buttons on a single form, this is the first one I'm changing to telerik out of several hundred forms in the application.

    Am I understanding this correctly? Or is it possible to strip a theme packet down to cover a selection of controls with just what's needed by those controls?

    If so then is it possible to add changing the functionality of the themes/visual designer to the 'wish list' for a future version please :)

  2. Dimitar
    Admin
    Dimitar avatar
    1871 posts

    Posted 22 Nov 2016 Link to this post

    Hello Claire,

    Thank you for writing.

    If you create a theme for a particular control only, it will have a smaller size than a complete theme. If you save the theme as XML you will notice that the controls styles are saved in separate files. These files are storing all properties set in Visual Style Builder. To reduce the size you can create a brand new theme and change only the needed controls. 

    However, the purpose of the themes is to provide a consistent look for all controls in the suite. This allows you to easily switch the themes at runtime. Please note that the same theme instance can be used for several forms as well. So the best approach will be to create a theme for all similar controls that are used in many places. If you have specific requirements for single forms only, make the changes in the code.   

    I hope this will be useful.

    Regards,
    Dimitar
    Telerik by Progress
    Telerik UI for WinForms is ready for Visual Studio 2017 RC! Learn more.
Back to Top