Siticone Logo
Siticone UI
DOCS
v2025.12.15
Docs Toggle Switch 2

Siticone Toggle Switch 2

The SiticoneToggleSwitch2 is a next-generation animated toggle control designed for modern UIs. It offers unparalleled customization, including unique thumb shapes (Circle, Square, Diamond), inner glow effects, and advanced animations like "Stretch" and "Inflate".

Thumb Customization

Configure the shape, size, and visual effects of the draggable thumb.

Property Type Description
ThumbShapeStyle Enum Defines the geometry of the thumb:
  • Circle: Standard round thumb.
  • Square: Rectangular thumb.
  • Diamond: Diamond-shaped thumb.
ThumbSizeRatio float The size of the thumb relative to the track's height (0.1 to 1.0). Default is 0.5 (half height).
ThumbInnerGlow bool Enables a subtle inner glow effect on the thumb for depth.
ThumbGlowColor Color The color of the inner glow effect.

Visual Appearance

Customize the track colors, borders, and hover effects.

Property Type Description
OnBackColor Color Background color of the track when ON.
OffBackColor Color Background color of the track when OFF.
OnThumbColor Color Color of the thumb when ON.
OffThumbColor Color Color of the thumb when OFF.
OnHoverColor Color Track color when hovered in ON state.
OffHoverColor Color Track color when hovered in OFF state.
ShowBorder bool Enables a border around the track.
BorderColor Color Color of the track border.

Animation Physics

Fine-tune the motion and feedback of the toggle action.

Property Type Description
AnimationDuration int Total duration of the toggle animation in milliseconds.
StretchOnToggle bool If true, the thumb elongates horizontally during the transition, simulating velocity.
StretchFactor float Controls the intensity of the stretch effect (0.1 to 1.0).
ThumbScaleStyle Enum Animation when pressing the thumb:
  • None: No scaling.
  • Inflate: Scales up.
  • Deflate: Scales down.
PulseOnHover bool Creates a subtle pulsating scale animation on hover.

Events

React to state changes and animation milestones.

CheckedChanged Event
// Fired when the Checked state changes.
toggle.CheckedChanged += (s, e) => 
{
                // e.IsChecked: The new state
                if (e.IsChecked)
    {
                EnableModule();
    }
};
BeforeCheckStateChanged Event
// Allows cancelling the toggle action.
toggle.BeforeCheckStateChanged += (s, e) => 
{
                if (e.NewValue == true && !IsAdmin())
    {
        e.Cancel = true;
                MessageBox.Show("Admin access required.");
    }
};
AnimationStateChanged Event
// Fired when animation starts or completes.
toggle.AnimationStateChanged += (s, e) => 
{
                if (e.State == AnimationState.Completed)
    {
                Console.WriteLine("Toggle animation finished.");
    }
};

Designer Support

Includes a rich Smart Tag menu with modern theme presets.

Category Features
Themes Apply presets like Light, Dark, Success, Neon Night, Cyberpunk, etc.
Animation Quick access to Stretch, Scale, and Pulse settings.
Settings Copy/Paste visual styles between controls.

Usage Examples

Example 1: iOS Style Toggle

A clean, smooth toggle similar to iOS switches.

C# - iOS Style
private void SetupIOSToggle()
{
    toggleIOS.OnBackColor = Color.FromArgb(52, 199, 89); // Green
    toggleIOS.OffBackColor = Color.FromArgb(233, 233, 234); // Light Gray
    toggleIOS.ThumbSizeRatio = 0.9f; // Large thumb
    
                // Animation
    toggleIOS.StretchOnToggle = true;
    toggleIOS.StretchFactor = 0.2f; // Subtle stretch
    toggleIOS.AnimationDuration = 250;
}

Example 2: Neon Cyberpunk Toggle

A futuristic style with glowing diamond thumb.

C# - Neon Style
private void SetupNeonToggle()
{
    toggleNeon.ThumbShapeStyle = ThumbStyle.Diamond;
    toggleNeon.OnBackColor = Color.FromArgb(255, 0, 198); // Hot Pink
    toggleNeon.OnThumbColor = Color.Cyan;
    
                // Glow Effect
    toggleNeon.ThumbInnerGlow = true;
    toggleNeon.ThumbGlowColor = Color.FromArgb(200, Color.Cyan);
    
                // Border
    toggleNeon.ShowBorder = true;
    toggleNeon.BorderColor = Color.Cyan;
}

Example 3: Read-Only Security Toggle

A locked toggle that shakes when clicked.

C# - Locked Toggle
private void SetupSecurityToggle()
{
    toggleSecure.Checked = true;
    toggleSecure.IsReadOnly = true;
    
                // Feedback
    toggleSecure.CanShake = true;
    toggleSecure.CanBeep = true;
    
    toggleSecure.ReadOnlyInteraction += (s, e) => 
    {
                MessageBox.Show("Security setting cannot be disabled.");
    };
}