Skip to main content
All docs
V25.1
  • Bar

    BarManager.SaveLayoutToJson(Stream) Method

    SECURITY NOTE

    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.1.dll

    NuGet Package: DevExpress.Win.Navigation

    Declaration

    public virtual void SaveLayoutToJson(
        Stream utf8jsonStream
    )

    Parameters

    Name Type Description
    utf8jsonStream Stream

    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