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

Styling a disabled item in a combobox

3 Answers 75 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Craig
Top achievements
Rank 1
Craig asked on 12 Feb 2014, 09:26 PM
I'm using Telerik RadControls for Silverlight Q1 2011 SP1.  I have a combobox with five items.  Only of the items will be disabled.  The other items will be enabled.  I'd like to style the disabled item so that its background color is black, and its foreground color is white.  I would like some advice on how to do this.

Thanks,
Craig

3 Answers, 1 is accepted

Sort by
0
Kalin
Telerik team
answered on 17 Feb 2014, 10:50 AM
Hi Craig,

In order to achieve the desired scenario you could use converters in order to change the Background and Foreground colors only of the disabled ComboBoxItems. For your convenience I have prepared and attached a sample project which demonstrates the exact approach.

Hope this helps.

Regards,
Kalin
Telerik

Check out the new Telerik Platform - the only modular platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native apps. Register for the free online keynote and webinar to learn more about the Platform on Wednesday, February 12, 2014 at 11:00 a.m. ET (8:00 a.m. PT).

0
Craig
Top achievements
Rank 1
answered on 18 Feb 2014, 02:40 PM
Thanks, Kalin.  It looks like the foreground still appears gray, despite the fact that it is set to blue in the IsEnabledToForegroundColorConverter class.  Maybe there's an opacity setting that needs to be changed.  I'll play around with it and see what I can find.
0
Craig
Top achievements
Rank 1
answered on 18 Feb 2014, 03:01 PM
Correction.  After studying the screen a little more carefully, the item does in fact appear blue, not gray.  But the color is very faint.  I think this may be due to an opacity setting somewhere.
Tags
ComboBox
Asked by
Craig
Top achievements
Rank 1
Answers by
Kalin
Telerik team
Craig
Top achievements
Rank 1
Share this question
or