Hi,
I am dynamically switching between resources and appointment, so every time I'm switching collections I need to clear SpecialTimeRegions and add new one
The issue is that first one appears correctly, but after clearing and adding again no SpecialTimeRegions appears
Hi SaiGanesh Sakthivel,
I've updated the nuget and now it throws null reference exception even though everything is initiated, heres the stack trace:
at Syncfusion.UI.Xaml.Scheduler.TimelineViewPanel.AddDisableSpecialTimeRegions()
at Syncfusion.UI.Xaml.Scheduler.TimelineViewPanel.UpdateVisibleSpecialTimeRegions()
at Syncfusion.UI.Xaml.Scheduler.TimelineViewPanel.OnSpecialTimeRegionsCollectionChanged(NotifyCollectionChangedEventArgs e)
at Syncfusion.UI.Xaml.Scheduler.TimeSlotViewSettings.OnSpecialTimeRegionsCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
I am using it like this:
RoutesScheduler.TimelineViewSettings.SpecialTimeRegions.Clear();
// Data manipulation here
var startingBlockRegion = new SpecialTimeRegion
{
StartTime = routeView.Route.RouteDate.Date,
EndTime = routeView.Route.ShiftStart,
Background = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Colors.Gray),
ResourceIdCollection = new ObservableCollection() { routeView }
};
// Exception here: (no exception on version 19.4.0.53)
RoutesScheduler.TimelineViewSettings.SpecialTimeRegions.Add(startingBlockRegion);
var endingBlockRegion = new SpecialTimeRegion
{
StartTime = routeView.Route.ShiftFinish,
EndTime = routeView.Route.RouteDate.Date.AddSeconds(86350),
Background = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Colors.Gray),
ResourceIdCollection = new ObservableCollection() { routeView }
};
RoutesScheduler.TimelineViewSettings.SpecialTimeRegions.Add(endingBlockRegion);
Hi SaiGanesh,
I've checked version 19.4.0.55 and looks like its working properly now, Thanks!