Click here to Skip to main content
15,899,825 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
The basic need that I have is to develop an application (windows) which will have features like mdiparent & child, menu and sub menus.
for example :
what I want is a mdiparent with menus and submenus.
on clicking the menus or sub menus different forms will open but it will be inside the mdiparent container. better if its a tabbed mdichild form.. This is the design i want. I am not able to find samples. can u help me with some????
Thank you
Posted
Comments
[no name] 10-Aug-14 11:06am    
If you are looking for an MDI example for WPF, you are probably going to be searching for quite some time. MDI fell out of favor a very long time ago so I doubt that anyone would actually create a WPF application using MDI.
mrbonny7 10-Aug-14 11:16am    
So what do you suggest i should do.. Cause .. My application will have menus and sub menus.. For example a School Management App.
There will be Modules like student name and other details entry form, Then student attendance module, Marksheet module, semester module... etc All these in one container I want. If this had been in web concept i could have used a master page and menus.. In Winforms Mdi parent and child with Menus.. What Options do I have in Case of WPF???

Here is the idea: who needs MDI, ever? Why torturing yourself and scaring off your users?
Do yourself a great favor: do not use MDI at all. You can do much easier to implement design without it, with much better quality. MDI is highly discouraged even by Microsoft, in fact, Microsoft dropped it out of WPF and will hardly support it. More importantly, you will scare off all your users if you use MDI. Just don't. Please see:
http://en.wikipedia.org/wiki/Multiple_document_interface#Disadvantages[^],
How to Create MDI Parent Window in WPF?[^].

I can explain what to do instead. Please see my past answers:
How to Create MDI Parent Window in WPF? [Solution 2],
Question on using MDI windows in WPF[^],
MDIContainer giving error[^],
How to set child forms maximized, last childform minimized[^].

—SA
 
Share this answer
 
Comments
mrbonny7 11-Aug-14 1:44am    
Thank you..I Get your point.. So can u please tell what to do instead u know my project scenario e.g. School Management App.
There will be Modules like student name and other details entry form, Then student attendance module, Marksheet module, semester module... etc All these in one container I want. If this had been in web concept i could have used a master page and menus.. In Winforms Mdi parent and child with Menus.. What Options do I have in Case of WPF??? plzz suggest a better approach.. Thank You
Sergey Alexandrovich Kryukov 11-Aug-14 3:07am    
I wrote about it in my referenced articles, after "I can explain what to do instead."
The simplest solution is tabs, TabControl with TabPages.
One of the most advanced designs, much like the one of Visual Studio is AvalonDock:
http://avalondock.codeplex.com.

One intermediate solution: use a tree view or or list box on left of the window. In selection of a node, show one or another Panel on right, hiding other panels. The view on left will represent a "topic", "section" or a "page", a panel on right — some associated content. This is very easy to implement by yourself.

I think I described you good number of good alternatives in sufficient detail. Will you accept the answer formally now? In all cases, your follow-up questions will be welcome.

—SA
mrbonny7 11-Aug-14 3:31am    
Can You give me certain example links of Tabbed Page interface... That would be of great help. I am thinking of having a left Panel where all menu Items will be displayed. On the right panel which will comprise the majority of the window almost about 75% of the screen I am thinking of having the tabbed page interface. so when a menu is clicked on left panel its respective module will open in Right panel. If multiple menus are clicked all will be tabbed in the right panel... Have Any soln. or examples similar to this ??
I am Newbie so plz be little descriptive.... Thank you so much for your help..
Sergey Alexandrovich Kryukov 11-Aug-14 3:37am    
Oh, you don't need any samples. It's much faster to write such a sample, because there is almost nothing to think about. Just add some TabControl to your XAML, add some pages to it. Everything is written in its documentation.

But your description is different; this is not how TabControl is used. In TabControl, "menu" is a set of tab headers. In the second design, you don't need TabControl, need just a set of panels, all hidden except one (or optionally, build the panel content out of data stored in each item every time you select it).

—SA
 
Share this answer
 
Comments
mrbonny7 10-Aug-14 11:43am    
thank you.. the second one seems to hav solved my problem.. thank you...
mrbonny7 10-Aug-14 12:30pm    
I would like to ask u as MDI is not much used in WPF wat else can i try for a project like School Management App.
There will be Modules like student name and other details entry form, Then student attendance module, Marksheet module, semester module... etc All these in one container I want. If this had been in web concept i could have used a master page and menus.. In Winforms Mdi parent and child with Menus.. What Options do I have in Case of WPF???

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900