I have in ViewModel a collection, with ICollectionView view; Well, in XAML I have
<Button ... Command="cmdDelete" CommandParameter="{Binding view.CurrentItem}" />
But it’s strange because the CommandParameter is not resolved at the time of click. I get some values which don’t reflect the CurrentItem.
Update: View is created as CollectionViewSource.GetDefaultView(observablecollection); and this collection is bound to the DataGrid.ItemsSource.
use this: