Click here to Skip to main content
13,591,301 members
Click here to Skip to main content
Add your own
alternative version


4 bookmarked
Posted 22 May 2010
Licenced CPOL


Rate this:
Please Sign up or sign in to vote.
In WPF/Silverlight, you might want to bind to a dictionary. Here's a couple of websites I found.
I was writing some code today, and decided it would be real nice if I could use an ObservableDictionary to allow the possible binding of items to a WPF/Silverlight control. Of course, I was dismayed to find that Microsoft (once again) failed to anticipate the needs of (quite possibly) the laziest programmer ever to stop around in Visual Studio - there was no such collection in .Net. Lookout google, here I come.

I was pleased my search was a relatively short one, and in the interest of saving you the time of conducting an identical search, I present you with my results - a sort of one-stop shopping experience, if you will.

The first link provides the article discussing the basic ObservableDictionary:[^]

And the second link allows you to add XML serialization:[^]

As with anything on the internet, I don't know how long these things will be around, so if I were you, I'd scoop the code as soon as humanly possible. I'[m working on an article that actually uses some of this code, so eventually, you'll be able to get it here as well (I'll get the original authors' permissions before I do that, though).


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

John Simmons / outlaw programmer
Software Developer (Senior) Paddedwall Software
United States United States
I've been paid as a programmer since 1982 with experience in Pascal, and C++ (both self-taught), and began writing Windows programs in 1991 using Visual C++ and MFC. In the 2nd half of 2007, I started writing C# Windows Forms and ASP.Net applications, and have since done WPF, Silverlight, WCF, web services, and Windows services.

My weakest point is that my moments of clarity are too brief to hold a meaningful conversation that requires more than 30 seconds to complete. Thankfully, grunts of agreement are all that is required to conduct most discussions without committing to any particular belief system.

You may also be interested in...

Comments and Discussions

GeneralI just posted an alternative as part of the solution to anot... Pin
John Stewien8-Jun-11 12:51
memberJohn Stewien8-Jun-11 12:51 
GeneralAwesome. I googled ObservableDictionary and the Dr. WPF link... Pin
SledgeHammer0122-May-10 13:32
memberSledgeHammer0122-May-10 13:32 
GeneralYou might want to check out the Reactive Extensions for .Net... Pin
Matthew Dennis22-May-10 13:30
staffMatthew Dennis22-May-10 13:30 
You might want to check out the Reactive Extensions for .Net (or JavaScript). Any IEnumerable can be turned into an Observable collection. See
There are also a number of Blogs about it. Also Channel9 has several videos.
GeneralReason for my vote of "5". To offset the univoting schmuck. Pin
Wes Aday22-May-10 13:12
memberWes Aday22-May-10 13:12 
GeneralI beg to differ. I needed an observable dictionary, and I am... Pin
John Simmons / outlaw programmer22-May-10 8:43
mvpJohn Simmons / outlaw programmer22-May-10 8:43 
GeneralReason for my vote of 1 links are not tips Pin
SledgeHammer0122-May-10 8:04
memberSledgeHammer0122-May-10 8:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web02 | 2.8.180618.1 | Last Updated 22 May 2010
Article Copyright 2010 by John Simmons / outlaw programmer
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid