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

Syntax

public abstract class Behavior : BindableObject

Remarks

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

Requirements

Namespace: Xamarin.Forms
Assembly: Xamarin.Forms.Core (in Xamarin.Forms.Core.dll)
Assembly Versions: 0.0.0.0, 1.3.0.0, 1.4.0.0, 1.5.0.0, 2.0.0.0

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

See Also: BindableObject

Protected Properties

[read-only]
AssociatedTypeType. Gets the type of the objects with which this Behavior can be associated.

Protected Methods

OnAttachedTo(BindableObject)
Application developers override this method to implement the behaviors that will be associated with bindable.
OnDetachingFrom(BindableObject)
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.