473,386 Members | 1,705 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Can a WPF window host another WPF window?

I am not looking for a "hybrid" WPF/WinForm or WinForm/WPF solution, but
rather a pure WPF/WPFsolution.

I want to host a WPF window inside another WPF window. I want to host a WPF
window as a "control" inside another WPF window, much like a button is
hosted inside a WPF window. This may not be possible today in WPF, but that
is what I am trying to determine. Since WPF is a 1.0 product, perhaps the
answer is: wait for a more complete WPF to be released in the future.
Anybody know?

I dock Windows forms inside of Windows forms in *all* my projects, sometimes
4 or 5 window levels deep. Without this capability in WPF, WPF is mostly a
non-starter for me.
Oct 2 '08 #1
2 8868
On Oct 1, 11:11 pm, "Dean Slindee" <slin...@charter.netwrote:
I dock Windows forms inside of Windows forms in *all* my projects, sometimes
4 or 5 window levels deep. Without this capability in WPF, WPF is mostly a
non-starter for me.
How are you doing that in Window Forms? Are you setting the parent of
one form to another and then setting the TopLevel property to false
before calling Show? What advantage does this give you over using,
say, a User Control? For what reason do you require your apps to be
this way?

That being said, I don't believe that a Window can be hosted inside a
Window, at least not like you would do with a Windows Form as in non-
WPF apps. I tried to do it with a simple test but was unable. That
doesn't mean it can't be done, just I couldn't figure it out in 5
minutes! You can instantiate other Windows as child windows by
setting the Owner property, but I don't think they can actually be
embedded within the main Window.

When using WPF, you have to change the way you think about application
design. If you could describe the reason for hosting forms in forms,
maybe there is a more WPF way to do it.

Chris
Oct 2 '08 #2
On 2008-10-02, Dean Slindee <sl*****@charter.netwrote:
I am not looking for a "hybrid" WPF/WinForm or WinForm/WPF solution, but
rather a pure WPF/WPFsolution.

I want to host a WPF window inside another WPF window. I want to host a WPF
window as a "control" inside another WPF window, much like a button is
hosted inside a WPF window. This may not be possible today in WPF, but that
is what I am trying to determine. Since WPF is a 1.0 product, perhaps the
answer is: wait for a more complete WPF to be released in the future.
Anybody know?

I dock Windows forms inside of Windows forms in *all* my projects, sometimes
4 or 5 window levels deep. Without this capability in WPF, WPF is mostly a
non-starter for me.

If your talking about docking, then yes it can be done. There are docking
libraries out there, just google it :)

--
Tom Shelton
Oct 2 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: dan | last post by:
This works in mozilla but I can't figure out why this won't work in IE. Say I have this html <html> header goes here header goes here
10
by: Shang Wenbin | last post by:
Hi, When I want to close the current window using window.close() in IE6.0, there will be a confirm box that: The web page you are viewing is trying to close the window. Do you want to close this...
4
by: Csaba Gabor | last post by:
Up until a few weeks ago, javascript code like window.open("http://mydomain.com", "windowName"); would always bring my new or reused window to the top, with focus. Lately, Firefox (Deer park...
22
by: stephen | last post by:
I have created an order form that users javascript to create a new html document when the customers clicks the "print page" button. Once the new document has been created it then prints the...
11
by: Dave | last post by:
For some reason, the below lines only work on select machines. All machines are running IE6. IE SP's and OS's vary. When it doesn't work, default.aspx (the page that this code is in) opens and...
3
by: dibakar | last post by:
Hello I want to open a window using Window.showModalDialog once i click inside of a TextBox.And that window need to come just under the TextBox,so that it seems to a same control. So,what...
5
by: kalyangvd | last post by:
Hi Guys, I am trying to get the Field Id from the Parent Window in the pop up window using window.opener ex: var var1 = window.opener.document.getElementById("text1").value; ...
2
by: Peri | last post by:
Dear All, Is there a dockable control in VB.NET similar to the Error List Window, Output Window, Soluition Explorer, Tool Box. I would like to have a control that has Pin functionality (Auto...
2
by: kurt sune | last post by:
Hello, I have a weird problem, I hope someone can explain this for me. I have a webpage using masterpage. In it I create a popup window using this code: Dim js As String = "<script...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.