I've a data form in SL3 which uses Prisms Commands with Attached Behaviour for trapping events.
(It fairly tightly follows this blog post: http://blogs.southworks.net/dschenkelman/2009/04/18/commands-with-attached-behavior-for-silverlight-3-dataform/#comment-607)
Basically, it's all hooked up and working fine, however in the viewmodel, I can't see how I can access the event args for the event.
In the constructor of the VM I define the delegate command:
this.EditEnded = new DelegateCommand<object>(o => {
//how can I tell if the button clicked was cancel or save?
}
But I need access to the DataFormItemEditEndedEventArgs property to so I can define what needs to be done? I want to perform different actions depending if the user cancelled or committed.