C# Class System.ComponentModel.Design.DesignerOptionService

Inheritance: IDesignerOptionService
显示文件 Open project: dotnet/corefx Class Usage Examples

Protected Methods

Method Description
CreateOptionCollection ( DesignerOptionCollection parent, string name, object value ) : DesignerOptionCollection

Creates a new DesignerOptionCollection with the given name, and adds it to the given parent. The "value" parameter specifies an object whose public properties will be used in the Propeties collection of the option collection. The value parameter can be null if this options collection does not offer any properties. Properties will be wrapped in such a way that passing anything into the component parameter of the property descriptor will be ignored and the value object will be substituted.

PopulateOptionCollection ( DesignerOptionCollection options ) : void

This method is called on demand the first time a user asks for child options or properties of an options collection.

ShowDialog ( DesignerOptionCollection options, object optionObject ) : bool

This method must be implemented to show the options dialog UI for the given object.

Private Methods

Method Description
GetOptionProperty ( string pageName, string valueName ) : PropertyDescriptor

Retrieves the property descriptor for the given page / value name. Returns null if the property couldn't be found.

IDesignerOptionService ( string pageName, string valueName ) : object

Gets the value of an option defined in this package.

IDesignerOptionService ( string pageName, string valueName, object value ) : void

Sets the value of an option defined in this package.

Method Details

CreateOptionCollection() protected method

Creates a new DesignerOptionCollection with the given name, and adds it to the given parent. The "value" parameter specifies an object whose public properties will be used in the Propeties collection of the option collection. The value parameter can be null if this options collection does not offer any properties. Properties will be wrapped in such a way that passing anything into the component parameter of the property descriptor will be ignored and the value object will be substituted.
protected CreateOptionCollection ( DesignerOptionCollection parent, string name, object value ) : DesignerOptionCollection
parent DesignerOptionCollection
name string
value object
return DesignerOptionCollection

PopulateOptionCollection() protected method

This method is called on demand the first time a user asks for child options or properties of an options collection.
protected PopulateOptionCollection ( DesignerOptionCollection options ) : void
options DesignerOptionCollection
return void

ShowDialog() protected method

This method must be implemented to show the options dialog UI for the given object.
protected ShowDialog ( DesignerOptionCollection options, object optionObject ) : bool
options DesignerOptionCollection
optionObject object
return bool