We often need to implement master-detail scenarios in our applications.
ListBox (also ComboBox) has a property called IsSynchronizedWithCurrentItem which makes it very easy to implement master-detail scenarios.
You can set the IsSynchronizedWithCurrentItem property to true to ensure that the item selected always corresponds to the CurrentItem property in the ItemCollection(source of data for the ListBox).
For example, if we need to have Listbox(MasterList) showing images of products and a details pane showing details of the image selected in the ListBox.
All we need to do is set the DataContext for the ListBox and details pane to the same ItemsCollection and set the IsSynchronizedWithCurrentItem on the ListBox to true.
You can find the source code attached.
#Note: This sample uses no C# code, only XAML.
Here is an interesting link on Selection Synchronization