HeaderPane
Main
Hide
Share Link
Print

SetContents Method, SftTree Class

Updates the control with data from an XML document.

Class: SftTree
Namespace: Softelvdm.SftTreeNET
Assembly: Softelvdm.SftTreeNET

Syntax

public static void SetContents(
    SftTree SftTreeControl,
    XmlDocument doc,
    PersistContentsEnum contents );
Public Shared Sub SetContents(
    ByVal SftTreeControl As SftTree,
    ByVal doc As XmlDocument,
    ByVal contents As PersistContentsEnum )

Parameters

SftTreeControl

Defines the SftTree/NET control to be updated.

doc

The XML document.

contents

Defines processing options.

Comments

Updates the control with data from an XML document.

Saving/loading the tree control contents using SftTree.GetContents/SftTree.SetContents saves/loads all data of the specified category (contents parameter). An application may wish to limit the amount of data saved by implementing its own save/load mechanism and save only the properties that are needed. Alternatively, if an application has an external data source, it may rebuild the tree control contents from its own data source, which may be significantly faster than an XML document. By implementing its own save/load mechanism an application could use a regular file or a custom format, which may also be significantly faster than an XML document.

In .NET Framework applications, images and fonts in the contents are saved with the BinaryFormatter. .NET 10 no longer includes it, so .NET 10 applications save images as image files and fonts by their name, size, style, unit and character set. Contents saved by a .NET 10 application load in .NET 10 and .NET Framework applications; contents saved by a .NET Framework application load in a .NET 10 application only if they contain no images or fonts (see Using SftTree/NET with .NET 10).

See Also SftTree Class | Classes | SftTree/NET 3.0