views:

44

answers:

2

I'm writing a data-entry software with lots of pages. For example one page for entering team data and another page for entering match data. I want to use the new fancy Microsoft ribbon control to organize different pages and categories.

The problem is I'm new to WPF and I don't know what should I use for:
a. The container of pages (should I create a usercontrol for each page?)
b. The container on the main page where ribbon is placed. (By clicking each ribbon button an specific page should be opened on the main window.)

What would you do?

A: 

You could use a DockPanel for the main layout, a TabControl docked to the top for the ribbon, and a ContentControl filling the rest of your application. When a button gets clicked in the TabControl, set the ContentTemplate of the ContentControl.

Rachel
In WindowsForms I usually create a usercontrol for each page and I will add the proper one to the main form's controls when needed. But I was wondering if there's a better way for WindowsForms and WPF.
You could use ControlTemplates instead of UserControls and just replace a ContentControl's Template as needed. All WPF controls are "lookless" so you can define their appearance and events any way you want, although most have a default template supplied.
Rachel
A: 

if you are using the actual RibbonControl from Microsoft there is a RibbonWindow that is used to host the ribbon.

http://blogs.msdn.com/b/jaimer/archive/2010/08/04/wpf-ribbon-has-been-released.aspx?wa=wsignin1.0

ecathell