A custom PropertyGrid
I’m working on some kind of custom PropertyGrid Control right now. You might have spottet it in some of the Screenshots that I’ve previously posted. .Net does have an existing PropertyGrid which is customizable to some degree and I could just have used it – but after doing that in Nullpunkt and not being very happy with the results I’m now trying a different approach.
The thing is, even with all possibilities of customizing the default PropertyGrid, it will always be just a grid full of equally-sized, mostly text-based Properties. Even when defining custom editors for all of them, you won’t see any unless currently editing a specific Property. Some things are just terribly bad to edit that way, others just don’t look good, and the overall usability is moderate. It’s not really bad. But also not really good either.
For the Duality Editor I wanted to try something new. Or, at least, experiment with it. Rather than using a fixed grid of key-value-pairs, my custom version of a PropertyGrid is designed more like a “vertical toolbox”: A set of PropertyEditors, each one a single Control by itsself, allowing a much more flexible, fitted and visually appealing way of editing values of specific types.
In theory, that is. Currently it pretty much looks like any other PropertyGrid as well because the available set of PropertyEditors is merely a reflection-driven fallback for the “no custom editor available”-case. I have to admit, they’re wasting most of the potential and due to the 1-Property-1-Control design, it doesn’t get anywhere near the original PropertyGrid’s performance when facing large sets of Properties. However, after adding a proper set of custom editors for each Component- and Resource type, it might still pay off well.
Anyway, here’s a demo project and the complete source code of my current PropertyGrid prototyping experiments. Feel free to use it, any thoughts appreciated.
Edit: Here’s another WiP screenshot of my custom PropertyGrid, showing a little more of the “vertical toolbox” idea. The currently selected object is a GameObject which is mapped to a combination of a plain GameObjectPropertyEditor and a list of PropertyEditors for all of its components.