0

I would like to create an application using WPF and MVVM Light but i don't know how to organize my application layout for a MVVM application. The idea is to have something similar to Visual Studio:

  • A main Window with tabs, toolbox and menu that can be docked and moved to different locations. I had been able to easily create this layout using Telerik WPF controls and their sample but all in a simple XAML file with it's code behind, I have no idea how to transform it into a MVVM application.

I would like each pane/window/toolbox to be a different view with its own View Model. I checked tutorials but I didn't find how to have one single application displaying simultaneously multiple views/viewmodels in the same "main window".

Have I do define each view in a specific user control? Have I to use ContentControl to organize my layout? Should I use data template? How to handle binding on multiple view/viewmodels within the same window ?

Thanks a lot for your help! Doots

Doots
  • 21
  • 1
  • 2
  • 1
    Don't think about N different views that are open at the same time. Only one view/window can be open/active/focused. With that in mind it's like a normal MVVM app. – jwillmer Feb 22 '13 at 17:18
  • Related: [Implementing a multidock window system (like blend, visual studio) in WPF](http://stackoverflow.com/a/2255719/2157640) – Palec Oct 11 '16 at 18:00

2 Answers2

3

look at using http://avalondock.codeplex.com to get a layout like visual studio. Then you could put usercontrols in the LayoutPanes for your views, and have those binded to your viewmodels.

Carman Babin
  • 154
  • 5
1

Thanks for your replies! Now i understand, I think I was searching way too far and made it more complex than it should...

Avalon seems a very nice solution, but I have a Telerik licence then I will go for it. If anybody is having the same issue, just take a look at this answer from Laurent Bugnon: http://mvvmlight.codeplex.com/discussions/252035

Thx

Doots
  • 21
  • 1
  • 2