PropertyGrid in WinForms and elsewhere


The other day someone was asking a question on the WinForms forums about the PropertyGrid class. This control is what you typically interact with to set properties in Visual Studio, and it's a very handy class that you can use at runtime as well for a quick way to allow users to edit an object. It is based on WinForms, however, and that got me thinking about what's available on other presentation stacks.

For Silverlight, the Silverlight toolkit provides the DataForm control with similar capabilities.

For WPF, it appears that various projects have done ports of one or the other. A good starting point is to simply do a search for either on http://www.codeplex.com/ and see what's available.

Is there anything obvious missing here? WPF makes it so easy to craft a specific template with data binding that I would imagine that in most cases it's not too time-consuming to craft a one-off data template for your types that will offer a more specialized user interface.

Enjoy!

Comments (3)

  1. Rod Mac says:

    When WPF first came out, I thought this was a surprising omission. The easy workaround I used was to add the WinForms PropertyGrid to WPF, but looking at that app now, both codewise and visually, that solution looks out of place. I think most folk would prefer/expect the inclusion of a WPF PropertyGrid in the VS toolbox otherwise the toolbox is going backwards. Seems from the WPF 5 suggestion list quite a few folk feel that way too. Hope that helps.

  2. Ira says:

    I worked on a large WPF application that uses the winforms grid as well, and it does look ugly and out of place.

  3. Hopefully the newer controls will do a better job at addressing your scenarios – especially with the additional validation built-in that they may have.

    @Rod, can you tell me which suggestion list you are referring to? I want to make sure I check out the right one 🙂

Skip to main content