Custom mouse-over color for buttons when using a theme

2 posts, 0 answers
  1. Thomas Bargholz
    Thomas Bargholz avatar
    14 posts
    Member since:
    Oct 2006

    Posted 15 Feb 2019 Link to this post

    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

  2. Dimitar
    Admin
    Dimitar avatar
    2926 posts

    Posted 15 Feb 2019 Link to this post

    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.
Back to Top