Class RangeSlider
- Namespace
- PluginUI
- Assembly
- PluginUI.dll
Slider with two thumbs selecting a range (key range, frequency band, loop points). Drag a thumb, or the band between them to move both; Shift = fine; double-click a thumb resets it. Each end can be bound to a parameter.
public class RangeSlider : Control
- Inheritance
-
RangeSlider
- Inherited Members
Constructors
RangeSlider()
Creates a range slider (0 – 1).
public RangeSlider()
Properties
DefaultHigh
Default of the upper end (reset).
public double DefaultHigh { get; set; }
Property Value
DefaultLow
Default of the lower end (reset).
public double DefaultLow { get; set; }
Property Value
DefaultSize
Natural size used when no explicit size is given.
protected override Size DefaultSize { get; }
Property Value
FineFactor
Sensitivity multiplier while Shift is held.
public float FineFactor { get; set; }
Property Value
Formatter
Formatter of a normalized end value (default: parameter text, or percent).
[Browsable(false)]
public Func<double, string>? Formatter { get; set; }
Property Value
High
Upper end (normalized).
public double High { get; set; }
Property Value
HighParameter
Parameter bound to the upper end.
public IParameter? HighParameter { get; set; }
Property Value
Low
Lower end (normalized).
public double Low { get; set; }
Property Value
LowParameter
Parameter bound to the lower end.
public IParameter? LowParameter { get; set; }
Property Value
MinimumGap
Minimum distance between the ends (normalized).
public double MinimumGap { get; set; }
Property Value
Orientation
Direction of travel.
public Orientation Orientation { get; set; }
Property Value
StepCount
Discrete steps of both ends when unbound (0 = continuous).
public int StepCount { get; set; }
Property Value
ValueText
Text drawn in the value area (null = no value area).
public override string? ValueText { get; }
Property Value
Methods
OnAttached()
Called when the element joins a host (subscribe to external events here).
protected override void OnAttached()
OnCaptureLost()
The mouse capture was lost without a button release.
protected override void OnCaptureLost()
OnDetached()
Called when the element leaves its host (unsubscribe here).
protected override void OnDetached()
OnMouseDown(MouseEventArgs)
Mouse button pressed over the element (or captured).
protected override void OnMouseDown(MouseEventArgs e)
Parameters
OnMouseLeave()
The mouse left the element.
protected override void OnMouseLeave()
OnMouseMove(MouseEventArgs)
Mouse moved over the element (or captured).
protected override void OnMouseMove(MouseEventArgs e)
Parameters
OnMouseUp(MouseEventArgs)
Mouse button released.
protected override void OnMouseUp(MouseEventArgs e)
Parameters
OnMouseWheel(MouseEventArgs)
Mouse wheel over the element.
protected override void OnMouseWheel(MouseEventArgs e)
Parameters
RenderVector(DrawingContext, Rect, VectorStyle)
Vector rendering of the widget area.
protected override void RenderVector(DrawingContext dc, Rect widget, VectorStyle style)
Parameters
dcDrawingContextwidgetRectstyleVectorStyle
Events
RangeChanged
Raised when either end changes.
public event Action<RangeSlider, double, double>? RangeChanged