WPF/Prism: Nested views and toolbar
===

I have a WPF/prism application similar to the mockup shown below:

![Layout][1]

  [1]: http://i.stack.imgur.com/fwuFw.jpg

Both TabControls contain a separate Prism region, the second one being nested into the first one. Now the toolbar should activate/deactive items depending on which view is currently active.

The toolbar is currently defined in the shell.

I tried using some sort of registry, where each ViewModel could register the toolbar commands it supports. However I then realized that the toolbar cannot know which view (and therefore which viewmodel) is active.

The problem is in the nesting, without that I could probably achieve what I wanted by binding the TabControl.SelectedItem property to the toolbar and use my registry from above.

Maybe there is a better way to do this? Or a way to let the toolbar find out which view is active?