语言

WebPart.CreateEditorParts 方法

定义

返回自定义 EditorPart 控件的集合,该控件可用于在处于编辑模式时编辑 WebPart 控件。

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包含与EditorPart控件关联的自定义WebPart控件。

实现

注解

开发人员可以使用此方法创建要与EditorPart控件关联的自定义WebPart控件的实例。 当用户单击 WebPart 控件上的编辑谓词时,将调用该方法。

注释

此方法中创建的控件的任何新实例 EditorPart 都必须为其 ID 属性赋值,然后才能将其添加到 EditorParts 集合中。

有关使用该方法的 CreateEditorParts 代码示例,请参阅 EditorPart 类概述。

适用于

另请参阅