The requested page is not available for the requested platform. You are viewing the content for Default platform.

XRPivotGridAppearances.RestoreLayoutFromStream(Stream) Method

Restores the appearance settings from the specified stream.

Namespace: DevExpress.XtraReports.UI.PivotGrid

Assembly: DevExpress.XtraReports.v18.2.dll

Declaration

public virtual void RestoreLayoutFromStream(
    Stream stream
)
Public Overridable Sub RestoreLayoutFromStream(
    stream As Stream
)

Parameters

Name Type Description
stream Stream

A Stream descendant from which the appearance settings are read.

Remarks

Use the RestoreLayoutFromStream method to load the appearance settings from a stream to which these settings were saved via the XRPivotGridAppearances.SaveLayoutToStream method. If the specified stream is empty or null (Nothing in Visual Basic), an exception is raised.

Examples

The following sample code saves the appearance settings used to paint the XtraGrid's elements to a memory stream and then restores them.

System.IO.Stream str;
str = new System.IO.MemoryStream();
gridControl1.MainView.Appearance.SaveLayoutToStream(str);
str.Seek(0, System.IO.SeekOrigin.Begin);

// ...

gridControl1.MainView.Appearance.RestoreLayoutFromStream(str);
str.Seek(0, System.IO.SeekOrigin.Begin);
See Also