hi
i would like to rollback the datetime user selection under the 'SelectedStartDateTimeChanged' event.
it seems that the SelectedDateTime property is updated correctly but the time control (view) is not.
scenario
the current dateTime selection is 29/12/2009 14:00
user try to change the datetime to 29/12/2009 15:00
then i would like from the time control to show 14:00 and not 15:00
source code:
private void OnSelectedStartDateTimeChanged(object sender, RoutedPropertyChangedEventArgs<DateTime?> e)
{
try
{
UnSubscribeToSelectedStartDateTimeChanged();
if (e.OldValue == null) //first time loading
return;
startDateTime.SelectedDateTime = (DateTime) e.OldValue;
}
finally
{
SubscribeToSelectedStartDateTimeChanged();
}
}
i would like to rollback the datetime user selection under the 'SelectedStartDateTimeChanged' event.
it seems that the SelectedDateTime property is updated correctly but the time control (view) is not.
scenario
the current dateTime selection is 29/12/2009 14:00
user try to change the datetime to 29/12/2009 15:00
then i would like from the time control to show 14:00 and not 15:00
source code:
private void OnSelectedStartDateTimeChanged(object sender, RoutedPropertyChangedEventArgs<DateTime?> e)
{
try
{
UnSubscribeToSelectedStartDateTimeChanged();
if (e.OldValue == null) //first time loading
return;
startDateTime.SelectedDateTime = (DateTime) e.OldValue;
}
finally
{
SubscribeToSelectedStartDateTimeChanged();
}
}