Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to implement mdi in a WPF application

Tags:

wpf

mdi

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.

like image 902
Asaf Avatar asked Oct 29 '10 11:10

Asaf


2 Answers

From some reason, Microsoft decided that MDI is wrong. There is a lot of information about this when searching it in Google.

I believe that it is wrong to kill something that so many people liked and in forums I visited, some people point to a new Microsoft example that works in MDI to stress the point that it is legit way to build an application.

I hate swimming against the stream, so I quit as soon as I understood that despite it is possible to create an MDI application with modern Microsoft application such as silverlight, wpf and maybe even windows-phone, microsoft really discorage it and doesn't offer any support (as far as I know).

Hope it helps to others that wonders what happened to our good old MDI "Father".

like image 50
Asaf Avatar answered Sep 28 '22 07:09

Asaf


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.

like image 21
Govert Avatar answered Sep 28 '22 05:09

Govert