Class BehaviorCollection
Represents a collection of IBehaviors with a shared AssociatedObject.
Implements
System.Collections.Generic.IList<DependencyObject>
System.Collections.Generic.ICollection<DependencyObject>
System.Collections.Generic.IEnumerable<DependencyObject>
System.Collections.IEnumerable
Inherited Members
Namespace: EmptyKeys.UserInterface.Interactivity
Assembly: EmptyKeys.UserInterface.dll
Syntax
public sealed class BehaviorCollection : DependencyObjectCollection, IObservableVector<DependencyObject>, IList<DependencyObject>, ICollection<DependencyObject>, IEnumerable<DependencyObject>, IEnumerable
Constructors
BehaviorCollection()
Initializes a new instance of the BehaviorCollection class.
Declaration
public BehaviorCollection()
Properties
AssociatedObject
Gets the DependencyObject to which the BehaviorCollection is attached.
Declaration
public DependencyObject AssociatedObject { get; }
Property Value
Type | Description |
---|---|
DependencyObject |
Methods
Attach(DependencyObject)
Attaches the collection of behaviors to the specified DependencyObject.
Declaration
public void Attach(DependencyObject associatedObject)
Parameters
Type | Name | Description |
---|---|---|
DependencyObject | associatedObject | The DependencyObject to which to attach. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | The BehaviorCollection is already attached to a different DependencyObject. |
Detach()
Detaches the collection of behaviors from the AssociatedObject.
Declaration
public void Detach()
Implements
System.Collections.Generic.IList<T>
System.Collections.Generic.ICollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable