![Avatar](https://secure.gravatar.com/avatar/72e7da8fb18d276b75c94cb66ef719b4.jpg?s=64&d=identicon&r=g)
I am trying to use DataTemplates to bind a tab's Groups to a collection of ViewModels. For example, I was expecting the tab would have a "Groups" or "Items" collection which could be bound to my ITabViewModel.GroupViewModels, and based on the object type of each GroupViewModel (a ClipboardGroupVM, FontGroupVM, etc), WPF would use the appropriate DataTemplate which contains a Ribbon.Controls.Group.
...and/or...
Similarly I would like to bind the Ribbon.Tabs collection with a collection of ViewModels which (through DataTemplates) will turn into Ribbon.Controls.Tabs. The hope would be xaml something like this:where TabVMs is a collection of ViewModels like HomeTabVM, InsertTabVM, and so on.
But Tabs is apparently not a DependencyProperty and so can't be bound.
Is there some other mechanism for generating ribbon tabs and/or groups dynamically using MVVM?
[Modified at 03/22/2010 12:52 PM]
...and/or...
Similarly I would like to bind the Ribbon.Tabs collection with a collection of ViewModels which (through DataTemplates) will turn into Ribbon.Controls.Tabs. The hope would be xaml something like this:
<ribbon:Ribbon Tabs="{Binding Path=TabVMs}" />
But Tabs is apparently not a DependencyProperty and so can't be bound.
Is there some other mechanism for generating ribbon tabs and/or groups dynamically using MVVM?
[Modified at 03/22/2010 12:52 PM]