Extending Xamarin.Forms with Behaviors with Matthew Soucoup

Sign in to queue

Description

This week, James is joined yet again by friend of the show Matthew Soucoup, who shows us how to extend the built-in capabilities of any View in Xamarin.Forms with little gems of awesomeness known as Behaviors. Matt demonstrates what a Behavior is, and how these reusable classes can expand the Xamarin.Forms controls functionality without having to subclass controls or modify the code-behind files.

 

Show Links:

Embed

Download

The Discussion

  • User profile image
    Me Ask You

    You beard makes you look like Yusuf Islam. No pun intended.

  • User profile image
    CodeGrue

    How do Behaviors differ from Effects? They seem very similar.

  • User profile image
    MattSoucoup

    @CodeGrue:They are very similar, both used to add additional features!

    You generally use an Effect for a small styling/UI change to a control. And the change you want to make has to be done in a platform specific way.

    Behaviors on the other hand are extending the functionality of the control - like adding validation. And the functionality that you're adding does not need to tap into anything platform specific.

    Quick way to keep them straight ... Effects=UI ... Behaviors=Functionality.

Add Your 2 Cents