Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: WPF
how to open window inside another window frame.i am having a window consist of frame i want to open another window in the frame is it possible or not?give some example.
Posted 24-Jan-13 2:33am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Your Form(Window) must be MDI(multiple document interface)
 
YourForm.IsMdiContainer = True
 
NewForm.MdiParent = YourForm;
NewForm.Show();
  Permalink  
Comments
Sergey Alexandrovich Kryukov at 24-Jan-13 15:34pm
   
This is WPF, not forms. Microsoft did a hard job of phasing out this mistaken UI style, so it's not available in WPF; and you are only trying to do harm of reviving it.
Sorry, I voted 1.
—SA
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

1. Read all about MDI at http://msdn.microsoft.com/EN-US/library/xyhh2e7e(v=VS.100,d=hv.2).aspx
 
2. Use Google or Bing search to find samples of MDI to study and learn from.
Following is a link to one example, I found with search key: mdi sample vb.net
www.cas.mcmaster.ca/~se4d03/tutorials/MDIExmpl.pdf

3. Develop a small sample application to help you learn.
 
4. Ask further clarifying questions by posting code from your sample application.
  Permalink  
Comments
Sergey Alexandrovich Kryukov at 24-Jan-13 15:35pm
   
This is WPF, not forms. Microsoft did a hard job of phasing out this mistaken UI style, so it's not available in WPF; and you are only trying to do harm of reviving it.
Sorry, I voted 1.
—SA
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

Don't do it. WPF Windows are not designed like that, thanks goodness. You need to start with thinking about nice UI design.
 
There are good alternatives. One very simple but quite good one is System.Windows.Controls.TabControl: http://msdn.microsoft.com/en-us/library/system.windows.controls.tabcontrol.aspx[^].
 
There are many others. Basically, you can have multiple panels in your window. Hide/Show them, move in/out, minimize/maximize, etc.
 
You can even use the advanced docking interface line in Visual Studio: http://avalondock.codeplex.com/[^].
 
—SA
  Permalink  

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

  Print Answers RSS
0 Maciej Los 245
1 OriginalGriff 210
2 Manfred R. Bihy 190
3 CHill60 180
4 _Amy 155
0 OriginalGriff 7,445
1 Sergey Alexandrovich Kryukov 6,157
2 Maciej Los 3,774
3 Peter Leow 3,448
4 CHill60 2,702


Advertise | Privacy | Mobile
Web01 | 2.8.140721.1 | Last Updated 24 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100