IExtenderProvider

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



. Net Windows Forms in a Nutshell
.NET Windows Forms in a Nutshell
ISBN: 0596003382
EAN: 2147483647
Year: 2002
Pages: 794

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net