O'Reilly logo

Mastering Windows Presentation Foundation by Sheridan Yuen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Data binding to enumeration collections

We've already seen a number of examples of data binding to enumeration instances. We've seen converters that we can use to convert our enumeration values and Extension methods that we can use to extract additional information from each member. Earlier in this chapter, we even saw a full but basic example using our BitRate enumeration. Now, with our new-found knowledge, let's see how we can improve that earlier example.

As noted, in the previous example, we manually declared a RadioButton control for each of our enumerations. While that is fine for our three member enumeration, it wouldn't make so much sense to use this method if we had a large number of members. Instead, let's think about how we could use ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required