How to use the PropertyGrid control in Visual Studio.NET: Webcast
July 17, 2009 Leave a comment
A little while ago I was thinking about how useful it would be to add a Property Grid to an application, so I started researching how you could do it. I was pleasantly surprised when I found the PropertyGrid .NET control from Microsoft. It may not be in your Windows Forms Toolbox by default, but you can add it to your toolbox pretty easily.
Basically you bind the control to an instance of a class and basically the Property Grid UI element will display the public properties in the grid. The really nice thing about this is that it will look at your data types and implement the right type of input box. For example, if the data type of one of your properties is ‘Color’ then the input for that property on the property grid will be the drop down color selector. Because the PropertyGrid control is directly bound to a class, your class can still contain any business logic that you wish in the class. There are custom attributes you can provide to specify the category for properties and description, etc.
Check out the webcast I created. It will give you a quick overview of how to use the control and implement it in an application.
I’m pleased that I was able to improve the audio quality for this webcast over my previous webcast I created with Camtasia Studio. From a personal and professional development perspective, it’s really helping me focus on what it takes to effectively deliver training material to an audience.
Here’s the link. I welcome any feedback:
It’s about 6 minutes long…