LabelDesigner Class
Assembly: System.Design (in system.design.dll)
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.
- SecurityPermission for calling unmanaged code. Demand value: Demand. Permission value: UnmanagedCode
System.ComponentModel.Design.ComponentDesigner
System.Web.UI.Design.HtmlControlDesigner
System.Web.UI.Design.ControlDesigner
System.Web.UI.Design.TextControlDesigner
System.Web.UI.Design.WebControls.LabelDesigner
Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.
Reference
LabelDesigner MembersSystem.Web.UI.Design.WebControls Namespace
Label
WebControl
BorderStyle
TextControlDesigner Class
ControlDesigner Class
HtmlControlDesigner Class
ComponentDesigner
Other Resources
ASP.NET Control Designers OverviewWalkthrough: Creating a Basic Control Designer for a Web Server Control