(X) Hide this
    • Login
    • Join
      • Generate New Image
        By clicking 'Register' you accept the terms of use .

MVVM binding a ListView to an Enum with translation

(0 votes)
0 comments   /   posted by Silverlight Show on Jul 07, 2014
Tags:   windows-phone , wpdev , windows-8 , windev , mvvm , glenn-versweyveld
Read original post by Glenn Versweyveld at Depechie's Outing

Sometimes we need to visualize a list of enum values to the user, so he can make a selection and if possible we would like to make this reusable for any enum used in our app.

But there are some problems when we would try to get this done… Enums are great for storing some kind of selection, but they are not easy to use in an MVVM list binding scenario! Certainly not if they need to be presented in a readable manner nor while different languages are supported.

But there is a way to get this done! Let me show you a solution while using a Windows Phone 8.1 store app, but the code will also work in Windows 8 store app and most of it will also run in a Windows Phone Silverlight app.


No comments

Add Comment

Login to comment:
  *      *       

Our News on Twitter

Latest News