NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Implementing an Extender Provider

Extender providers add properties to other controls. The ActiveX world also had the concept of extender providers, however, special support was required in the programming language to support them. In the NGWS frameworks, no special language support is required for extender providers. In source code, an extender provider property exists on the actual extender provider object. Setting the value of the property on another object requires two pieces of information: the object to set the value on, and the new value of the property. For example, Win Forms has a ToolTip component that offers an extender property to other controls. The property it sets on other objects is a string that represents the tool tip the user sees when she hovers her mouse cursor over the control. The source code for setting the tool tip property on a control is shown below:

[C#]
tooltip1.SetToolTip(button1, “The tooltip text”);

At design time, extender properties show up in the property browser as properties on objects they extend, rather than the actual extender object. In the example above, the ToolTip property shows up on button1, not on tooltip1.

To implement an extender provider

While an extender provider implemented as above can provide properties to any component, the implementation is often not so general, but includes features that make it usable only with a specific category of components.

Note The implementation of an extender provider for Win Forms controls is different from that for Web Forms controls.

A complete sample is provided in Win Forms Extender Provider Sample.