From the course: Mastering Xamarin.Forms Development: 8 Renderers, Behaviors, and Effects

Unlock this course with a free trial

Join today to access over 22,400 courses taught by industry experts.

Attached vs. Xamarin.Forms behaviors

Attached vs. Xamarin.Forms behaviors

- [Instructor] Well there's two types of behaviors. There's an out of the box attached behavior and then there's a Xamarin Forms behavior. Attached behaviors are static classes, and these are usable and they're sometimes appropriate, but Xamarin Forms behaviors are an enhanced type of generic behavior, and Xamarin Forms behaviors are the preferred approach to behavior construction. You don't have to use them, but in general, I found that a Xamarin Form behavior, not just performs better, but is much easier to implement and extend. So again, attached behaviors are available, and Xamarin Forms behaviors implement the standard attached behavior, but a Xamarin Forms behavior is an enhanced type of behavior, specific to the Xamarin Forms platform that is the preferred method for behavior construction.

Contents