Hosts a Win32 window as an element within Windows Presentation Foundation (WPF) content.
Namespace:
System.Windows.Interop
Assembly:
PresentationFramework (in PresentationFramework.dll)
Visual Basic (Declaration)
<SecurityPermissionAttribute(SecurityAction.InheritanceDemand, Flags := SecurityPermissionFlag.UnmanagedCode)> _
Public MustInherit Class HwndHost _
Inherits FrameworkElement _
Implements IDisposable, IWin32Window, IKeyboardInputSink
[SecurityPermissionAttribute(SecurityAction.InheritanceDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
public abstract class HwndHost : FrameworkElement,
IDisposable, IWin32Window, IKeyboardInputSink
[SecurityPermissionAttribute(SecurityAction::InheritanceDemand, Flags = SecurityPermissionFlag::UnmanagedCode)]
public ref class HwndHost abstract : public FrameworkElement,
IDisposable, IWin32Window, IKeyboardInputSink
public abstract class HwndHost extends FrameworkElement implements IDisposable, IWin32Window, IKeyboardInputSink
This class is abstract; see Inheritance Hierarchy for derived non-abstract classes usable in XAML.
To host a Win32 window, create a class that derives from HwndHost. Override the BuildWindowCore method and create your Win32 window as a child of the parent window that is passed into the method.
System..::.Object
System.Windows.Threading..::.DispatcherObject
System.Windows..::.DependencyObject
System.Windows.Media..::.Visual
System.Windows..::.UIElement
System.Windows..::.FrameworkElement
System.Windows.Interop..::.HwndHost
System.Windows.Forms.Integration..::.WindowsFormsHost
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
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.
.NET Framework
Supported in: 3.5, 3.0
Reference
Other Resources