Question

I have the following GUI design and the questions are in red.

enter image description here

Basically I have one Ribbon on top, and a main area below. The main area as you can see contains lots of panes. These are all floatable, dockable all that good stuff. I will use AvalonDock. So yeah my main questions are on the image, but they are more meant to start a conversation. I am sure you guys have done something similar and can share stuff related to this.

Just to be clear, I use visual studio 2012, c#, wpf, prism, and avalondock. Of course I try to organize things according to MVVM pattern.

Was it helpful?

Solution

Ribbon: It depends. Are you going to be adding and removing sections to the Ribbon? Both while running and from a development standpoint. If yes to either, then break apart the ribbon into View/ViewModels as appropriate. If no, then just make one View/ViewModel for the entire Ribbon region.

Yes, you want individual View/ViewModels for these sections. Can consider DockPanel as well for means to establish the components.

I would have a MenuRegion for the Ribbon, and Workspace region for below. In the Workspace View, I'd create the layout and assign each to its own Region which has the corresponding View/ViewModel.

OTHER TIPS

Yes you are right about separate view for each region. If you are using a certain ribbon control say, from windows itself (System.Windows.Controls.Ribbon). Then the library provides you with different kind of button/ribbonbutton/dropdownbutton etc controls.

Now AvalonDock v2.0 is out, it has better support for MVVM pattern, it wasn't the case with v1.3.

Since you plan to use PRISM then you can use the region adaptor provided with it to host your views in their respective regions. You should be able to find plenty of samples for it. I tried to find one quickly for you from the AvalonDock project itself.

http://avalondock.codeplex.com/releases/view/92210

I hope it helps!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top