Hi,
I have a RadTimePicker with its SelectedTime property bound to a view-model TimeSpan? property that looks like this:
public TimeSpan? Time
{
get { return time; }
set
{
if (value != null)
{
time = value;
}
NotifyPropertyChanged(...);
}
}
So I'd like that when the user clears the input for the time picker the application actually restores the last value automatically. This should normally happen, since in the property setter I check for null and don't save the value, then raise the property changed event.
However, the input of the time picker stays blank! Can you tell me what I'm doing wrong here? The same approach works fine for a regular SL control (e.g. TextBox).
Thanks!
I have a RadTimePicker with its SelectedTime property bound to a view-model TimeSpan? property that looks like this:
public TimeSpan? Time
{
get { return time; }
set
{
if (value != null)
{
time = value;
}
NotifyPropertyChanged(...);
}
}
So I'd like that when the user clears the input for the time picker the application actually restores the last value automatically. This should normally happen, since in the property setter I check for null and don't save the value, then raise the property changed event.
However, the input of the time picker stays blank! Can you tell me what I'm doing wrong here? The same approach works fine for a regular SL control (e.g. TextBox).
Thanks!