AmbientProperties 類別

定義

提供最上層控制項的環境屬性 (Ambient Property) 值。

public ref class AmbientProperties sealed
public sealed class AmbientProperties
type AmbientProperties = class
Public NotInheritable Class AmbientProperties
繼承
AmbientProperties

備註

環境屬性是控制項上的屬性,如果未設定,則會從父控制項擷取。 如果控制項沒有父代且屬性未設定,控制項會嘗試透過 Site 屬性尋找環境屬性的值。 如果未月臺控制項,則月臺不支援環境屬性,或未在 物件上 AmbientProperties 設定 屬性,則會 Control 使用自己的預設值。 衍生自 類別的某些 Control 物件可能會設定 屬性,即使您未這麼做也一樣。 例如,類別 Form 一律會設定 ForeColorBackColor 屬性。

建構函式

AmbientProperties()

初始化 AmbientProperties 類別的新執行個體。

屬性

BackColor

取得或設定物件的環境背景色彩。

Cursor

取得或設定物件的環境游標。

Font

取得或設定物件的環境字型。

ForeColor

取得或設定物件的前景色彩。

方法

Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetType()

取得目前執行個體的 Type

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
ToString()

傳回代表目前物件的字串。

(繼承來源 Object)

適用於

另請參閱