views:

25

answers:

0

I'm using Fluent ribbon in a MVVM application. For each tab item I associate a view and a view model (set a new DataContext). How can I change the view and the view model (DataContext) each time when the selected tab item is changed ? It would have been nice to have an event that fires each time a tab item is selected, like Microsoft Ribbon for WPF has. Moreover the SelectedTabChanged event defined for a ribbon instance is triggered twice when the selected tab is changed: one time for the old tab and one time for the new tab item. I don't think it's a good coding practice.

Anyway please suggest me an efficient way of changing the view when the selected tab item is changed.(code example or link to some code examples).

Thanks,

Tudor