<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Legomaster Building and Coding &#187; WPF</title>
	<atom:link href="http://legomaster.net/categories/wpf/feed/" rel="self" type="application/rss+xml" />
	<link>http://legomaster.net</link>
	<description>Building Better Code</description>
	<lastBuildDate>Thu, 23 Jun 2011 01:00:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Data Bound Collections in WPF</title>
		<link>http://legomaster.net/2010/01/data-bound-collections-in-wpf/</link>
		<comments>http://legomaster.net/2010/01/data-bound-collections-in-wpf/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 17:40:16 +0000</pubDate>
		<dc:creator>travis</dc:creator>
				<category><![CDATA[WPF]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[Data Binding]]></category>

		<guid isPermaLink="false">http://legomaster.net/?p=53</guid>
		<description><![CDATA[One of the joys of working with WPF is that data binding that can exist. At a couple points I&#8217;ve wanted to bind a Dictionary as a list. Each item in the list would have a key and only one of those items could exist based upon the the key. Thus I put together two [...]]]></description>
			<content:encoded><![CDATA[<p>One of the joys of working with WPF is that data binding that can exist. At a couple points I&#8217;ve wanted to bind a Dictionary as a list. Each item in the list would have a key and only one of those items could exist based upon the the key. Thus I put together two parts that allowed me to do this. It also allows the bound data to be updated from a thread other than the UI one. </p>
<p>NotifyCollectionChangedBase implemented the INotifyCollectionChanged interface to allow the data bound elements in the WPF to identify the item has been updated.<br />
<script src="http://gist.github.com/282024.js?file=NotifyCollectionChangedBase.cs"></script></p>
<p>The IKeyedObject just allows the KeyedCollectionBase to identify the key used in the internal dictionary.<br />
<script src="http://gist.github.com/282024.js?file=IKeyedObject.cs"></script></p>
<p>KeyedCollectionBase implemented IList to make the collection appear as a list to the rendering elements but internally stores everything as a dictionary so only a single object with the given key exists.<br />
<script src="http://gist.github.com/282024.js?file=KeyedCollectionBase.cs"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://legomaster.net/2010/01/data-bound-collections-in-wpf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

