About Me

indepth experience in developing RIA applications with C# Linq,WCF , Silverlight and JavaScript. Just help in delivering a robust business application in Silverlight for a large financial company.helped with architecture and coding. Participate in Codecamps as a presenter. This blog has no sense of order as it mainly a self help so I can reference things of my interest. my site http://www.sandkeysoftware.com has articles and videos by category

Thursday, July 15, 2010

Silverlight 4 Commanding made simpler

Commanding in Silverlight 4 is a nice new feature if you are into MVVM and seems everyone and their dog is these days. However there is quite a lot of work in setting up the plumbing. John Papa helps reduce this effort in this very helpful blog

As a result I can now write code that looks like:


public class Class2
{
public ICommand LoadFOOCommand { get; set; }
void PhoneVM()
{
new DelegateCommand(LoadFOO, CanFoo);
}
private void LoadFOO(object param)
{
}
private bool CanFoo(object param)
{
return true;
}

}

0 comments: