May 25 2008 10:03PM GMT
Posted by: Mark Shurmer
WPF
WPF DataTriggers with enums
Posted by: Mark Shurmer
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:



You must be logged-in to post a comment. Log-in/Register