Feature Request: Event to Command support in Prism next version

Topics: Prism v2 - Silverlight 3, Prism v2 - WPF 3.5
Nov 23, 2009 at 4:44 AM

Hello,

Could you please support Event to Command in Prism? There are a few numbers of MVVM frameworks that support EventToCommand. Even we can copy the code or repeat the same thing in our own way, It would be the best if we have official support from Prism Framework. 

One suggestion that I like to suggest for implementing Event to Command is that VM should have the reference to control. For example: If I'm using third-party control in View, but my view model shouldn't aware of that third-party control. The max scope of this third-party control should be only in View and attached property (not in ViewModel). 

We will need a lot of tricks when it comes to usability. WPF strong binding is great and what Prism supports so far is also very good for developing WPF/Silverlight business application. But there are some scenarios that we need events (this is where Event to Command comes into picture.), setting focus or handling mouse or etc. 

Thanks,
Michael Sync 

 

Nov 23, 2009 at 5:45 PM

Hi Michael,

To facilitate execution of commands, (other than click in buttons) you can use commands with attached behaviors. Julian Dominguez has a great post that explains how this works in depth. I have created a code snippet that should make the creation of these much faster.

You might also want to add this topic as a suggestion for Prism’s next version in the Issue Tracker. That way the team can keep track of this, and might evaluate providing more support for this out of the box.

Please let me know if this helps.

Damian Schenkelman
http://blogs.southworks.net/dschenkelman

Nov 24, 2009 at 1:49 AM

Thanks.  Yeah. As I mentioned, it would be great if we have the official support from Prism Framework even we can roll our own. 

Yah. I will post it in Issue Tracker.