SPPictureLibrary Class
The SPPictureLibrary class represents a document library that contains pictures.
System.Object
Microsoft.SharePoint.SPDocumentLibrary
Microsoft.SharePoint.SPPictureLibrary
Public Properties
The following table shows the public properties of the SPPictureLibrary class, the data type of each property, and a brief description of each.
Name | Data type | Description |
---|---|---|
ThumbnailSize | Int32 | Gets or sets the size in pixels of the height or width, whichever is longest, to use for thumbnails in the picture library. |
WebImageHeight | Int32 | Gets or sets the height in pixels used to display images in the picture library. |
WebImageWidth | Int32 | Gets or sets the width in pixels used to display images in the picture library. |
Thread Safety
Any public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread safe.
Remarks
To obtain an SPPictureLibrary object, cast the given list as a picture library, as follows:
[Visual Basic .NET]
Dim pictureLibrary As SPPictureLibrary = CType(list, SPPictureLibrary)
[C#]
SPPictureLibrary pictureLibrary = (SPPictureLibrary)list;
Caution Changing the values of the properties listed in the previous table may lead to adverse effects in the user interface and is not supported.
Example
The following code example displays property settings for the size of images used in a picture library on the specified site.
This example requires using directives (Imports in Visual Basic) for both the Microsoft.SharePoint and Microsoft.SharePoint.WebControls namespaces.
Requirements
Namespace: Microsoft.SharePoint
Platforms: Microsoft Windows Server 2003
Assembly: Windows SharePoint Services (in Microsoft.SharePoint.dll)
Security: Code Access Security