EditorPartDesigner Class

Note: This class is new in the .NET Framework version 2.0.

Provides design-time support for EditorPart controls.

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

public class EditorPartDesigner : PartDesigner
public class EditorPartDesigner extends PartDesigner
public class EditorPartDesigner extends PartDesigner

EditorPartDesigner is a public implementation of the PartDesigner base class for the purpose of rendering EditorPart controls at design time. It adds the capability of carrying zone information from the associated control into design view, but does not otherwise change the functionality of the parent control.

As with other control designers, you can change the design-time rendering of custom EditorPart controls by inheriting from EditorPartDesigner and overriding the GetDesignTimeHtml method. If you want to override the CreateViewControl method, be sure to include the base implementation so as to retain zone information.

The following code example creates a simple custom EditorPart control that allows the user to change the ToolTip property of the target control. The associated EditorPartDesigner validates the control and replaces the user input text box at design time with a label explaining that it is hidden.

In order for the custom control to render, the page must have a WebPartManager control, an EditorZone with a ZoneTemplate for the control to reside in, and a WebPartZone containing a control for the custom EditorPart to act on, as shown in the following code example.

For the EditorPart to be usable at run time, edit mode must be enabled on the page. The following code example demonstrates how to do so with a code-behind file.

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 2000 SP4, Windows Millennium Edition, 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.

.NET Framework

Supported in: 2.0