New to Telerik UI for WinForms? Start a free 30-day trial

Draws ruler labels, interval lines, and the current-time marker using the ruler's configured styles.

Definition

Constructors

Initializes the default renderer for the specified ruler.

C#
public RulerRenderer(RulerPrimitive ruler)
Parameters:rulerRulerPrimitive

The ruler whose settings determine the scale, labels, and appearance.

Methods

Draws the current-time marker according to the ruler's configured pointer style and color.

C#
public override void RenderCurrentTimePointer(IGraphics graphics, float y)
Parameters:graphicsIGraphics

The graphics context used to draw the marker.

yfloat

The vertical position of the marker.

Overrides: RulerRendererBase.RenderCurrentTimePointer(IGraphics, float)

Formats and draws an hour label, its minute label, and the hour separator line.

C#
public override void RenderHour(IGraphics g, int hour, RectangleF bounds)
Parameters:gIGraphics

The graphics context used to draw the ruler.

hourint

The hour index supplied by the base renderer.

boundsRectangleF

The bounds of the corresponding ruler row.

Overrides: RulerRendererBase.RenderHour(IGraphics, int, RectangleF)

Formats and draws the labels and separator line for a sub-hour interval.

C#
public override void RenderSubHour(IGraphics g, int hour, int sectionIndex, RectangleF bounds)
Parameters:gIGraphics

The graphics context used to draw the ruler.

hourint

The hour index containing the interval.

sectionIndexint

The sub-hour interval's index within the hour.

boundsRectangleF

The bounds of the corresponding ruler row.

Overrides: RulerRendererBase.RenderSubHour(IGraphics, int, int, RectangleF)