WPF – Displaying “Flags” (Enums as Flags)

I started using WPF about a year ago. I liked the way the WPF team managed to split the behaviour of controls from their graphical rendering. This is very powerful and one of the area of ambiguity in the past where logic code ended up in the UI part of your application, making the maintenance more complex and breaking things a lot easier.

During that “learning journey of WPF”, I went through some “challenges” (or issues, depending on how you see the half-full/empty glass of water). This is my first blog to keep track of some of those “challenges” and shared them.

Recently, I had to present to the end user a “list” of choices to filter out items from another control. I used an enumerated type with the “Flags” attribute to define the possible distinct choices. (more…)

Advertisement
%d bloggers like this: