Back to Devexpress

TreeList.SaveLayoutToXml(String, OptionsLayoutBase) Method

windowsforms-devexpress-dot-xtratreelist-dot-treelist-dot-savelayouttoxml-x28-system-dot-string-devexpress-dot-utils-dot-optionslayoutbase-x29.md

latest2.7 KB
Original Source

TreeList.SaveLayoutToXml(String, OptionsLayoutBase) Method

SECURITY-RELATED CONSIDERATIONS

Using file paths sourced from untrusted input may expose unauthorized files or allow unintended file access. Always validate and normalize all external paths to prevent path manipulation.

Saves a control’s layout to a specified XML file, using the specified options.

Namespace : DevExpress.XtraTreeList

Assembly : DevExpress.XtraTreeList.v25.2.dll

NuGet Packages : DevExpress.Win.Navigation, DevExpress.Win.TreeList

Declaration

csharp
public virtual void SaveLayoutToXml(
    string xmlFile,
    OptionsLayoutBase options
)
vb
Public Overridable Sub SaveLayoutToXml(
    xmlFile As String,
    options As OptionsLayoutBase
)

Parameters

NameTypeDescription
xmlFileString

A string value specifying the XML file name.

| | options | OptionsLayoutBase |

An OptionsLayoutTreeList object that specifies which Tree List options must be saved. Or, a OptionsLayoutBase.FullLayout object, to save all the settings.

|

Remarks

Use the SaveLayoutToXml method to save the Tree List control’s layout to an XML file. You can restore saved settings later, via a TreeList.RestoreLayoutFromXml method call.

Tip

You can utilize the Persistence Behavior or Workspace Manager component to save and restore layouts for all supported DevExpress controls at once.

See Also

Save and Restore Layouts of DevExpress controls

TreeList Class

TreeList Members

DevExpress.XtraTreeList Namespace