Partager via


Hosting Windows Presentation Foundation Content in a Win32 Window Sample

This sample hosts a Windows Presentation Foundation (WPF) page in a Win32 window. The sample shows how to create and host the control, and how to handle communication between the page and the host window.

This sample demonstrates a specific feature of the Windows Presentation Foundation (WPF) and, consequently, does not follow application development best practices. For comprehensive coverage of Windows Presentation Foundation (WPF) and Microsoft .NET Framework application development best practices, refer to the following as appropriate:

Accessibility - Accessibility Best Practices

Security - WPF Security

Localization - WPF Globalization and Localization Overview

Download sample

Building the Sample

  • To build the sample in Microsoft Visual Studio 2005, load the sample solution or project file and then press CTRL+SHIFT+B.

  • Note that this sample uses a project file that will not compile correctly using the command line (Microsoft build engine (MSBuild)). You must use Microsoft Visual Studio 2005 to build this sample.

Running the Sample

  • To run the compiled sample with debugging in Visual Studio 2005, press F5.

See Also