IViewDefinitions.NewElementDef Method
Namespace: NextDesign.Core
Description
Creates an editor element definition for the specified model class.
Arguments
| Name | Type | Description |
|---|---|---|
| editor | IEditorDef | Editor Definition |
| name | string | Editor element definition name |
| modelClass | IClass | Model metaclass |
| type | string | Editor element type - "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 if you want to define it 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 not specified - Metaclass not specified |
| Invalid type | ExtensionInvalidTypeException | If an unsupported editor element type is specified - An unsupported element type is specified in type - The parameter specification conflicts with the type specified in type |
| Field not found | ExtensionFieldNotFoundException | If the field specified by the path was not found |
| Duplicate definition | ExtensionDuplicationException | If the view element definition name is duplicated |