Styling a disabled item in a combobox

4 posts, 0 answers
  1. Craig
    Craig avatar
    4 posts
    Member since:
    Feb 2014

    Posted 12 Feb 2014 Link to this post

    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
  2. Kalin
    Admin
    Kalin avatar
    1207 posts

    Posted 17 Feb 2014 Link to this post

    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).

  3. DevCraft banner
  4. Craig
    Craig avatar
    4 posts
    Member since:
    Feb 2014

    Posted 18 Feb 2014 in reply to Kalin Link to this post

    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.
  5. Craig
    Craig avatar
    4 posts
    Member since:
    Feb 2014

    Posted 18 Feb 2014 Link to this post

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