In Depth Banner
Skip Navigation Links

Select your preferred language

The TestObject class

This class is edited by the property grid and shows how properties may be attributed with a specific editor.

  class TestObject

  {

    int _transparency=255;

    [Editor(typeof(TransparencyEditor),typeof(UITypeEditor))]

    public int Transparency

    {

      get{return _transparency;}

      set{_transparency=value;}

    }

 

    int _integer;

    public int Integer

    {

      get{return _integer;}

      set{_integer=value;}

    }

  }

 

Return to the article.

 

Copyright © Bob Powell 2003-2009. All rights reserved