Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1735
xamPropertyGrid: Select value from a dynamic list of options
posted

Hi,

in the xamPropertyGrid I need to set a property value from a list of available values found in a list. I want the selectable values to end up in a combo box in the property grid.

From my initial investigation I find that a way to do this (at least in other property editors) is to use a TypeConverter attribute on my property and implement the TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) method to generate the list of available options. However, when I try this with the xamPropertyGrid I get passed a context of null in this (and related) TypeConverter methods, making it difficult to use anything but a static list of options.

Is there a way to set up a type converter with a proper context for the xamPropertyGrid, or is there an alternative way to get the combo-box experience I need ?

Regards,
Leif

Parents Reply Children
No Data