开发者

How to implement WPF Ribbon Contextual Tabs MVVM way

I'm developing MVVM application using WPF Ribbon control from Office UI licensing site as main menu. And I can not bind or somehow inject contextual tabs into my ribbon control. I do not want to store all contextual tabs markup and command bindings in my main view, I want to use this tabs depending on view selected and store this tabs maybe in same view or some special view with only this type of tabs. Is it poss开发者_运维百科ible?


One thing you could do is to write Styles or even ControlTemplates for the various RibbonTabs in your App.config, avoiding the need to put that markup in the MainWindow. Then simply add all the RibbonTabs into the Ribbon in MainWindow.xaml and set the Visibility properties of each by binding to the main view model. You could use a load of bool properties in the main view model with a simple bool to Visibility converter.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜