We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Docking Manager and WindowsFormsIntegration

Thread ID:





123988 May 5,2016 05:20 PM UTC May 6,2016 06:56 AM UTC WPF 1
Tags: DockingManager
Gregory Pe
Asked On May 5, 2016 05:20 PM UTC

how to make:

Creating a form from a WinForms Control hosted within WPF (Docking Manager)

 UserControl1 rtb = new UserControl1();
            System.Windows.Forms.Integration.WindowsFormsHost host = new System.Windows.Forms.Integration.WindowsFormsHost();
            host.Child = rtb;

1. AddElementWF_Click    ADD - Window2.XAML
2. AddElementWUC_Click  ADD - UserControl1.cs
3. AddElementWPF_Click ADD Form2.cs

Attachment: CS2_18575e0a.zip

Vijayalakshmi Roopkumar [Syncfusion]
Replied On May 6, 2016 06:56 AM UTC

Hi Grzegorz,

Thank you for using Syncfusion products.

We have checked your sample and found that you have tried to add the WPF window, Usercontrol and WindowsFormsHost element in the DocumentContainer. In our DocumentContainer, you can add only the element which are derived from the Dependency object. But in your sample, you have tried to add the System.Windows.Forms.Usercontrol which is not derived from the DependencyObject, so it will not be added as a child of DocumentContainer. To add this as a child of DocumentContainer, you can host the Usercontrol inside WindowsFormsHost. You cannot add WPF window as a child of DocumentContainer, since window cannot be a child of any visual element.

Vijayalakshmi V.R.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon