Xamarin.Forms.GridView
Xamarin.Forms.GridView copied to clipboard
MenuItem not working on GridView
It seems like the MenuItem is not working with the GridView on iOS or Android. Not yet implement the feature? Thanks. ' var vcTemplate = new GridViewXamlCell { View = new StackLayout { Padding = new Thickness(8, 8), Children = { new Label{Text="test"} } } }; var miDelete = new MenuItem { Text = "Delete", IsDestructive = true }; miDelete.SetBinding(MenuItem.CommandParameterProperty, new Binding(".")); miDelete.Clicked += (sender, e) => { var mi = ((MenuItem)sender); System.Diagnostics.Debug.WriteLine("Delete Context Action clicked: " + mi.CommandParameter); }; vcTemplate.ContextActions.Add(miDelete);
`
Yeah looking at the Xamarin.Forms repo it appears that CellAdapter is where the contextmenu support has been added by implementing ActionMode.ICallback. In Xamarin.Forms the ListViewAdapter inherits from CellAdapter but in this repo the GridViewAdapter is inheriting from RecyclerView.Adapter. I'll have a think about implementing ActionMode.ICallback in my own adapter but I can't promise anything.