Forum Xamarin.Forms
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

ViewCell with ContextAction Causes app to freeze

KyleClarkKyleClark USMember
edited November 2016 in Xamarin.Forms

I'm trying to add a Delete ContextAction to a basic ViewCell, but when I run the application it freezes when navigating to this page. I'm testing on iOS, and my current code is very similar to the example code supplied in the documentation:

Xaml View:

<?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="" 
        <ListView x:Name="TestListView" 
            ItemsSource="{Binding TestRows}">
                            <MenuItem Text="Delete" 
                                Clicked="OnDelete" />
                            <Label Text="{Binding .}" />


using System;
using myApp.ViewModels;
using Xamarin.Forms;

namespace myApp.Views
    public partial class DevelopmentPage : ContentPage
        private DevelopmentViewModel _vm;

        public DevelopmentPage()
            _vm = new DevelopmentViewModel();
            BindingContext = _vm;

        protected override void OnAppearing()

        public void OnDelete(object sender, EventArgs e)
                // Do Nothing


using System.Collections.ObjectModel;

namespace myApp.ViewModels
    public class DevelopmentViewModel : ViewModel
        public ObservableCollection<string> TestRows { get; set; }

        public DevelopmentViewModel()
            TestRows = new ObservableCollection<string>();

        public void LoadData()
            TestRows.Add("Hello 1");
            TestRows.Add("Hello 2");

Any help would be greatly appreciated!


  • MusicnotesDevMusicnotesDev USMember ✭✭

    Having the same issue here. If I take out the ContextActions the whole app functions fine.

    This is after converting to a "PrismApplication" and using their DI container. Not sure why this would effect the XAML ContextActions ...

    Very frustrating!

Sign In or Register to comment.