Nevron .NET Vision
Diagram for .NET / User's Guide / Document Object Model / Diagram Elements

In This Topic
    Diagram Elements
    In This Topic
    In Nevron Diagram for .NET all types of elements, which can reside in a document derive from the base NDiagramElement class. This topic outlines the logical classification of the different diagram elements.
     Class Hierarchy

    The following image illustrates the diagram elements class hierarchy:

    Logically the elements in this hierarchy can be divided into several categories:

     Collections, Stencils and Masters

    Collections are composite elements the purpose of which is to contain other elements of specific type. For example: the port collection can only contain ports, the layer collection can only contain layers etc.. The root class for all types of collections is the NDiagramElementCollection class.

    Stencils are specific types of collections, which are used to store transformable content. This content can be displayed on multiple places in the diagram. For example: a specific arrowhead shape can appear at the start and end points of several lines, but the diagram will only store a single definition for this shape. Stencils help you minimize the memory footprint and the consistency of the drawing.

    See Collections and Stencils for more information.

    Masters are used to store content, which can instanced in multiple drawings. Masters help you reuse shapes and configurations of shapes. Masters are stored in libraries. See Library Documents for more information about masters.

     Styleable Elements and Stylesheets

    Styleable elements are such elements to which you can apply a style. Styleable elements can reuse styles from stylesheets or other styleable elements below it in the hierarchy. Since the NStyleableElement class is pretty low in the hierarchy this means that styling is supported for almost all major elements that you use in the diagram.

    See Styles, Style Composition and Style Sheets for more information.

     Shapes and Models

    Shapes are the primary diagram building blocks and are used to represent objects from the real world, concepts or abstractions. Shapes can be connected with each other and be involved in complex relationships. Shapes can have additional elements like labels, ports, plugs and control points. See Shapes for more information about shapes.

    Shapes are in fact aggregate models (models assembled from other primitive and/or aggregate models). The primary content of a diagram is in this way defined by hierarchically organized models. See Models for more information about models.

    See Also