Freigeben über


Binding to an ENUM in Windows 8

imageYou create a Settings flyout for your app so users can configure their experience. Sometimes, your settings are based on a ENUM that you use throughout your app. But how do you bind to an ENUM in XAML?

Our sample ENUM

The first thing you should know is that you cannot really bind to a ENUM, but with some code we can expose an ENUM as a type you can bind to. Let’s take a look at the code:

image

Read the whole article here