What are extender provider components in C#?

CsharpProgrammingServer Side Programming

To provide properties to other components, the extender provider is used. Let’s consider an example of a TooTtip component.

You add the component to a form. This sets a ToolTip property to every control. The same property is not under the attacked PropertyGrid control.

myTooltip1.SetToolTip(btn1, "This is ToolTip!");

Let us see how to implement extender provider component −

Firstly, define a component −

public class MyExtender : IExtenderProvider {...}

IExtenderProvider definition −

public interface IExtenderProvider {
   bool newExtend(object extendeNew);
}

Now you need to implement the newExtend method. This is done to return true for every related component or control.

raja
Published on 13-Aug-2018 12:15:14
Advertisements