Back to Devexpress

BarManager.SaveLayoutToJson(Stream) Method

windowsforms-devexpress-dot-xtrabars-dot-barmanager-dot-savelayouttojson-x28-system-dot-io-dot-stream-x29.md

latest2.1 KB
Original Source

BarManager.SaveLayoutToJson(Stream) Method

SECURITY-RELATED CONSIDERATIONS

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

Saves the layout of bars to a file in JSON format.

Namespace : DevExpress.XtraBars

Assembly : DevExpress.XtraBars.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
public virtual void SaveLayoutToJson(
    Stream utf8jsonStream
)
vb
Public Overridable Sub SaveLayoutToJson(
    utf8jsonStream As Stream
)

Parameters

NameTypeDescription
utf8jsonStreamStream

Layout settings of bars in UTF-8 encoded JSON format.

|

Remarks

Use the BarManager.RestoreLayoutFromJson method to load layout settings of bars from a file in JSON format.

Note

To correctly save the layout of bar created in code, ensure that the BarItem.Id property is set to a unique value for all bar items. Bar items created at design time automatically initialize the Id property.

Refer to the following help topic for additional information: Saving and Restoring a Bars Layout Manually.

See Also

BarManager Class

BarManager Members

DevExpress.XtraBars Namespace