Emulating ICommandSource in Silverlight 2

November 17, 2008

I recently discovered that Silverlight 2 has the ICommand interface, but does not have ICommandSource.  Basically, this means that you cannot easily execute a command when, say, a user clicks a button.  This is pretty strange to me, and renders Silverlight’s ICommand interface next to worthless.  If you’re an MVVM zealot like me, I’m sure you must see where I’m coming from here…

So, I corrected the situation.  You can now execute commands, pass them parameters, and even honor their CanExecute status, all via some attached property magic.  Read more about it, and download the source code, here.

Article about aggregating WPF commands

May 4, 2008

I just published yet another article about WPF this weekend on CodeProject.  This one is about my new CommandGroup class, which allows you to create a “composite command.”  The article explains the problem that this class solves, but also explains that the solution has uses outside of just that one problem.  If you are interested in checking it out, here is the link: