Skip to main content
A newer version of this page is available. .

SchedulerControlBase.DependencyPropertyChanged Event

Occurs when any SchedulerControl’s dependency property is changed.

Namespace: DevExpress.Xpf.Scheduling

Assembly: DevExpress.Xpf.Scheduling.v21.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:

Note

The complete sample project How to obtain the appointment, resource or time interval selected by an end-user is available in the DevExpress Examples repository.

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();
    }
}
See Also