Gauge Class
Namespace: GHIElectronics.TinyCLR.UI.Controls · Assembly: GHIElectronics.TinyCLR.UI
Analog gauge with calibrated tick marks, optional threshold arc, optional seven-segment digital readout, dial label, and pointer needle. Always square — pass the side length to the constructor. Rendering is cached: the static background (dial face, calibration, threshold, digital number, label) is drawn once into a backing bitmap; only the pointer is redrawn each paint. Any property change marks the background dirty.
public class Gauge : Image, IDisposable
Constructors
Gauge(int side)
public Gauge(int side) : base()
No description available.
| Parameter | Type | Description |
|---|---|---|
side | int |
Properties
Font
public Font Font { get; set; }
Font used by the text. (inherited)
EnableDigitalNumber
public bool EnableDigitalNumber { get; set; }
No description available.
EnableThreshold
public bool EnableThreshold { get; set; }
No description available.
BackColor
public MediaColor BackColor { get; set; }
No description available.
DialColor
public MediaColor DialColor { get; set; }
No description available.
ForeColor
public MediaColor ForeColor { get; set; }
No description available.
MinValue
public float MinValue { get; set; }
Smallest raw value accepted by Write(int, int). (inherited)
MaxValue
public float MaxValue { get; set; }
Largest raw value accepted by Write(int, int). (inherited)
ThresholdPercent
public float ThresholdPercent { get; set; }
Threshold area around the recommended value, 1–99%.
RecommendedValue
public float RecommendedValue { get; set; }
No description available.
Value
public float Value { get; set; }
Current needle position. Only this property doesn't dirty the background — the pointer is repainted every frame.
Glossiness
public float Glossiness { get; set; }
Glossiness strength 0..100 (mapped to 0..220 alpha internally).
NoOfDivisions
public int NoOfDivisions { get; set; }
No description available.
NoOfSubDivisions
public int NoOfSubDivisions { get; set; }
No description available.
DialText
public string DialText { get; set; }
No description available.
EnableTransparentBackground
public bool EnableTransparentBackground { get; set; }
When true, the dial face is overlapped by a slightly larger ellipse in the back color so the dial appears to float. Costs an extra FillEllipse per redraw.
Methods
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. |
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 |