TitleStyle::Wrap Property

 

Gets or sets a value indicating whether the contents of the title bar for a part control wrap in the title bar.

Namespace:   System.Web.UI.WebControls.WebParts
Assembly:  System.Web (in System.Web.dll)

public:
property bool Wrap {
	virtual bool get() override;
	virtual void set(bool value) override;
}

Property Value

Type: System::Boolean

true if the contents of a title bar wrap in the title bar; otherwise, false. The default is false.

The TitleStyle class overrides the base Wrap property so that it can set the value to false. The TitleStyle sets the Wrap property to false, so that by default, a title bar for a part control does not allow its contents to wrap.

The following code example demonstrates the declarative use of the Wrap property. In the code for the following page, an <asp:calendar> element and an <asp:label> element appear within a zone, which gives the corresponding controls genuine Web Parts functionality at run time.

Notice that the <parttitlestyle> element, which contains several style attributes, applies to the title bars of both Web Parts controls contained within the zone. Notice also that the <parttitlestyle> element has wrap and width attributes. Because the Wrap property value is set to true, and the text in the title bars of the two controls is wider than the value assigned to the width attribute, the title bar text of each control wraps when the page is loaded in a browser.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0
Return to top
Show: