Siticone Vertical Slider 2
The SiticoneVSlider2 is a highly performant and customizable vertical slider control for Windows Forms.
Built for modern UIs, it features advanced event handling, diverse thumb animations (Blink, ColorTransition), and strict performance controls (UltraFastMode).
It is fully accessible with keyboard support and allows granular control over every visual aspect, from thumb size to track colors.
Core Data Properties
These properties define the fundamental data model of the slider: its range and current position.
| Property | Type | Description & Usage Example |
|---|---|---|
Value |
int |
slider.Value = 50;
The current position of the slider thumb.
Setting this property triggers the ValueChanged event and initiates animation unless UltraFastMode is enabled.
|
Minimum |
int | slider.Minimum = 0; The lowest possible value for the slider. |
Maximum |
int | slider.Maximum = 100; The highest possible value for the slider. |
Appearance & Dimensions
Fine-tune the geometry and coloring of the slider components. SiticoneVSlider2 separates styling for normal and read-only states.
| Property | Type | Description & Usage Example |
|---|---|---|
ThumbWidth |
int | slider.ThumbWidth = 24; Width of the slider thumb in pixels. Allows for rectangular handles. |
ThumbHeight |
int | slider.ThumbHeight = 9; Height of the slider thumb in pixels. |
TrackWidth |
int | slider.TrackWidth = 4; The thickness of the slider track. |
TrackColor |
Color | slider.TrackColor = Color.LightGray; The color of the background track. |
FillColor |
Color | slider.FillColor = Color.SeaGreen; The color representing the value from minimum to the current position. |
ThumbColor |
Color | slider.ThumbColor = Color.ForestGreen; The main color of the thumb handle. |
ThumbHoverColor |
Color | slider.ThumbHoverColor = Color.LimeGreen; Thumb color when the mouse pointer is over it. |
Padding |
Padding | slider.Padding = new Padding(0, 5, 0, 5); Internal spacing to prevent the thumb from being clipped at the ends of the track. |
Animations & Visual Effects
Controls for dynamic visual feedback.
Note: Animations are automatically suspended when UltraFastMode is true.
| Property | Type | Description & Usage Example |
|---|---|---|
ThumbAnimation |
ThumbAnimation |
slider.ThumbAnimation = ThumbAnimation.Blink;
Sets the idle animation for the thumb:
|
CanShake |
bool | slider.CanShake = true; If true, the slider shakes horizontally when a user tries to change a Read-Only value. |
Behavior & Interaction
Manage how the user interacts with the slider via mouse and keyboard.
| Property | Type | Description & Usage Example |
|---|---|---|
IsReadOnly |
bool |
slider.IsReadOnly = false;
If true, user interaction is blocked.
Attempting to move the slider triggers the ReadOnlyAttempt event and feedback effects (Shake/Beep).
|
KeyboardEnabled |
bool | slider.KeyboardEnabled = true; Enables control via Arrow keys (SmallChange) and Page keys (LargeChange). |
MouseWheelEnabled |
bool | slider.MouseWheelEnabled = true; Allows changing value by scrolling the mouse wheel while the control is focused. |
SmallChange |
int | slider.SmallChange = 1; The value increment for arrow key presses. |
MouseWheelChange |
int | slider.MouseWheelChange = 5; The value increment for one tick of the mouse wheel. |
UltraFastMode |
bool | slider.UltraFastMode = true; Disables all non-essential animations (Blink, transitions, smooth scrolling) to maximize rendering performance. Ideal for high-density dashboards. |
Public Methods
// Restores all properties (colors, dimensions, behavior) to their initial factory settings.
siticoneVSlider2.ResetToDefaults();
// 1. Copy current configuration to clipboard
sliderSource.CopySettings();
// 2. Apply configuration to another slider
sliderDestination.PasteSettings();
Events & Lifecycle
The SiticoneVSlider2 provides a granular event model suitable for complex applications requiring precise state management.
// 1. ValueChangeStarted
// Fires when the user starts interacting (Mouse Down).
// Use this to pause real-time updates or heavy processing.
slider.ValueChangeStarted += (s, e) =>
{
Console.WriteLine("User started dragging.");
PauseLiveStream();
};
// 2. ValueChanged
// Fires continuously as the value changes.
// Use for lightweight UI updates (labels).
slider.ValueChanged += (s, e) =>
{
// e provides OldValue and NewValue
lblValue.Text = e.NewValue.ToString();
};
// 3. ValueChangeCompleted
// Fires when the user finishes interacting (Mouse Up).
// Use this for committing changes, database saves, or resuming heavy tasks.
slider.ValueChangeCompleted += (s, e) =>
{
Console.WriteLine("User released thumb at: " + e.NewValue);
ResumeLiveStream();
SaveToDatabase(e.NewValue);
};
// 4. ReadOnlyAttempt
// Fires when a user tries to change a read-only slider.
slider.ReadOnlyAttempt += (s, e) =>
{
MessageBox.Show("This setting is locked by administrator.");
};
// 5. TrackClick
// Fires when the track is clicked (but not the thumb).
slider.TrackClick += (s, e) =>
{
Console.WriteLine($"Track clicked at value: {e.Value}");
};
Designer Support
Extensive Smart Tag support is available in the Visual Studio Designer.
| Section | Actions |
|---|---|
Theme Presets |
Instantly apply full color schemes: Forest Green, Ocean Blue, Sunset Orange, Royal Purple, Crimson Red, Charcoal Gray, etc. |
Value Presets |
Quickly set common ranges: 0 to 100, Bipolar (-100 to 100). |
Actions |
Copy/Paste UI Settings, Reset to Defaults. |
Detailed Usage Examples
Example 1: Audio Mixer Fader (Green Theme)
Creates a slider styled like a professional audio console fader using the ThumbWidth and ThumbHeight properties.
private SiticoneVSlider2 CreateAudioFader()
{
var fader = new SiticoneVSlider2
{
Size = new Size(45, 300),
Minimum = -60, // dB Scale
Maximum = 10,
Value = 0,
// Fader Styling
ThumbWidth = 35, // Wide thumb
ThumbHeight = 15, // Short height
ThumbBorderSize = 1,
TrackWidth = 4,
// Green Theme Palette
TrackColor = Color.FromArgb(40, 40, 40),
FillColor = Color.Transparent, // Faders typically don't have a fill bar
ThumbColor = Color.SeaGreen,
ThumbHoverColor = Color.SpringGreen,
ThumbBorderColor = Color.Silver,
// Precision
SmallChange = 1,
MouseWheelChange = 2
};
// Add a center detent (snap to 0dB)
fader.ValueChanged += (s, e) =>
{
if (Math.Abs(e.NewValue) < 2 && e.NewValue != 0)
{
// Snap visually to 0
fader.Value = 0;
}
AudioEngine.SetGain(fader.Value);
};
return fader;
}
Example 2: Animated Alert Monitor
Demonstrates the ThumbAnimation property. The slider acts as a read-only gauge that blinks red when levels are critical.
private SiticoneVSlider2 _cpuGauge;
private void UpdateCpuLoad(int loadPercentage)
{
_cpuGauge.Value = loadPercentage;
if (loadPercentage > 90)
{
// Critical State: Blink Red
_cpuGauge.ThumbColor = Color.Crimson;
_cpuGauge.FillColor = Color.Crimson;
_cpuGauge.ThumbAnimation = ThumbAnimation.Blink;
}
else if (loadPercentage > 75)
{
// Warning State: Solid Orange
_cpuGauge.ThumbColor = Color.Orange;
_cpuGauge.FillColor = Color.Orange;
_cpuGauge.ThumbAnimation = ThumbAnimation.Normal;
}
else
{
// Normal State: Solid Green
_cpuGauge.ThumbColor = Color.SeaGreen;
_cpuGauge.FillColor = Color.SeaGreen;
_cpuGauge.ThumbAnimation = ThumbAnimation.Normal;
}
}
private void InitializeGauge()
{
_cpuGauge = new SiticoneVSlider2
{
IsReadOnly = true, // User cannot edit
CanShake = true, // Shake if clicked
Minimum = 0,
Maximum = 100,
ThumbWidth = 20,
ThumbHeight = 20
};
}
Example 3: Precision Data Input
Uses the event lifecycle to manage heavy data operations efficiently, only saving when the user stops dragging.
private void SetupDataSlider(SiticoneVSlider2 slider)
{
slider.Minimum = 0;
slider.Maximum = 1000;
// 1. User starts dragging: Disable live chart updates to save CPU
slider.ValueChangeStarted += (s, e) =>
{
LiveChart.SuspendUpdates();
};
// 2. User dragging: Update simple label only
slider.ValueChanged += (s, e) =>
{
lblPreview.Text = $"Value: {e.NewValue}";
};
// 3. User finishes: Commit to DB and refresh chart
slider.ValueChangeCompleted += async (s, e) =>
{
lblStatus.Text = "Saving...";
await Database.SaveSettingAsync("Threshold", e.NewValue);
LiveChart.ResumeUpdates();
lblStatus.Text = "Saved";
};
}