WebPart.CreateEditorParts 方法

定义

返回自定义 EditorPart 控件的集合,这些控件可用于在 WebPart 控件处于编辑模式时对其进行编辑。Returns a collection of custom EditorPart controls that can be used to edit a WebPart control when it is in edit mode.

public:
 virtual System::Web::UI::WebControls::WebParts::EditorPartCollection ^ CreateEditorParts();
public virtual System.Web.UI.WebControls.WebParts.EditorPartCollection CreateEditorParts ();
abstract member CreateEditorParts : unit -> System.Web.UI.WebControls.WebParts.EditorPartCollection
override this.CreateEditorParts : unit -> System.Web.UI.WebControls.WebParts.EditorPartCollection
Public Overridable Function CreateEditorParts () As EditorPartCollection

返回

EditorPartCollection

一个 EditorPartCollection,包含与 EditorPart 控件关联的自定义 WebPart 控件。An EditorPartCollection that contains custom EditorPart controls associated with a WebPart control.

实现

注解

开发人员可以使用此方法创建 EditorPart 要与控件关联的自定义控件的实例 WebPartDevelopers can use this method to create instances of custom EditorPart controls that they want to associate with a WebPart control. 当用户单击控件上的编辑谓词时,将调用方法 WebPartThe method is called when a user clicks the edit verb on a WebPart control.

备注

EditorPart在此方法中创建的控件的任何新实例都必须有一个赋值给其 ID 属性的值,然后才能将其添加到 EditorParts 集合中。Any new instance of an EditorPart control that is created in this method must have a value assigned to its ID property before it can be added to the EditorParts collection.

有关使用方法的代码示例 CreateEditorParts ,请参阅 EditorPart 类概述。For a code example that uses the CreateEditorParts method, see the EditorPart class overview.

适用于

另请参阅