BarControlViewModelCollection Class
Represents a collection of bar control view models.
public class BarControlViewModelCollection
- Inheritance:
- object object
Constructors
BarControlViewModelCollection()
Initializes a new instance of the BarControlViewModelCollection class.
public BarControlViewModelCollection()
BarControlViewModelCollection(IBarImageProvider)
Initializes a new instance of the BarControlViewModelCollection class with the specified IBarImageProvider.
public BarControlViewModelCollection(IBarImageProvider imageProvider)
| Parameter | Type | Description |
|---|---|---|
| imageProvider | IBarImageProvider | The IBarImageProvider to use for assigning variant images as view models are created. |
Properties
Count
Gets the number of bar control view models in the collection.
public int Count { get; }
Property Value
- int:
The number of bar control view models in the collection.
this[string]
Returns the bar control view model for the specified key.
public IHasKey this[string key] { get; }
| Parameter | Type | Description |
|---|---|---|
| key | string | A string that uniquely identifies the control. |
Property Value
- IHasKey:
The bar control view model for the specified key.
Methods
Create(string)
Creates a bar control view model for the specified key.
protected virtual IHasKey Create(string key)
| Parameter | Type | Description |
|---|---|---|
| key | string | A string that uniquely identifies the control. |
Returns
- IHasKey:
The bar control view model that was created.
GetEnumerator()
Returns an enumerator for the bar control view models in the collection.
public IEnumerator<IHasKey> GetEnumerator()
Returns
- IEnumerator<IHasKey>:
An enumerator for the bar control view models in the collection.
Register(string, Func<string, IHasKey>)
Registers a bar control view model creation factory function for the specified key.
public void Register(string key, Func<string, IHasKey> factory)
| Parameter | Type | Description |
|---|---|---|
| key | string | A string that uniquely identifies the control. |
| factory | Func<string, IHasKey> | A function that creates a bar control view model with the specified key. |