Without the use of third part DLLs, is it possible to bind the event of CellEditEnding to my command? Currently, I am using .NET 3.5, which has become an issue because it tells me that I cannot add an EventTrigger to the Trigger collection.
<i:Interaction.Triggers>
<i:EventTrigger EventName="CellEditEnding">
<i:InvokeCommandAction CommandName="EnterUserCountCommand" />
</i:EventTrigger>
</i:Interaction.Triggers>
Any help would be greatly appreciated!
Not sure if this is the best solution, but when I'm in this situation I usually just do something like this.
private void CellEditEndingEvent(object sender, RoutedEventArgs e)
{
var viewModel = (MyViewModel)DataContext;
//Change params as needed
if (viewModel.MyCommand.CanExecute(null))
viewModel.MyCommand.Execute(null);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With