Hi,
When I use ResourceTypeSource and SpecialSlotStyleSelctor I dont get the style for the HighlightItem. When I remove the ResourceTypeSource I get the style returned by the specialSlotStyleSelector. I dont know where I made mistake.. Plz Help...
Here is my ScheduleView
And the SpecialSlotStyleSelector...
And here is the style..
When I use ResourceTypeSource and SpecialSlotStyleSelctor I dont get the style for the HighlightItem. When I remove the ResourceTypeSource I get the style returned by the specialSlotStyleSelector. I dont know where I made mistake.. Plz Help...
Here is my ScheduleView
<sv:RadScheduleView x:Name="Scheduler" AppointmentsSource="{Binding Appointments}" Loaded="Scheduler_Loaded" MouseLeftButtonUp="Scheduler_MouseLeftButtonUp" ShowDialog="Scheduler_ShowDialog" ResourceTypesSource="{Binding ResourceTypes}" AppointmentCreating="Scheduler_AppointmentCreating" > <sv:RadScheduleView.ViewDefinitions> <sv:DayViewDefinition ShowAllDayArea="True" MajorTickLength="1h" MinorTickLength="30min" /> <sv:WeekViewDefinition ShowAllDayArea="True" MajorTickLength="1h" MinorTickLength="30min" /> <sv:MonthViewDefinition /> </sv:RadScheduleView.ViewDefinitions> <sv:RadScheduleView.GroupDescriptionsSource> <sv:GroupDescriptionCollection> <sv:DateGroupDescription /> <sv:ResourceGroupDescription ResourceType="Speaker" /> </sv:GroupDescriptionCollection> </sv:RadScheduleView.GroupDescriptionsSource> </sv:RadScheduleView>And the SpecialSlotStyleSelector...
class SpecialSlotStyleSelector:ScheduleViewStyleSelector { private Style nonworkingHourStyle; public Style NonworkingHourStyle { get { return this.nonworkingHourStyle; } set { this.nonworkingHourStyle = value; } } public override Style SelectStyle(object item, DependencyObject container, ViewDefinitionBase activeViewDefinition) { return this.NonworkingHourStyle; } }And here is the style..
<s:SpecialSlotStyleSelector x:Key="SpecialSlotStyleSelector"> <s:SpecialSlotStyleSelector.NonworkingHourStyle> <Style TargetType="{x:Type sv:HighlightItem}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate> <Border Background="LightGray" Opacity="0.8" /> </ControlTemplate> </Setter.Value> </Setter> </Style> </s:SpecialSlotStyleSelector.NonworkingHourStyle> </s:SpecialSlotStyleSelector>