Skip to main content

PivotGridControl.RestoreLayoutFromXmlAsync(String, AsyncCompletedHandler) Method

Restores the pivot grid's layout from the specified XML file asynchronously. Allows you to specify custom actions to be performed after this operation is completed.

Namespace: DevExpress.Xpf.PivotGrid

Assembly: DevExpress.Xpf.PivotGrid.v14.2.dll

Declaration

public void RestoreLayoutFromXmlAsync(
    string fileName,
    AsyncCompletedHandler asyncCompleted
)
Public Sub RestoreLayoutFromXmlAsync(
    fileName As String,
    asyncCompleted As AsyncCompletedHandler
)

Parameters

Name Type Description
fileName String

A String value that specifies the target file name.

asyncCompleted AsyncCompletedHandler

An AsyncCompletedHandler delegate referencing a method that should be executed after the operation is completed.

Remarks

The RestoreLayoutFromXmlAsync method is asynchronous. It starts executing the related operation in a background thread, and immediately returns control. The primary UI thread is not blocked, allowing the application to continue responding to end-user actions. For more information about the asynchronous mode, see Asynchronous Mode.

To save the pivot grid's layout, use the PivotGridControl.SaveLayoutToXml method.

Note that the PivotGridControl.SaveLayoutToXml and RestoreLayoutFromXmlAsync methods directly access the file system, which is forbidden by the default Silverlight security sandbox. To use these methods, you should configure your application to require elevated trust. To learn how to do this, see the Trusted Applications MSDN topic.

Note that you should specify unique names for all pivot grid fields to correctly save and restore the layout. You can do this using the PivotGridField.Name property.

To learn more, see Save and Restore Layout.

See Also