开发者

WPF Prism and the Ribbon Control

I am working on a line of business application for our company and I came across Prism. I have never worked with it before but the concepts it talks about sound a lot like what I did for the last project in Winforms. I had a ShellForm and then multiple User Controls.

Anyway, assuming I am not seriously misunderstanding what Prism is I would like to know how a Ribbon Control would fit into it. Is it it's own Module with a Region on the Shell.xaml or is it embedded in the Shell.xaml? It seems to me like it would be the second one but then again, I don't know what I am talking about yet or I wouldn't be asking.

Also, I don't suppose anyone else has used a Ribbon Control 开发者_开发百科in an Enterprise Prism application before and could offer any tips or "watch-outs" about walking this path.


The ribbon would be an child element of RibbonWindow, which would both be contained in shell.xaml. Your module would then just register Tabs, groups, or buttons to the regions you setup on your ribbon.

Check out this code review post for some sample code https://codereview.stackexchange.com/questions/429/mvvm-wpf-ribbon-v4-with-prism


More than likely it would be in the Shell.xaml --- since the Ribbon control integrates with the window chrome in ways that I dont think would be possible if it was a modules (and part of a UserControl).

Refer to following to get the window chrome integration: http://blogs.msdn.com/b/wpf/archive/2010/08/04/why-should-i-use-a-ribbonwindow.aspx

That limits (at least from a design purist point of view) how the modules can interact with the ribbon control - but more than likely your design doesnt need that if you want to use a Ribbon in the first place.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜