Search
SvgNode Class
Remarks See Also
 





Represents nodes that can render SVG drawings.

Namespace: MindFusion.Diagramming
Assembly: MindFusion.Diagramming

 Syntax

C#  Copy Code

public class SvgNode : ShapeNode

Visual Basic  Copy Code

Public Class SvgNode
    Inherits ShapeNode

 Remarks

An SvgNode instance represents nodes that can display SVG drawings in addition to the rendering provided by the base ShapeNode class. The SVG drawing is rendered after the associated Image and just before the DrawNode event is raised with CustomDraw.Additional.

The SVG drawing of the node is specified through its Content property. The SVG graphics is loaded and associated with the node through an SvgContent object, which should be initialized and then assigned to this property.

The following code illustrates how to load an SVG graphics from a local file and associate it with an existing SvgNode (referenced by the svgNode variable):

C#  Copy Code

SvgContent content = new SvgContent();
content.Parse(@"c:\image.svg");
svgNode.Content = content;

VB.NET  Copy Code

Dim content As New SvgContent()
content.Parse("c:\image.svg")
svgNode.Content = content

 Note

The SvgContent class is defined in the MindFusion.Svg.dll assembly. You need to add a reference to this assembly in the target project and import the necessary namespaces.

 Inheritance Hierarchy

System.Object
    MindFusion.Diagramming.DiagramItem
        MindFusion.Diagramming.DiagramNode
            MindFusion.Diagramming.ShapeNode
                MindFusion.Diagramming.SvgNode

 See Also