Those posts are getting outdated for Windows-8. Any ideas on what needs to change to get this to work on a Windows 8 machine as well as a Windows 7? I would appreciate any nudges in the right direction.Īfter reading the first answer that it worked for them with a slight change, I took the application that I have been developing on my Windows 8 machine and executed it in a Windows 7 VM and it worked as expected. I am still a bit of a WPF noob, so I must be missing something simple here. I have the following XAML and it sets the font color properly, but the backgroound is the default transparent blue regardless of the brush settings. I have read what I could find here on SO and have followed, or believed to have followed the recommendations there ( Change background color for selected ListBox item, WPF How to change the listbox selected item text color when the list box loses focus, Change selected and unfocused Listbox style to not be grayed out, and others).Īll seem to solve the problem by setting the HighlightBrush and ControlBrush to Transparent for the selected item.
I am attempting to set the background color of a selected ListBoxItem to be white rather than the system color.