편집

다음을 통해 공유


HwndSourceParameters Constructors

Definition

Initializes a new instance of the HwndSourceParameters class. Do not use the parameterless constructor for HwndSourceParameters; see Remarks.

Overloads

HwndSourceParameters(String)

Initializes a new instance of the HwndSourceParameters class with a specified window name.

HwndSourceParameters(String, Int32, Int32)

Initializes a new instance of the HwndSourceParameters class with a specified window name and initial size.

Remarks

Important

Do not construct instances of this structure using the default (parameterless) constructor. An HwndSourceParameters instance that is created by the parameterless constructor results in HwndSourceParameters that cannot be assigned a WindowName (even though the WindowName property appears to be settable). If such an instance is applied as the parameters for an HwndSource constructor, the resulting HwndSource cannot display a window.

HwndSourceParameters(String)

Initializes a new instance of the HwndSourceParameters class with a specified window name.

public:
 HwndSourceParameters(System::String ^ name);
public HwndSourceParameters (string name);
new System.Windows.Interop.HwndSourceParameters : string -> System.Windows.Interop.HwndSourceParameters
Public Sub New (name As String)

Parameters

name
String

The window's name.

See also

Applies to

HwndSourceParameters(String, Int32, Int32)

Initializes a new instance of the HwndSourceParameters class with a specified window name and initial size.

public:
 HwndSourceParameters(System::String ^ name, int width, int height);
public HwndSourceParameters (string name, int width, int height);
new System.Windows.Interop.HwndSourceParameters : string * int * int -> System.Windows.Interop.HwndSourceParameters
Public Sub New (name As String, width As Integer, height As Integer)

Parameters

name
String

The window's name.

width
Int32

The window's width, in pixels.

height
Int32

The window's height, in pixels.

Remarks

Do not pass 0 (zero) for either the width or height parameters. Although the method eventually succeeds, even if you do pass 0, a significant performance penalty occurs.

See also

Applies to