Class Behavior<T>
Encapsulates state information and zero or more ICommands into an attachable object.
Inheritance
System.Object
Behavior<T>
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: System.Windows.Interactivity
Assembly: OpenSilver.Interactivity.dll
Syntax
public abstract class Behavior<T> : Behavior, IAttachedObject where T : DependencyObject
Type Parameters
Name | Description |
---|---|
T | The type the Behavior<T> can be attached to. |
Remarks
Behavior is the base class for providing attachable state and commands to an object. The types the Behavior can be attached to can be controlled by the generic parameter. Override OnAttached() and OnDetaching() methods to hook and unhook any necessary handlers from the AssociatedObject.
Constructors
| Improve this Doc View SourceBehavior()
Initializes a new instance of the Behavior<T> class.
Declaration
protected Behavior()
Properties
| Improve this Doc View SourceAssociatedObject
Gets the object to which this Behavior<T> is attached.
Declaration
protected T AssociatedObject { get; }
Property Value
Type | Description |
---|---|
T |