Xamarin.Forms Guides | Samples

Xamarin.Forms.Behavior Class

Base class for generalized user-defined behaviors that can respond to arbitrary conditions and events.

See Also: Behavior


public abstract class Behavior : BindableObject


Application developers should specialize the Behavior`1 generic class, instead of directly using Behavior.

Related content


Namespace: Xamarin.Forms
Assembly: Xamarin.Forms.Core (in Xamarin.Forms.Core.dll)
Assembly Versions:,,,,

The members of Xamarin.Forms.Behavior are listed below.

See Also: BindableObject

Protected Properties

AssociatedTypeType. Gets the type of the objects with which this Behavior can be associated.

Protected Methods

Application developers override this method to implement the behaviors that will be associated with bindable.
Application developers override this method to remove the behaviors from bindable that were implemented in a previous call to the Behavior.OnAttachedTo method.

Explicitly Implemented Interface Members

Behavior$IAttachedObject.AttachTo(BindableObject)Attempts to attach to bindable. If successful, calls the Behavior.OnAttachedTo method.
Behavior$IAttachedObject.DetachFrom(BindableObject)Detaches from bindable. Calls the Behavior.OnDetachedFrom method.