How to display static (shared) object's properties in a PropertyGrid?

Posted by Paul Sasik on Stack Overflow See other posts from Stack Overflow or by Paul Sasik
Published on 2010-04-12T14:09:08Z Indexed on 2010/04/12 14:23 UTC
Read the original article Hit count: 359

Filed under:
|
|
|
|

I would like to display static (shared) objects at runtime in a PropertyGrid but if I try to set the selected object property of the grid like this:

_propertyGrid.SelectedObject = System.Windows.Forms.Application

I get a compilation error:

'Application' is a type and cannot be used as an expression.

Is there a way to display a static (shared) object or the object's properties in the PropertyGrid?

© Stack Overflow or respective owner

Related posts about winforms

Related posts about c#