RadRibbonForm cannot be Themed

4 posts, 1 answers
  1. Mike
    Mike avatar
    18 posts
    Member since:
    Mar 2008

    Posted 25 Feb 2009 Link to this post

    I have been trying to apply a them to the RadRibbonForm but it just doesn't work!

    Here is how I have been trying to do it.
    1. Open Visual Style Builder
    2. Select the radRibbonForm control
    3. Modify the styles
    4. Give it a name and save it to an xml file.
    5. Add the xml file to the project and set it as Embedded Resource.
    6. Add a radRibbonForm from the template to the project
    7. Add a theme manager to the form.
    8. Load the xml file created aboveas a resource.
    9. Open the properties for the ribbon form
    10. The theme I created is not in the drop down list of theme names so I type it in.
    11. Designer doesn't change
    12. No change at runtime either.

    How do you apply a theme to the radRibbonForm?

    Mike

  2. Answer
    Deyan
    Admin
    Deyan avatar
    2041 posts

    Posted 27 Feb 2009 Link to this post

    Hi Mike,

    Thanks for contacting us.

    Due to some internal reasons the RadRibbonForm cannot be themed in the conventional way.

    If you want to set a custom background to your form, I suggest you use the ShapedForm (by inheriting from this class).
    In the Visual Studio Designer you can add a RadPanel to the form, set its Dock to Fill and design its FillPrimitive with the Edit UI Elements dialog according to your preferences. In this way you can style the background of your form. You can open the Edit UI Elements dialog from the Smart Tag of the RadPanel control.

    I hope this will help you achieve your goal.

    All the best,
    Deyan
    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.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Mike
    Mike avatar
    18 posts
    Member since:
    Mar 2008

    Posted 27 Feb 2009 Link to this post

    Hi Deyan,
    Thanks for your answer.

    I have found that Colour Blend does what I need but I wish I understood more clearly how it works.   I have looked up all the description I can find on your website but none of them explain just what it's doing.  They just re-iterate the 3 programming lines you need to make it work.  Can you point me to a detailed description of this feature?

    Mike
  5. Deyan
    Admin
    Deyan avatar
    2041 posts

    Posted 04 Mar 2009 Link to this post

    Hi Mike,

    Thanks for your questions.

    Basically, the color-blending mechanism works by converting the RGB colors defined in the theme to HSL colors since HSL color space is used for the calculation of the new colors based on the color you specify as a base color. The base color that you define when initializing the color blending determines a certain range that is used when the color variations are created. This range is calculated so that only near colors to the base color are used (so that when you choose Red as a base color, only colors near to Red are utilized etc.). In this way, the same "color pattern" is preserved, only the Hue (HSL - Hue, Saturation, Lightness) is adjusted so that the new color "feel" is created.

    Please note that color blending is only applied to RGB color settings defined in the themes. If you have any images in your theme, they will not be affected by the color-blending procedure.

    In our mechanism we have implemented our own routines for RGB to HSL conversion. You can find many techniques to do this on the Internet as well.

    I hope this will clarify the main idea of color-blending. You can write anytime if you have more questions.

    Best wishes,
    Deyan
    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.
Back to Top