Monday, March 7, 2011

WPF changing button background color when the window is disabled

I have a button with a transparent background on a wpf window.

Problem is, when I open up another window with a .showdialog the form becomes disabled as does the button, causing the button to go white (and stick out like a sore thumb); the same happens to the listview and textbox controls. Labels and group boxes aren't impacted in this way and remain looking fine.

How do I preserve the transparency color of the button, listview and textboxes when they are disabled?

Thanks, Rob

From stackoverflow
  • I'm not sure what your button template looks like, I would recommend posting your XAML. But check out the MSDN Docs on Button Templating

    Rob : Thank you, that put me on the right track

0 comments:

Post a Comment