Changing disabled color

2 posts, 0 answers
  1. Dave
    Dave avatar
    21 posts
    Member since:
    Jan 2005

    Posted 29 Dec 2017 Link to this post

    I have a "blueprint" style app with white buttons on a blue background.  When those buttons are in the disabled state, they switch to the default light grey masking which is not very different.

    Ideally without changing the theme, can I change the "Disabled Color Mask" of a Telerik control like a button on a per-control basis?

    Thanks,
    Dave

     

  2. Hristo
    Admin
    Hristo avatar
    1259 posts

    Posted 02 Jan Link to this post

    Hi Dave,

    Thank you for writing.

    One way to accomplish your task is to use the Visual Style Builder tool and modify the theme. With this approach, however, you will change the disabled back color for all the controls which are using your theme. As I understand you would like to do this on a control basis. In this case, you can refer to the SetThemeValueOverride API: https://docs.telerik.com/devtools/winforms/telerik-presentation-framework/override-theme-settings-at-run-time.

    For a drop-down button, you can change its disabled back color this way: 
    this.radDropDownButton1.DropDownButtonElement.SetThemeValueOverride(Telerik.WinControls.Primitives.FillPrimitive.BackColorProperty,
        Color.Red, "Disabled", typeof(Telerik.WinControls.Primitives.FillPrimitive));

    I hope this helps. Let me know if you have other questions.

    Regards,
    Hristo
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top