This documentation is archived and is not being maintained.

ElementHost.HostContainer Property

Gets the parent container of the hosted Windows Presentation Foundation (WPF) element. 

Namespace:  System.Windows.Forms.Integration
Assembly:  WindowsFormsIntegration (in WindowsFormsIntegration.dll)

public Panel HostContainer { get; }

Property Value

Type: System.Windows.Controls.Panel
The parent container.

The host container is the WPF FrameworkElement, which is the parent container for the hosted element. The host container is always at the root of the WPF element hierarchy. To access the parent of the hosted element, access HostContainer directly.

.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.