Change background color of disabled listbox in windows classic theme

Posted by Mercury821 on Stack Overflow See other posts from Stack Overflow or by Mercury821
Published on 2010-04-07T17:57:00Z Indexed on 2010/04/07 18:13 UTC
Read the original article Hit count: 438

Filed under:
|
|

I am developing a WPF application that must run using Windows Classic theme. The application creates a dialog box containing a ListBox. When the dialog box is shown, it must be disabled for 1s before accepting any input. I am accomplishing this with a style trigger, and it works. However, the ListBox shows a white background when it's disabled, which I can't seem to get rid of. When using the aero theme, the following style resource fixes the issue:

<SolidColorBrush x:Key="{x:Static SystemColors.ControlBrushKey}" Color="Transparent"/>

But when using Windows Classic theme, the white background reappears. How can i remedy the situation for Classic theme???

© Stack Overflow or respective owner

Related posts about wpf

Related posts about themes