How do custom Properties surport the results from LINQ ?

Jun 21, 2010 at 10:20 AM
Edited Jun 21, 2010 at 3:31 PM


i'v defined my own properties through implementing the interface ICustomTypeDescriptor and PropertyDescriptor.  I dictate that the properties such as Displayname or Category have been changed as what i want.

But it can not be used for my entities from Enttity Framework. I did it something like following:


  var query = from x in tables
                   select x;

WpfPropertyGrid.Instance = query.toList().First();


in which the tables is the entities and his EntityObject including all the Properties drived from myCustomTypeDescriptor. But in the WPFPropertyGrid the desired Properties will not be shown.

thank you for any hints.


Jun 22, 2010 at 7:27 AM


i've got the resolution and it is very easy.  It should define TypeDescriptor.GeProperties(object, false) instead of TypeDescriptor.GeProperties(object), so than it can find the ICustomTypeDecriptor what i defined.