ViewStyle Element (List)
Applies to: SharePoint Foundation 2010
Contains the definition of a view style for a list.
<ViewStyle
BaseType = "Integer" | "Text"
Description = "Text"
DisplayName = "Text"
ID = "Counter"
Preview = "Text"
Type = "Integer">
</ViewStyle>
Attributes
Attribute |
Description |
---|---|
BaseType |
Optional. Specifies the base type of the list. The BaseType attribute can be set to Integer, which stores values as integers, or to Text (default), which stores values as text. |
Description |
Optional Text. Contains a description for the view style. |
DisplayName |
Required Text. Specifies the display name of the view style. |
ID |
Required Counter. Specifies the ID that uniquely identifies the view style. |
Preview |
Optional Text. Specifies the site-relative path to a preview image for the view style. For example, _layouts/images/prvpicl.gif. |
Type |
Optional Integer. Specifies the list definition type. |
Child Elements
Element |
---|
GroupByFooter, GroupByHeader, PagedClientCallbackRowset, PagedRecurrenceRowset, PagedRowset, ScriptViewBidiHeader, ViewBody, ViewEmpty, ViewFields, ViewFooter, ViewHeader |
Parent Elements
Occurrences
Minimum: 0 Maximum: 1 (Unbounded within ViewStyles) |
Example
The following example outlines the sections contained within the Boxed view style of a ViewStyles.xml file.
<ViewStyle ID="13" DisplayName="Boxed" BaseType="0">
<ViewFields />
<GroupByHeader>
...
</GroupByHeader>
<GroupByFooter>
...
</GroupByFooter>
<ViewHeader ExpandXML="TRUE">
...
</ViewHeader>
<ViewBidiHeader ExpandXML="TRUE">
...
</ViewBidiHeader>
<ViewBody ExpandXML="TRUE">
...
</ViewBody>
<ViewFooter ExpandXML="TRUE">
...
</ViewFooter>
<PagedRowset>
...
</PagedRowset>
<PagedRecurrenceRowset>
...
</PagedRecurrenceRowset>
<RowLimit Paged="TRUE">100</RowLimit>
<ViewEmpty>
...
</ViewEmpty>
...
</ViewStyle>