Style.Item[String] 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得符合 styleName 參數中特定名稱的指定樣式值。 在 C# 中,這個屬性是 Style 類別的索引子。
public:
virtual property System::Object ^ default[System::String ^] { System::Object ^ get(System::String ^ styleName); };
public override object this[string styleName] { get; }
member this.Item(string) : obj
Default Public Overrides ReadOnly Property Item(styleName As String) As Object
參數
- styleName
- String
要在集合中搜尋的樣式名稱。
屬性值
object,其中包含符合 styleName 參數中特定名稱的指定樣式值。
備註
在 Microsoft JScript 中,您可以使用類型所定義的預設索引屬性,但無法明確定義自己的屬性。 但是,在類別上指定 expando 屬性 (Attribute) 會自動提供預設索引屬性 (Property),該屬性 (Property) 的類型為 Object 而且索引類型為 String。