(X) Hide this Watch the recordings of our recent webinars: Switch or no switch: Can I build my business apps in LightSwitch and Switching on the Cloud for Silverlight by Gill Cleeren
Our next webinar is on May 11th: Getting started with the Silverlight 5 Beta. Join it!
Skip Navigation LinksHome / News / View News

ViewModel INotifyPropertyChanged Code Generation

+ Add to SilverlightShow Favorites
1 comments   /   posted by Svetla Stoycheva on Apr 25, 2011
(0 votes)
SilverlightShow Page for all Silverlight and Windows Phone 7 (WP7) things on Twitter

In this post Colin Eberhardt describes a novel method of generating boiler-plate MVVM code using codesnippet automation. You simply add attributes to your view model classes and the code is generated for you!

Source: Scott Logic's Blog

Model-View-ViewModel (MVVM) has become the de facto pattern for Silverlight, WPF and WP7 applications, providing code that is easily tested and couples cleanly to the view via databinding. However, one small problem with MVVM is that it relies on the INotifyPropertyChanged (INPC) interface and the boiler-plate code which this entails.

This blog post describes a technique for implementing INPC and adding properties to your view model as easily as this:

Share


Comments

Comments RSS RSS
  • RE: ViewModel INotifyPropertyChanged Code Generation  

    posted by Sam on Apr 25, 2011 23:28
    Pretty cool! Has anyone seen an example that uses VB.NET Source instead?

Add Comment

 
 

   
  
  
   
Please add 4 and 2 and type the answer here: