Skip to main content

Dashboard.OptionsChanged Event

Occurs after any option in the current Dashboard is changed.

Namespace: DevExpress.DashboardCommon

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

NuGet Package: DevExpress.Dashboard.Core

Declaration

public event DashboardOptionsChangedEventHandler OptionsChanged

Event Data

The OptionsChanged event's data class is DashboardOptionsChangedEventArgs.

Remarks

The event occurs after any action is added to dashboard history and fires only for the current dashboard.

In the UI, when you use the Open command, the dashboard instance remains the same and the OptionsChanged event continues to occur for the opened dashboard. The New command creates a new dashboard instance and you need to handle the OptionsChanged event again.

To detect changes for any dashboard, fire the designer’s DashboardDesigner.DashboardOptionsChanged event. You can also use the DashboardDesigner.IsDashboardModified property to indicate changes made in the DashboardDesigner UI since the last save.

The example below shows how to handle the OptionsChanged event to check the actual dashboard state.

dashboardDesigner1.Dashboard.OptionsChanged += Dashboard_OptionsChanged;  

private void Dashboard_OptionsChanged(object sender, DashboardOptionsChangedEventArgs e) {  
    this.BeginInvoke((Action)(() => {  
        bool hasUndo = undoBarItem1.Enabled;  
        bool hasRedo = redoBarItem1.Enabled;  
        Debug.WriteLine($"Undo = {hasUndo}, Redo = {hasRedo}");  
    }));  
} 

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

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.

See Also