An example app to show one way in which to create a multi-select ListView in Xamarin.Forms.
Switch branches/tags
Nothing to show
Clone or download
Latest commit fc8381e Jun 29, 2017
Failed to load latest commit information.
MultiSelectDemo some tweaks Jun 29, 2017
.gitignore Initial commit Jun 28, 2017
LICENSE Initial commit Jun 28, 2017
MultiSelectDemo.sln Added initial code Jun 28, 2017 some tweaks Jun 29, 2017


An example app to show one way in which to create a multi-select ListView in Xamarin.Forms.

More info here:

This app has some new types, such as the selectable item:

public class SelectableItem : BindableObject
    public static readonly BindableProperty DataProperty;
    public static readonly BindableProperty IsSelectedProperty;

    public SelectableItem(object data);
    public SelectableItem(object data, bool isSelected);

    public object Data { get; set; }
    public bool IsSelected { get; set; }
public class SelectableItem<T> : SelectableItem
    public SelectableItem(T data);
    public SelectableItem(T data, bool isSelected);

    public new T Data { get; set; }

There is also a selectable collection, with some convenience members:

public class SelectableObservableCollection<T> : ObservableCollection<SelectableItem<T>>
    public SelectableObservableCollection();
    public SelectableObservableCollection(IEnumerable<T> collection);
    public SelectableObservableCollection(IEnumerable<SelectableItem<T>> collection);

    public IEnumerable<T> SelectedItems { get; }
    public IEnumerable<T> UnselectedItems { get; }

    public void Add(T item, bool selected = false);
    public void Insert(int index, T item, bool selected = false);
    public bool IsSelected(T item);
    public bool Contains(T item);
    public int IndexOf(T item);
    public bool Remove(T item);

These types can be used like any other collection:

public partial class MainPage : ContentPage
    public MainPage()

        Items = new SelectableObservableCollection<string>();

        Items.Add("Hello World");
        Items.Add("Testing 1. 2. 3.");
        Items.Add("Xamarin.Forms", true); // this one is selected

        BindingContext = this;

    public SelectableObservableCollection<string> Items { get; }

But, they make any list support multi-select:

<ListView ItemsSource="{Binding Items}"

                <!-- set the selected indicator (optional) -->
                    <BoxView Color="Red" WidthRequest="12" HeightRequest="12" />

                <!-- set the content (optional) -->
                    <Label Text="{Binding}" />