ASP.NET Pack Programmer's Guide
CompositeNode.LoadFromXml Method
See Also
 





DiagramItem.LoadFromXml override.

Namespace: MindFusion.Diagramming
Package: MindFusion.Diagramming

 Syntax

C#  Copy Code

protected override void LoadFromXml (
    XmlElement xmlElement,
    XmlPersistContext context
)

Visual Basic  Copy Code

Protected Overrides Sub LoadFromXml( _
    xmlElement As XmlElement, _
    context As XmlPersistContext _
)

 Parameters

xmlElement
An XmlElement containing the item's data.
context
An XmlPersistContext object providing contextual information about the serialization process and some helper serialization methods.

 Remarks

By default, all components of a CompositeNode are saved in the XML document along with their associated data. This will lead to wasted space if the instances of a derived class are built upon the same hierarchy of components and expose only a few properties corresponding to component attributes. The recommended approach of serializing such classes is to override SerializeComponents and return false to stop the built-in serialization of components, and save / load the node properties from SaveToXml / LoadFromXml overrides. This is demonstrated in the Scripting sample project.

 See Also

CompositeNode Members
CompositeNode Class
MindFusion.Diagramming Namespace