Hosts a Win32 window as an element within Windows Presentation Foundation (WPF) content.
Assembly: PresentationFramework (in PresentationFramework.dll)
'Declaration <SecurityPermissionAttribute(SecurityAction.InheritanceDemand, Flags := SecurityPermissionFlag.UnmanagedCode)> _ Public MustInherit Class HwndHost _ Inherits FrameworkElement _ Implements IDisposable, IWin32Window, IKeyboardInputSink 'Usage Dim instance As HwndHost
To host a Win32 window, create a class that derives from . Override the BuildWindowCore method and create your Win32 window as a child of the parent window that is passed into the method.
Although derives from FrameworkElement, various properties of that come from FrameworkElement and other intermediate classes such as UIElement are not generally mapped to possible Win32 equivalents. Also, not all FrameworkElement / UIElement input events transfer across the interoperation boundary. derives from FrameworkElement primarily so that an instance can be inserted into the widest variety of possible content models, and so that default FrameworkElement layout characteristics can apply. For more details on , see WPF and Win32 Interoperation Overview.
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.