System.ComponentModel.ProvidePropertyAttribute Class

Specifies the name of the property that an implementer of System.ComponentModel.IExtenderProvider offers to other components. This class cannot be inherited

See Also: ProvidePropertyAttribute Members


[System.AttributeUsage(System.AttributeTargets.Class, AllowMultiple=true, Inherited=true)]
public sealed class ProvidePropertyAttribute : Attribute


When you mark a class with this attribute, you tell the code generator to create an extender property with the name you provide. The marked class must implement System.ComponentModel.IExtenderProvider. As a result, the new property can be used by other components in a container.

Within the marked class, you must implement Get <name> and Set <name> methods. For example, if you mark a class with [ProvideProperty("PropertyName")], you must implement GetPropertyName and SetPropertyName methods. To specify that the new property will be an extender property, you must implement from System.ComponentModel.IExtenderProvider, you must also implement a CanExtend method.

For more information, see Extending Metadata Using Attributes.


Namespace: System.ComponentModel
Assembly: System (in System.dll)
Assembly Versions: 1.0.3300.0, 1.0.5000.0,,