Skip to main content

SchedulerControlBase.DependencyPropertyChanged Event

Occurs when any SchedulerControl’s dependency property is changed.

Namespace: DevExpress.Xpf.Scheduling

Assembly: DevExpress.Xpf.Scheduling.v24.2.dll

NuGet Package: DevExpress.Wpf.Scheduling

Declaration

public event DependencyPropertyChangedEventHandler DependencyPropertyChanged

Event Data

The DependencyPropertyChanged event's data class is DependencyPropertyChangedEventArgs. The following properties provide information specific to this event:

Property Description
NewValue Gets the value of the property after the change.
OldValue Gets the value of the property before the change.
Property Gets the identifier for the dependency property where the value change occurred.

The event data class exposes the following methods:

Method Description
Equals(Object) Determines whether the provided object is equivalent to the current DependencyPropertyChangedEventArgs.
Equals(DependencyPropertyChangedEventArgs) Determines whether the provided DependencyPropertyChangedEventArgs is equivalent to the current DependencyPropertyChangedEventArgs.
GetHashCode() Gets a hash code for this DependencyPropertyChangedEventArgs.
ToString() Returns the fully qualified type name of this instance. Inherited from ValueType.

Remarks

Handle this event to determine whether a certain dependency property is changed.

This event can be used instead of the legacy SchedulerControl.SelectionChanged event, as illustrated in the following code snippet:

private void schedulerControl_DependencyPropertyChanged(object sender, DependencyPropertyChangedEventArgs e) {
    SchedulerControl scheduler = sender as SchedulerControl;
    if (e.Property == SchedulerControl.SelectedIntervalProperty) {
        OutputBox.AppendText(string.Format("SelectedInterval is changed. New value is {0} \r\n", e.NewValue));
        OutputBox.ScrollToEnd();
    }
    if (e.Property == SchedulerControl.SelectedResourceProperty) {
        OutputBox.AppendText(string.Format("SelectedResource is changed. New value is {0} \r\n", ((ResourceItem)e.NewValue).Caption));
        OutputBox.ScrollToEnd();
    }
}

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the DependencyPropertyChanged 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