DekGenius.com
[ Team LiB ] Previous Section Next Section

IExtenderProvider

System.ComponentModel (system.dll)interface

This interface is implemented by classes that wish to offer additional properties for particular objects in the designer. For example, the System.Windows.Forms.ToolTip component adds a ToolTip property to other System.Windows.Forms.Control objects owned by its host. This is done by implementing the CanExtend( ) method to determine whether the class can extend a particular object (implementations usually filter by the type of the object) and adding a series of property-like methods called GetMyProperty() and SetMyProperty( ), which take an additional parameter for the object they are extending (e.g., a System.Windows.Forms.Control, in the case of the ToolTip. Finally, you decorate the class with a ProvidePropertyAttribute for each of these extended properties.

You would typically derive a class that implements this interface from Component, to add it to a designer surface.

public interface IExtenderProvider {
// Public Instance Methods
   public bool CanExtend(object extendee);
}

Implemented By

System.Windows.Forms.{ErrorProvider, HelpProvider, ToolTip}, System.Windows.Forms.Design.{ComponentTray, PropertyTab}

Returned By

ExtenderProvidedPropertyAttribute.Provider

    [ Team LiB ] Previous Section Next Section