Siticone Logo
Siticone UI
DOCS
v2025.12.15
Docs Clock (Digital)

Siticone Digital Clock

The SiticoneDigitalClock is a modern, text-based timekeeping control. Unlike the analog version, this control focuses on typography, date formatting, and clear readability. It supports 12/24 hour formats, blinking colons, and customizable date/day display.

Appearance & Styling

Customize the typography and colors for the Time, Date, and Day of Week separately.

Property Type Description & Usage Example
TimeColor Color clock.TimeColor = Color.WhiteSmoke; The color of the main time text (HH:mm:ss).
TimeFont Font clock.TimeFont = new Font("Segoe UI", 48F); The font used for the time display.
DateColor Color clock.DateColor = Color.DarkGray; The color of the date string (e.g., "January 1, 2025").
DayColor Color clock.DayColor = Color.DimGray; The color of the day of the week (e.g., "Monday").
EnableShadow bool clock.EnableShadow = true; Adds a subtle drop shadow to all text elements for better contrast.

Time & Date Formatting

Control how the time and date are presented to the user.

Property Type Description & Usage Example
TimeFormat Enum clock.TimeFormat = DigitalClockTimeFormat.TwelveHourWithAmPm; Toggles between TwentyFourHour (14:00) and TwelveHourWithAmPm (2:00 PM).
DateFormat string clock.DateFormat = "yyyy-MM-dd"; Standard .NET Date format string. Default is "D" (Long Date).
ShowSeconds bool clock.ShowSeconds = true; Toggles the display of seconds.
ColonBlink bool clock.ColonBlink = true; If enabled (and seconds are hidden), the colon between hours and minutes will blink every second.
DisplayAlignment StringAlignment clock.DisplayAlignment = StringAlignment.Center; Aligns the text to the Left, Center, or Right of the control.

Performance

Optimization for low-resource environments.

Property Type Description & Usage Example
UltraFastPerformance bool clock.UltraFastPerformance = true; Disables shadows, high-quality anti-aliasing, and transparency. Reduces CPU usage significantly.

Events

Precise time-tracking events for application logic.

Event Descriptions & Wiring
// 1. TimeUpdated Event
// Fires on every tick (internal interval depends on settings).
clock.TimeUpdated += (s, e) => 
{
                Console.WriteLine($"Tick: {e.CurrentTime}");
};

// 2. DateChanged Event
// Fires specifically when the day rolls over (at midnight).
clock.DateChanged += (s, e) => 
{
                RefreshDailySchedule(e.NewDate);
};

Detailed Usage Examples

Example 1: Modern 12-Hour Clock

A standard wall-clock style setup with AM/PM indicators.

C# - 12H Setup
private void Setup12HourClock()
{
    clock.TimeFormat = DigitalClockTimeFormat.TwelveHourWithAmPm;
    clock.TimeColor = Color.White;
    clock.DateColor = Color.LightGray;
    
                // Hide day of week, show date
    clock.ShowDay = false;
    clock.ShowDate = true;
    clock.DateFormat = "MMMM dd, yyyy";
    
                // Enable shadow for depth
    clock.EnableShadow = true;
}

Example 2: Minimalist 24-Hour Clock

A sleek, blinking colon display often found on VCRs or server dashboards.

C# - Minimalist 24H
private void SetupMinimalClock()
{
    clock.TimeFormat = DigitalClockTimeFormat.TwentyFourHour;
    
                // Hide seconds to enable colon blinking
    clock.ShowSeconds = false;
    clock.ColonBlink = true;
    
                // Hide extra info
    clock.ShowDate = false;
    clock.ShowDay = false;
    
                // Cyberpunk styling
    clock.TimeColor = Color.Cyan;
    clock.TimeFont = new Font("Consolas", 36f, FontStyle.Bold);
}

Example 3: Alarm Clock Logic

Using the `TimeUpdated` event to trigger an alarm at a specific time.

C# - Alarm
private DateTime _alarmTime = DateTime.Today.AddHours(8); // 8:00 AM

private void InitializeAlarm()
{
    clock.TimeUpdated += CheckAlarm;
}

private void CheckAlarm(object sender, DigitalTimeChangedEventArgs e)
{
                if (e.CurrentTime.Hour == _alarmTime.Hour && 
        e.CurrentTime.Minute == _alarmTime.Minute && 
        e.CurrentTime.Second == 0)
    {
                MessageBox.Show("Wake Up!");
    }
}

Example 4: Performance Mode Toggle

Switching rendering modes based on application state.

C# - Perf Mode
private void ToggleLowPowerMode(bool lowPower)
{
                if (lowPower)
    {
                // Disable shadows and high-quality rendering
        clock.UltraPerformanceMode = true;
        clock.BackColor = Color.Black; // Opaque background is faster
    }
                else
    {
        clock.UltraPerformanceMode = false;
        clock.BackColor = Color.Transparent;
    }
}

Example 5: Custom Date & Day Styling

Creating a calendar-like widget appearance.

C# - Widget Style
private void SetupCalendarWidget()
{
                // Left align for widget look
    clock.DisplayAlignment = StringAlignment.Near;
    
    clock.TimeColor = Color.White;
    
                // Emphasize the Day of Week
    clock.DayColor = Color.Goldenrod;
    clock.DayFont = new Font("Segoe UI", 14f, FontStyle.Bold);
    
                // Subtle Date
    clock.DateColor = Color.Gray;
    clock.DateFormat = "dd MMM yyyy";
    
    clock.ShowSeconds = false;
}