This documentation is archived and is not being maintained.

HwndSource Constructor (HwndSourceParameters)

Initializes a new instance of the HwndSource class by using a structure that contains the initial settings.

Namespace:  System.Windows.Interop
Assembly:  PresentationCore (in PresentationCore.dll)

public HwndSource(
	HwndSourceParameters parameters


Type: System.Windows.Interop.HwndSourceParameters
A structure that contains the parameters that are required to create the window.

Security noteSecurity Note

This method is not available in the Internet security zone.

This constructor signature might be more convenient in certain situations, because the default structure contains some appropriate initial default values.

Important noteImportant

If you use this signature, do not use the default HwndSourceParameters constructor to construct the HwndSourceParameters structure for the parameters value. You must use the HwndSourceParameters constructor that enables you to specify an initial window name. If you use the default HwndSourceParameters constructor and create an HwndSource with it, that HwndSource does not display because an initial window name is a construction requirement for the represented HWND.

.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.