Export (0) Print
Expand All

LabelDesigner Class

Provides design-time support in a visual designer for the Label Web server control.

Namespace: System.Web.UI.Design.WebControls
Assembly: System.Design (in system.design.dll)

public ref class LabelDesigner : public TextControlDesigner
public class LabelDesigner extends TextControlDesigner
public class LabelDesigner extends TextControlDesigner
Not applicable.

The Label control allows text to be displayed programmatically on a Web page.

In a visual designer, when you switch from Source to Design view, the markup source code that describes a Label control is parsed and a design-time version of the control is created on the design surface. When you switch back to Source view, the design-time control is persisted to the markup source code and edited into the markup for the Web page. The LabelDesigner class provides design-time support for the Label control.

The OnComponentChanged method is called when there is a change to the associated Label control.

The following code example shows how to derive the SampleLabel control from the Label control, and applies a DesignerAttribute attribute on the SampleLabel control to associate it with the SampleLabelDesigner class.

The code example also derives the SampleLabelDesigner from the LabelDesigner class. It overrides the GetDesignTimeHtml method to set the BorderStyle property to Dashed, if the original BorderStyle was the NotSet or None value. This improves the visibility of the associated control at design time.

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

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show:
© 2014 Microsoft