trying to stick to MVVM as much as possible using Xamarin Forms PCL porting to an Android deliverable - I have a TaskViewModel, with an ObservableCollection of ToDoItems. I also have a Tasks' View (bound to TaskViewModel) containing a listbox, with the ItemsSource bound to the ToDoItems.
I'm attempting to add a Context Menu Option to the ListView so when user selects and holds one of the ToDo items from within the ListView, the menu appears at the top (Android) with REMOVE option.
I have just now found out that any Command bound to the context menu are not recognized from the TaskViewModel but from the ToDoItem model instead?? So my issue is, how do I access the TaskViewModel.ToDoItems from the ToDoItem Model - as the TaskViewModel is the one that contains the collection where I will be able to go ToDoItems.Remove(SelectedToDoItem).
What is the best practice approach?