ClassSchedulerElementProvider
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
SchedulerElementProvider(RadScheduler)
Declaration
public SchedulerElementProvider(RadScheduler scheduler)
Parameters
scheduler
Properties
AllowCache
Gets or sets a value indicating whether caching and recycling of elements is allowed.
Scheduler
The scheduler that owns this provider.
Methods
CacheElement(ISchedulerRecyclableElement)
Adds an element to the cache if this is CanCache(ISchedulerRecyclableElement) allows this.
Declaration
public virtual bool CacheElement(ISchedulerRecyclableElement element)
Parameters
element
Returns
CanCache(ISchedulerRecyclableElement)
Indicates whether an element can be added to the cache.
Declaration
protected virtual bool CanCache(ISchedulerRecyclableElement element)
Parameters
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.
ClearCache()
Removes all cached elements from the cache.
Declaration
public virtual void ClearCache()
CreateElement<T>(SchedulerView, object)
Creates a new instance of type T with the specified view for the specified context. Override to provide custom elements.
Declaration
protected virtual T CreateElement<T>(SchedulerView view, object context) where T : SchedulerVisualElement
Parameters
view
The view that should be associated with the element.
context
The context that requests the element (usually the future parent of the element).
Returns
T
The newly created element.
CreateResourceSeparatorElement(SchedulerView)
Creates a SchedulerVisualElement which represents will be place inbetween the view elements when grouping by resource.
Declaration
public virtual SchedulerVisualElement CreateResourceSeparatorElement(SchedulerView view)
Parameters
view
The view to create the element with.
Returns
The newly created element.
CreateRulerPrimitive(DayViewAppointmentsArea, SchedulerTimeZone)
Creates a RulerPrimitive instance which will be used in the DayViewAppointmentsArea of DayView and WeekView.
Declaration
public virtual RulerPrimitive CreateRulerPrimitive(DayViewAppointmentsArea area, SchedulerTimeZone timeZone)
Parameters
area
The owner DayViewAppointmentsArea
timeZone
The timezone for this ruler.
Returns
The newly created ruler primitive.
GetElement<T>(SchedulerView, object)
Gets an element of type T from the cache or creates a new one if such is not found.
Declaration
public T GetElement<T>(SchedulerView view, object context) where T : SchedulerVisualElement
Parameters
view
The SchedulerView which will be associated with the retrieved element.
context
The context that requests the element (usually the future parent of the element).
Returns
T
An element of the requested type
GetElement<T>(SchedulerView, string, object)
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.
Declaration
public T GetElement<T>(SchedulerView view, string elementClass, object context) where T : SchedulerVisualElement
Parameters
view
The SchedulerView which will be associated with the retrieved element.
elementClass
The Class of the requested element.
context
The context that requests the element (usually the future parent of the element).
Returns
T
An element of the requested type
TryGetCachedElement<T>(out T, string, SchedulerView, object)
Tries to get an element with type T and a specified Class from the cache.
Declaration
protected virtual bool TryGetCachedElement<T>(out T element, string elementClass, SchedulerView view, object context) where T : SchedulerVisualElement
Parameters
element
T
The result of the lookup.
elementClass
The Class of the requested element.
view
The SchedulerView which will be associated with the retrieved element.
context
The context that requests the element (usually the future parent of the element).
Returns
[true] if a cached element was found, [false] otherwise.