Siticone Logo
Siticone UI
DOCS
v2025.12.15
Docs Taskbar Badge

Siticone Taskbar Badge System

The SiticoneTaskbarBadgeSystem is a non-visual component that enables advanced interaction with the Windows taskbar button. It allows you to overlay dynamic badges (numbers, alerts, notifications) directly onto your application's taskbar icon, similar to messaging apps or email clients. Features include animated transitions, blinking notifications, and system theme awareness.

Core Functionality

Properties to control the main badge value and display type.

Property Type Description & Usage Example
BadgeValue int badgeSystem.BadgeValue = 5; The number displayed on the badge. Setting this to 0 hides the badge unless in Notification mode.
BadgeType BadgeType badgeSystem.BadgeType = BadgeType.Counter; Determines the behavior: Counter (exact number), Numeric (formatted like 1K+), or Notification (dot only).
ParentForm Form badgeSystem.ParentForm = this; The form whose taskbar icon will be modified. Automatically detected if dropped in the designer.

Appearance & Styling

Customize the look of the badge to match your application branding.

Property Type Description & Usage Example
BadgeColor Color badgeSystem.BadgeColor = Color.Red; The background color of the badge circle.
TextColor Color badgeSystem.TextColor = Color.White; The color of the number or text inside the badge.
BadgeFont Font badgeSystem.BadgeFont = new Font("Segoe UI", 12f, FontStyle.Bold); The font used for rendering the counter number.
EnableNumeric bool badgeSystem.EnableNumeric = true; Enables formatting for large numbers (e.g., 1000 becomes "1K").
NumericFormat string badgeSystem.NumericFormat = "K"; Suffix style for large numbers: "K", "M", or "B".

Animation & Notification

Engage users with dynamic effects for new updates.

Property Type Description & Usage Example
EnableAnimation bool badgeSystem.EnableAnimation = true; Enables smooth transitions when the badge value changes.
AnimationType AnimationType badgeSystem.AnimationType = AnimationType.Bounce; The visual effect for updates: Fade, Bounce, or Pulse.
EnableFlash bool badgeSystem.EnableFlash = true; Allows the badge to flash (blink) rapidly to grab attention when triggered.
BlinkNotification bool badgeSystem.BlinkNotification = true; Specifically for Notification mode, makes the dot blink continuously.

System Integration

Adapt to the user's OS environment.

Property Type Description
EnableSystemThemeTracker bool If true, monitors Windows Light/Dark mode changes. Can be used to adjust badge colors dynamically.
CurrentSystemTheme SystemTheme Read-only. Returns the current OS theme state (Light or Dark).

Public Methods

UpdateBadgeValueImmediate(int value)
// Sets the badge value instantly, bypassing any animations.
// Useful for initial loading or bulk updates.
taskbarBadge.UpdateBadgeValueImmediate(10);
FlashBadge()
// Triggers the flash effect defined by FlashCount and FlashDuration.
// Useful for high-priority alerts.
taskbarBadge.FlashBadge();

Events

Event Handling
// 1. Badge Changed
// Fires after the visual update is complete.
taskbarBadge.BadgeChanged += (s, e) => 
{
                Console.WriteLine("Badge Updated on Taskbar");
};

// 2. Badge Updating (Cancellable)
// Fires before the value changes. Allows modification or cancellation.
taskbarBadge.BadgeUpdating += (s, e) => 
{
                // Prevent negative numbers
                if (e.NewValue < 0) e.Cancel = true;
};

// 3. System Theme Changed
// Fires when the user changes their Windows theme.
taskbarBadge.SystemThemeChanged += (s, e) => 
{
                if (e.NewTheme == SystemTheme.Dark)
        taskbarBadge.BadgeColor = Color.Cyan; // Brighter color for dark mode
                else
        taskbarBadge.BadgeColor = Color.DarkBlue;
};

Designer Support

Use the Smart Tag panel in Visual Studio to quickly apply presets.

Category Features
Badge Presets Counter Badge: Standard red circle with number.
Notification Badge: Blinking dot for alerts.
Numeric Badge: Formatted text (e.g., "1K").
Color Presets Red / Green / Blue Styles: Pre-configured color schemes with matching animations (Bounce, Pulse, Fade).

Detailed Usage Examples

Example 1: Unread Message Counter

Updates the taskbar icon to show the number of unread emails.

C# - Message Counter
private void OnNewMessageReceived(int unreadCount)
{
                // Standard counter setup
    taskbarBadge.BadgeType = BadgeType.Counter;
    taskbarBadge.BadgeColor = Color.Red;
    taskbarBadge.AnimationType = AnimationType.Bounce;
    
                // Update value - triggers animation
    taskbarBadge.BadgeValue = unreadCount;
    
                // Flash if urgent
                if (unreadCount > 10)
    {
        taskbarBadge.FlashBadge();
    }
}

Example 2: System Alert Notification

Uses the notification mode (blinking dot) to indicate a background alert without a number.

C# - Alert Dot
private void TriggerSystemAlert()
{
                // Switch to notification mode (just a dot)
    taskbarBadge.BadgeType = BadgeType.Notification;
    
                // Warning Color
    taskbarBadge.NotificationColor = Color.Gold;
    
                // Enable blinking to draw attention
    taskbarBadge.BlinkNotification = true;
    taskbarBadge.NotificationSpeed = 300; // Fast blink
    
                // Activate
    taskbarBadge.EnableNotification = true;
}

Example 3: Download Progress Indicator

While the badge is usually for counts, it can show status like "99%".

C# - Download Status
private void OnDownloadProgress(int percent)
{
    taskbarBadge.BadgeType = BadgeType.Numeric;
    taskbarBadge.BadgeColor = Color.DodgerBlue;
    
                // Disable animation for rapid updates to save resources
    taskbarBadge.EnableAnimation = false;
    
    taskbarBadge.BadgeValue = percent;
    
                if (percent >= 100)
    {
        taskbarBadge.BadgeColor = Color.LimeGreen;
        taskbarBadge.FlashBadge();
    }
}