Siticone Vertical Slider
The SiticoneVSlider is a customizable vertical slider control designed for modern Windows Forms applications.
It supports extensive features such as custom thumb animations (Blink, Gradient, Pulsate), visual feedback (Glow, Shadow), and advanced state management.
It includes built-in accessibility support, keyboard navigation, and a robust event system for data binding.
Value & Range
Properties that define the slider's numeric data limits and current position.
| Property | Type | Description & Usage Example |
|---|---|---|
Value |
int | slider.Value = 75; The current numeric value of the slider. Must be between Minimum and Maximum. Triggers animation when changed. |
Minimum |
int | slider.Minimum = 0; The lower bound of the slider's range. |
Maximum |
int | slider.Maximum = 100; The upper bound of the slider's range. |
Step |
int | slider.Step = 5; The increment/decrement value used when using keyboard controls (Arrow keys) or context menu actions. |
Appearance & Track
Control the visual styling of the track, thumb size, and margins.
| Property | Type | Description & Usage Example |
|---|---|---|
TrackColor |
Color | slider.TrackColor = Color.LightGray; The color of the unfilled portion of the slider track (above the thumb). |
ElapsedTrackColor |
Color | slider.ElapsedTrackColor = Color.SeaGreen; The color of the filled portion of the track (from minimum to thumb). |
ThumbSize |
int | slider.ThumbSize = 20; The diameter of the thumb handle in pixels. |
ThumbColor |
Color | slider.ThumbColor = Color.MediumSeaGreen; The primary color of the slider thumb. |
ThumbBorderColor |
Color | slider.ThumbBorderColor = Color.White; The color of the border ring around the thumb. |
ControlMargin |
Padding | slider.ControlMargin = new Padding(0, 10, 0, 10); Internal spacing around the track. Useful to prevent the thumb from clipping at the edges. |
Thumb Animations
Configure how the thumb behaves visually. The ThumbType property controls active animations.
Note: Complex animations are disabled if UltraFastMode is active.
| Property | Type | Description & Usage Example |
|---|---|---|
ThumbType |
ThumbType |
slider.ThumbType = ThumbType.Pulsate;
Determines the visual mode:
|
ThumbPressShrink |
int | slider.ThumbPressShrink = 4; Pixels by which the thumb shrinks when pressed. |
Visual Effects
Enhancements like shadows, glows, and hover interactions to improve UI depth.
| Property | Type | Description & Usage Example |
|---|---|---|
ShadowEnabled |
bool | slider.ShadowEnabled = true; Renders a drop shadow beneath the thumb for depth. |
HoverEffects |
bool | slider.HoverEffects = true; If true, the thumb expands slightly when the mouse hovers over it. |
GlowColor |
Color | slider.GlowColor = Color.FromArgb(100, Color.SpringGreen); |
GlowSize |
int | slider.GlowSize = 15; The radius of the glow effect around the thumb. |
Interaction & Behavior
Settings controlling user input, accessibility, and context menus.
| Property | Type | Description & Usage Example |
|---|---|---|
IsReadOnly |
bool | slider.IsReadOnly = true; If true, the slider cannot be moved by the user. Triggers 'Shake' or 'Beep' on interaction if enabled. |
ContextMenuEnabled |
bool | slider.ContextMenuEnabled = true; Enables a built-in right-click menu with options to Increment, Decrement, or Set Value manually. |
ShowToolTip |
bool | slider.ShowToolTip = true; Displays a tooltip with the current value and keyboard shortcuts while dragging or hovering. |
MouseWheelDelta |
int | slider.MouseWheelDelta = 5; The amount the value changes when scrolling the mouse wheel. |
Feedback
Haptic-like feedback settings for invalid interactions (e.g., clicking a read-only slider).
| Property | Type | Description & Usage Example |
|---|---|---|
CanShake |
bool | slider.CanShake = true; Triggers a horizontal shake animation if the user tries to modify a ReadOnly slider. |
CanBeep |
bool | slider.CanBeep = true; Plays a system beep sound on invalid input. |
System & Performance
| Property | Type | Description & Usage Example |
|---|---|---|
UltraFastMode |
bool |
slider.UltraFastMode = true;
Disables complex effects (Glow, Pulsate, Shadows) and forces ThumbType.Solid.
Use this when rendering many sliders simultaneously to maximize FPS.
|
Public Methods
Programmatic control over the slider's state.
// Resets the slider value to the Minimum property.
siticoneVSlider1.Reset();
// 1. Save the current visual and data configuration
var state = siticoneVSlider1.SaveState();
// ... modify slider properties ...
// 2. Restore the previous configuration
siticoneVSlider1.GetState(state);
Events
// 1. Standard ValueChanged
// Fires every time the value property updates (during drag or animation).
slider.ValueChanged += (s, e) =>
{
Console.WriteLine("Value updated.");
};
// 2. ValueHasChanged (Delegate)
// Provides the integer value directly in the signature.
slider.ValueHasChanged += (s, val) =>
{
lblDisplay.Text = val.ToString() + "%";
};
// 3. ValueChangedComplete
// Fires ONLY when the user releases the mouse button after dragging.
// Ideal for heavy operations like applying filters or database updates.
slider.ValueChangedComplete += (s, finalVal) =>
{
ApplyAudioSettings(finalVal);
};
// 4. DynamicValueUpdated
// Provides access via custom EventArgs.
slider.DynamicValueUpdated += (s, e) =>
{
int val = e.Value;
UpdateLivePreview(val);
};
Designer Experience
The SiticoneVSlider includes a comprehensive Smart Tag panel in Visual Studio.
| Category | Features |
|---|---|
Theme Presets |
Instantly apply styles: Default (Blue), Dark, Light, Green, Red. |
Animation Presets |
Quickly set ThumbType: Solid, Blink, Gradient, Pulsate, Glow. |
Size Presets |
Compact, Standard, Large, Extra Large configurations. |
Range Presets |
0-100 (Default), Percentage, Extended (0-1000), Bipolar (-100 to 100). |
Copy/Paste |
Copy the entire UI configuration of one slider and paste it onto another instance. |
Detailed Usage Examples
Example 1: Audio Volume Controller
Creates a responsive volume slider with a gradient thumb that cycles colors.
private SiticoneVSlider CreateVolumeSlider()
{
var volumeSlider = new SiticoneVSlider
{
Size = new Size(40, 200),
Minimum = 0,
Maximum = 100,
Value = 50,
// Visuals
ThumbType = ThumbType.Gradient, // Cycles colors
ThumbSize = 22,
TrackColor = Color.FromArgb(230, 230, 230),
ElapsedTrackColor = Color.MediumSeaGreen,
// Effects
HoverEffects = true,
ShadowEnabled = true,
ShowToolTip = true,
// Context Menu for precise control
ContextMenuEnabled = true
};
// Handle volume change
volumeSlider.ValueHasChanged += (s, val) =>
{
AudioSystem.SetMasterVolume(val / 100f);
};
return volumeSlider;
}
Example 2: Read-Only System Gauge
Uses the slider as a read-only progress indicator (e.g., CPU Usage). It shakes if the user tries to click it.
private SiticoneVSlider CreateCpuGauge()
{
var cpuGauge = new SiticoneVSlider
{
// Data Binding would typically update 'Value'
Minimum = 0,
Maximum = 100,
// Make it non-interactive
IsReadOnly = true,
// Feedback: Shake if user clicks
CanShake = true,
CanBeep = false,
// Read-Only Specific Styling
ReadOnlyTrackColor = Color.FromArgb(40, 40, 40),
ReadOnlyElapsedTrackColor = Color.Crimson,
ReadOnlyThumbColor = Color.White,
ReadOnlyThumbSize = 10 // Smaller thumb for gauges
};
return cpuGauge;
}
Example 3: Thermometer with Pulsating Thumb
Visualizes temperature with a pulsating thumb to indicate "active" monitoring.
private void SetupThermometer(SiticoneVSlider slider)
{
slider.Minimum = -20;
slider.Maximum = 50;
// Thumb beats/pulsates to show activity
slider.ThumbType = ThumbType.Pulsate;
slider.ThumbColor = Color.OrangeRed;
// Add a Glow effect
slider.ThumbType = ThumbType.Glow; // Note: Last assignment wins, choose one
slider.GlowColor = Color.FromArgb(100, Color.Red);
slider.GlowSize = 15;
// Update color dynamically based on temperature
slider.DynamicValueUpdated += (s, e) =>
{
if (e.Value < 0)
slider.ElapsedTrackColor = Color.LightBlue;
else if (e.Value > 30)
slider.ElapsedTrackColor = Color.Red;
else
slider.ElapsedTrackColor = Color.ForestGreen;
};
}