Class RadClock
Represents a clock control that displays time with customizable appearance and functionality. The control can show system time or a specific time value with optional offset support.
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
public class RadClock : RadControl, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IPCHost, IAnalyticsProvider
Constructors
RadClock()
Initializes a new instance of the RadClock class with default settings. The control is configured with auto-sizing enabled and fixed dimensions.
Declaration
public RadClock()
Properties
AutoSize
Gets or sets a value indicating whether the control's size will be determined automatically based on the current font. When enabled, the control automatically adjusts its dimensions to accommodate the font size.
Declaration
public override bool AutoSize { get; set; }
Property Value
|
System.Boolean
|
Overrides
ClockElement
Gets the RadClockElement that encapsulates the UI representation and core functionality of the clock control.
Declaration
public RadClockElement ClockElement { get; }
Property Value
|
RadClockElement
|
DefaultSize
Gets the default size of the clock control.
Declaration
protected override Size DefaultSize { get; }
Property Value
|
System.Drawing.Size
|
ForeColor
This property is not relevant for this class as the RadClock consists of multiple visual elements with separate settings to customize their appearance.
Declaration
public override Color ForeColor { get; set; }
Property Value
|
System.Drawing.Color
|
Overrides
Offset
Gets or sets the time offset to apply to the displayed time. This offset is added to the system time when ShowSystemTime is true.
Declaration
public TimeSpan Offset { get; set; }
Property Value
|
System.TimeSpan
|
RightToLeft
Gets or sets the right-to-left text direction for the control. This property is not fully supported for the clock control.
Declaration
public override RightToLeft RightToLeft { get; set; }
Property Value
|
System.Windows.Forms.RightToLeft
|
ShowSystemTime
Gets or sets a value indicating whether the clock will display the current system time. When set to true, the clock automatically updates to show the current system time.
Declaration
public bool ShowSystemTime { get; set; }
Property Value
|
System.Boolean
|
Text
This property is not relevant for this class.
Declaration
public override string Text { get; set; }
Property Value
|
System.String
|
Overrides
Value
Gets or sets the current time value displayed by the clock. When set to null, the clock displays the system time if ShowSystemTime is enabled.
Declaration
public DateTime? Value { get; set; }
Property Value
|
System.Nullable<System.DateTime>
|
Methods
CreateChildItems(RadElement)
Creates the child elements for the clock control, specifically the RadClockElement.
Declaration
protected override void CreateChildItems(RadElement parent)
Parameters
|
RadElement
parent
The parent element to which child elements will be added. |
Overrides
InitializeRootElement(RootRadElement)
Initializes the root element of the clock control with specific configuration.
Declaration
protected override void InitializeRootElement(RootRadElement rootElement)
Parameters
|
RootRadElement
rootElement
The root element to initialize. |