All tagged ListView xamarin forms

Shell - New Navigation Paradigm in Xamarin Forms

Starting with Xamarin.Forms 3.6 there is a new navigation paradigm available for us developers to use called Shell. In this post I want to discuss the benefits of using Shell over the traditional Page push and pop navigation that you may be accustomed to, as well as the initial steps that you need to perform in order to get Shell working on a new blank app.

Keep in mind that at the moment of writing this post, Shell is still in Preview, but is going to be one of the core features that will be fully available for Xamarin Forms 4.

ListView Interactivity with Xamarin Forms

ListView interactions are an important part of the user experience on any application. As often as it is necessary for our applications to list items inside of a list, it is necessary for the user to interact with them.

In my previous post, I built a Notes application that allowed users to create new notes, assign a title and some content, and save these notes inside an SQLite database. Once saved in the database, there was a Page that read all these items and listed them inside a ListView, but there is no real interaction with the list.

In this post I will focus on 3 interactions you can add to your ListViews:

  1. Pull to refresh (reading from the table)
  2. Context actions (deleting an element)
  3. Taps (showing a details page)

Local Databases in Xamarin Forms with SQLite

I don't need to argue that databases are of great importance in almost any kind of application, so in this post, I will cover the usage of local SQLite databases inside a Xamarin Forms app.

Specifically, we will be creating a simple notes app, with a couple of views: one where the user will see the list of notes and another one for creating/editing a note. While I will briefly explain the code that I use to define the interface, I will focus on the SQLite functionality itself, not really talking about the event handlers and the definition of elements inside the XAML file. If you are not familiar with XAML maybe check one of my previous posts first.

I do want to specify that I created this project using a .NET Standard library as a code sharing strategy and that I will cover Android, iOS and UWP implementation. If you are using Visual Studio for Mac, UWP won't be an option, and maybe your code sharing strategy will be PCL instead of .NET Standard, but the implementation is identical, except for the folder where you need to reference the SQLite packages.