Class RadClockElement
Represents a clock element that displays time with analog hour, minute, and second hands. This element provides the core visual functionality for the RadClock control.
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
public class RadClockElement : LightVisualElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IComponent, IDisposable, IBindableComponent, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider
Constructors
RadClockElement()
Initializes a new instance of the RadClockElement class with default settings.
Declaration
public RadClockElement()
Properties
HoursArrow
Gets or sets the arrow element that represents the hours hand of the clock. This element is rotated to indicate the current hours value, taking minutes into account for smooth movement.
Declaration
public ArrowElement HoursArrow { get; set; }
Property Value
ArrowElement
|
MinutesArrow
Gets or sets the arrow element that represents the minutes hand of the clock. This element is rotated to indicate the current minutes value.
Declaration
public ArrowElement MinutesArrow { get; set; }
Property Value
ArrowElement
|
Offset
Gets or sets the time offset applied to the displayed time when ShowSystemTime is enabled. This offset is added to the current system time to calculate the displayed time.
Declaration
public TimeSpan Offset { get; set; }
Property Value
System.TimeSpan
|
SecondsArrow
Gets or sets the arrow element that represents the seconds hand of the clock. This element is rotated to indicate the current seconds value.
Declaration
public ArrowElement SecondsArrow { get; set; }
Property Value
ArrowElement
|
ShowSystemTime
Gets or sets a value indicating whether the clock automatically displays and updates the current system time. When set to true, the clock updates every second to show the current time plus any Offset.
Declaration
public virtual bool ShowSystemTime { get; set; }
Property Value
System.Boolean
|
Value
Gets or sets the specific time value displayed by the clock. When set to a non-null value, the clock displays this specific time and stops updating with system time. When set to null, the clock behavior depends on the ShowSystemTime property.
Declaration
public virtual DateTime? Value { get; set; }
Property Value
System.Nullable<System.DateTime>
|
Methods
CreateChildElements()
Creates and initializes the child elements that make up the clock, including the hour, minute, and second hands, the central dot, and starts the timer for automatic updates when ShowSystemTime is enabled.
Declaration
protected override void CreateChildElements()
Overrides
DisposeManagedResources()
Disposes of managed resources, specifically stopping and disposing the internal timer used for automatic time updates.
Declaration
protected override void DisposeManagedResources()
Overrides
SetClock(DateTime)
Sets the clock hands to display the specified time by calculating and applying the appropriate angles for the hour, minute, and second hands.
Declaration
public virtual void SetClock(DateTime value)
Parameters
System.DateTime
value
The time value to display on the clock. |