Behaviors

Adding functionality to controls without subclassing

PDF for offline use

Let us know how you feel about this


0/250

last updated: 2016-04

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 Behaviors

Behaviors are reusable across more than one application. These articles explain how to create useful behaviors to perform commonly used functionality.

Xamarin Workbook

If it's not already installed, install the Xamarin Workbooks app first. The workbook file should download automatically, but if it doesn't, just click to start the workbook download manually.