Skip to Content
.NET Windows® Forms Custom Controls
book

.NET Windows® Forms Custom Controls

by Richard Weeks
January 2002
Intermediate to advanced
288 pages
5h 48m
English
Sams
Content preview from .NET Windows® Forms Custom Controls

Control-Based Extender Providers

As stated previously, any component can serve as an Extender Provider. All that is necessary is to implement the IExtenderProvider interface, add the necessary ProvideProperty attributes, and implement the Get/Set methods for the property. Creating a control that implements the IExtenderProvider interface is the same as it was for the BorderPainterExtender sample described previously. To demonstrate this, the next Extender Provider will be derived from a Label control. In addition, this new Extender Provider will only extend MenuItems to provide a MenuItemHelpText property. Figure A.3 shows the completed MenuItemExtender displaying some help text for the selected MenuItem.

Figure A.3. A Label control implementing ...
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.
Start your free trial

You might also like

Pro .NET 5 Custom Libraries: Implementing Custom .NET Data Types

Pro .NET 5 Custom Libraries: Implementing Custom .NET Data Types

Roger Villela
Professional C# 5.0 and .NET 4.5.1

Professional C# 5.0 and .NET 4.5.1

Christian Nagel, Jay Glynn, Morgan Skinner

Publisher Resources

ISBN: 0672323338Purchase book