This project is read-only.

Project Description
Property Designer simplifies the management of complex .NET properties by providing a visual way to describe properties and their associated callbacks, events and other behaviors.

Properties are often associated with things like validation, callbacks and events. They also come in multiple flavors -- backing field implementations (including auto-properties) and dependency properties. The code for properties is usually boilerplate code with variations according to the necessary behaviors. The implementation of a property may look something like this:

public int Length
    get { return _length; }
        if (_length != value)
            if (value <= 0)
                throw new ArgumentException("Length must be greater than 0.", "value");
            _length = value;
            var evt = LengthChanged;
            if (evt != null)
                evt(this, EventArgs.Empty);

...and that's a simple one!

The behaviors of a property usually fall into two categories:

  • Validation
  • Notification
    • On___Changing and On___Changed callbacks to self
    • ___Changing and ___Changed events to clients
    • INotifyPropertyChanging and INotifyPropertyChanged implementations

And properties are most often implemented in one of three ways:

  • Auto property
  • Backing field
  • Dependency property

Property Designer provides a developer-friendly way to define and visualize these aspects of a property. When a supported file is loaded into the main document area of Visual Studio, the Property Designer tool window will be available in the IDE. This tool window provides the ability to easily view and edit properties while editing code or designing a form or user control. The designer introduces no runtime overhead in the associated properties. It accomplishes this by assuming control of the designed properties (not all properties need be designed) and managing all the code in a separate, related file, in the same way that the WPF and WinForms designers automatically create code that usually isn't edited by the developer directly. The code generated by Property Designer is simple and efficient.

There are a number of property frameworks and property frameworks themselves are not difficult to implement. However, nearly every property framework involves the usage of base classes such as DependencyObject. And DependencyProperty has its own additional requirement -- the public static property that exposes the DependencyProperty object. Property Designer requires no base class, and can work with any class contained in a supported language file.

Last edited Oct 11, 2011 at 3:44 PM by Neuroboy23, version 6