Siticone Clock
The SiticoneClock is a modern, vector-based analog clock control.
It supports high-quality rendering, gradient faces, customizable hands, integrated digital display, and precise time events. It is fully transparent-capable and optimized for smooth animation.
Appearance & Styling
Customize the face, border, and overall look of the clock.
| Property | Type | Description & Usage Example |
|---|---|---|
FaceColor |
Color | clock.FaceColor = Color.WhiteSmoke; The primary background color of the clock dial. |
EnableFaceGradient |
bool |
clock.EnableFaceGradient = true;
Enables a linear gradient background using FaceColor and FaceColor2.
|
ShowBorder |
bool | clock.ShowBorder = true; Draws a rim around the clock face. |
BorderColor |
Color | clock.BorderColor = Color.DimGray; The color of the outer rim. |
ShowShadow |
bool | clock.ShowShadow = true; Adds a subtle drop shadow to the hands for depth. |
Hands Configuration
Adjust the dimensions, colors, and styles of the Hour, Minute, and Second hands.
| Property | Type | Description & Usage Example |
|---|---|---|
HourHandColor |
Color | clock.HourHandColor = Color.Black; Color of the hour hand. |
MinuteHandLengthRatio |
float | clock.MinuteHandLengthRatio = 0.7f; The length of the minute hand relative to the clock radius (0.0 to 1.0). |
ShowSecondHand |
bool | clock.ShowSecondHand = true; Toggles the visibility of the second hand. |
HandCapStyle |
LineCap | clock.HandCapStyle = LineCap.Round; Sets the shape of the ends of the hands (Round, Square, Triangle, etc.). |
CenterCapRadius |
float | clock.CenterCapRadius = 6f; Size of the circular cap covering the center pivot point. |
Ticks & Numerals
Control the markers and numbers on the dial.
| Property | Type | Description & Usage Example |
|---|---|---|
ShowNumbers |
bool | clock.ShowNumbers = true; Displays numbers 1 through 12 on the face. |
NumberFont |
Font | clock.NumberFont = new Font("Arial", 12); The font used for the hour numbers. |
TickColor |
Color | clock.TickColor = Color.DarkGray; The color of the minute/hour tick marks. |
Digital Display
Integrated digital time display on the clock face.
| Property | Type | Description & Usage Example |
|---|---|---|
ShowDigitalTime |
bool | clock.ShowDigitalTime = true; Displays the current time numerically on the face. |
DigitalTimeFormat |
string | clock.DigitalTimeFormat = "HH:mm:ss"; Standard DateTime format string (e.g., "hh:mm tt" for 12-hour format). |
Performance
Options to optimize rendering for low-end hardware.
| Property | Type | Description & Usage Example |
|---|---|---|
UltraFastPerformance |
bool | clock.UltraFastPerformance = true; Disables anti-aliasing, transparency, and smooth animations for maximum efficiency. Ideal for embedded systems or heavy UIs. |
Events
Respond to time changes to trigger alarms or updates.
// 1. SecondChanged Event
// Fires exactly when the second changes. Good for UI updates.
clock.SecondChanged += (s, e) =>
{
Console.WriteLine($"Second tick: {e.NewSecond}");
};
// 2. HourChanged Event
// Fires once per hour. Ideal for chimes or hourly tasks.
clock.HourChanged += (s, e) =>
{
PlayChime();
};
// 3. TimeChanged Event
// Fires on every refresh tick (approx. 25ms). Used for smooth custom animations.
clock.TimeChanged += (s, e) =>
{
// e.CurrentTime contains the precise time
};
Detailed Usage Examples
Example 1: Modern Minimalist Clock
A clean design with no numbers and thin hands.
private void SetupMinimalClock()
{
clock.FaceColor = Color.White;
clock.ShowBorder = true;
clock.BorderColor = Color.Black;
clock.BorderWidth = 2f;
// Hide numbers for clean look
clock.ShowNumbers = false;
// Thin, sleek hands
clock.HourHandWidth = 4f;
clock.MinuteHandWidth = 3f;
clock.SecondHandWidth = 1f;
clock.SecondHandColor = Color.Red;
// Add a digital readout
clock.ShowDigitalTime = true;
clock.DigitalTimeFormat = "HH:mm";
}
Example 2: Hourly Chime Implementation
Using events to create a functional grandfather clock behavior.
public void InitializeClock()
{
siticoneClock1.HourChanged += OnHourChange;
}
private void OnHourChange(object sender, HourChangedEventArgs e)
{
// Play a sound file corresponding to the hour count
int hour = e.NewHour % 12;
if (hour == 0) hour = 12;
Console.WriteLine($"BONG! It is {hour} o'clock.");
// SoundPlayer.Play();
}