This project has moved. For the latest updates, please go here.

Ignore Property Attribute

Nov 8, 2011 at 4:24 PM

 

Love the PropertyGrid control, it's awesome.

Is there an attribute I can use to exclude a property from the PropertyGrid.  I know you can build a list of the properties you want to display, but is there a way to do something like:

[ExcludeProperty]

public string DontShowProperty { get; set; }

Michael

 

Nov 9, 2011 at 7:07 PM

Currently this is not supported, but it would be a great feature request.

Nov 10, 2011 at 5:04 AM

This can be done now:

[

Browsable(false), ReadOnly(true), EditorBrowsable(EditorBrowsableState.Never)]
public string DontShowProperty { get; set; }

 

Nov 10, 2011 at 2:23 PM

Why didn't I think of that?  Apparently I had tunnel vision on the ExcludeProperty attribute.

Nov 10, 2011 at 4:17 PM

Thanks.  I'll give that a try.

Again, great work, I love the PropertyGrid.