I am building a UserControl that has four ListBoxes on it that I have setup to select multiple items and feed my viewmodel with the techniques outlined here. When I select an item in a different listbox the items in the other listboxes get de-selected. The items are still properly selected in my viewmodel but they are not being properly displayed in the view. Does anyone know why this could be?
The only code that is unique to my implementation of the above link is the following
<ListBox ItemsSource="{Binding LeftTires}" ff:MultiSelectorBehaviours.SynchronizedSelectedItems="{Binding SelectedLFTiresText}" Grid.Column="0" Grid.Row="2" SelectionMode="Multiple" Margin="10,0,10,10" />
<ListBox ItemsSource="{Binding RightTires}" ff:MultiSelectorBehaviours.SynchronizedSelectedItems="{Binding SelectedRFTiresText}" Grid.Column="1" Grid.Row="2" SelectionMode="Multiple" Margin="10,0,10,10" />
<ListBox ItemsSource="{Binding LeftTires}" ff:MultiSelectorBehaviours.SynchronizedSelectedItems="{Binding SelectedLRTiresText}" Grid.Column="0" Grid.Row="4" SelectionMode="Multiple" Margin="10,0,10,10" />
<ListBox ItemsSource="{Binding RightTires}" ff:MultiSelectorBehaviours.SynchronizedSelectedItems="{Binding SelectedRRTiresText}" Grid.Column="1" Grid.Row="4" SelectionMode="Multiple" Margin="10,0,10,10" />
And if you download the sample from the link I provided and add a second Listbox to the very simple form you can reproduce exactly what is happening.
You sure you don’t want to use a checkbox list instead? Microsoft has an page here explaining why. This might be easier to find which are checked, but unsure since there is no code. HTH