I am using the Avalon DatePicker Control with MVVM pattern. I am binding this control's CurrentlySelectedDate to a property from my ViewModel like so:
<my:DatePicker x:Name="dtpBirthDate" Cursor="Hand" DatesSelectionMode="Single" OverridesDefaultStyle="False" CurrentlySelectedDate="{Binding Path=BirthDate}" />
where BirthDate is a property of type DateTime in my ViewModel class:
public DateTime BirthDate
{
get { return _patient.BirthDate; }
set
{
if (value == _patient.BirthDate)
return;
_patient.BirthDate = value;
base.OnPropertyChanged("BirthDate");
}
}
Still, the change of this property does not occur when I change the value from the user interface. Can someone explain me what I did wrong? I am restricted to .NET 3.0.