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 控制項。

實作

備註

開發人員可以使用這個方法來建立想要與 WebPart 控制項產生關聯的自訂 EditorPart 控制項實例。 當使用者按一下控制項上的 WebPart 編輯動詞時,會呼叫 方法。

注意

在此方法中建立的任何新控制項實例 EditorPart ,都必須有指派給其 ID 屬性的值,才能將其新增至 EditorParts 集合。

如需使用 方法的程式 CreateEditorParts 代碼範例,請參閱 EditorPart 類別概觀。

適用於

另請參閱