Skip to main content
Version: 4.2

MeterThresholdEventArgs

Namespace: Wisej.Web

Assembly: Wisej.Framework (4.2.0.0)

Describes one absolute threshold boundary crossed because MeterBar.Value changed.

public class MeterThresholdEventArgs : EventArgs

Derives from or implements EventArgs.

Use From, Tone, OldValue to access the event data.

Example:

var meter = new MeterBar();
meter.Thresholds.Add(new MeterThreshold(75, MeterTone.Warning));
meter.ThresholdCrossed += (sender, e) =>
MessageBox.Show($"Boundary {e.From}: {e.OldValue} to {e.NewValue}; upward: {e.IsIncreasing}");
meter.Value = 80;

Constructors​

Instance member MeterThresholdEventArgs(from, tone, oldValue, newValue)​

Initializes immutable information about a threshold crossing.

NameTypeDescription
fromDoubleAbsolute boundary that was crossed.
toneMeterToneTone associated with that boundary at the time of crossing.
oldValueDoubleUsage before the change, in the meter's units.
newValueDoubleUsage after the change, in the meter's units.

Properties​

Instance member From​

Double: Gets the absolute boundary crossed, in the meter's units.

Instance member IsIncreasing​

Boolean: Gets whether usage crossed upward into the threshold.

Instance member NewValue​

Double: Gets usage after the change.

Instance member OldValue​

Double: Gets usage before the change.

Instance member Tone​

MeterTone: Gets the boundary's tone, which is not necessarily the final active tone.