This documentation is archived and is not being maintained.

EditableDesignerRegion Class

Represents an editable content region within the design-time markup for the associated control.

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

public ref class EditableDesignerRegion : public DesignerRegion

The EditableDesignerRegion type exposes the following members.

  NameDescription
Public methodEditableDesignerRegion(ControlDesigner, String)Initializes a new instance of the EditableDesignerRegion class using the given owner and name.
Public methodEditableDesignerRegion(ControlDesigner, String, Boolean)Creates a new instance of the EditableDesignerRegion class using the given owner and name and the initial value of the ServerControlsOnly property.
Top

  NameDescription
Public propertyContentGets or sets the HTML markup for the content of the region.
Public propertyDescriptionGets or sets the description for a designer region. (Inherited from DesignerRegion.)
Public propertyDesignerGets the associated designer component. (Inherited from DesignerObject.)
Public propertyDisplayNameGets or sets the friendly display name for a designer region. (Inherited from DesignerRegion.)
Public propertyEnsureSizeGets or sets a value indicating whether the region size is to be explicitly set on the designer region by the design host. (Inherited from DesignerRegion.)
Public propertyHighlightGets or sets a value indicating whether to highlight the designer region on the design surface. (Inherited from DesignerRegion.)
Public propertyNameGets the name of the object. (Inherited from DesignerObject.)
Public propertyPropertiesGets the object's properties. (Inherited from DesignerObject.)
Public propertySelectableGets or sets a value indicating whether the designer region can be selected by the user on the design surface. (Inherited from DesignerRegion.)
Public propertySelectedGets or sets a value indicating whether the designer region is currently selected on the design surface. (Inherited from DesignerRegion.)
Public propertyServerControlsOnlyGets or sets a value indicating whether the region can accept only Web server controls.
Public propertySupportsDataBindingGets or sets a value indicating whether the region can be bound to a data source.
Public propertyUserDataGets or sets optional user data to associate with the designer region. (Inherited from DesignerRegion.)
Top

  NameDescription
Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetBoundsRetrieves the size of the designer region on the design surface. (Inherited from DesignerRegion.)
Public methodGetChildViewRenderingReturns a ViewRendering object containing the design-time HTML markup for the given control.
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Protected methodGetServiceGets a service from the design host, as identified by the provided type. (Inherited from DesignerObject.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

  NameDescription
Explicit interface implemetationPrivate methodIServiceProvider::GetServiceFor a description of this member, see IServiceProvider::GetService. (Inherited from DesignerObject.)
Top

Use the EditableDesignerRegion class to help manage templates at design time. A ControlDesigner will use an instance of this class with its GetEditableDesignerRegionContent method to generate HTML markup of the region's content.

This example shows how to create a control with two clickable regions and an EditableDesignerRegion object with two views, or templates. Compile the project, then open the page in a visual designer and switch to design (WYSIWYG) view. There are two clickable views, View1 and View2. Click View1 and drag the CheckBox control from the lower part of the page into the empty designer region just below the clickable regions. Click View2 and drag the RadioButton control into the empty designer region. Click View1 again, and the region with the CheckBox reappears. Click View2 and the region with the RadioButton reappears. Switch back to source view to see how your changes are persisted in the HTML markup

NoteNote

Your project must have a reference to the System.Design.dll assembly.

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

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

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