You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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);
`
The text was updated successfully, but these errors were encountered:
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.
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);
`
The text was updated successfully, but these errors were encountered: