Use a "normal" property rather than an automatic property, and raise the change event in the setter:
private int _date;
public int Date
{
get { return _date; }
set
{
if (value != _date)
{
_date = value;
// raise change event here
}
}
}
To raise the change event, if this is a standard INotifyPropertyChanged.PropertyChanged event:
PropertyChangedEventHandler handler = PropertyChanged;
if (handler != null)
{
handler(this, new PropertyChangedEventArgs("Date");
}
It's recommended practice to isolate this into an OnPropertyChanged method.
If you're raising a custom DateChanged event, the logic will be similar but with different names and event args.