Class SchedulerElementProvider
A provider that is used to creating most of the visual elements of Rad
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.Scheduler.dll
Syntax
public class SchedulerElementProvider
Constructors
SchedulerElementProvider(RadScheduler)
Declaration
public SchedulerElementProvider(RadScheduler scheduler)
Parameters
Rad
|
Properties
AllowCache
Gets or sets a value indicating whether caching and recycling of elements is allowed.
Declaration
public bool AllowCache { get; set; }
Property Value
System.
|
Scheduler
The scheduler that owns this provider.
Declaration
public RadScheduler Scheduler { get; }
Property Value
Methods
CacheElement(ISchedulerRecyclableElement)
Adds an element to the cache if this is Can
Declaration
public virtual bool CacheElement(ISchedulerRecyclableElement element)
Parameters
IScheduler
|
Returns
System.
|
CanCache(ISchedulerRecyclableElement)
Indicates whether an element can be added to the cache.
Declaration
protected virtual bool CanCache(ISchedulerRecyclableElement element)
Parameters
IScheduler The element that is trying to get cached. |
Returns
System. [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
Scheduler The view that should be associated with the element. |
System. The context that requests the element (usually the future parent of the element). |
Returns
T
The newly created element. |
Type Parameters
T
The type of the element to be created. |
CreateResourceSeparatorElement(SchedulerView)
Creates a Scheduler
Declaration
public virtual SchedulerVisualElement CreateResourceSeparatorElement(SchedulerView view)
Parameters
Scheduler The view to create the element with. |
Returns
Scheduler The newly created element. |
CreateRulerPrimitive(DayViewAppointmentsArea, SchedulerTimeZone)
Creates a Ruler
Declaration
public virtual RulerPrimitive CreateRulerPrimitive(DayViewAppointmentsArea area, SchedulerTimeZone timeZone)
Parameters
Day The owner Day |
Scheduler The timezone for this ruler. |
Returns
Ruler 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
Scheduler The Scheduler |
System. The context that requests the element (usually the future parent of the element). |
Returns
T
An element of the requested type |
Type Parameters
T
The type of the requested element. |
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
Scheduler The Scheduler |
System. The Class of the requested element. |
System. The context that requests the element (usually the future parent of the element). |
Returns
T
An element of the requested type |
Type Parameters
T
The type of the requested element. |
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
T
element
The result of the lookup. |
System. The Class of the requested element. |
Scheduler The Scheduler |
System. The context that requests the element (usually the future parent of the element). |
Returns
System. [true] if a cached element was found, [false] otherwise. |
Type Parameters
T
The type of the requested element. |