I want to derive from Telerik.Windows.Controls.ScheduleView.Slot to add some extra information as IsHoliday to my special slots and than use this in my special slot style selector. My scheduler binds to an ObservableCollection<CSchedulerSlot> as SpecialSlotsSource.
But the "object item" which is passed to SelectStyle method of the selector is always of type Slot instead of my custom class CSchedulerSlot. The following code does not work, becuase i always get a an InvalidCastException.
item, DependencyObject container, ViewDefinitionBase activeViewDefinition)
FrameworkElement elem = container
.SelectStyle(item, container, activeViewDefinition);
CSchedulerSlot slot = (CSchedulerSlot)item;
What I'm doing wrong? Is there a workaround for this?
thanks in advance,