This project is read-only.

Multiple objects

May 15, 2010 at 2:33 AM

Hi,

Is there a way to aggregate properties into a PropertyGrid control, for instance from multiple simultaneous objects at once?

There are two aggregation strategies that would be useful depending on the circumstance:

- Display the union of all properties of all selected objects. (This is very useful for batch editing multiple selected objects, say in an editor.)
- Display only the properties that are common to all selected objects.

I understand there is a design barrier to this, because the property controls may need to be aware of conflicts and convey a ghost state when properties of the same name and return type have conflicting data. But the payoff is potentially huge for certain tools.

 

Just in case I am missing a native approach: Is there an elegant way to achieve the same effect in C#4 (or even better 3) by exploiting dynamic objects instead of requiring special handling code in the PropertyGrid?  ie. build a dynamic object on the fly that is the aggregate of all individual object properties?

 

Coordinator
May 15, 2010 at 6:39 AM

I think this is not so hard to implement, but we need a Property if we show the Properties for the Object collection, or the Properties for the Object's in that collection!

I'm looking for this next week!

May 17, 2010 at 11:36 PM

Hi jogi,

Are you saying that you are thinking of implementing aggregation strategies as custom property editors?

 

Thank you.