Binding a combo box to an enum with Silverlight 2

Starting with a great example of radio button binding here:

http://www.nablasoft.com/alkampfer/index.php/2008/07/29/binding-combobox-to-enum-in-silverlight/

I added a combo box example (which seemed be missing from the example).

sl2bindenumwithcombozip

 

Here’s the app with both radios and combo boxes:

 

Hope it helps!

Advertisements

2 Responses to “Binding a combo box to an enum with Silverlight 2”

  1. Justin Halls Says:

    it all seems verycomplicated just to populate a combobox from the enum, and you have to explicity add each member of the enum to an array anyway. You might just as well create List of all the enum members and then simply binf the combobox.ItemsSource to that list – no need for converters or explicitly defined resources at all. Far less code, far less possibility of erros creeping in.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: