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.
Unfortunately, activation email could not send to your email. Please try again.

Docking Manager and WindowsFormsIntegration

Thread ID:

Created:

Updated:

Platform:

Replies:

123988 May 5,2016 01:20 PM May 6,2016 02:56 AM WPF 1
loading
Tags: DockingManager
Gregory Pe
Asked On May 5, 2016 01:20 PM

Hi
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;
            grid.Children.Add(host);


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 02:56 AM

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.

Regards,
Vijayalakshmi V.R.
 


CONFIRMATION

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.

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.

;