Using: Prism Prism v4 - Drop 7, RibbonControlsLibrary 3.5.40729.1
I have a RibbonContextualTabGroupItemsControl that is a region. My ribbon binds to this for its ContextualTabGroupsSource property. This is so modules can register their own contexts for ribbon tabs they may inject.
When I call RegisterViewWithRegion with 1 context, everything works fine. When I attempt to register another context Microsoft.Practices.Prism.Regions.
ViewsCollection. OnCollectionChanged() throws an index out of range exception. As an experiment I wrapped the call in a try catch block and the ribbon does get both context objects, but neither will actually display.
As a temporary work around I am binding the ItemsSource of the RibbonContextualTabGroupItemsControl to a collection in my shell's view model and it works but I have to reference my
modules in the shell so this is not good.
Note that I do not have a region adapter for the ribbon, I just have those particular views inheriting from the objects the ribbon controls expect, which works fine for the ribbon tabs, just not for more than 1 RibbonTabContextualTabGroup.