Radform - Setting Form BackColor only works in DesignTime?

10 posts, 1 answers
  1. Duane
    Duane avatar
    37 posts
    Member since:
    Sep 2010

    Posted 12 Nov 2010 Link to this post

    Hi Guys,

    I have an issue where I am trying to set the BackColor property of a RadForm to a paler blue than the default. It displays fine in DesignTime, but in runtime it reverts back to the standar mid blue.

    Please advise what I am doing wrong? Is it something to do with the theme? If so how do I change or dsiable this?

    Best regards,
    Duane.
  2. Answer
    Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 12 Nov 2010 Link to this post

    Hi Duane,

    I'd advise using the Visual Style Builder to do this. It's easy to use and you can build on your style as you need to.

    Here are some links that may help:
    blog post on VSB
    VSB Overview
    Unstanding the VSB interface

    hope this helps
    Richard
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Duane
    Duane avatar
    37 posts
    Member since:
    Sep 2010

    Posted 15 Nov 2010 Link to this post

    Thanks Richard, I'll take a look.
  5. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 15 Nov 2010 Link to this post

    No problem. If you find that this has helped, please remember to mark as answer.

    Many thanks
    Richard
  6. Duane
    Duane avatar
    37 posts
    Member since:
    Sep 2010

    Posted 15 Nov 2010 Link to this post

    Hi Richard,

    So looking at the links you sent (except last link did not return a page for me)....
     
    Am I correct in assuming that I would need to add a style manager on to EVERY single form? Is there no way to set this globally for the whole application? I ask as we have over 250 forms in just one of the applications. Another has well over 100...

    Best regards,
    Duane.
  7. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 15 Nov 2010 Link to this post

    Hello,

    These further links should help.

    Using a default theme for the entire application
    Adding custom theme components

    hope that helps
    Richard
  8. Duane
    Duane avatar
    37 posts
    Member since:
    Sep 2010

    Posted 16 Nov 2010 Link to this post

    Hi Richard,

    Thanks for those links, they look like theyshould help...

    Currently though when I drop my custom theme on the form, the theme name is not visible for any of the controls.

    Bets regards,
    Duane.
  9. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 17 Nov 2010 Link to this post

    Hello Duane,

    Thank you for writing.

    Dropping the theme over the form will not load it in your project unless this theme is wrapped in a component as described here. If you are using a tssp file which is not wrapped, please follow the instructions provided at the bottom of the help article Saving and Loading Theme files.

    Should you need any additional assistance, do not hesitate to contact me.

    Sincerely yours,
    Stefan
    the Telerik team
    See What's New in RadControls for WinForms in Q3 2010 on Wednesday, November 17, 11am Eastern Time: Register here>>
  10. Duane
    Duane avatar
    37 posts
    Member since:
    Sep 2010

    Posted 18 Nov 2010 Link to this post

    Hi Stefan,

    As per your first link, the theme was wrapped in a component, and placed in the toolbox and dropped on the form's component area from the toolbox. However the theme was still not visible in the "ThemeName" property for any controls or forms that the theme was valid for. Due to time concerns I have siince given up on that approach and we now have the theme as an embedded resource in the project, and use a RadThemeManager on the first form that is opened when the application runs to apply the theme to the whole application. I'm sure this has a slight hit on performance but we will have to live with that. The only downside to this is when we are in design-time, we have to open that form first before we can see any of the theming on any of the other forms and / or controls.

    Your second link does not work for me, but thanks anyway.

    Best regards,
    Duane.


    Edited: For spello and more detail.
  11. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 23 Nov 2010 Link to this post

    Hello Duane, 

    Thank you for your reply.

    I am glad to hear that you have managed to solve this issue. I will check whether our KB article needs to be updated further. The last link that did not work for you was to an help article which describes how to set a theme application at runtime when using .tssp files. You can navigate to this article by opening our help page >> Tools >> Visual Style Builder >> Working with Visual Style Builder >> Saving and Loading theme files. 

    I hope you find this information helpful. If you have any other questions, do not hesitate to open a new support ticket/forum thread.

    All the best,
    Stefan
    the Telerik team
    Get started with RadControls for WinForms with numerous videos and detailed documentation.
Back to Top
UI for WinForms is Visual Studio 2017 Ready