Saturday, May 5, 2018

Trouble changing WPF combo box appearance in Windows 10?

This was working fine in Windows 7, but for some reason in windows 10 it ignores my colors set in the xaml file and follows the windows default appearance instead. So after some googling i followed the instructions here - https://blog.magnusmontin.net/2014/04/30/changing-the-background-colour-of-a-combobox-in-wpf-on-windows-8/

And now everything looks correct in the Visual Studio designer, but when i run the program it still displays using the default windows appearance. I then found the "OverridesDefaultStyle" option, but when that is enabled the combo box doesn't display at all when the program runs. Any suggestions as to what's going on here? When it doesn't display does that mean there's a problem in my xaml somewhere? I really don't understand why it would work in the designer but not when the app runs, this seems unnecessarily complicated just to change the background color of a control that was working fine before.

Thank you for any suggestions!

Trouble changing WPF combo box appearance in Windows 10? Click here
  • Blogger Comment
  • Facebook Comment

0 comments:

Post a Comment

The webdev Team