Slider Class
Namespace: GHIElectronics.TinyCLR.UI.Controls · Assembly: GHIElectronics.TinyCLR.UI
Horizontal or vertical value slider with optional tick marks and snap-to intervals. The knob is rendered with the shared Scale9 Button bitmaps so it picks up the theme's surface styling automatically.
public class Slider : ContentControl, IDisposable
Constructors
Slider()
public Slider() : this(0, 0)
No description available.
Slider(int width, int height)
public Slider(int width, int height)
No description available.
| Parameter | Type | Description |
|---|---|---|
width | int | |
height | int |
Properties
Alpha
public ushort Alpha { get; set; }
No description available.
RadiusBorder
public int RadiusBorder { get; set; }
Corner radius in pixels for the Scale9Image-rendered bar. (inherited)
Orientation
public Orientation Orientation { get; set; }
Logical screen rotation. (inherited)
Minimum
public double Minimum { get; set; }
No description available.
Maximum
public double Maximum { get; set; }
No description available.
Value
public double Value { get; set; }
Current needle position. Only this property doesn't dirty the background — the pointer is repainted every frame. (inherited)
KnobSize
public int KnobSize { get; set; }
Knob size along the slide axis (px).
TickInterval
public int TickInterval { get; set; }
Number of tick mark intervals along the track. 0 disables ticks.
SnapInterval
public int SnapInterval { get; set; }
Number of snap stops along the track. 0 disables snap (continuous).
TrackColor
public Media.Color TrackColor { get; set; }
Color used for the track line and tick marks.
Methods
OnRender(DrawingContext dc)
public override void OnRender(DrawingContext dc)
Renders the DataGrid onto it's parent container's graphics. (inherited)
| Parameter | Type | Description |
|---|---|---|
dc | DrawingContext |
OnTouchDown(TouchEventArgs e)
protected override void OnTouchDown(TouchEventArgs e)
Handles the touch down event. (inherited)
| Parameter | Type | Description |
|---|---|---|
e | TouchEventArgs | Touch event arguments. |
OnTouchUp(TouchEventArgs e)
protected override void OnTouchUp(TouchEventArgs e)
Handles the touch up event. (inherited)
| Parameter | Type | Description |
|---|---|---|
e | TouchEventArgs | Touch event arguments. |
OnTouchMove(TouchEventArgs e)
protected override void OnTouchMove(TouchEventArgs e)
Handles the touch move event. (inherited)
| Parameter | Type | Description |
|---|---|---|
e | TouchEventArgs | Touch event arguments. |
OnButtonDown(ButtonEventArgs e)
protected override void OnButtonDown(ButtonEventArgs e)
Hardware button support: Left/Right step a horizontal slider, Up/Down step a vertical slider. Step size is one snap interval, or 1% of the range when SnapInterval is 0.
| Parameter | Type | Description |
|---|---|---|
e | ButtonEventArgs |
Dispose()
public void Dispose()
Releases buffered memory (the unmanaged firmware/application buffers). (inherited)
Dispose(bool disposing)
protected virtual void Dispose(bool disposing)
Closes a response stream, if present. (inherited)
| Parameter | Type | Description |
|---|---|---|
disposing | bool | Not used. |
Events
ValueChanged
public event ValueChangedEventHandler ValueChanged
Raised when the pin transitions on an edge selected by ValueChangedEdge. The handler runs on the driver's event thread — keep it short and avoid blocking. (inherited)