With the new SP1 release of Q3 2010 we added a new feature to RadScheduleView that helps you customize every slot in a different way.
To do that you should create an instance of the Slot class, set its Start and End properties,
var christmasSlot =
new
Slot() { Start =
new
DateTime(2010, 12, 25), End =
new
DateTime(2010, 12, 26) };
christmasSlot.RecurrencePattern =
new
RecurrencePattern();
christmasSlot.RecurrencePattern.Interval = 1;
christmasSlot.RecurrencePattern.Frequency = RecurrenceFrequency.Yearly;
christmasSlot.RecurrencePattern.DayOfMonth = 25;
christmasSlot.RecurrencePattern.MonthOfYear = 12;
SpecialSlots.Add(christmasSlot);
var valentineSlot =
new
Slot() { Start =
new
DateTime(2010, 2, 14), End =
new
DateTime(2010, 2, 15) };
valentineSlot.RecurrencePattern =
new
RecurrencePattern();
valentineSlot.RecurrencePattern.Interval = 1;
valentineSlot.RecurrencePattern.Frequency = RecurrenceFrequency.Yearly;
valentineSlot.RecurrencePattern.DayOfMonth = 14;
valentineSlot.RecurrencePattern.MonthOfYear = 2;
SpecialSlots.Add(valentineSlot);
<
telerik:RadScheduleView
Grid.Column
=
"1"
Grid.Row
=
"0"
x:Name
=
"scheduleView"
SpecialSlotsSource
=
"{Binding SpecialSlots}"
AppointmentsSource
=
"{Binding Appointments}"
SpecialSlotStyleSelector
=
"{StaticResource HolidayStyleSelector}"
Margin
=
"10 0 10 0"
>
<
telerik:RadScheduleView.ViewDefinitions
>
<
telerik:MonthViewDefinition
/>
</
telerik:RadScheduleView.ViewDefinitions
>
</
telerik:RadScheduleView
>
You can now download the full project here , see another example using special slots in our online demos and start customizing the slots in your own unique way.
Rossitza Fakalieva is a Technical Manager, Microsoft MVP in Developer Technologies and a Director of the Bulgarian chapter of the global Women Who Code organization. She previously worked on the Telerik engineering team and defines herself as .NET enthusiast. She loves to empower others to grow in their career and in the tech field—by teaching, by delivering courses and presentations, and as part of her daily job.