views:

20

answers:

0

I am trying to build a WPF control that allows users to edit the values of non-specific types outside of the context of a runtime PropertyGrid. The WinForms PropertyGrid makes use of UITypeEditors and these can be obtained and utilised at runtime via the relevant TypeDescriptor method.

The Visual Studio PropertyGrid, on the other hand, makes use of PropertyValueEditors. Microsoft recommends the use of so-called "metadata assemblies" in order to associate a type with a visual editor, but such an approach only benefits Visual Studio users because such assemblies are typically not referenced and thus not included in a build. See http://msdn.microsoft.com/en-us/library/bb546923(VS.90).aspx.

My problem is that I want my control to be able to utilise PropertyValueEditors where they exist because, let's face it, if someone has gone to the trouble of designing such editors then it seems to me they should be available in runtime scenarios as well as VS design time scenarios.

So my question is, does anyone know of a way to harness existing PropertyValueEditors in a runtime scenario where such editors are declared in metadata assemblies?

Thanks,

Chris.