Home > Code Generation, Overview > CodeRush INotifyPropertyChanged interface support

CodeRush INotifyPropertyChanged interface support

July 31st, 2012

Since ancient times, CodeRush has supported the INotifyPropertyChanged interface implementation. The interface provides a standard way to notify binding clients of a property value change. It has just one event, with a simple and clear name, PropertyChanged.

The most important part of the support of this interface is connected to the code templates. Once you expand a property template in a class that implements the INotifyPropertyChanged interface, you will see the corresponding code generated. For instance, expanding the ‘ps’ template will produce the following code:

CodeRush INotifyPropertyChanged interface template support

You can immediately rename the property including the field references and an argument to the PropertyChangedEventArgs. No matter what technology you are using, WinForms, WPF or Silverlight, code templates will be expanded appropriately in any technology.

If you already have properties in your code and would like to convert them into properties supporting the INotifyPropertyChanged interface, you might want to take a look at the community plug-in that allows you to expand or convert a property declaration so that it also fires the PropertyChanged event by Brian Noyes. To learn more about this plug-in, visit its official page on the DXCore community.

Products: CodeRush Pro
Versions: 12.1 and up
VS IDEs: 2008 and up
Updated: Jul/31/2012
ID: C171

Similar Posts:

  1. Martin
    January 22nd, 2014 at 06:44 | #1


    Is this still work ? I’ve a project in VS2012 using CodeRush 12.2.8 and my class is implementing INotifyPropertyChanged but the property template (ex ps) doesn’t expend with the notification part in the setter. Am I missing an plugin or is it because my entities are in a class library and not a “XAML specific” project ? Maybe a setting turned off ? The Brian Noyes plugin works for converting existing property but it will be way faster for new properties to use a template.


  2. January 22nd, 2014 at 16:35 | #2

    Hi Martin. It should be working. If not, please drop a line at support@devexpress.com to resolve this issue. Thank you in advance.