WebPartPreview.WebPart Property
Gets a read-only copy of a Web Part to be displayed only on the Web Part preview page of the Web Part catalog.
Namespace: Microsoft.SharePoint.WebPartPages
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Syntax
'Declaration
Public ReadOnly Property WebPart As WebPart
Get
'Usage
Dim instance As WebPartPreview
Dim value As WebPart
value = instance.WebPart
public WebPart WebPart { get; }
Property Value
Type: System.Web.UI.WebControls.WebParts.WebPart
A Microsoft.SharePoint.WebPartPages.WebPart object that is a read-only copy of the Web Part to be displayed on the Web Part preview page of the Web Part catalog.
Remarks
The WebPart property gets a Web Part control that is meant to be used in only the Web Part preview page of the Web Part catalog (wpprevw.aspx). The Web Part preview page is stored in the _layouts folder, and similar to files in this folder, it is read-only.