MVVM, Ribbon and Contextual Tabs

Apr 20, 2010 at 1:28 PM

I am relatively new to MVVM.  I want to create a WPF app with a ribbon and a tabbed window area.  The ribbon needs to have contextual tabs based on certain things like the active tab view and what is currently selected in the view.  So this is what I have:

MainWindowView: the main window that contains the ribbon and a tab window area.  The buttons in the ribbon are tied to the view model's commands.  I will be following the help from the discussion "Using Ribbon with MVVM" to make sure MVVM is followed.

MainWindowViewModel: contains commands.

One of the commands opens a screen for "Customer".  So I would have a CustomerView and a CustomerViewModel.  The CustomerView should have its own Contextual tab because certains commands only apply to the CustomerViewModel.

Another command could open a different View and ViewModel and have its own contextual tab.

Does anyone have any ideas on how to do this and still maintain MVVM?