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

Custom mouse-over color for buttons when using a theme

1 Answer 104 Views
RibbonBar
This is a migrated thread and some comments may be shown as answers.
Thomas Bargholz
Top achievements
Rank 1
Iron
Thomas Bargholz asked on 15 Feb 2019, 01:00 PM

Hi,

I'm using a ribbon and have added a theme to it,so it visually matches the entire app.
That is all perfectly fine, except that I would like to change the mouse-over highlight color so it is different in certain situations.

I have tried to do a SetThemeValueOverride for the radButtonElement(s), but have not found the correct property to change, and/or the correct values to pass. For example:

this.radButtonElement1.SetThemeValueOverride(LightVisualElement.HighlightColorProperty, Color.Red, "");

Can you please help me with the correct property and parameters to use for this situation? Thanks :)

Regards

Thomas

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 15 Feb 2019, 02:30 PM
Hi Thomas,

Here is the code for this:
radButtonElement1.SetThemeValueOverride(FillPrimitive.BackColorProperty,    Color.FromArgb(0, 0, 0), "MouseOver", typeof(FillPrimitive));
radButtonElement1.SetThemeValueOverride(FillPrimitive.GradientStyleProperty,  GradientStyles.Solid, "MouseOver", typeof(FillPrimitive));

I hope this will be useful. Let me know if you have additional questions.

Regards,
Dimitar
Progress Telerik
Get quickly onboard and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
RibbonBar
Asked by
Thomas Bargholz
Top achievements
Rank 1
Iron
Answers by
Dimitar
Telerik team
Share this question
or