Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Xamarin.Forms

You're reading from   Mastering Xamarin.Forms Build rich, maintainable, multi-platform, native mobile apps with Xamarin.Forms

Arrow left icon
Product type Paperback
Published in Mar 2018
Publisher
ISBN-13 9781788290265
Length 192 pages
Edition 2nd Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Ed Snider Ed Snider
Author Profile Icon Ed Snider
Ed Snider
Roberto Hernandez Roberto Hernandez
Author Profile Icon Roberto Hernandez
Roberto Hernandez
Arrow right icon
View More author details
Toc

Adding pull-to-refresh

As with the new entry page, when the main page is loading our data, we should present the user with a loading indicator so that they know their list of entries is on its way. However, since the main page is using a data-bound ListView instead of a static TableView, we can use the ListView pull-to-refresh functionality to indicate when our data is being loaded. Pull-to-refresh also has the benefit of allowing users to easily refresh the screen and load any new data that might be available. Xamarin.Forms makes adding pull-to-refresh very easy, and we will still use the IsBusy property from our BaseViewModel, just as we did on the new entry page.

The Xamarin.Forms ListView pull-to-refresh API requires two things: an ICommand that handles refreshing the bound source of the ListView, and a boolean field that indicates whether the ListView is currently refreshing...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £16.99/month. Cancel anytime