Share via


Xamarin.Forms Behaviors

Behaviors lets you add functionality to user interface controls without having to subclass them. Behaviors are written in code and added to controls in XAML or code.

Introduction to Behaviors

Behaviors enable you to implement code that you would normally have to write as code-behind, because it directly interacts with the API of the control in such a way that it can be concisely attached to the control. This article provides an introduction to behaviors.

Attached Behaviors

Attached behaviors are static classes with one or more attached properties. This article demonstrates how to create and consume attached behaviors.

Xamarin.Forms Behaviors

Xamarin.Forms behaviors are created by deriving from the Behavior or Behavior<T> class. This article demonstrates how to create and consume Xamarin.Forms behaviors.

Reusable EffectBehavior

Behaviors are a useful approach for adding an effect to a control, removing boiler-plate effect handling code from code-behind files. This article demonstrates creating and consuming a Xamarin.Forms behavior to add an effect to a control.