views:

48

answers:

3

I noticed that programs like Report Builder allow user to set property value or an expression determining property value. I want to the add same functionality to my application. So is there any simple way to do so or do i have to redefine all type converters so that they allow to set expression in addition to their original functionality.

Here is an example

A: 

Maybe it's easier to override the Property-Grid-Control to add this kind of functionality to every property.

I am just curious, how do you evaluate those expressions (CodeDOM) ?

ralf.w.
Actually I have parser for custom expression language.
savras
A: 

If you want to create your own "drop-down properties", you need to implement a custom UITypeEditor.

There are several samples for that:

SaguiItay
Not what the question asked.
leppie
A: 

This is exposed via TypeConverter.

To allow string input, the object must be convertible from type string.

To allow a drop down, expose the values via GetStandardValues.

You will need to override the xxxSupported methods too.

leppie