Start Wpf listbox selecteditem not updating

Wpf listbox selecteditem not updating

When I add a level to my game project, I refresh the list box displaying the project's levels like this : is my List Box instance. The 'Selected Value' looks right etc, it's just that the actual UI doesn't get updated (no blue box around the list item). That's somewhat annoying, I might have a look at the extended wpf toolkit and see if they have a nicer implementation. If you want, re-style the control to change the color of the non-focused selection box to something that is more visible (or the same color as the one when it has focus) The selection in WPF list boxes when the list box doesn't have focus is (by default) a light grey which is difficult to see.

For each of the buttons, I have defined a click handler in the Code-behind.

In the constructor of the window, we initialize a list, add three TODO items to it and then assign it to the Items Source of the List Box.

The combination of the Items Source and the Item Template we specified in the XAML part, this is all WPF need to render all of the items as a TODO list.

As mentioned, a key difference between the Items Control and the List Box is that the List Box handles and displays user selection for you.