A provider that is used to creating most of the visual elements of RadScheduler. Extend this class and replace the instance in ElementProvider to replace any of the visual elements with custom implementations.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.Scheduler.dll
Syntax:
public class SchedulerElementProvider
Inheritance: objectSchedulerElementProvider
Constructors
Properties
Gets or sets a value indicating whether caching and recycling of elements is allowed.
public bool AllowCache { get; set; }
The scheduler that owns this provider.
public RadScheduler Scheduler { get; }
Methods
Adds an element to the cache if this is CanCache(ISchedulerRecyclableElement) allows this.
public virtual bool CacheElement(ISchedulerRecyclableElement element)
Indicates whether an element can be added to the cache.
protected virtual bool CanCache(ISchedulerRecyclableElement element)
The element that is trying to get cached.
Returns:[true] if the element can be added to the cache and reused later, [false] otherwise.
Removes all cached elements from the cache.
public virtual void ClearCache()
Creates a new instance of type T with the specified view for the specified context. Override to provide custom elements.
protected virtual T CreateElement<T>(SchedulerView view, object context) where T : SchedulerVisualElement
The view that should be associated with the element.
contextobjectThe context that requests the element (usually the future parent of the element).
Returns:T
The newly created element.
Creates a SchedulerVisualElement which represents will be place inbetween the view elements when grouping by resource.
public virtual SchedulerVisualElement CreateResourceSeparatorElement(SchedulerView view)
The view to create the element with.
Returns:The newly created element.
Creates a RulerPrimitive instance which will be used in the DayViewAppointmentsArea of DayView and WeekView.
public virtual RulerPrimitive CreateRulerPrimitive(DayViewAppointmentsArea area, SchedulerTimeZone timeZone)
The owner DayViewAppointmentsArea
timeZoneSchedulerTimeZoneThe timezone for this ruler.
Returns:The newly created ruler primitive.
Gets an element of type T from the cache or creates a new one if such is not found.
public T GetElement<T>(SchedulerView view, object context) where T : SchedulerVisualElement
The SchedulerView which will be associated with the retrieved element.
contextobjectThe context that requests the element (usually the future parent of the element).
Returns:T
An element of the requested type
Gets an element of type T and a specified Class from the cache or creates a new one if such is not found. The method finds all cached elements of type T and tries to find one that matches the specified Class. If a match is not found, returns any of the found elements of type T. If there are no cached elements of type T, creates a new element.
public T GetElement<T>(SchedulerView view, string elementClass, object context) where T : SchedulerVisualElement
The SchedulerView which will be associated with the retrieved element.
elementClassstringThe Class of the requested element.
contextobjectThe context that requests the element (usually the future parent of the element).
Returns:T
An element of the requested type
Tries to get an element with type T and a specified Class from the cache.
protected virtual bool TryGetCachedElement<T>(out T element, string elementClass, SchedulerView view, object context) where T : SchedulerVisualElement
The result of the lookup.
elementClassstringThe Class of the requested element.
viewSchedulerViewThe SchedulerView which will be associated with the retrieved element.
contextobjectThe context that requests the element (usually the future parent of the element).
Returns:[true] if a cached element was found, [false] otherwise.