Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / Design Time / January 2006

Tip: Looking for answers? Try searching our database.

Retrieving the original component that extends a property in a converter

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Remus Rusanu [MSFT] - 25 Jan 2006 09:50 GMT
I have a component that implements IExtenderProvider and add a property, say
"ID", to some controls, say a Button. I have added a type converter to this
property and this type converter offers a drop down list of possible values,
by overriding GetStandardValuesSupported and GetStandardValues. But in order
to populate the list of values, I need to get a reference to the my
component instance that provides the extended property. I don't see how can
I retrieve this from the ITypeDescriptorContext. The context is exposing the
'Button' that has the extended property, but no the component instance that
provides this extended property.

TIA,
~ Remus
Remus Rusanu [MSFT] - 26 Jan 2006 03:09 GMT
Found it. The Provider property on the ExtenderProvidedPropertyAttribute in
the Attributes collection of the context.PropertyDescriptor.

>I have a component that implements IExtenderProvider and add a property,
>say "ID", to some controls, say a Button. I have added a type converter to
[quoted text clipped - 8 lines]
> TIA,
> ~ Remus
Dira - 27 Jan 2006 08:38 GMT
O!
This is much better than the code i used:

Remus Rusanu [MSFT] schrieb:

> Found it. The Provider property on the ExtenderProvidedPropertyAttribute in
> the Attributes collection of the context.PropertyDescriptor.
[quoted text clipped - 11 lines]
> > TIA,
> > ~ Remus

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.