HwndSourceParameters 結構

定義

包含用於利用 HwndSource 建構函式建立 HwndSource(HwndSourceParameters) 物件的參數。

public value class HwndSourceParameters
public struct HwndSourceParameters
type HwndSourceParameters = struct
Public Structure HwndSourceParameters
繼承
HwndSourceParameters

備註

這個結構只會用於 HwndSource 物件建構函式呼叫中。

建構 時 HwndSource ,這個結構所建立其值的屬性不會直接在 實例上 HwndSource 公開。 不過,結構的值 HwndSourceParameters 通常會影響存在於特定裝載物件及其 API 中的一般 UI 屬性,例如「高度」和「寬度」。

重要

請勿使用預設 (無參數) 建構函式來建構這個 結構的實例。 HwndSourceParameters無參數建構函式所建立的實例會導致 HwndSourceParameters 無法指派 WindowName (,即使 WindowName 屬性似乎可設定) 也一樣。 如果這類實例套用為建構函式的參數 HwndSource ,則產生的 HwndSource 無法顯示視窗。

建構函式

HwndSourceParameters(String)

使用指定的視窗名稱,初始化 HwndSourceParameters 類別 (Class) 的新執行個體。

HwndSourceParameters(String, Int32, Int32)

使用指定的視窗名稱和初始大小,初始化 HwndSourceParameters 類別的新執行個體。

屬性

AcquireHwndFocusInMenuMode

取得或設定值,這個值決定是否在建立 HwndSource 時,為包含 WPF 的視窗取得 Win32 焦點。

AdjustSizingForNonClientArea

取得或設定值,這個值表示是否包含要調整的非工作區大小。

ExtendedWindowStyle

取得或設定視窗的擴充 Microsoft Windows樣式。

HasAssignedSize

取得值,這個值表示是否已指派大小。

Height

取得或設定值,這個值表示視窗的高度。

HwndSourceHook

取得或設定視窗的訊息勾點。

ParentWindow

取得或設定所建立視窗之父系的視窗控制代碼 (HWND)。

PositionX

取得或設定視窗的左邊緣位置。

PositionY

取得或設定視窗的上邊緣位置。

RestoreFocusMode

取得或設定 WPF 將焦點還原至視窗的處理方式。

TreatAncestorsAsNonClientArea

取得或設定值,指出 HwndSource 的父視窗在配置階段是否應視為視窗的非工作區。

TreatAsInputRoot

取得或設定值,指出 HwndSource 是否應該會收到訊息幫浦透過 ComponentDispatcher 所引發的視窗訊息。

UsesPerPixelOpacity

取得值,這個值會宣告是否遵守來源視窗內容之每像素的不透明度。

UsesPerPixelTransparency

取得值,這個值會宣告是否遵守來源視窗內容之每像素的不透明度。

Width

取得或設定值,這個值表示視窗的寬度。

WindowClassStyle

取得或設定視窗的 Microsoft Windows 類別樣式。

WindowName

取得或設定視窗的名稱。

WindowStyle

取得或設定視窗的樣式。

方法

Equals(HwndSourceParameters)

判斷這個結構是否等於指定的 HwndSourceParameters 結構。

Equals(Object)

判斷這個結構是否等於指定的物件。

GetHashCode()

傳回這個 HwndSourceParameters 執行個體的雜湊碼。

SetPosition(Int32, Int32)

設定用於 HwndSource 視窗之螢幕位置的值。

SetSize(Int32, Int32)

設定用於 HwndSource 視窗大小的值。

運算子

Equality(HwndSourceParameters, HwndSourceParameters)

判斷 HwndSourceParameters 結構是否等於另一個 HwndSourceParameters 結構。

Inequality(HwndSourceParameters, HwndSourceParameters)

判斷 HwndSourceParameters 結構是否不等於另一個 HwndSourceParameters 結構。

適用於

另請參閱