Will Silverlight 4 ICommand support simplify using commands in Prism?
December 7th, 2009
As I thought this is a question that could interest many people, instead of answering this question directly in the Prism codeplex forum I decided to create a short blog post and answer it here.
No longer necessary
<Button Content=“Save” Command=“{Binding Path=SaveOrderCommand}“/>
Still necessary
As there is not an actual implementation of the ICommand interface, the DelegateCommand and CompositeCommand are still useful. Also, as controls other than Buttons do not have the possibility to bind their events to commands in the ViewModel, using attached behaviors is a good approach. You can use this code snippet to simplify the work.
Wrapping up
I hope this helps clarify this topic a bit, and if you have any doubts drop by the Codeplex forum and ask away (if you are shy you can always leave me a comment).
In case you want a working sample, I have made a couple of changes to the Commanding Quickstart to use the Command property instead of Prism’s attached behavior. You can find it here. The code is provided “AS IS” with no warranties and confers no rights.

December 10th, 2009 at 2:41 am
Will Silverlight 4 ICommand support simplify using commands in Prism?…
Thank you for submitting this cool story - Trackback from DotNetShoutout…
December 10th, 2009 at 6:03 am
[...] Damian Schenkelman’s Blog » Blog Archive » Will Silverlight 4 ICommand support simplify using … blogs.southworks.net/dschenkelman/2009/12/07/will-silverlight-4-icommand-support-simplify-using-commands-in-prism – view page – cached As I thought this is a question that could interest many people, instead of answering this question directly in the Prism codeplex forum I decided to create a short blog post and answer it here. [...]
December 10th, 2009 at 10:26 pm
Hi Damian
Would you be able to email me the attached behaviors snippet as a zip file?
I’m behind a corporate firewall which is blocking the link to the code.
Many thanks,
Phil
December 12th, 2009 at 2:09 am
Hi Phil,
I have sent you an email with the snippet attached.
I hope its useful,
Damian