Siticone Logo
Siticone UI
DOCS
v2025.12.15
Docs Activity Indicator

Siticone Activity Indicator

The SiticoneActivityIndicator is a high-performance, Material Design-inspired loading control. It features complex spring-based physics animations, dynamic color cycling, and extensive customization options for creating modern "indeterminate" progress indicators.

Core Animation & State

Properties controlling the fundamental operation of the indicator.

Property Type Description & Usage Example
IsActive bool loadingSpinner.IsActive = true; Starts or stops the animation. Setting this to false will freeze the indicator in its current state.
Theme ActivityIndicatorTheme loadingSpinner.Theme = ActivityIndicatorTheme.Material; Applies a predefined style (Material, Light, Dark, ColorfulRainbow, Minimal).
Direction AnimationDirection loadingSpinner.Direction = AnimationDirection.CounterClockwise; Controls the rotation direction (Clockwise or CounterClockwise).
UltraFastPerformance bool loadingSpinner.UltraFastPerformance = true; Enables a simplified rendering mode that disables complex physics and events for maximum FPS on lower-end devices.

Colors & Styling

Customize the visual presentation, including strokes, colors, and margins.

Property Type Description & Usage Example
Color Color loadingSpinner.Color = Color.DodgerBlue; The primary color of the indicator stroke.
UseMultipleColors bool loadingSpinner.UseMultipleColors = true; If true, the indicator cycles through a list of colors (e.g., Google's 4-color spinner).
StrokeWidth int loadingSpinner.StrokeWidth = 6; The thickness of the rotating arc in pixels.
StrokeMargin int loadingSpinner.StrokeMargin = 4; Padding between the control's edge and the indicator.

Physics & Timing

Fine-tune the "feel" of the animation with detailed timing and physics parameters.

Property Type Description & Usage Example
AnimationSpeed int loadingSpinner.AnimationSpeed = 10; The timer interval in milliseconds. Lower values result in smoother, faster updates.
RotationSpeed double loadingSpinner.RotationSpeed = 8.5; The base rotation speed in degrees per frame.
SpringConstant double loadingSpinner.SpringConstant = 0.05; Controls the "bounciness" or acceleration of the expanding/contracting arc. Higher values are snappier.
MaxSweepAngle int loadingSpinner.MaxSweepAngle = 300; The maximum length (in degrees) the arc grows to before shrinking.
MinSweepAngle int loadingSpinner.MinSweepAngle = 20; The minimum length (in degrees) the arc shrinks to before growing.

Control Methods

Programmatic control over the animation state and color management.

Animation Control
// Starts the animation from the current state
loadingSpinner.Start();

// Stops the animation immediately
loadingSpinner.Stop();

// Resets the animation to the initial position (top) and restarts it
loadingSpinner.Reset();
Color Management
// Clear existing color cycle list
loadingSpinner.ClearColors();

// Add custom colors to the cycle
loadingSpinner.AddColor(Color.Red);
loadingSpinner.AddColor(Color.Blue);
loadingSpinner.AddColor(Color.Green);

// Enable multi-color mode to use the added list
loadingSpinner.UseMultipleColors = true;

Events

Hooks for monitoring animation cycles, progress, and state changes.

Event Handling
// 1. StateChanged
// Fires when IsActive changes (Started/Stopped).
spinner.StateChanged += (s, e) => 
{
                Console.WriteLine($"Spinner is now {(e.IsActive ? "Running" : "Stopped")}. Reason: {e.Reason}");
};

// 2. CycleCompleted
// Fires every time the indicator finishes a full expand/contract cycle.
spinner.CycleCompleted += (s, e) => 
{
                Console.WriteLine($"Completed cycle #{e.CycleCount}");
};

// 3. ProgressUpdated
// Fires periodically during animation (requires ProgressEventEnabled = true).
// Useful for syncing other UI elements to the spinner's rhythm.
spinner.ProgressEventEnabled = true;
spinner.ProgressUpdated += (s, e) => 
{
                // e.PhasePercentage indicates how far through the expand/contract phase we are (0-100)
    progressBar.Value = (int)e.PhasePercentage;
};

Designer & Smart Tags

The component includes a comprehensive Smart Tag menu for rapid configuration within Visual Studio.

Feature Category Capabilities
Theme Shortcuts One-click presets:
  • Material: Standard Google-style blue spinner.
  • Light/Dark: Gray spinners optimized for specific backgrounds.
  • Rainbow: High-energy, multi-color cycle (Red, Orange, Yellow, etc.).
  • Minimal: Thin, subtle gray indicator.
Control Actions Start/Stop/Reset: Control animation directly in the designer to preview behavior.
Toggle Direction: Switch between clockwise and counter-clockwise.
Settings Copy/Paste Settings: Easily transfer complex configurations between multiple indicators.

Detailed Usage Examples

Example 1: Async Operation Feedback

Using the indicator to show status during a long-running background task.

C# - Async Loading
private async void BtnLoad_Click(object sender, EventArgs e)
{
                // 1. Setup UI for loading
    btnLoad.Enabled = false;
    loadingSpinner.Visible = true;
    loadingSpinner.Start();
    
                try
    {
                // 2. Perform heavy task
                await Task.Delay(3000); 
                // Replace with actual work: await _service.GetDataAsync();
    }
                finally
    {
                // 3. Reset UI
        loadingSpinner.Stop();
        loadingSpinner.Visible = false;
        btnLoad.Enabled = true;
    }
}

Example 2: Custom Brand Styling

Configuring the indicator to match a specific brand identity (e.g., Purple & Teal).

C# - Brand Styling
private void ApplyBrandTheme()
{
                // Clear default material colors
    brandSpinner.ClearColors();
    
                // Add brand colors
    brandSpinner.AddColor(Color.Purple);
    brandSpinner.AddColor(Color.Teal);
    brandSpinner.AddColor(Color.Magenta);
    
                // Customize physics for a "heavier" feel
    brandSpinner.StrokeWidth = 8;
    brandSpinner.AnimationSpeed = 15; // Slower
    brandSpinner.SpringConstant = 0.02; // Less bouncy
    
                // Ensure multi-color mode is on
    brandSpinner.UseMultipleColors = true;
}

Example 3: Performance Mode

Optimizing for scenarios with many indicators (e.g., a list of downloading files).

C# - Performance Optimization
private void SetupListIndicators()
{
                foreach (var item in downloadList)
    {
                var spinner = new SiticoneActivityIndicator();
        
                // Enable UltraFastPerformance to disable complex physics/events
                // This drastically reduces CPU usage when many spinners run at once
        spinner.UltraFastPerformance = true;
        
                // Simplify visuals for small sizes
        spinner.Size = new Size(24, 24);
        spinner.StrokeWidth = 3;
        
        item.Controls.Add(spinner);
        spinner.Start();
    }
}