Show class name in C # Properties Grid

I am creating a property grid using C # .NET for my AutoCAD plugin. This plug-in checks every object in the AutoCAD drawing for XRecord data and, if it finds one, tries to deserialize it into a class. This all works, so now I want to show the stored properties of the object in my form property grid. Here is the class whose information I want to show

public class SerializeTest
    {
        #region class variables
        public int X { get; set; }
        public int Y { get; set; }
        #endregion

        #region Constructors
        public SerializeTest(int passedX, int passedY)
        {
            this.X = passedX;
            this.Y = passedY;
        }

        private SerializeTest()
        {

        }

        #endregion
    }

      

And this is how it looks in my form when I click on an AutoCAD object that stores it as an XRecord

enter image description here

I want to add the class type of the object (in this case SerializeTest) before the other properties. How do I set up the property grid this way?

enter image description here

Specifically, I want it to look like the class field at the top is not at the bottom

+3


source to share





All Articles