MeterThresholdCollection
Namespace: Wisej.Web
Assembly: Wisej.Framework (4.2.0.0)
A mutable collection of thresholds that refreshes its owning meter when items change.
- C#
- VB.NET
public class MeterThresholdCollection : Collection<MeterThreshold>
Public Class MeterThresholdCollection
Inherits Collection(Of 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
MeterThresholdCollection()
Initializes a new instance of MeterThresholdCollection.
Methods
ClearItems()
Removes all items and their change subscriptions.
InsertItem(index, item)
Inserts an item and starts observing its property changes.
| Parameter | Type | Description |
|---|---|---|
| index | Int32 | Zero-based insertion position. |
| item | MeterThreshold | Non-null item not already in this collection. |
RemoveItem(index)
Removes an item and stops observing it.
| Parameter | Type | Description |
|---|---|---|
| index | Int32 | Zero-based position to remove. |
SetItem(index, item)
Replaces an item and transfers property-change observation.
| Parameter | Type | Description |
|---|---|---|
| index | Int32 | Zero-based position to replace. |
| item | MeterThreshold | Non-null replacement item. |