ToolPane.SelectedWebPart Property
Gets the currently selected WebPart.
Namespace: Microsoft.SharePoint.WebPartPages
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Syntax
'Declaration
Public ReadOnly Property SelectedWebPart As WebPart
Get
'Usage
Dim instance As ToolPane
Dim value As WebPart
value = instance.SelectedWebPart
public WebPart SelectedWebPart { get; }
Property Value
Type: Microsoft.SharePoint.WebPartPages.WebPart
The Web Part that is currently selected.
Remarks
Use this property in views where Web Part selection is supported, such as the Extensible view and the Properties view. If no Web Part is selected, or the view does not support selection, the SelectedWebPart property returns a null reference (Nothing in Visual Basic). Setting this property causes the tool pane to close and reopen in the same view.