Nevron Open Vision Documentation
User Interface / Decorators / Symbols
In This Topic
    In This Topic

    NOV symbols are a collection of vector based shapes that can be shown by a symbol box.

     Predefined Symbols

    Nevron Open Vision provides wide range of commonly used symbols, which can be created through the static Create method of the NSymbol class.

    Create Predefined Symbol
    Copy Code
    NSymbol symbol = NSymbol.Create(ENSymbolShape.Rectangle, new NSize(20, 10), NColor.MediumBlue);
    NSymbolBox symbolBox = new NSymbolBox(symbol);

    The image below shows the currently supported predefined symbols:

     Custom Symbols

    Nevron Open Vision also lets you create custom symbols. To do so, you should create an instance of the NSymbol shape and add one or more symbol shapes to it using its Add method. The following image shows the descendants of the NSymbolShape class that you can use to define the geometry of your custom symbols:

    You can use the Stroke property of any symbol shape to apply a stroke style to it. If the shape is a fillable symbol shape (for example a rectangle), then you can use its Fill property to specify its fill style. The piece of code below demonstrates how to create the "Triangle Up" symbol from the previous section:

    Create a Triangle Up Symbol
    Copy Code
    NSize size = new NSize(16, 16);
    // Create a triangle shape that points up
    NPolygonSymbolShape shape = new NPolygonSymbolShape(new NPoint[]{
     new NPoint(0, size.Height),
     new NPoint(size.Width * 0.5, 0),
     new NPoint(size.Width, size.Height)}, ENFillRule.EvenOdd);
    shape.Fill = new NColorFill(NColor.MediumBlue);
    // Add the shape to the symbol
    NSymbol symbol = new NSymbol();
    See Also