SPViewStyleCollection.StyleByID Method
Returns the view style with the specified ID from the collection.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
Syntax
'Declaration
Public Function StyleByID ( _
ID As Integer _
) As SPViewStyle
'Usage
Dim instance As SPViewStyleCollection
Dim ID As Integer
Dim returnValue As SPViewStyle
returnValue = instance.StyleByID(ID)
public SPViewStyle StyleByID(
int ID
)
Parameters
ID
Type: System.Int32A 32-bit integer that specifies the ID of the view style.
Return Value
Type: Microsoft.SharePoint.SPViewStyle
An SPViewStyle object that represents the view style.
Remarks
To return a style, the StyleByID method uses the ID specified in the file VWSTYLE.XML, while the Item property uses the index of the style in the collection.
The following table shows the IDs and names of view styles that are included in the original installation of Microsoft Windows SharePoint Services.
Value |
Description |
---|---|
0 |
Basic Table |
6 |
Picture Library Details |
7 |
No name |
8 |
No name |
9 |
No name |
12 |
Boxed, no labels |
13 |
Boxed |
14 |
Document Details |
15 |
Newsletter |
16 |
Newsletter, no lines |
17 |
Shaded |
18 |
Issues Boxed |
19 |
Issues Boxed, no labels |