I have an extender (IExtenderProvider) which extends certain types of controls with additional properties. For one of these properties, I have written a UITypeEditor. So far, all works just fine.
The extender also has a couple of properties itself, which I am trying to use as a sort of default for the UITypeEditor. What I want to do is to be able to set a property on the extender itself (not the extended controls), and when I open up the UITypeEditor for one of the additional properties on an extended control, I want to set a value in the UITypeEditor to the value of the property on the extender.
A simple example: The ExtenderProvider has a property DefaultExtendedValue. On the form I set the value of this property to "My Value". Extended controls have, through the provider, a property ExtendedValue with a UITypeEditor. When I open the editor for the property ExtendedValue the default (initial) value should be set to "My Value".
It seems to me that the best place to do this would be UITypeEditor.EditValue, just before calling IWindowsFormsEditorService.DropDownControl or .ShowDialog.
The only problem is that I can't (or I haven't discovered how to) get hold of the extender provider itself in EditValue, to read the value of the property in question and set it in the UITypeEditor. Context gives me the extended control, but that is of no use to me in this case.
Is there any way to achieve what I'm trying? Any help appreciated!
Thanks Tom