Global Themes

7 posts, 0 answers
  1. Jim
    Jim avatar
    19 posts
    Member since:
    Feb 2008

    Posted 03 Jul 2008 Link to this post

    I am new to the Telerik WinForms controls (so be gentle if this is dumb question).

    I have looked through the doc, watched videos and searched the forums, but I can not figure out how to set a theme that applies to an entire application or even all controls on a form.  It seems like you have to set the theme on every control on every form.  What am I missing?

    - Jim
  2. Mike
    Admin
    Mike avatar
    640 posts

    Posted 04 Jul 2008 Link to this post

    Hi Jim,

    Indeed you are right about the docs, even though the approach is pretty straightforward. There is no help topic article about this and we are taking the point. We will fix this for the next release. The property you need is
    ThemeResolutionService.ApplicationThemeName
    and it is static for your convenience.

    All the best,
    Mike
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Tony
    Tony avatar
    14 posts
    Member since:
    Jul 2008

    Posted 29 Jul 2008 Link to this post

    My question is similar to this post.  How do I combine the many control themes into one file to set the entire application theme to?  At one point I thought it would be combining all the BuilderRegistrations into one file under the root.  But then I looked at all the examples and all of them have one file per control.  I have the feeling I missed something.  Can you direct me where to look? 

    Thanks
  5. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 30 Jul 2008 Link to this post

    Hello Tony,

    Thank you for interest in themes.

    1) You could easy combine many theme files in one theme file via Visual Style Builder: To do this open the desired files one by one and save them using "Save As" in one file.

    2) As of Q2 2008 release all themes moved in separate assemblies, apart from the controls assemblies. In order to be able to use them, you should drag and drop the particular component from the Toolbox to the form.
    To set the entire application theme to desired  theme you should use the follow property:
    ThemeResolutionService.ApplicationThemeName
    This property sets the theme name that will be used by all controls in the application.  
    Note that some themes do not exist for all controls, for example the name of the black theme Office2007Black for RadGridVIew is Vista Telerik

    I recommend to read also follows explanations about themes:
    Managing predefined themes in Q2 2008

    We moved all common themes in separate components

    And very helpful Theming Optimizations

    Hope this helps.

    Kind regards,
    Peter
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  6. SelAromDotNet
    SelAromDotNet avatar
    67 posts
    Member since:
    Jul 2012

    Posted 21 Jul 2009 Link to this post

    I'm a little confused on this.. I've added the following code to my applications main form's constructor:

    ThemeResolutionService

     

    .ApplicationThemeName = "Office2007Black";

     
    but when I launch the application, the default basic theme is still being used.

    also does this not support design time (so I can see the theme while I edit)?

    thanks!

     

  7. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 24 Jul 2009 Link to this post

    Hi SelArom,

    In order to have Office2007Black theme applied, you should drag and drop the Office2007BlackTheme component on your form. This will load the Office2007Black themes in your project and when you set ApplicationThemeName to Office2007Black, RadControls will get the correct style.

    ApplicationThemeName could be set only by code and it is supported only at runtime. In order to preview RadControls at design-time you need to set the ThemeName property to each one of them.

    If you have additional questions, feel free to contact me.

    All the best,
    Nikolay
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  8. kottu
    kottu avatar
    23 posts
    Member since:
    Mar 2009

    Posted 27 Jul 2009 Link to this post

    hi SelArom,

                    ThemeResolutionService.ApplyThemeToControlTree(this, "Theme Name");



    try this one it wil be useful for u .............




    regards,
    vignesh
Back to Top
UI for WinForms is Visual Studio 2017 Ready