All docs
V20.1
20.1
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

DashboardDesigner.DashboardCustomPropertyChanged Event

Occurs when the custom property value in the Dashboard Designer is changed.

Namespace: DevExpress.DashboardWin

Assembly: DevExpress.Dashboard.v20.1.Win.dll

Declaration

public event CustomPropertyChangedEventHandler DashboardCustomPropertyChanged
Public Event DashboardCustomPropertyChanged As CustomPropertyChangedEventHandler

Event Data

The DashboardCustomPropertyChanged event's handler receives an argument of the CustomPropertyChangedEventArgs type. The following properties provide information specific to this event:

Property Description
Name Gets a custom property name for which the event is raised.
NewValue Gets a new value that has been assigned to the custom property.
OldValue Gets the custom property's previous value, which has been replaced by the new value.
Owner

Remarks

In comparison to the Dashboard.OptionsChanged and DashboardDesigner.DashboardOptionsChanged events, the DashboardCustomPropertyChanged event occurs when the custom property value is changed. The change does not have to be recorded in the history.

The following example shows how to change the ribbon button checked status when you enable or disable the custom property:

public class ChartScaleBreakModule {
  // ...
  public static readonly string PropertyName = "ScaleBreak";

  void Designer_DashboardCustomPropertyChanged(object sender, CustomPropertyChangedEventArgs e) {
      if(e.Name == PropertyName)
          UpdateBarItem();
  }

  void UpdateBarItem() {
      barItem.Checked = designer.SelectedDashboardItem.CustomProperties.GetValue<bool>(PropertyName);
  }
  public static T GetValue<T>(this CustomProperties property, string name) where T : struct {
      var value = property.GetValue(name);
      if(value == null) return default(T);
      return (T)Convert.ChangeType(value, typeof(T));
  }
}
See Also