Back to Devexpress

DashboardViewer.GetDashboardState() Method

dashboard-devexpress-dot-dashboardwin-dot-dashboardviewer-26095d4a.md

latest4.2 KB
Original Source

DashboardViewer.GetDashboardState() Method

Gets the current dashboard state.

Namespace : DevExpress.DashboardWin

Assembly : DevExpress.Dashboard.v25.2.Win.dll

NuGet Package : DevExpress.Win.Dashboard

Declaration

csharp
public DashboardState GetDashboardState()
vb
Public Function GetDashboardState As DashboardState

Returns

TypeDescription
DashboardState

A DashboardState object that contains modifications produced by end-user interaction.

|

Remarks

Refer to the Manage Dashboard State document for details about a dashboard state.

The following code snippets (auto-collected from DevExpress Examples) contain references to the GetDashboardState() method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-dashboard-save-restore-dashboard-state/CS/WinFormsDashboard_DashboardState/Form1.cs#L56

csharp
{
    var state = dashboardViewer1.GetDashboardState();
    var stateValue = state.SaveToXml().ToString(SaveOptions.DisableFormatting);

winforms-viewer-save-and-apply-dashboard-state/CS/WinFormsViewerSaveAndApplyDashboarState/ViewerForm1.cs#L34

csharp
private void ViewerForm1_FormClosing(object sender,FormClosingEventArgs e) {
    var dState = dashboardViewer.GetDashboardState();
    var stateValue = dState.SaveToXml().ToString(SaveOptions.DisableFormatting);

winforms-dashboard-save-restore-dashboard-state/VB/WinFormsDashboard_DashboardState/Form1.vb#L47

vb
Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As FormClosingEventArgs)
    Dim state = dashboardViewer1.GetDashboardState()
    Dim stateValue = state.SaveToXml().ToString(SaveOptions.DisableFormatting)

winforms-viewer-save-and-apply-dashboard-state/VB/WinFormsViewerSaveAndApplyDashboarState/ViewerForm1.vb#L33

vb
Private Sub ViewerForm1_FormClosing(ByVal sender As Object, ByVal e As FormClosingEventArgs) Handles Me.FormClosing
    Dim dState = dashboardViewer.GetDashboardState()
    Dim stateValue = dState.SaveToXml().ToString(SaveOptions.DisableFormatting)

Implements

GetDashboardState()

See Also

SetDashboardState(DashboardState)

SetInitialDashboardState

DashboardViewer Class

DashboardViewer Members

DevExpress.DashboardWin Namespace