BarControlViewModelCollection Class
Represents a collection of bar control view models.
public class BarControlViewModelCollection : IReadOnlyCollection<IHasKey>, IEnumerable<IHasKey>, IEnumerable
- Inheritance:
- System.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
- System.Int32:
The number of bar control view models in the collection.
Item[String]
Returns the bar control view model for the specified key.
public IHasKey this[string key] { get; }
| Parameter | Type | Description |
|---|---|---|
| key | System.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 | System.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
- System.Collections.Generic.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 | System.String | A string that uniquely identifies the control. |
| factory | System.Func<System.String, IHasKey> | A function that creates a bar control view model with the specified key. |
Inherited Members
- System.Object.ToString()
- System.Object.Equals(System.Object)
- System.Object.Equals(System.Object, System.Object)
- System.Object.ReferenceEquals(System.Object, System.Object)
- System.Object.GetHashCode()
- System.Object.GetType()
- System.Object.MemberwiseClone()