Click here to Skip to main content
15,884,176 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi all,

How to load another window in current window in WPF? At Windows Form Application, the idea is showing it at PANEL

VB
Me.pnlView.Controls.Clear()
Dim frm1 As New frmNewMeeting
frm1.FormBorderStyle = FormBorderStyle.None
frm1.Dock = DockStyle.Fill
frm1.WindowState = FormWindowState.Maximized
frm1.TopLevel = False
Me.pnlView.Controls.Add(frm1)
frm1.Show()
Me.Text = "Schedule System :: Book New Meeting Session"
Exit Sub


What is the equivalent of Winform with WPF? I'm working on WPF right now
Posted
Comments
Sergey Alexandrovich Kryukov 18-Aug-14 22:58pm    
Window in window? Why?! It makes no sense, really... As well as showing a form in a form. The code you've show won't work; you also need to modify TopLevel property. But it makes no sense...
The analog of Form is WPF Window. So what?
—SA
Luiey Ichigo 18-Aug-14 23:31pm    
That code is for WinForm sample to view a another form in my current form. That code is run good for me. I'm asking is there any way that equivalent this view to be use in WPF. At WinForm, it will be form in a form. So in WPF, it will be Window in Window. I don't use Page.
Sergey Alexandrovich Kryukov 19-Aug-14 1:58am    
I say, it makes no sense. Just try it yourself if you want; what's the problem in trying that?
—SA

1 solution

Agree with Sergey..

I think that you should use Frame[^] for this purpose. You can load to frame different contents.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 19-Aug-14 2:01am    
You are right, but "different content" could be loaded in many containers. It also could be any type of System.Windows.Controls.Panel.
—SA

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