Share via


SPViewStyleCollection.Item property (Int32)

Gets the view style object at the specified index in the collection.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public ReadOnly Default Property Item ( _
    iIndex As Integer _
) As SPViewStyle
    Get
'Usage
Dim instance As SPViewStyleCollection
Dim iIndex As Integer
Dim value As SPViewStyle

value = instance(iIndex)
public SPViewStyle this[
    int iIndex
] { get; }

Parameters

  • iIndex
    Type: System.Int32

    A 32-bit integer that specifies the index.

Property value

Type: Microsoft.SharePoint.SPViewStyle
An SPViewStyle object that represents the view style.

Remarks

To return a style, the Item property uses the index of the style in the collection, while the StyleByID() property uses the ID specified in the file VWSTYLES.XML.

This property throws an ArgumentOutOfRangeException exception if the specified index is outside the valid range of indexes for the collection.

In C#, this property is an indexer for the SharePointSPViewStyleCollection class.

See also

Reference

SPViewStyleCollection class

SPViewStyleCollection members

Item overload

Microsoft.SharePoint namespace