CurrentItem vs. SelectedItem, what's the difference?

Jul 22, 2010 at 6:19 AM


Can someone please explain what exactly is the difference between DataGrid's CurrentItem and SelectedItem properties.

In which cases will these two NOT reference the same object?

I for example I have a DataGrid next to a StackPanel with simple edit controls like TextBox. I want to bind the DataContext of the StackPanel to the item that is "currently selected" in my grid (and then bind the individual controls to properties of that object). Would I rather use SelectedItem or CurrentItem in that case?

Also, can you please explain the magic of IsSynchronizedWithCurrentItem ?