RulerPrimitive
Renders the scheduler's vertical time ruler, including its interval labels and current-time marker.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.Scheduler.dll
Syntax:
public class RulerPrimitive : FillPrimitive, IDisposable, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IStylableNode, IPrimitive, IFillElement, IPrimitiveElement, IShapedElement
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementBasePrimitiveFillPrimitiveRulerPrimitive...
Implements:
Inherited Members
Constructors
Initializes a new instance of the RulerPrimitive class.
public RulerPrimitive(RadScheduler scheduler, DayViewAppointmentsArea area)
Fields
Identifies the current-time marker color property; the registered default is RGB (246, 207, 114).
public static RadProperty CurrentTimePointerColorProperty
Identifies the minute component added to the ruler's ending hour; the registered default is 0.
public static RadProperty EndScaleMinutesProperty
Identifies the ending hour used to calculate ruler rows; the registered default is 24.
public static RadProperty EndScaleProperty
Identifies the formatting settings used to generate ruler labels; the registered default is null.
public static RadProperty FormatStringsProperty
Identifies the color used for major hour lines; the registered default is black.
public static RadProperty HourLineColorProperty
Identifies the shadow color drawn with major hour lines; the registered default is white.
public static RadProperty HourLineShadowColorProperty
Identifies the horizontal start position for major hour lines; the registered default is 10.
public static RadProperty HourLineStartPositionProperty
Identifies the font used for minute labels; the registered default is DefaultFont.
public static RadProperty MinutesFontProperty
Identifies the interval size used to subdivide the ruler; the registered default is Hour.
public static RadProperty RangeFactorProperty
Identifies the ruler width property; its registered default is 40.
public static RadProperty RulerWidthProperty
Identifies the color used for sub-hour section lines; the registered default is black.
public static RadProperty SectionLineColorProperty
Identifies the horizontal start position for sub-hour section lines; the registered default is 30.
public static RadProperty SectionLineStartPositionProperty
Identifies the ruler's separator spacing property; the registered default is 24.
public static RadProperty SeparatorsOffsetProperty
Identifies whether the ruler displays the current-time marker; the registered default is true.
public static RadProperty ShowCurrentTimeProperty
Identifies the minute component added to the ruler's starting hour; the registered default is 0.
public static RadProperty StartScaleMinutesProperty
Identifies the starting hour used to calculate ruler rows; the registered default is 0.
public static RadProperty StartScaleProperty
Identifies the current-time marker style; the registered default is Line.
public static RadProperty TimePointerStyleProperty
Properties
Gets or sets the border.
public BorderPrimitive Border { get; }
The border.
Gets or sets the color of the current time pointer.
[Browsable(true)]
public Color CurrentTimePointerColor { get; set; }
The color of the current time pointer.
Gets or sets the width of the Current time pointerof the ruler.
public float CurrentTimePointerWidth { get; set; }
Gets the selected time zone's offset from the view time zone at the view's start date, in hours.
public float DefaultOffset { get; }
Gets or sets the default separator offset.
public int DefaultSeparatorOffset { get; set; }
The default separator offset.
Gets or sets the end scale.
public int EndScale { get; set; }
The end scale.
Gets or sets the end scale minutes.
public int EndScaleMinutes { get; set; }
Gets or sets and instance holding the format strings used for drawing time representations on the ruler.
public RulerFormatStrings FormatStrings { get; set; }
Gets or sets the hour line color.
public Color HourLineColor { get; set; }
The hour line color.
Gets or sets the hour line shadow color.
public Color HourLineShadowColor { get; set; }
The hour line shadow color.
Gets or sets the hour line start position.
public int HourLineStartPosition { get; set; }
The hour line start position.
Gets or sets the minutes font.
public Font MinutesFont { get; set; }
The minutes font.
Gets or sets the range factor.
public ScaleRange RangeFactor { get; set; }
The range factor.
Gets or sets the ruler primitive's renderer.
public RulerRendererBase RulerRenderer { get; set; }
Gets or sets the width of the ruler.
public int RulerWidth { get; set; }
The width of the ruler.
Gets a lazily created cache of hour-label fonts keyed by scale factor.
protected virtual Dictionary<float, Font> ScaledHourFontsCache { get; }
Gets a lazily created cache of minute-label fonts keyed by scale factor.
protected virtual Dictionary<float, Font> ScaledMinutesFontsCache { get; }
Gets or sets the section line color.
public Color SectionLineColor { get; set; }
The section line color.
Gets or sets the section line start position.
public int SectionLineStartPosition { get; set; }
The section line start position.
Gets or sets the selected time zone.
public SchedulerTimeZone SelectedTimeZone { get; set; }
The selected time zone.
Gets or sets the separators offset.
public float SeparatorsOffset { get; set; }
The separators offset.
Gets or sets a value indicating whether to show the current time
public bool ShowCurrentTime { get; set; }
Gets or sets the start scale.
public int StartScale { get; set; }
The start scale.
Gets or sets the start scale minutes.
public int StartScaleMinutes { get; set; }
Gets or sets the time pointer style.
public RulerCurrentTimePointer TimePointerStyle { get; set; }
The time pointer style.
Gets the view time zone.
public SchedulerTimeZone ViewTimeZone { get; }
The view time zone.
Methods
Copies the ruler's current range factor to the active day view when the scheduler element is ready.
protected virtual void CallActiveViewOnPropertyChanged()
Creates the child elements.
protected override void CreateChildElements()
Overrides:
Clears the scaled-font caches during managed-resource disposal.
protected override void DisposeManagedResources()
Overrides:
Gets the bounds calculated for a ruler row.
public RectangleF GetHourItemBounds(int row)
The nonnegative row index.
Returns:The row bounds, or Empty when row is beyond the calculated rows.
row is negative.
Gets a cached minute-label font scaled by the specified factor.
protected virtual Font GetScaledMinutesFont(float scale)
The font-size multiplier; a factor of 1 returns MinutesFont.
Returns:The unscaled font or a font instance reused for the specified scale.
Configures the ruler's theme class, clipping, input handling, and non-stretching layout.
protected override void InitializeFields()
Overrides:
Marks the cached text metrics for recalculation after the ruler font changes.
protected override void OnFontChanged(EventArgs e)
The event data.
Overrides:
Synchronizes ruler scale and width changes with the day-view settings.
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
The changed property and its new value.
Overrides: