MindFusion.Wpf Pack Programmer's Guide
SvgNode Class
Remarks See Also
 





Represents nodes that can render SVG drawings.

Namespace: MindFusion.Diagramming.Wpf
Assembly: MindFusion.Diagramming.Wpf

 Syntax

C#  Copy Code

public class SvgNode : ShapeNode

Visual Basic  Copy Code

Public Class SvgNode
    Inherits ShapeNode

 Remarks

The SvgNode class represents nodes that display SVG drawings, in addition to the rendering provided by the base ShapeNode class. A node's SVG drawing is rendered after its associated bitmap Image, and just before the DrawNode event is raised for Additional custom-draw type. Set the Transparent property of base type to hide the node's Shape geometry and draw only SVG graphics.

The SVG drawing that should be shown inside an SvgNode is specified through the node's Content property. SVG graphics are 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 SVG drawing 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.Wpf.dll assembly. You need to add a reference to this assembly in the target project and import the necessary namespaces.

 Inheritance Hierarchy

System.Object
    System.Windows.Threading.DispatcherObject
        System.Windows.DependencyObject
            System.Windows.Media.Visual
                System.Windows.UIElement
                    System.Windows.FrameworkElement
                        MindFusion.Diagramming.Wpf.DiagramItem
                            MindFusion.Diagramming.Wpf.DiagramNode
                                MindFusion.Diagramming.Wpf.ShapeNode
                                    MindFusion.Diagramming.Wpf.SvgNode

 See Also

SvgNode Members
MindFusion.Diagramming.Wpf Namespace