MVVM .net MAUI delete button not working
What I'm trying to do is: 1. Click the delete button 2. The deleted item gets removed from the collectionview
However, this is not working with the code that I have, as it gives me this error or crashes the program.
I followed stackoverflow on similar issues, such as this one: https://stackoverflow.com/questions/74460587/how-to-delete-selected-item-from-collection-view-in-net-maui, just without the selection
I've set my command binding to the delete command in the view model, and the problem starts occurring when I set my commandparameter's binding to . or Items, is there a fix for my problem? what is the problem that occurred in my logic?
Stack Overflow
How to delete selected Item from collection view in .net MAUI
I have collection in my Child view.
<CollectionView SelectionMode="Single" SelectedItem="{Binding Source={Reference sideview}, Path=myViewModel.SelectedItem.FileName}"
...
2 Replies
this is my delete command:
and my binding command is set to this:
Link to my repo for more info: https://github.com/Morganiscooler/Notepad-Bugged-with-breakpoint-
GitHub
GitHub - Morganiscooler/Notepad-Bugged-with-breakpoint-: A randomly...
A randomly generated code keeps popping up and will not let me use the app anymore - Morganiscooler/Notepad-Bugged-with-breakpoint-