DesignerOptionService.CreateOptionCollection 方法

定義

使用指定名稱建立新的 DesignerOptionService.DesignerOptionCollection,並將其加入指定的父代。

protected:
 System::ComponentModel::Design::DesignerOptionService::DesignerOptionCollection ^ CreateOptionCollection(System::ComponentModel::Design::DesignerOptionService::DesignerOptionCollection ^ parent, System::String ^ name, System::Object ^ value);
protected System.ComponentModel.Design.DesignerOptionService.DesignerOptionCollection CreateOptionCollection (System.ComponentModel.Design.DesignerOptionService.DesignerOptionCollection parent, string name, object value);
member this.CreateOptionCollection : System.ComponentModel.Design.DesignerOptionService.DesignerOptionCollection * string * obj -> System.ComponentModel.Design.DesignerOptionService.DesignerOptionCollection
Protected Function CreateOptionCollection (parent As DesignerOptionService.DesignerOptionCollection, name As String, value As Object) As DesignerOptionService.DesignerOptionCollection

參數

parent
DesignerOptionService.DesignerOptionCollection

父設計工具選項集合。 除根物件集合之外的所有集合都具有父代。

name
String

這個集合的名稱。

value
Object

提供這個集合屬性的物件。 如果集合不應提供任何屬性,則可為 null

傳回

具有給定名稱的新 DesignerOptionService.DesignerOptionCollection

例外狀況

parentnamenull

name 為空字串。

備註

參數 value 會指定物件,其公用屬性用於 Properties 選項集合的集合中。 如果這個選項集合未提供任何屬性,則 value 參數可以是 null 。 屬性會以將任何項目傳遞至的元件參數 PropertyDescriptor 的方式包裝,並 value 取代物件。

適用於

另請參閱