views:

186

answers:

1

I want to create a parent window and host a couple of childWindows inside it, and show them according to user events:

in other words: on parentWindow.load() event, i load the main Childwindow.. and according to the user's choices i unload/close , and then load a different childwindow.
-all of that happening "inside" the parent window" - giving the user the feeling of a paging application instead of a "forms/window" application.

is that doable ? and r there any better practices to have create a similar effect ?

A: 

I am not sure what you are going for exactly, but it seems like one of two options will help you:

  1. TabControl/HeaderedContentControl: your main window could contain a large HeaderedContentControl (such as TabControl) and each of your "child windows" can be individual tabs. With a little coding, the user will be able to close certain tabs, make new tabs, etc. Josh Smith's MVVM demo application is an excellent example of the right way to do this.

  2. Page-based navigation: using NavigationWindow and and Pages you can create a browser-style application that could have various child windows, each displayed one at a time, and with support for navigation history, hyperlinking, etc.

Charlie
thx for ur reply, the tabbed control (close/open) seems like a fine choice.. but the page-based nav. history is my problem, i dont want the user to be able to go back and forth (jumping between pages too).. i need to make it like a smooth program.. 1st page showing multiple choices, when one is chosen(hyperlink clicked) he goes to that page, the only way to go back is through click my home or back button, and not through the "back" button provided by the browser..i hope i explained my case better this time..
Madi D.