共用方式為


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 類別概觀。

適用於

另請參閱