This is something that I had to do recently, and it wasn’t as obvious as I thought.
Given a very simple enum like:
The first (and obvious) try is:
Here we are trying to hide a label and a textbox based on the value of the enum.
However, it doesn’t work
As an aside, the autogrid you see heer is very handy, and can be found on www.codeplex.com
What you actually need to do is slightly odd, and is effectively instantiating the enum values: