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

Changing disabled color

1 Answer 1451 Views
Buttons, RadioButton, CheckBox, etc
This is a migrated thread and some comments may be shown as answers.
Dave
Top achievements
Rank 1
Dave asked on 29 Dec 2017, 04:47 PM

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.

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

 

1 Answer, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 02 Jan 2018, 09:08 AM
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.
Tags
Buttons, RadioButton, CheckBox, etc
Asked by
Dave
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Share this question
or