C# wpf --- This is a "continuation" of c-sharpcorner.com/forums/how-do-change-the-background-color-on-one-listbox-item-continued.
When I highlight one ListBox item,
gLBxEpidemicSequence.SelectedIndex = iIndex;
the background is Gray. How do I change the background color?
---
The response, by Abhishek Yadav, was "you can do the following:"
gLBxEpidemicSequence.SelectionBackground = Brushes.Blue;
"This will change the background color of the selected item to blue."
When I use SelectionBackground
the error message is:
'ListBox' does not contain a definition for 'SelectionBackground' and no accessible extension method 'SelectionBackground' accepting a first argument of type 'ListBox' could be found (are you missing a using directive or an assembly reference?)
Please advise.