Export (0) Print
Expand All

HwndSourceParameters Structure

Contains the parameters that are used to create an HwndSource object using the HwndSource constructor.

Namespace:  System.Windows.Interop
Assembly:  PresentationCore (in PresentationCore.dll)
XMLNS for XAML: Not mapped to an xmlns.

public struct HwndSourceParameters
<HwndSourceParameters .../>

The HwndSourceParameters type exposes the following members.

  NameDescription
Public methodHwndSourceParameters(String)Initializes a new instance of the HwndSourceParameters class with a specified window name.
Public methodHwndSourceParameters(String, Int32, Int32)Initializes a new instance of the HwndSourceParameters class with a specified window name and initial size.
Top

  NameDescription
Public propertyAcquireHwndFocusInMenuModeGets or sets the value that determines whether to acquire Win32 focus for the WPF containing window when an HwndSource is created.
Public propertyAdjustSizingForNonClientAreaGets or sets a value that indicates whether to include the nonclient area for sizing.
Public propertyExtendedWindowStyleGets or sets the extended Microsoft Windows styles for the window.
Public propertyHasAssignedSizeGets a value that indicates whether a size was assigned.
Public propertyHeightGets or sets a value that indicates the height of the window.
Public propertyHwndSourceHookGets or sets the message hook for the window.
Public propertyParentWindowGets or sets the window handle (HWND) of the parent for the created window.
Public propertyPositionXGets or sets the left-edge position of the window.
Public propertyPositionYGets or sets the upper-edge position of the window.
Public propertyRestoreFocusModeGets or sets how WPF handles restoring focus to the window.
Public propertyTreatAncestorsAsNonClientAreaGets or sets a value that indicates whether the parent windows of the HwndSource should be considered the non-client area of the window during layout passes.
Public propertyTreatAsInputRootGets or sets a value that indicates whether the HwndSource should receive window messages raised by the message pump via the ComponentDispatcher.
Public propertyUsesPerPixelOpacityGets a value that declares whether the per-pixel opacity of the source window content is respected.
Public propertyUsesPerPixelTransparency
Public propertyWidthGets or sets a value that indicates the width of the window.
Public propertyWindowClassStyleGets or sets the Microsoft Windows class style for the window.
Public propertyWindowNameGets or sets the name of the window.
Public propertyWindowStyleGets or sets the style for the window.
Top

  NameDescription
Public methodEquals(HwndSourceParameters)Determines whether this structure is equal to a specified HwndSourceParameters structure.
Public methodEquals(Object)Determines whether this structure is equal to a specified object. (Overrides ValueType.Equals(Object).)
Public methodGetHashCodeReturns the hash code for this HwndSourceParameters instance. (Overrides ValueType.GetHashCode().)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodSetPositionSets the values that are used for the screen position of the window for the HwndSource.
Public methodSetSizeSets the values that are used for the window size of the HwndSource.
Public methodToStringReturns the fully qualified type name of this instance. (Inherited from ValueType.)
Top

  NameDescription
Public operatorStatic memberEqualityDetermines whether an HwndSourceParameters structure is equal to another HwndSourceParameters structure.
Public operatorStatic memberInequalityDetermines whether an HwndSourceParameters structure is not equal to another HwndSourceParameters structure.
Top

This structure is used only in the HwndSource object constructor call.

The properties whose values are established by this structure are not directly exposed on HwndSource instances when an HwndSource is constructed. However, the values of the HwndSourceParameters structure typically affect general UI properties such as "Height" and "Width" that might exist in specific hosted objects and their APIs.

Important noteImportant

Do not construct instances of this structure using the default (parameterless) constructor. An HwndSourceParameters instance that is created by the default 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.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft