How to lmodify Office 2007 Theme at the application level?

4 posts, 0 answers
  1. Pawz
    Pawz avatar
    51 posts
    Member since:
    Aug 2007

    Posted 12 Nov 2007 Link to this post

    I've got a bit of a problem I'm trying to work around. I'm hoping there's a much better way to do this..

    I've got a DockingManager on my form, and I've assigned it the Office2007Black theme. I'm not entirely happy with it, so I want to edit the theme. Unfortunately, the docking manager smart tags don't allow me to edit the theme of the Docking Manager!

    Not only that, but I can't figure out how to load the Office2007Black theme into the visual builder for the Dock Panel and Document Panel, so I'm left with trying to duplicate the look all over again.

    Not only that, but in general I want to use my own customized theme for every single control, but have it based off of the 2007 theme with some minor tweaks. How would I go about making sure of the following:

    1. All controls are themed in all my forms, consistently across the entire application
    2. Any controls I add to my form automatically take on the theme of the application, without me having to manually go in and set every single theme property
    3. Any controls that I may not have used yet (say, a RadHScrollBar) automatically can be set to my new theme, without mucking around inside the theme (essentially, how to copy the *entire* Office2007Black theme, for *all* controls, once. Not every time I add a new control).

    Additionally, 2 more questions..

    4. Anyone have any sample buttons for the title bar that actually work with the Office2007black theme?
    5. Where on earth do you find the Visual Style Builder Options? I can't figure out where you set the smart buttons & outline options..

  2. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 13 Nov 2007 Link to this post

    Hi Pawz,

    Thank you for writing.

    We are sending you all the theme files used in the RadControl for Winforms Suite. Usually they are embedded in resources of the RadControls DLL. You can load all these themes in your form startup (Form_Load handler) using the following code (in C#):

    ThemeResolutionService.RegisterThemeFromStorage(ThemeStorageType.File, @"Telerik\WinControls.UI\Resources\UIElementsThemes\StatusBar\Office2007Blue.xml");

    To use a theme for the entire application you have to define the following static properties:

    ThemeResolutionService.ApplicationThemeName = "ThemeName";

    Unfortunately, is not possible to use the already created themes for new controls, because each control has its own unique set of subcomponents. By default, we are creating each control with least 3 themes that are common for the whole RadControls for Winforms Suite.

    I'm not sure I completely understand what you mean by "any sample buttons for the title bar". Could you please be more specific?

    You cannot use the "Visual Style Builder Options" because this application not contain any options. Also, please clarify what is "smart buttons & outline options".

    Please contact us again, if you need any further assistance.

    Greetings,
    Peter
    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. Pawz
    Pawz avatar
    51 posts
    Member since:
    Aug 2007

    Posted 13 Nov 2007 Link to this post

    Awesome - thanks for that theme file! Looks like part of what I was looking for. It doesn't seem to have a office 2007 theme for the docking manager though - just an 'Olive' theme that causes an XML error when I try to apply it via the VSB. Which is the only control I couldn't figure out how to get the style for.. :(

    I've been poking around the ThemeResolutionService and it seems to be working the way I want - adds the correct theme to all radcontrols that don't have a specific theme. Excellent :)

    By 'sample buttons' I'm talking about how the Title Bar loses its min/max/close buttons if you use any other theme than the default. I read in a post that to get it to work, I need to add the 3 button images to the imagelist of the title bar control - I was just wondering if telerik perhaps had those button images available somewhere.

    Visual Style Builder Options - In the help documentation there's a page about setting the options, with options for showing the selection contour, and showing 'smart tags'
    (Working With Styles & Themes > Working With the Visual Style Builder > Advanced VisualStyleBuilder Features > Setting VisualStyleBuilder Options)

  5. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 14 Nov 2007 Link to this post

    Hello Pawz,

    Thank you for writing.

    We are sending you additional Docking themes. You can edit the files with Visual Style Builder and load the into your application using the ThemeResolutionService.RegisterThemeFromStorage method.

    We are in the process of updating the WinForms Controls documentation, and the Visual Style Builder documentation is an important piece of that effort. Subscribe to this thread if you would like to check the new Visual Style Builder documentation once it's available.

    Please contact us again, if you need any further assistance.

    All the best,
    Peter
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top