LoginStatusDesigner Class
Assembly: System.Design (in system.design.dll)
The LoginStatus control renders a button that automatically checks the authentication status of the user and displays the appropriate login or logout option.
In a visual designer, when you switch from Source to Design view, the markup source code that describes the LoginStatus 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 LoginStatusDesigner class provides design-time support for the LoginStatus control.
The ActionLists property returns a DesignerActionListCollection object, which typically contains an object that is derived from the DesignerActionList class for each level in the inheritance tree of the designer. The UsePreviewControl property always returns true, indicating that the designer creates a temporary copy of the associated LoginStatus to generate the design-time markup, since the user authentication status is not available at design time.
The GetDesignTimeHtml method returns the markup that is used to render the associated LoginStatus at design time. The Initialize method prepares the designer to view, edit, and design the associated LoginStatus.
The following code example shows how to extend the LoginStatusDesigner class to change the appearance of controls that are derived from the LoginStatus control at design time.
The example derives the MyLoginStatus control from the LoginStatus. The MyLoginStatus is a copy of the LoginStatus control. The example also derives the MyLoginStatusDesigner class from LoginStatusDesigner, and then applies a DesignerAttribute attribute for the MyLoginStatusDesigner on the MyLoginStatus control.
The MyLoginStatusDesigner overrides the GetDesignTimeHtml method to draw a blue, dashed border around the control to make it more visible, if the BorderStyle property of the MyLoginStatus is the NotSet or None value.
System.ComponentModel.Design.ComponentDesigner
System.Web.UI.Design.HtmlControlDesigner
System.Web.UI.Design.ControlDesigner
System.Web.UI.Design.WebControls.CompositeControlDesigner
System.Web.UI.Design.WebControls.LoginStatusDesigner
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
LoginStatusDesigner MembersSystem.Web.UI.Design.WebControls Namespace
LoginStatus
CompositeControl
WebControl
CompositeControlDesigner Class
ControlDesigner Class
HtmlControlDesigner Class
ComponentDesigner
Other Resources
ASP.NET Control Designers OverviewWalkthrough: Creating a Basic Control Designer for a Web Server Control