I have a simple WPF program using the Master-Detail user interface template, where Detail shows the currently selected collection item in the Master panel. I use MVVM, and each XAML page is supported by a ViewModel that is set as a DataContext.
Now I want to add a DELETE button on the Master panel to remove it from the main list of items. However, I cannot understand how to pass the viewmodel of the currently selected item as a CommandParameter button to the routed command handler code.
Thanks in advance for any pointers.
Mike
Mike garrett
source
share