windowsforms-devexpress-dot-xtrabars-dot-barmanager-b0a5da3f.md
Gets or sets the version of the layout of bars.
Namespace : DevExpress.XtraBars
Assembly : DevExpress.XtraBars.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
[Browsable(false)]
[EditorBrowsable(EditorBrowsableState.Never)]
public virtual string LayoutVersion { get; set; }
<Browsable(False)>
<EditorBrowsable(EditorBrowsableState.Never)>
Public Overridable Property LayoutVersion As String
| Type | Description |
|---|---|
| String |
A string representing the version of the layout of bars.
|
You should assign versions to layouts if you need to customize the bar layout after a previous version of the layout has been loaded from a data store (a stream, xml file or system registry), and applied to the control.
Imagine that an earlier version of an application was released, and this contained the FILE menu consisting of two items (NEW and EXIT). When running the application an end-user saved the layout of bars to an XML file. Then a new version of the application was designed. For example, it added a new bar item (OPEN) to the FILE menu. By default, when the previously saved layout is loaded within the new application the current layout of the control will be overridden. Therefore the FILE menu will only contain two items (NEW and EXIT). The OPEN item will be removed from the FILE menu, although the corresponding bar item will not be disposed of.
To allow end-users to work with previously saved layouts and ensure that new features won’t be lost and new bar items will still be visible after old layouts have been loaded, you should do the following:
The LayoutVersion property’s value is synchronized with the bar’s OptionsLayoutBase.LayoutVersion property’s value.
See Also