PropertyPath 類別

定義

實作資料結構,用以將屬性描述為另一個屬性下或擁有者型別下的路徑。 屬性路徑會用於物件的資料繫結,以及分鏡腳本與時間表的動畫。

public ref class PropertyPath sealed
[System.ComponentModel.TypeConverter(typeof(System.Windows.PropertyPathConverter))]
public sealed class PropertyPath
[<System.ComponentModel.TypeConverter(typeof(System.Windows.PropertyPathConverter))>]
type PropertyPath = class
Public NotInheritable Class PropertyPath
繼承
PropertyPath
屬性

備註

這個類別包含字串 Path ,以及字串 Path 中為 PathParameters 的相依性屬性清單。

PropertyPath 支援兩種行為模式:

來源模式 描述做為其他作業來源之屬性的路徑。 類別會 Binding 使用此模式來支援資料系結。

目標模式 描述將設定為目標屬性的路徑。 動畫支援分鏡腳本和時間軸 setter 時,會使用此模式。

例如, Background.Opacity 是雙步驟路徑。 此路徑表示:首先,尋找 Background 物件的 屬性、取得屬性設定為的值 Opacity 物件 Background ,然後取得該物件上的 屬性值。

XAML Attribute Usage

<object property="propertyPath" .../>  

XAML 值

propertyPath
評估為簡單或複雜屬性路徑的字串。 在 XAML 中設定 PropertyPath 的語法十分實用,但複雜,而且會在 個別主題 PropertyPath XAML 語法中描述。

建構函式

PropertyPath(Object)

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

PropertyPath(String, Object[])

使用提供的路徑語彙基元 (Token) 字串和參數,初始化 PropertyPath 類別的新執行個體。

屬性

Path

取得或設定描述路徑的字串。

PathParameters

取得要使用的參數之清單,這些參數會在路徑參考索引參數時使用。

方法

Equals(Object)

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

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetType()

取得目前執行個體的 Type

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
ToString()

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

(繼承來源 Object)

適用於

另請參閱