Skip to main content
Version: 4.2

MeterThresholdCollection

Namespace: Wisej.Web

Assembly: Wisej.Framework (4.2.0.0)

A mutable collection of thresholds that refreshes its owning meter when items change.

public class MeterThresholdCollection : Collection<MeterThreshold>

Null items and duplicate item instances are rejected. Item property changes are observed automatically.

Example:

var meter = new MeterBar { Maximum = 100 };
meter.Thresholds.Add(new MeterThreshold(75, MeterTone.Warning));
meter.Thresholds[0].From = 80; // Refreshes the owning meter.

Constructors​

Instance member MeterThresholdCollection()​

Initializes a new instance of MeterThresholdCollection.

Methods​

Protected member ClearItems()​

Removes all items and their change subscriptions.

Protected member InsertItem(index, item)​

Inserts an item and starts observing its property changes.

ParameterTypeDescription
indexInt32Zero-based insertion position.
itemMeterThresholdNon-null item not already in this collection.

Protected member RemoveItem(index)​

Removes an item and stops observing it.

ParameterTypeDescription
indexInt32Zero-based position to remove.

Protected member SetItem(index, item)​

Replaces an item and transfers property-change observation.

ParameterTypeDescription
indexInt32Zero-based position to replace.
itemMeterThresholdNon-null replacement item.