Xamarin – Display a loading graphic when performing an async operation

Still learning Xamarin. I have built a login page, validation, called a web api to login and stored credentials after the user has logged in. I now wanted to show a loading graphic whilst the web api is being hit. Xamarin has a built in control called ActivityIndicator. I defined a new property in my ViewModel to Read more about Xamarin – Display a loading graphic when performing an async operation[…]

Xamarin disable button & validating entries with behaviours

In my earlier post validate entries using behaviours I showed how I used Xamarin behaviours to show validation messages to the user. This is good, but it didn’t prevent the button from being pressed/submitted. Here’s how I achieved this. In my ViewModel add properties for the validators I use in the view These need to be Read more about Xamarin disable button & validating entries with behaviours[…]

Validate Entries using behaviours

This is based on a post here https://blog.xamarin.com/behaviors-in-xamarin-forms/ which is a little incomplete and had a couple of errors and some omissions. The following example shows how to validate that an email address is valid Create a new class that inherits from Behavior<T>. Make sure you don’t just inherit from Behavior as the code sample shows. Read more about Validate Entries using behaviours[…]

Xamarin – binding a ListView to object

Binding Testing how to bind a ListView to an object. Consider a test list It's straight-forward to set the ItemSource directly via But if you wish to use binding instead e.g. Then in the xaml use the following Note the dot after the word Binding, this refers to the parent object. Defining a template Same Read more about Xamarin – binding a ListView to object[…]