Databound RibbonTab is displaying RibbonGroup content in "Header"
I have an observableCollection of "RibbonGroupViewModel".
The view of each viewModel is defined like that :
<DataTemplate DataType="{x:Type vm:RibbonGroupViewModel}">
<ribbon:RibbonGroup Header="test">
//....
</ribbon:RibbonGroup >
</DataTemplate>
And to display Ribbon :
<ribbon:RibbonTab Header="Home">
<ribbon:RibbonGroup Header="Client">
<ribbon:RibbonCheckBox Label="bouton2"></ribbon:RibbonCheckBox>
</ribbon:RibbonGroup>
<ItemsControl ItemsSource="{Binding RibbonGroupCollection}"></ItemsControl>
</ribbon:RibbonTab>
THe new RibbonGroup is added to my ribbon but the display is not correct....
See ScreenShot
http://img8.imageshack.us/img8/8584/screenshot300d.jpgthe second 开发者_如何学Pythongroup is in "other" level... very strange
Just for information, if I don't use ItemTemplate (first RibbonGroup), all is ok
The problem could be, that ItemsControl does not just inserts a bunch of RibbonGroups, but wraps them in a StackPanel.
If thats it, you could add your "Client" group to the RibbonGroupCollection and bind to the ItemsSource property of the RibbonTab.
精彩评论