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)

public static HtmlGenericControl CreateToolPartToggleSwitch(
	Control toolPart,
	string expandToolTip,
	string collapseToolTip,
	string displayText,
	string id,
	string helpTopic,
	bool removeUserSectionTitleBorder
)

Parameters

toolPart
Type: System.Web.UI.Control

The tool part for which the toggle switch is being created.

expandToolTip
Type: System.String

The tooltip text for the expand button.

collapseToolTip
Type: System.String

The tooltip text for the collapse button.

displayText
Type: System.String

The text displayed for the control.

id
Type: System.String

The ID of the control.

helpTopic
Type: System.String

The help topic associated with the toggle control.

removeUserSectionTitleBorder
Type: System.Boolean

When true, removes the bottom border from the header.

Return value

Type: System.Web.UI.HtmlControls.HtmlGenericControl
The toggle controls for the tool part.

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.

Show: