Name

IExtenderProvider

Synopsis

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

Get .NET Windows Forms in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.