C# Collapsible Properties

Here’s a sweet way to display properties. Basically, I had a bunch of generic properties that I was using shorthand notation for, and one that was a read-only property which served as an aggregate of a few other properties. I couldn’t shortcut it, but the implementation of it was trivial, so I hid it inside a region whose name looked exactly like a shorthand property. Tough to explain, but easy to understand:

Collapsed Property

Expanded Property

Expanded Property

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>