Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WPF MDI children

Tags:

wpf

mdi

This question has been posted before, but I can't find a good answer.

I want MDI children in my WPF application. And I want those children to be fully WPF compliant.

.Net WPF doesn't have MDI children (windows within main window) any more. Some say it’s because the design is obsolete and GUI apps shouldn't be designed that way. Those people can refrain from answering this post. I know what I need. :)

What (preferably free) alternatives is there for WPF MDI? Will they work with MVVM?

EDIT: PEOPLE - don't vote up comments that say "MDI IS NOT GOOD". I specifically asked people to avoid that. I'm asking for MDI windows, not to be told not to use MDI windows.

like image 494
Tedd Hansen Avatar asked Dec 28 '10 11:12

Tedd Hansen


People also ask

Is MDI supported in WPF?

You can implement MDI in two ways in WPF; they are: Tab control.

What is MDI child form?

MDI child forms are an essential element of Multiple-Document Interface (MDI) applications, as these forms are the center of user interaction. In the following procedure, you'll use Visual Studio to create an MDI child form that displays a RichTextBox control, similar to most word-processing applications.

What do you think is the relationship of a parent MDI and child MDI?

An MDI application provides a single parent window—called the MDI parent form—with each open document represented by a child form. This arrangement has some special characteristics: Child forms are restricted to the parent form's client area.


1 Answers

I understand you don't want to hear that, but MDI basically aimed to duplicate the desktop metaphor inside the application's main window, and that was a little confusing to end users because it involved several levels of window management:

Tech: Now click on the Maximize button of the active window inside the other window you've just restored to normal size and everything should be okay.

Customer: What?

Tab-based interfaces are generally considered as a better alternative to MDI. You might want to use the TabControl class and read Josh Smith's MVVM article on MSDN Magazine, which demonstrates how to host your views in TabItems.

like image 177
Frédéric Hamidi Avatar answered Oct 19 '22 01:10

Frédéric Hamidi