DiffFieldCollection
Namespace: Wisej.Web
Assembly: Wisej.Framework (4.2.0.0)
A mutable collection of fields that refreshes its owning viewer when items change.
- C#
- VB.NET
public class DiffFieldCollection : Collection<DiffField>
Public Class DiffFieldCollection
Inherits Collection(Of DiffField)
Null items and duplicate item instances are rejected. Item property changes are observed automatically.
Example:
var viewer = new DiffViewer();
viewer.Fields.Add(new DiffField { Name = "Stage" });
viewer.Fields[0].Text = "Sales stage"; // Refreshes the owning viewer.
Constructors
DiffFieldCollection()
Initializes a new instance of DiffFieldCollection.
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 | DiffField | 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.