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

need explanation of code piece in WPF DockingDemo2008

Thread ID:





94840 Jun 4,2010 10:43 AM UTC Jun 7,2010 11:55 AM UTC WPF 1
Tags: Tools
EXAPT Systemtechnik GmbH
Asked On June 4, 2010 10:43 AM UTC

In Window1.xaml.cs I find the following code section. Could someone explain this to me?
private void InitWindowsFormsHost()
if( DockingManager.UseInteropCompatibilityMode )
WindowsFormsHost host = new WindowsFormsHost();
WinForms.Button btn = new WinForms.Button();
btn.Text = "Winows Forms Button";
host.Child = btn;
FindResults.Content = host;

David C [Syncfusion]
Replied On June 7, 2010 11:55 AM UTC

Hi Christoph,

Thanks for your interest in Syncfusion products.

Basically we set UseInteropCompatibilityMode to true when we use WinForms controls in DockingManager of WPF. By the code snippet, we place WinForms's Button inside of the ContentControl(FindResults). WindowsFormsHost.EnableWindowsFormsInterop() funtion enables a System.Windows.Forms.Form to function correctly when it is opened modelessly from WPF

David C


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