Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TreeList.RestoreLayoutFromStream(Stream, OptionsLayoutBase) Method

SECURITY NOTE

Deserializing layout settings from untrusted resources may create security issues. Review the following help topic for additional information: Safe Deserialization.

Loads the control’s layout from a stream, using the specified options.

Namespace: DevExpress.XtraTreeList

Assembly: DevExpress.XtraTreeList.v24.2.dll

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

#Declaration

public virtual void RestoreLayoutFromStream(
    Stream stream,
    OptionsLayoutBase options
)

#Parameters

Name Type Description
stream Stream

A System.IO.Stream object from which the control’s settings are read.

options OptionsLayoutBase

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

#Remarks

Use the RestoreLayoutFromStream method to load the control’s layout from a stream to which a layout was saved via the TreeList.SaveLayoutToStream method call.

Note

When restoring a layout during a form load (for instance, in your Form.Load event handler), you may need to call the TreeList.ForceInitialize method prior to the layout restoration. See this method to learn more.

See Also