This is a migrated thread and some comments may be shown as answers.

RadRibbonForm cannot be Themed

3 Answers 147 Views
Themes and Visual Style Builder
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 2
Mike asked on 25 Feb 2009, 07:10 AM
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

3 Answers, 1 is accepted

Sort by
0
Accepted
Deyan
Telerik team
answered on 27 Feb 2009, 02:15 PM
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.
0
Mike
Top achievements
Rank 2
answered on 27 Feb 2009, 02:58 PM
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
0
Deyan
Telerik team
answered on 04 Mar 2009, 09:38 AM
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.
Tags
Themes and Visual Style Builder
Asked by
Mike
Top achievements
Rank 2
Answers by
Deyan
Telerik team
Mike
Top achievements
Rank 2
Share this question
or