Special Slots
RadTimeBar
provides an easy way to mark certain intervals along the visible range of the control as special slots. This is done through a custom class, which implements the ITimeRangeGenerator
interface. This interface defines the GetRanges
method. Given the current visible period, this method returns IEnumerable<IPeriodSpan>
- an array of PeriodSpan
instances, each of which defines a special slot with a start and end date.
Below you can find a sample weekends generator implementation:
Implementing the ITimeRangeGenerator in a new class
SpecialSlotsGenerator
property of the RadTimeBar control you can specify a custom ITimeRangeGenerator
instance that defines certain time intervals as special.
The following example shows how to set the custom WeekendsGenerator
from the above code snippet to the RadTimeBar control: