StyleProperties.Item[] Property

Definition

Gets the specified style from the collection.

Overloads

Item[Int32]

Gets the value of the style located in the collection at the position indicated by the index. In C#, this property is the indexer for the StyleProperties class.

Item[String]

Gets the specified style from the collection.

Item[Int32]

Gets the value of the style located in the collection at the position indicated by the index. In C#, this property is the indexer for the StyleProperties class.

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

Parameters

index
Int32

The zero-based index of the style value to find in the collection.

Property Value

An Object containing the value of the style found in the location specified by the index.

Remarks

The objects referenced in the StyleProperties class are the same as those in the Style class, however the Style class differentiates between shared and non-shared properties.

In JScript, you can use the default indexed properties defined by a type, but you cannot explicitly define your own. However, specifying the expando attribute on a class automatically provides a default indexed property whose type is Object and whose index type is String.

Applies to

Item[String]

Gets the specified style from the collection.

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

Parameters

styleName
String

The name of the style.

Property Value

An Object containing the style that matches the name specified in the styleName parameter.

Remarks

Retrieves the parameter from the collection that matches the name specified in the styleName parameter. In C#, this property is the indexer for the StyleProperties class.

The objects referenced in the StyleProperties collections are the same as the Style collection, however the Style class differentiates between shared and non-shared properties.

In JScript, you can use the default indexed properties defined by a type, but you cannot explicitly define your own. However, specifying the expando attribute on a class automatically provides a default indexed property whose type is Object and whose index type is String.

Applies to