参考文章:
http://www.jphamilton.net/post/MVVM-with-Type-Safe-INotifyPropertyChanged.aspx
http://www.designerwpf.com/2009/04/30/inotifypropertychanged-snippets-and-why-you-should-use-these-instead-of-dependencyproperties/
首先定义基类,如下:
再将下面的代码,另存为INotifyProperty.snippet,保存到Visual Studio的相应目录中,在我的VS2008中,目录为:C:/Program Files/Microsoft Visual Studio 9.0/VC#/Snippets/2052/Visual C#
使用方法:
pretty coll, huh?