Microsoft.Xaml.Behaviors.Wpf by Microsoft

<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.3" />

 Behavior

public abstract class Behavior : Animatable, IAttachedObject
Encapsulates state information and zero or more ICommands into an attachable object.

Gets the object to which this behavior is attached.

protected Type AssociatedType { get; }

The type to which this behavior can be attached.

public void Attach(DependencyObject dependencyObject)

Attaches to the specified object.

public void Detach()

Detaches this instance from its associated object.

protected virtual void OnAttached()

Called after the behavior is attached to an AssociatedObject.

protected virtual void OnDetaching()

Called when the behavior is being detached from its AssociatedObject, but before it has actually occurred.