O'Reilly logo

MCTS: Microsoft Silverlight 4 Development (70-506) Certification Guide by Johnny Tordgeman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Implementing ICommand

The ICommand interface is part of the commanding system in Silverlight and is usually recognizable alongside the Model-View-ViewModel (MVVM) pattern. The MVVM pattern aids the developer to separate the UI layer (View) from the code layer (Model) using a connector in between (ViewModel). The commanding system allows us to wire business logic functionality directly to buttons on the UI layer using XAML. Now, you may be thinking that we can already do that using event handlers and writing code in the code behind file of our XAML, and you would be right. But think about a scenario where you have to use the button logic elsewhere in the application. You will need to write another even handler for the new button, copy the logic ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required