unselects the items on top when scrolling to bottom

140 Views Asked by At

I have a WPF listbox. The items are bound to the listbox.

When I select a few items at the top of the listbox and scroll down to the bottom of the listbox to select other items, the items that were earlier selected at the top are getting unselected.

I am finding this behavior with selection mode set to Extended as well as Multiple. Please advice.

2

There are 2 best solutions below

0
On

FYI - For anybody working with Silverlight who finds this answer, try using this:

VirtualizingStackPanel.VirtualizationMode="Standard"
0
On

Try turning off virtualization

<ListBox VirtualizingStackPanel.IsVirtualizing="False" 
                       ItemsSource="{Binding XPath=Team}" 
                       ItemTemplate="{DynamicResource NameDataStyle}"/>