Interoperability with Win32 and WinForm

In this chapter, we will cover the following recipes:

  • Hosting WinForm controls in WPF applications
  • Hosting WPF controls in WinForm applications
  • Calling Win32 APIs from WPF applications
  • Embedding ActiveX controls in WPF applications

Introduction

The term interoperability describes the capability of different applications to exchange data via a common set of exchangeable formats. It is a characteristic of the product or system, whose interfaces are completely understood, to work with other products or systems.

WPF and Windows Forms present two different architectures for creating application interfaces. The WindowsFormsHost and ElementHost classes are used to implement the interoperation capabilities ...

Get Windows Presentation Foundation Development Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.