views:

108

answers:

1

So i have a combo box on the main window of my WPF app. I bind a List accessed through a singleton to the ItemSource of the combo box. All is fine. In a child window that the user can open, i have a ListBox bound to the same List in the singleton.

The Problem: when i change the selection of the list box in the child window, i can see the selection change for the combo box on the main window at the same time.

What is causing these two very separate controls to behave like there is some kind of synchronization between them? Is it an issue with binding both controls to the same data object?

+1  A: 

If both of your controls have "IsSynchronizedWithCurrentItem" enabled, you could see this issue.

You can find out more about this property here.

You can bind both controls to the same object without having them synchronized, just mark the "IsSynchronizedWithCurrentItem" property as false, and you should be good to go.

Darien Ford
Awesome, that was it. Thanks.
Jason Miesionczek
Glad to hear it
Darien Ford