RadialGauge
Namespace: Wisej.Web
Assembly: Wisej.Framework (4.2.0.0)
Displays a read-only circular capacity gauge with absolute tone thresholds.
- C#
- VB.NET
public class RadialGauge : Control
Public Class RadialGauge
Inherits Control
Values outside the range remain available as text; only the painted fill is clamped. Thresholds use the same nonnegative absolute boundaries as MeterBar, even when Minimum is negative.
Example:
var gauge = new RadialGauge { Value = 81, Shape = RadialGaugeShape.Arc, Label = "MEMORY" };
gauge.Thresholds.Add(new MeterThreshold(75, MeterTone.Warning));
gauge.Thresholds.Add(new MeterThreshold(90, MeterTone.Danger));
this.Controls.Add(gauge);
Constructors
RadialGauge()
Initializes a nonfocusable gauge with a range of zero to one hundred.
Properties
Animated
Boolean: Gets or sets whether value updates animate, respecting reduced-motion preferences. (Default: False)
CurrentTone
MeterTone: Gets the effective tone after applying thresholds.
DefaultSize
Size: Gets the default size of 140 by 140 pixels.
Focusable
Boolean: Gets or sets focus availability. The default is false. (Default: False)
Label
String: Gets or sets the plain-text label beneath the value. (Default: "")
Maximum
Double: Gets or sets the finite upper bound, strictly greater than Minimum. (Default: 100)
Minimum
Double: Gets or sets the finite lower bound, strictly less than Maximum. (Default: 0)
Shape
RadialGaugeShape: Gets or sets the ring or arc layout. Uncustomized angles follow the shape. (Default: Ring)
ShowValue
Boolean: Gets or sets whether the formatted center value is visible. (Default: True)
StartAngle
Int32: Gets or sets the angle. Clockwise degrees from three o’clock; defaults to -90 for Ring and 180 for Arc.
An explicitly assigned angle is retained when Shape changes. Reset in the designer to restore automatic defaults. Angles remain clockwise in right-to-left layouts.
SweepAngle
Int32: Gets or sets the angle. Clockwise sweep from 1 through 360 degrees; defaults to 360 for Ring and 180 for Arc.
An explicitly assigned angle is retained when Shape changes. Reset in the designer to restore automatic defaults. Angles remain clockwise in right-to-left layouts.
TabStop
Boolean: Gets or sets tab participation. The default is false. (Default: False)
Thickness
Int32: Gets or sets stroke thickness in pixels; the renderer caps it to fit small gauges. (Default: 8)
Thresholds
MeterThresholdCollection: Gets the observed collection of absolute tone boundaries shared with MeterBar.
The highest matching boundary wins; the last item wins equal boundaries. Editing items refreshes the gauge. Boundaries are inclusive on upward crossings and exclusive on downward crossings.
Tone
MeterTone: Gets or sets the tone used when no threshold matches. (Default: Primary)
Value
Double: Gets or sets the finite absolute value. The default is zero. (Default: 0)
Threshold crossings are snapshotted before callbacks. Assigning the same value raises no events. Changes to range limits or thresholds do not raise ThresholdCrossed.
ValueFormat
String: Gets or sets a composite format using Value, Minimum, Maximum, and the range fraction. (Default: "{3:P0}")
Uses CurrentCulture. Arguments are {0}=Value, {1}=Minimum, {2}=Maximum, {3}=fraction of the range. The default "{3:P0}" displays a percentage. The fraction is clamped to zero through one.
Example:
gauge.ValueFormat = "{0:N1} GB";
ValueText
String: Gets the server-formatted value using the current culture.
Methods
Dispose(disposing)
Detaches threshold notifications before releasing resources.
| Parameter | Type | Description |
|---|---|---|
| disposing | Boolean | Whether managed resources should be released. |
OnThresholdCrossed(e)
Raises ThresholdCrossed.
| Parameter | Type | Description |
|---|---|---|
| e | MeterThresholdEventArgs | Event data captured for this change. |
OnValueChanged(e)
Raises ValueChanged.
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | Event data captured for this change. |
OnWebRender(config)
Sends an atomic range snapshot and appearance settings to the client widget.
| Parameter | Type | Description |
|---|---|---|
| config | Object | Wisej client configuration. |
Events
ThresholdCrossed
EventHandler<MeterThresholdEventArgs> Occurs after ValueChanged for each crossed boundary, in traversal order.
ValueChanged
EventHandler Occurs after Value changes.
Implements
| Name | Description |
|---|---|
| IUserData | Provides access to the UserData and Tag properties associated to the component implementing this interface. |
| IBindableComponent | Bindable components implement this interface. |
| IDropTarget | Controls that support drag & drop operations implement this interface. |
| IWisejComponent | All wisej components implement this interface. |
| IWisejControl | All wisej controls derived from the Control class must implement this interface. |
| IWisejSerializable | Allows an object to serialize itself. |