开发者

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

Databound RibbonTab is displaying RibbonGroup content in "Header"

http://img8.imageshack.us/img8/8584/screenshot300d.jpg

the 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜