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
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access