Back to Devexpress

BarManager.RestoreFromXml(String) Method

windowsforms-devexpress-dot-xtrabars-dot-barmanager-dot-restorefromxml-x28-system-dot-string-x29.md

latest2.7 KB
Original Source

BarManager.RestoreFromXml(String) Method

SECURITY-RELATED CONSIDERATIONS

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

Restores the BarManager component state from an xml file.

Namespace : DevExpress.XtraBars

Assembly : DevExpress.XtraBars.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[EditorBrowsable(EditorBrowsableState.Never)]
public virtual void RestoreFromXml(
    string xmlFile
)
vb
<EditorBrowsable(EditorBrowsableState.Never)>
Public Overridable Sub RestoreFromXml(
    xmlFile As String
)

Parameters

NameTypeDescription
xmlFileString

An xml file from which the BarManager component’s state is restored.

|

Remarks

This method is obsolete. Use the BarManager.RestoreLayoutFromXml method instead.

Example

The following code can be used to read and write a BarManager’s state from/to an XML file.

csharp
string xmlFile = "c:\\XtraBars\\States\\MainState.xml";
barManager1.SaveLayoutToXml(xmlFile);

//...

barManager1.RestoreLayoutFromXml(xmlFile);
vb
Dim xmlFile As String = "c:\XtraBars\States\MainState.xml"
BarManager1.SaveLayoutLayoutToXml(xmlFile)

    '...

BarManager1.RestoreLayoutLayoutFromXml(xmlFile)

See Also

SaveToXml(String)

Saving and Restoring a Bars Layout Manually

Saving and Restoring a Bars Layout Automatically

BarManager Class

BarManager Members

DevExpress.XtraBars Namespace