MeterSegment
Namespace: Wisej.Web
Assembly: Wisej.Framework (4.2.0.0)
A named portion of MeterBar.Value, measured in the same units as the meter.
- C#
- VB.NET
public class MeterSegment
Public Class MeterSegment
Segments are stacked in collection order and clipped to the meter's visible total.
Example:
var meter = new MeterBar { Maximum = 100, Value = 80 };
meter.Segments.Add(new MeterSegment("Applications", 50, MeterTone.Primary));
meter.Segments.Add(new MeterSegment("Cache", 30, MeterTone.Success));
Constructors
MeterSegment()
Initializes an empty segment with the primary tone.
MeterSegment(label, value, tone)
Initializes a named segment.
| Name | Type | Description |
|---|---|---|
| label | String | Human-readable name, also used in the segment tooltip. |
| value | Double | Nonnegative amount in the meter's units. |
| tone | MeterTone | Semantic theme tone. |
Properties
Label
String: Gets or sets the segment name. The default is an empty string. (Default: "")
Tone
MeterTone: Gets or sets the segment's theme tone. The default is Primary. (Default: Primary)
Throws:
- InvalidEnumArgumentException The value is not a defined tone.
Value
Double: Gets or sets this portion of the total, in the meter's units. The default is 0. (Default: 0)
Throws:
- ArgumentOutOfRangeException The value is negative or not finite.