Thanks to everyone who came along to my DEV311 at TechEd New Zealand yesterday. Here’s the low down on the snippets demo that didn’t work the way it should on the day …
Creating a property that triggers the
PropertyChanged event isn’t difficult, but it is mindless boilerplate. The
propn snippet makes it really easy to write with just a few keystrokes.
Here’s the output of using the snippet to declare a
Note that this is triggering the
OnPropertyChanged() method with no parameters, expecting it to use the new
[CallerMemberName] attribute introduced in .NET 4.5.
The supporting infrastructure for the
INotifyPropertyChanged event is also boilerplate - hence the
that produces this code:
propn, writing the infrastructure to support databinding is a whole lot easier.