Pass command parameter to method in ViewModel in WPF?
“ViewModel” implies MVVM. If you’re doing MVVM you shouldn’t be passing views into your view models. Typically you do something like this in your XAML: <Button Content=”Edit” Command=”{Binding EditCommand}” CommandParameter=”{Binding ViewModelItem}” > And then this in your view model: private ViewModelItemType _ViewModelItem; public ViewModelItemType ViewModelItem { get { return this._ViewModelItem; } set { this._ViewModelItem = … Read more