Hi,
I used a scheduleview with custom appointment and style.
I modified appointments in my viewmodel programmatically when I received message from Azure service bus. The problem is that the UI isn't updated. I have to scroll down and up to see changes in UI.
I tried this solution : https://www.telerik.com/forums/changing-appointment-start-end-not-reflected-on-ui but it didn't work.
Thanks for your advice
Véronique
Here's my code :
public class TimeSlot : Appointment
{
....
public void UpdateTimeSlot(TimeSlot source)
{
CopyFrom(source);
_truckId = source.TruckId;
TimeMarker = TimeSlotMarkerCollection.GetTimeSlotMarker(source.CurrentStatus);
OnPropertyChanged();
}
}
In my viewmodel :
public class DispatchBoardViewModel : ObservableObject
{
private void _listenerMessageService_MessageReceived(object sender, EventArgs e)
{
var dispatchList= ((MessageEventArgs)e)?.Message;
dispatchList?.TimeSlots.ForEach(d =>
{
var displayedTimeSlot = TimeSlots.FirstOrDefault(ts =>[where_clause])
);
displayedTimeSlot?.UpdateTimeSlot(timeSlot);
});
}