Class BehaviorCollection
Provides an ordered, mutable collection of animation behaviors.
Inherited Members
Namespace: DRIT.Presentation.Animation
Assembly: DRIT.Presentation.dll
Syntax
public class BehaviorCollection : IBehaviorCollection, IEnumerable<IBehavior>, IEnumerable
Properties
AsIEnumerable
Gets the collection through the non-generic enumerable contract.
Declaration
public IEnumerable AsIEnumerable { get; }
Property Value
| Type | Description |
|---|---|
| IEnumerable |
Count
Gets the number of behaviors.
Declaration
public int Count { get; }
Property Value
| Type | Description |
|---|---|
| int |
this[int]
Gets or replaces the behavior at the specified zero-based index.
Declaration
public IBehavior this[int index] { get; set; }
Parameters
| Type | Name | Description |
|---|---|---|
| int | index |
Property Value
| Type | Description |
|---|---|
| IBehavior | The behavior at |
Methods
Add(IBehavior)
Adds a behavior to the end of the collection.
Declaration
public void Add(IBehavior item)
Parameters
| Type | Name | Description |
|---|---|---|
| IBehavior | item | The behavior to add. |
Clear()
Removes all behaviors.
Declaration
public void Clear()
Contains(IBehavior)
Determines whether a behavior is present.
Declaration
public bool Contains(IBehavior item)
Parameters
| Type | Name | Description |
|---|---|---|
| IBehavior | item | The behavior to locate. |
Returns
| Type | Description |
|---|---|
| bool |
GetEnumerator()
Returns an enumerator over behaviors in collection order.
Declaration
public IEnumerator<IBehavior> GetEnumerator()
Returns
| Type | Description |
|---|---|
| IEnumerator<IBehavior> | An enumerator over the live collection. |
IndexOf(IBehavior)
Returns the zero-based index of a behavior, or -1 when absent.
Declaration
public int IndexOf(IBehavior item)
Parameters
| Type | Name | Description |
|---|---|---|
| IBehavior | item | The behavior to locate. |
Returns
| Type | Description |
|---|---|
| int | The first matching index, or -1. |
Insert(int, IBehavior)
Inserts a behavior at the specified zero-based index.
Declaration
public void Insert(int index, IBehavior item)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The insertion index. |
| IBehavior | item | The behavior to insert. |
Remove(IBehavior)
Removes the first matching behavior.
Declaration
public bool Remove(IBehavior item)
Parameters
| Type | Name | Description |
|---|---|---|
| IBehavior | item | The behavior to remove. |
Returns
| Type | Description |
|---|---|
| bool |
RemoveAt(int)
Removes the behavior at the specified zero-based index.
Declaration
public void RemoveAt(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The behavior index to remove. |