How to implement mdi in a WPF application

Asaf picture Asaf · Oct 29, 2010 · Viewed 29k times · Source

I really like MDI applications.

It allows me to move quickly between windows and compare the content of different windows. Furthermore, sometime the content of one window is useful for another, so I can copy and paste. I think it's a great user experience for working mode.

Right or wrong practice, I love it.

I saw Stack Overflow question MDI applications in WPF, and there they gave the Visual Studio 2010 environment as an example. I didn't understand if and how it is possible to implement that environment: like having tabs that can be tear off to independent screen (less important for me) and rearranged side by side with the rest of the tabs.

I guess that I am looking for "docking layout system in WPF", googleing this offer third-party components.

I think I'll start with a "normal" application. It feels like there is no easy out-of-the-box implementation here.

Answer

Govert picture Govert · Nov 28, 2010

There are two popular projects on CodePlex that might help you:

  • AvalonDock - a docking library in the style of Visual Studio, and
  • WpfMdi which is a classic MDI window manager.

AvalonDock supports separate tab-sets side-by-side and also tear-off windows like Visual Studio, so it should give you everything you need, though not exactly classical MDI. It is used in SharpDevelop, so you could download that to play around and get an idea of how the docking library can be used.

Edit:

And I found a third one which looks very snazzy: Chronos WPF.