Nevron Open Vision Documentation
Diagram / Diagram DOM / Drawings / Themes / Drawing Themes
In This Topic
    Drawing Themes
    In This Topic

    Drawing themes in NOV Diagram are represented by the NDrawingTheme class. The class also contains public static read only fields that expose the predefined drawing themes included in NOV Diagram, for example: MyDrawNature, Office, Linear and so on.

     Theme Structure

    A drawing theme consists of the following components:

    • ColorPalette - contains the colors used in the theme. The color palette also contains 4 variant color palettes, which contains the colors used by each of the 4 theme variants.
    • ShapeStyle - contains the styles used by shapes.
    • ConnectorStyle - contains the styles used by connectors.
    • VariantStyles - contains information about the styles to apply to shapes and connectors for the different variants of the theme.

    A drawing theme also contains the following properties:

    • ThemeId - the id of the theme.
    • Name - the name of the theme.
     Using Themes

    The drawing contains a collection of drawing themes. You can access them through the Themes property of the drawing. Themes are usually referenced by ID. If a theme is not found in the drawing's theme collection, then it is searched for in the global registry of themes of the NDrawingTheme class.

    The drawing page contains the following properties that lets you easily apply any component of a specific drawing theme to it:

    • ThemeId - the id of the default theme applied to this page.
    • ColorThemeId - the id of the theme whose color palette to use.
    • StyleThemeId - the id of the theme whose style component to use.
    • FontThemeId - the if of the theme whose font component to use.
    • ConnectorThemeId - the id of the theme to use for connectors.

    Usually all of these theme id properties will be set to the same value, which means that only one drawing theme is used by the page. Setting them to different theme ids makes it possible to combine components from different drawing themes.

    The following properties specify which theme variant to use for color and which for styles:

    • VariantColorIndex - the variant color index.
    • VariantStyleIndex - the variant style index.

    The same properties are also available in shapes. If not set locally, the values of these properties will be inherited by the page that owns the shape. Thus when you change the theme or variant of a drawing page, the appearance of all shapes in that page will also change, unless the theme, variant or local styles are applied to the shapes explicitly.

    See Also