Does anyone kow how to show different custom objects properties in one ProertyGrid, show properties of each object (dragged or clicked event) in the same propertyGrid. For example,I have two classes for values corresponding to respective objects.

classLine contains Length and Thickness
classSurface contains Perimeter and Area

The objects can be a collection of several lines and surfaces

So, my idea is to do the following

When a Line is selected/dragged&dropped:
PropertyGrid Shows:
Length: value
Thickness: value

Surface is is selected/dragged&dropped:
PropertyGrid Shows:
Perimeter: value
Area: value

I know I can show all properties but can't get the idea if only the properties of a specific object can be shown. Showing all is also a problem at the list of properties shown in the propertyGrid will be very long when more objects are involved, each with their corresponding properties (parameters).