Xamarin.Forms 101: Data Binding

Play Xamarin.Forms 101: Data Binding
Sign in to queue


Let's take a step back in a new mini-series that I like to call Xamarin.Forms 101. In each episode we will walk through a basic building block of Xamarin.Forms to help you build awesome cross-platform native applications. This week we will look at MVVM and Data Binding to simplify development.

Show Notes:



The Discussion

  • User profile image

    Thank you James. I really like this super simple introduction to MVVM, I needed that. Well done. 

  • User profile image

    Actually traditional MVVM bindings are a really clunky approach.

    Doing this from code using a reactive library (e.g. Gjallarhorn) you can have
    in the ViewModel


    and then in the view code

    changingText |> bind (fun t -> label.Text <- t)

    To go in the other direction, you have in the ViewModel


    and then in the view code
    entry.TextChanged.Subscribe(fun _ -> changingText.Value <- entry.Text)

    This 1. avoids INotifyPropertyChanged scaffolding, 2. makes the logic explicit, 3. doesn't require reflection and magic strings, 4. is nicely type-checked, 5. avoids Value Converter yuckiness.

  • User profile image

    Nice and simple

  • User profile image

    Great video! Thanks!

  • User profile image
    Nice and very crisp....

Add Your 2 Cents