RulerRendererBase
Provides the row traversal and drawing hooks used to render a scheduler time ruler.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.Scheduler.dll
Syntax:
public abstract class RulerRendererBase
Inheritance: objectRulerRendererBase
Derived Classes:
Constructors
Initializes the renderer for the specified ruler.
public RulerRendererBase(RulerPrimitive ruler)
The ruler that supplies the scale and visual settings.
Fields
Reset before each render pass; derived renderers can set it when they draw ruler content.
protected bool isDrawn
The ruler whose scale, layout, and appearance this renderer uses.
protected RulerPrimitive ruler
Methods
Calculates and renders the current-time marker when ShowCurrentTime is enabled. The base implementation calculates its position from Now.
Draws the hour and minute labels on the same ruler row.
protected Size DrawTimeText(IGraphics graphics, float y, string text, string minutesText, Size measuredSize)
The graphics context used to draw the labels.
yfloatThe vertical position of the labels.
textstringThe hour label.
minutesTextstringThe minute label displayed beside the hour.
measuredSizeSizeThe measured size supplied by the caller.
Returns:The supplied measuredSize; this method does not modify the measurement.
Gets the bounds calculated for a ruler row.
public RectangleF GetHourBounds(int hour)
The nonnegative, zero-based row index.
Returns:The row bounds, or Empty when hour is beyond the calculated rows.
hour is negative.
Gets the number of ruler intervals in one hour for the current scale.
Walks the ruler intervals, dispatches hour and sub-hour drawing, and then renders the current-time marker.
public virtual void Render(IGraphics graphics)
The graphics context used to draw the ruler.
Draws a major hour interval within the supplied ruler row.
public abstract void RenderHour(IGraphics graphics, int hour, RectangleF bounds)
The graphics context used to draw the interval.
hourintThe hour index for the interval.
boundsRectangleFThe bounds of the ruler row.
Draws a sub-hour interval within the supplied ruler row.
public abstract void RenderSubHour(IGraphics graphics, int hour, int sectionIndex, RectangleF bounds)
The graphics context used to draw the interval.
hourintThe hour index containing the interval.
sectionIndexintThe sub-hour interval's index within the hour.
boundsRectangleFThe bounds of the ruler row.