ReflectPropertyDescriptor defines a property. Properties are the main way that a user can set up the state of a component. The ReflectPropertyDescriptor class takes a component class that the property lives on, a property name, the type of the property, and various attributes for the property. For a property named XXX of type YYY, the associated component class is required to implement two methods of the following form:
public YYY GetXXX(); public void SetXXX(YYY value);
The component class can optionally implement two additional methods of the following form: public boolean ShouldSerializeXXX(); public void ResetXXX();
These methods deal with a property's default value. The ShouldSerializeXXX() method returns true if the current value of the XXX property is different than it's default value, so that it should be persisted out. The ResetXXX() method resets the XXX property to its default value. If the ReflectPropertyDescriptor includes the default value of the property (using the DefaultValueAttribute), the ShouldSerializeXXX() and ResetXXX() methods are ignored. If the ReflectPropertyDescriptor includes a reference to an editor then that value editor will be used to edit the property. Otherwise, a system-provided editor will be used. Various attributes can be passed to the ReflectPropertyDescriptor, as are described in Attribute. ReflectPropertyDescriptors can be obtained by a user programmatically through the ComponentManager.