StyleProperties.Item[] 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
從集合中取得指定的風格。
多載
| 名稱 | Description |
|---|---|
| Item[Int32] |
取得集合中位於索引位置的樣式值。 在 C# 中,這個屬性就是類別的 StyleProperties 索引器。 |
| Item[String] |
從集合中取得指定的風格。 |
Item[Int32]
取得集合中位於索引位置的樣式值。 在 C# 中,這個屬性就是類別的 StyleProperties 索引器。
public:
property System::Object ^ default[int] { System::Object ^ get(int index); };
public object this[int index] { get; }
member this.Item(int) : obj
Default Public ReadOnly Property Item(index As Integer) As Object
參數
- index
- Int32
在集合中尋找的樣式值的零基索引。
屬性值
an Object 包含在索引指定位置所找到的樣式值。
備註
類別中所 StyleProperties 參考的物件與類別中的 Style 物件相同,但類別 Style 區分共享屬性與非共享屬性。
在 JScript 中,你可以使用類型定義的預設索引屬性,但無法明確定義自己的屬性。 然而,在 expando 類別上指定屬性會自動提供一個預設的索引屬性,其型別為 Object ,索引型別為 String。
適用於
Item[String]
從集合中取得指定的風格。
public:
property System::Object ^ default[System::String ^] { System::Object ^ get(System::String ^ styleName); };
public object this[string styleName] { get; }
member this.Item(string) : obj
Default Public ReadOnly Property Item(styleName As String) As Object
參數
- styleName
- String
這個風格的名稱。
屬性值
An Object 包含與參數中指定 styleName 名稱相符的樣式。
備註
從集合中取得與參數指定 styleName 名稱相符的參數。 在 C# 中,這個屬性就是類別的 StyleProperties 索引器。
集合中 StyleProperties 所參考的物件與集合 Style 相同,但 Style 類別區分共享屬性與非共享屬性。
在 JScript 中,你可以使用類型定義的預設索引屬性,但無法明確定義自己的屬性。 然而,在 expando 類別上指定屬性會自動提供一個預設的索引屬性,其型別為 Object ,索引型別為 String。