Expand a class instance within a class instance in PropertryGrid

Posted by Dmi on Stack Overflow See other posts from Stack Overflow or by Dmi
Published on 2010-03-30T18:08:43Z Indexed on 2010/03/30 18:13 UTC
Read the original article Hit count: 356

Filed under:
|

In C#, I have a class set up like so:

class Page
{
  public class Element
  {
   private string test;
   public string Test
   { get { return test; } set { test = value; } }
  }

 private Element element;
 public Element PrimaryElement
 { get { return element; } set { element = value; } }
}

If I have a PropertyGrid where the select object is an instance of Page, how can I modify Test in its member PrimaryElement from the PropertyGrid? It shows up in grey and is not expandable nor editable.

© Stack Overflow or respective owner

Related posts about c#

Related posts about propertygrid