IViewDefinitions.NewElementDef method
Namespace: NextDesign.Core
Description
Generates an editor element definition for the specified model class.
argument
Name | Type | Description |
---|---|---|
editor | IEditorDef | Editor definition |
name | string | editor element definition name |
modelClass | IClass | Model Metaclass |
type | string | Editor element types -"SimpleShape": Simple Shape -"CompartmentShape": Compartment Shape -"Port": Port Shape -"ConnectorShape" : Connector Shape -"TextBox": Text Box -"CheckBox": Check Box -"ComboBox": Combo Box -"List": List -"Grid": Grid -"ModelReferenceControl": Model Reference Control |
path | string | Path string of the corresponding metaclass Specify null for elements that do not correspond to the field. The default value is null. |
parent | IElementDef | Parent definition element Specify null when defining as an element directly under the editor definition. The default value is null. |
Return value
Exception
Name | Exception Class | Description |
---|---|---|
Invalid argument | ExtensionArgumentException | If the parameter is invalid -Editor definition is not specified -Metaclass is not specified |
Invalid type | ExtensionInvalidTypeException | When an unsupported editor element type is specified -An unsupported element type is specified for type -The parameter specification is inconsistent with the type specified for type. To |
Field not found | ExtensionFieldNotFoundException | If the field specified in the path is not found |
Duplicate definition | ExtensionDuplicationException | When the view element definition name is duplicated |