We can use ICommand instead of Routed Event to implement MVVM, so we can write the logic in ViewModel.
Here is a example:
<Button Width="40" Command="{Binding CommandOne}">Click1
</Button>
But we need to Set CommandParameter all by ourself, and my problem is how to send the RoutedEventArgs as the CommandParameter.
private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
{
throw new NotImplementedException();
}
How can I use the RoutedEventArgs as the CommandParameter in my ViewModel? Any ideas?