Share via


BehaviorCollection Class

Represents a collection of IBehaviors with a shared AssociatedObject.

Inheritance Hierarchy

DependencyObjectCollection
  Microsoft.Xaml.Interactivity.BehaviorCollection

Namespace:  Microsoft.Xaml.Interactivity
Assembly:  Microsoft.Xaml.Interactivity (in Microsoft.Xaml.Interactivity.dll)

Syntax

public sealed class BehaviorCollection : DependencyObjectCollection

The BehaviorCollection type exposes the following members.

Constructors

  Name Description
Public method BehaviorCollection Initializes a new instance of the BehaviorCollection class.

Top

Properties

  Name Description
Public property AssociatedObject Gets the DependencyObject to which the BehaviorCollection is attached.

Top

Methods

  Name Description
Public method Attach Attaches the collection of behaviors to the specified DependencyObject.
Public method Detach Detaches the collection of behaviors from the AssociatedObject.

Top

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.Xaml.Interactivity Namespace