Skip to main content
A newer version of this page is available. .

WPF and WinForms Interoperation Limitations

  • 2 minutes to read

WinForms controls can be embedded into WPF applications, as described in WPF and Win32 Interoperation Overview.

However, there are two major limitations to the WPF and WinForms interoperation that prevent WinForms controls from being used with DXDocking:

  • WinForms controls, when embedded in WPF applications, are always displayed on top of WPF controls.

    Here is an example of this scenario. Assume that a DXDocking dock panel exists with a WinForms control within it. All other panels, when moved or placed over this panel, will be hidden behind the WinForms control.

  • WinForms controls cannot be displayed in WPF windows that have the AllowsTransparency property set to true.

    All dock panels have the AllowsTransparency property set to true. This ensures correct display of the panel’s borders and shadows. However, WinForms controls are hidden when they are displayed within windows that support transparency.

To overcome possible issues with auto-hide panels and floating panels overlapped by WinForms controls, set the DockLayoutManager.EnableWin32Compatibility property to true.

This action will set the AllowsTransparency property for all floating WPF windows to false and force auto-hide panels to be drawn over a WindowsFormsHost object. The DockLayoutManager.EnableWin32Compatibility property is in effect for floating panels only in the FloatingMode.Desktop mode.

See Also