Wednesday, May 30, 2007

Avoid unwanted synchronization: IsSynchronizedWithCurrentItem= False

All Selectors in WPF have a property named IsSynchronizedWithCurrentItem. The documentation reads:
Gets or sets a value that indicates whether a Selector should keep the SelectedItem synchronized with the current item in the Items property.
This makes me think that I need this set to have the selected item is sync with the current in the items property. This is not the case. If you set the property your selection will be in sync with all selectors sharing the same Items or ItemsSource. If you do not want this synchronization across all selectors sharing the same collection simply set the property to false.

No comments: