Hi all
I have a custom appointment, of which I am modifying both Start and End programmatically if a command is fired. The problem is that setting those properties doesn't result in the UI being updated: The appointment still shows the old start / end boundaries until I change the view. For now, I employed a dirty hack by removing and reinserting the modified item, but this is obviously a horrible workaround.
Thanks for your advice
Philipp
Here's my code:
I have a custom appointment, of which I am modifying both Start and End programmatically if a command is fired. The problem is that setting those properties doesn't result in the UI being updated: The appointment still shows the old start / end boundaries until I change the view. For now, I employed a dirty hack by removing and reinserting the modified item, but this is obviously a horrible workaround.
Thanks for your advice
Philipp
Here's my code:
public class CalendarItemViewModel : AppointmentBase{ public LaborTrackingSession Model { get; private set; } public override DateTime Start { get { return Model.StartTime.DateTime; } set { Model.StartTime = value; OnPropertyChanged(() => Start); } } public override DateTime End { get { return Model.EndTime.HasValue ? Model.EndTime.Value.DateTime : SystemTime.Now().DateTime; } set { Model.EndTime = value; OnPropertyChanged(() => End); } } ...}