Class Switch
- Namespace
- PluginUI
- Assembly
- PluginUI.dll
N-position selector switch (waveform, range, mode). Vector look: a slotted track with a lever and position
labels; bitmap look: a film-strip skin (new FilmStripSkin(strip, useStateIndex: true)).
public class Switch : ValueControl
- Inheritance
-
Switch
- Inherited Members
Constructors
Switch()
Creates a switch (3 positions unless bound or given items).
public Switch()
Switch(params string[])
Creates a switch with local position labels.
public Switch(params string[] items)
Parameters
itemsstring[]
Properties
ClickMode
Click behavior.
public SwitchClickMode ClickMode { get; set; }
Property Value
DefaultSize
Natural size used when no explicit size is given.
protected override Size DefaultSize { get; }
Property Value
Items
Position labels (null = parameter state labels).
public IReadOnlyList<string>? Items { get; set; }
Property Value
Orientation
Track direction.
public Orientation Orientation { get; set; }
Property Value
PositionCount
Number of positions.
public int PositionCount { get; }
Property Value
SelectedIndex
Selected position.
public int SelectedIndex { get; set; }
Property Value
ShowPositionLabels
Draws the position labels next to the track.
public bool ShowPositionLabels { get; set; }
Property Value
ValueText
Text drawn in the value area (null = no value area).
public override string? ValueText { get; }
Property Value
Methods
OnKeyDown(KeyEventArgs)
Key pressed while focused (bubbles to parents).
protected override void OnKeyDown(KeyEventArgs e)
Parameters
OnMouseDown(MouseEventArgs)
Mouse button pressed over the element (or captured).
protected override void OnMouseDown(MouseEventArgs e)
Parameters
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
RenderVector(DrawingContext, Rect, VectorStyle)
Vector rendering of the widget area.
protected override void RenderVector(DrawingContext dc, Rect widget, VectorStyle style)
Parameters
dcDrawingContextwidgetRectstyleVectorStyle