Back to Devexpress

DashboardSavingEventArgs.Command Property

dashboard-devexpress-dot-dashboardwin-dot-dashboardsavingeventargs.md

latest3.7 KB
Original Source

DashboardSavingEventArgs.Command Property

Gets which user action raised the event.

Namespace : DevExpress.DashboardWin

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

NuGet Package : DevExpress.Win.Dashboard

Declaration

csharp
public DashboardSaveCommand Command { get; }
vb
Public ReadOnly Property Command As DashboardSaveCommand

Property Value

TypeDescription
DashboardSaveCommand

A DashboardSaveCommand enumeration member that specifies the user action that triggered the event.

|

Available values:

NameDescription
Save

An end-user has called the Save command.

| | SaveAs |

An end-user has called the Save As command.

|

Remarks

The DashboardDesigner.DashboardSaving event is raised when an end-user selects the Save or Save As command. To determine which if these commands was selected, use the Command property.

To access the dashboard that should be saved, use the DashboardSavingEventArgs.Dashboard property.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Command property.

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-custom-save-and-open-procedures/CS/Dashboard_LoadingAndSaving/Form1.cs#L15

csharp
DevExpress.DashboardWin.DashboardSavingEventArgs e) {
if (e.Command == DevExpress.DashboardWin.DashboardSaveCommand.Save) {
    dashboardDesigner1.Dashboard.SaveToXml(filePath);

winforms-dashboard-custom-save-and-open-procedures/VB/Dashboard_LoadingAndSaving/Form1.vb#L16

vb
Private Sub dashboardDesigner1_DashboardSaving(ByVal sender As Object, ByVal e As DevExpress.DashboardWin.DashboardSavingEventArgs) Handles dashboardDesigner1.DashboardSaving
    If e.Command = DevExpress.DashboardWin.DashboardSaveCommand.Save Then
        dashboardDesigner1.Dashboard.SaveToXml(filePath)

See Also

Dashboard

Handled

Saved

DashboardSavingEventArgs Class

DashboardSavingEventArgs Members

DevExpress.DashboardWin Namespace