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?
image.png
Stack Overflow
I have collection in my Child view.
<CollectionView SelectionMode="Single" SelectedItem="{Binding Source={Reference sideview}, Path=myViewModel.SelectedItem.FileName}"
...
Was this page helpful?