I am using Devexpress’s SpinEdit control on a view. There is an event on it called ‘EditValueChanging’. I need to remove this event from the view’s code-behind and use RelayCommand in viewmodel instead. However I don’t find any Command propery in the control with which to bind the RelayCommand. Also I can’t implement a dependency property in my viewmodel as I have already inherited it with Mvvmlight Toolkit’s ViewModelBase (hence GetValue and SetValue are not available).
What is the possible way to remove the logic present in EditValueChanging event in my view’s code-behind and put it in my viewmodel?
I am using Devexpress’s SpinEdit control on a view. There is an event on
Share
Since you’re already using MVVMLight, have you looked at its
EventToCommandbehavior?Article from the author
Link to source for the class