CmsDataFormWebPart.CreateToolPartToggleSwitch method
Creates the controls for toggling sections of a Tool Part.
Namespace: Microsoft.SharePoint.Publishing.WebControls
Assembly: Microsoft.SharePoint.Publishing (in Microsoft.SharePoint.Publishing.dll)
Syntax
'Declaration
Public Shared Function CreateToolPartToggleSwitch ( _
toolPart As Control, _
expandToolTip As String, _
collapseToolTip As String, _
displayText As String, _
id As String, _
helpTopic As String, _
removeUserSectionTitleBorder As Boolean _
) As HtmlGenericControl
'Usage
Dim toolPart As Control
Dim expandToolTip As String
Dim collapseToolTip As String
Dim displayText As String
Dim id As String
Dim helpTopic As String
Dim removeUserSectionTitleBorder As Boolean
Dim returnValue As HtmlGenericControl
returnValue = CmsDataFormWebPart.CreateToolPartToggleSwitch(toolPart, _
expandToolTip, collapseToolTip, _
displayText, id, helpTopic, removeUserSectionTitleBorder)
public static HtmlGenericControl CreateToolPartToggleSwitch(
Control toolPart,
string expandToolTip,
string collapseToolTip,
string displayText,
string id,
string helpTopic,
bool removeUserSectionTitleBorder
)
Parameters
toolPart
Type: System.Web.UI.ControlThe tool part for which the toggle switch is being created.
expandToolTip
Type: System.StringThe tooltip text for the expand button.
collapseToolTip
Type: System.StringThe tooltip text for the collapse button.
displayText
Type: System.StringThe text displayed for the control.
id
Type: System.StringThe ID of the control.
helpTopic
Type: System.StringThe help topic associated with the toggle control.
removeUserSectionTitleBorder
Type: System.BooleanWhen true, removes the bottom border from the header.
Return value
Type: System.Web.UI.HtmlControls.HtmlGenericControl
The toggle controls for the tool part.
Remarks
Avoid a thick border with the default Web Part headers by setting the removeUserSectionTitleBorder parameter to true for the last call to the CreateToolPartToggleSwitch(System.Web.UI.Control,System.String,System.String,System.String,System.String,System.String,System.Boolean) method.