DesignTime-Support for self-defined value list - how to do that?

G

Geepy

I am implementing an Extension control that provides other Controls
with a set of properties.
One of the properties should be a list of values that is configurable
by the user (aka developer).

The Extension control itself has a collection property where the user
can specify the values that should be allowable for the extension on
the other controls.


I am able to provide the VS Designer with that list in Design mode when

the method ITypeDescriptor.GetStandardValues() is called with a valid
conext as parameter. There I retrieve my own Extender control and query

it for the current list of allowed values.
But when I work in Markup, the type descriptor is called with an empty
context ('null').
How can I retrieve the current list of property values from my extender

control when in markup mode?


Below is a snippet of the markup for my extender control


<my:Extender ID="extender1" runat="server">
<AllowedValues>
<my:AllowedValue name="one" value="1"/>
<my:AllowedValue name="two" value="2"/>
<my:AllowedValue name="three" value="3"/>
</AllowedValues>
<ExtensionsProvided>
<my:ExtensionProvided ControlId="ctl1" Preset="one"/>
</ExtensionsProvided>


When I open this markup, delete the '="one"' behind Preset and press
the '=' key, I get an intellisense list which should contain 'one',
'two' and 'three', but the list is always empty...


Any ideas?


Guenter from Frankfurt/Germany
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top