Re: Provider Properties + IExtenderProvider
From: Bob Powell [MVP] (bob_at__spamkiller_bobpowell.net)
Date: 11/23/04
- Next message: Craig: "RE: MDI app and UIP v2.0"
- Previous message: WXS: "Provider Properties + IExtenderProvider"
- In reply to: WXS: "Provider Properties + IExtenderProvider"
- Next in thread: WXS: "Re: Provider Properties + IExtenderProvider"
- Reply: WXS: "Re: Provider Properties + IExtenderProvider"
- Reply: WXS: "Re: Provider Properties + IExtenderProvider"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 23 Nov 2004 15:55:42 +0100
You can return true to all cases from CanExtend. You might do this if you
wanted to provide a property for anything based on Component for example.
The IExtenderProvider only enables you to add a property at design time. You
can't add an event.
It's important to note that the property isn't really added to the object.
This is just a design time trick that enables the IDE to make the user think
that the object has properties it doesn't. At runtime those properties do
not exist and must be handled by the property provider itself. More
particularly, the object being extended has no knowledge that the addition
has taken place and so for it to magically gain an event in this manner
would make no sense.
Maybe you should explain in detail what you want to do rather than speculate
on the operation of the extender provider. There may be another way to
answer the question.
-- Bob Powell [MVP] Visual C#, System.Drawing Find great Windows Forms articles in Windows Forms Tips and Tricks http://www.bobpowell.net/tipstricks.htm Answer those GDI+ questions with the GDI+ FAQ http://www.bobpowell.net/faqmain.htm All new articles provide code in C# and VB.NET. Subscribe to the RSS feeds provided and never miss a new article. "WXS" <WXS@discussions.microsoft.com> wrote in message news:B4425918-BDFB-45AA-A548-4B8E15ABB775@microsoft.com... > Is there any way to create an extender that provides an event to all controls > that > I return CanExtends==true for? It seems I can provide properties, like > strings, bools, ints, but not events to other controls. > > The reason I would like to do this is so I can associate an event with the > control and have the designer automatically add the event handler for me when > the user double clicks the event in the event pane of the designer for the > control. > > Is there a way to do this? > Thanks, > Dave
- Next message: Craig: "RE: MDI app and UIP v2.0"
- Previous message: WXS: "Provider Properties + IExtenderProvider"
- In reply to: WXS: "Provider Properties + IExtenderProvider"
- Next in thread: WXS: "Re: Provider Properties + IExtenderProvider"
- Reply: WXS: "Re: Provider Properties + IExtenderProvider"
- Reply: WXS: "Re: Provider Properties + IExtenderProvider"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|