A newer version of this page is available. Switch to the current version.

SchedulerControlBase.DependencyPropertyChanged Event

Occurs when any SchedulerControl's dependency property is changed.

Namespace: DevExpress.Xpf.Scheduling

Assembly: DevExpress.Xpf.Scheduling.v19.1.dll

Declaration

public event DependencyPropertyChangedEventHandler DependencyPropertyChanged
Public Event DependencyPropertyChanged As DependencyPropertyChangedEventHandler

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

Implements

DevExpress.Mvvm.Native.INotifyDependencyPropertyChanged.DependencyPropertyChanged
See Also