Table of Contents

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

double

DefaultLow

Default of the lower end (reset).

public double DefaultLow { get; set; }

Property Value

double

DefaultSize

Natural size used when no explicit size is given.

protected override Size DefaultSize { get; }

Property Value

Size

FineFactor

Sensitivity multiplier while Shift is held.

public float FineFactor { get; set; }

Property Value

float

Formatter

Formatter of a normalized end value (default: parameter text, or percent).

[Browsable(false)]
public Func<double, string>? Formatter { get; set; }

Property Value

Func<double, string>

High

Upper end (normalized).

public double High { get; set; }

Property Value

double

HighParameter

Parameter bound to the upper end.

public IParameter? HighParameter { get; set; }

Property Value

IParameter

Low

Lower end (normalized).

public double Low { get; set; }

Property Value

double

LowParameter

Parameter bound to the lower end.

public IParameter? LowParameter { get; set; }

Property Value

IParameter

MinimumGap

Minimum distance between the ends (normalized).

public double MinimumGap { get; set; }

Property Value

double

Orientation

Direction of travel.

public Orientation Orientation { get; set; }

Property Value

Orientation

StepCount

Discrete steps of both ends when unbound (0 = continuous).

public int StepCount { get; set; }

Property Value

int

ValueText

Text drawn in the value area (null = no value area).

public override string? ValueText { get; }

Property Value

string

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

e MouseEventArgs

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

e MouseEventArgs

OnMouseUp(MouseEventArgs)

Mouse button released.

protected override void OnMouseUp(MouseEventArgs e)

Parameters

e MouseEventArgs

OnMouseWheel(MouseEventArgs)

Mouse wheel over the element.

protected override void OnMouseWheel(MouseEventArgs e)

Parameters

e MouseEventArgs

RenderVector(DrawingContext, Rect, VectorStyle)

Vector rendering of the widget area.

protected override void RenderVector(DrawingContext dc, Rect widget, VectorStyle style)

Parameters

dc DrawingContext
widget Rect
style VectorStyle

Events

RangeChanged

Raised when either end changes.

public event Action<RangeSlider, double, double>? RangeChanged

Event Type

Action<RangeSlider, double, double>