Adding existing WPF Window to Workspace

Docking/MDI for WPF Forum

Posted 10 years ago by Tim Harvey
Version: 9.1.0503
Avatar
I have a number of existing WPF windows that I would like to show up as DocumentWindows in the MDI interface. Is there an easy way to do this?

Comments (2)

Posted 10 years ago by Tim Harvey
Avatar
Solved it.

I made a new User Control, ported the Window controls and code, and created a DocumentWindow using that User Control.
Posted 10 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Tim,

Sorry but from anything we've read on the net, this doesn't appear to be possible. WPF Windows cannot be used as "controls" in other WPF content, like you could do with Windows Forms' Form. Sample article here:
http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/469cc45a-5fc3-4d3c-8a6d-8deffe538bba

I agree with your decision to port it to a UserControl and use that in a DocumentWindow. That provides you the same sort of encapsulation you were trying to achieve.

Also note that you can port directly to a DocumentWindow and eliminate the UserControl middleman. Look at the "Custom Docking Windows" QuickStart for a sample of this.


Actipro Software Support

The latest build of this product (v2019.1 build 0681) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.