<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>WebPurity Project Blog</title>
	<atom:link href="http://webpurityltd.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://webpurityltd.wordpress.com</link>
	<description>.NET Development blog from WebPurity Limited</description>
	<lastBuildDate>Tue, 20 Jan 2009 17:40:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='webpurityltd.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>WebPurity Project Blog</title>
		<link>http://webpurityltd.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://webpurityltd.wordpress.com/osd.xml" title="WebPurity Project Blog" />
	<atom:link rel='hub' href='http://webpurityltd.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Working with .NET 3.5 SP1 (Sentinel Client)</title>
		<link>http://webpurityltd.wordpress.com/2009/01/19/working-with-net-35-sp1/</link>
		<comments>http://webpurityltd.wordpress.com/2009/01/19/working-with-net-35-sp1/#comments</comments>
		<pubDate>Mon, 19 Jan 2009 13:56:10 +0000</pubDate>
		<dc:creator>webpurity</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[3.5 sp1]]></category>

		<guid isPermaLink="false">http://webpurityltd.wordpress.com/2009/01/19/working-with-net-35-sp1/</guid>
		<description><![CDATA[&#160; I recently installed 3.5 SP1 on my development laptop and was merrily coding away for a while before deploying some code to a virtual machine. Run the code and got this strange error! Unable to install or run application.&#160; The application requires that assembly Sentinel.v3.5 Client Version 3.5.0.0 be installed in the Global Assembly [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webpurityltd.wordpress.com&amp;blog=3263781&amp;post=68&amp;subd=webpurityltd&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>&nbsp;</p>
<p>I recently installed 3.5 SP1 on my development laptop and was merrily coding away for a while before deploying some code to a virtual machine.</p>
<p>Run the code and got this strange error!</p>
<p><a href="http://webpurityltd.files.wordpress.com/2009/01/sentinel-screenshot.png"><img style="border-width:0;" height="187" alt="Sentinel.v3.5 Client Version" src="http://webpurityltd.files.wordpress.com/2009/01/sentinel-screenshot-thumb.png?w=434&#038;h=187" width="434" border="0"></a> </p>
<p>Unable to install or run application.&nbsp; The application requires that assembly Sentinel.v3.5 Client Version 3.5.0.0 be installed in the Global Assembly Cache (GAC) first.</p>
<p><strong>Cause</strong>: Application compiled on 3.5 SP1 then run on machine with only 3.5 installed.</p>
<p><strong>Resolution</strong>: Install 3.5 SP1 on the client machine</p>
<p>Thought it was worth posting in case anyone else hits this issue&#8230;as I could not find anything on the web about Sentinel!!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/webpurityltd.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/webpurityltd.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/webpurityltd.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/webpurityltd.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/webpurityltd.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/webpurityltd.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/webpurityltd.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/webpurityltd.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/webpurityltd.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/webpurityltd.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/webpurityltd.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/webpurityltd.wordpress.com/68/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/webpurityltd.wordpress.com/68/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/webpurityltd.wordpress.com/68/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webpurityltd.wordpress.com&amp;blog=3263781&amp;post=68&amp;subd=webpurityltd&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://webpurityltd.wordpress.com/2009/01/19/working-with-net-35-sp1/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/85c0ff9fbed8b4cf82628a0018b96856?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">webpurity</media:title>
		</media:content>

		<media:content url="http://webpurityltd.files.wordpress.com/2009/01/sentinel-screenshot-thumb.png" medium="image">
			<media:title type="html">Sentinel.v3.5 Client Version</media:title>
		</media:content>
	</item>
		<item>
		<title>Running 10k for charity</title>
		<link>http://webpurityltd.wordpress.com/2009/01/13/sponsor-me-for-10k-run/</link>
		<comments>http://webpurityltd.wordpress.com/2009/01/13/sponsor-me-for-10k-run/#comments</comments>
		<pubDate>Tue, 13 Jan 2009 20:21:33 +0000</pubDate>
		<dc:creator>webpurity</dc:creator>
				<category><![CDATA[general]]></category>

		<guid isPermaLink="false">http://webpurityltd.wordpress.com/?p=63</guid>
		<description><![CDATA[Some of us at Fitness First are running 10k for the British Heart Foundation.  We are looking to raise £1000 so please give generously and check out my fundraising page. Thanks for your support!<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webpurityltd.wordpress.com&amp;blog=3263781&amp;post=63&amp;subd=webpurityltd&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Some of us at Fitness First are running 10k for the British Heart Foundation.  We are looking to raise £1000 so please give generously and check out <a href="http://www.justgiving.com/alarkin">my fundraising page</a>.</p>
<p>Thanks for your support!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/webpurityltd.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/webpurityltd.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/webpurityltd.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/webpurityltd.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/webpurityltd.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/webpurityltd.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/webpurityltd.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/webpurityltd.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/webpurityltd.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/webpurityltd.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/webpurityltd.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/webpurityltd.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/webpurityltd.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/webpurityltd.wordpress.com/63/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webpurityltd.wordpress.com&amp;blog=3263781&amp;post=63&amp;subd=webpurityltd&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://webpurityltd.wordpress.com/2009/01/13/sponsor-me-for-10k-run/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/85c0ff9fbed8b4cf82628a0018b96856?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">webpurity</media:title>
		</media:content>
	</item>
		<item>
		<title>Protected: HOWTO Rebuild and deploy a new pre-requisite</title>
		<link>http://webpurityltd.wordpress.com/2008/11/17/howto-rebuild-and-deploy-a-new-pre-requisite/</link>
		<comments>http://webpurityltd.wordpress.com/2008/11/17/howto-rebuild-and-deploy-a-new-pre-requisite/#comments</comments>
		<pubDate>Mon, 17 Nov 2008 11:43:11 +0000</pubDate>
		<dc:creator>webpurity</dc:creator>
				<category><![CDATA[splitscene]]></category>

		<guid isPermaLink="false">http://webpurityltd.wordpress.com/2008/11/17/howto-rebuild-and-deploy-a-new-pre-requisite/</guid>
		<description><![CDATA[There is no excerpt because this is a protected post.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webpurityltd.wordpress.com&amp;blog=3263781&amp;post=51&amp;subd=webpurityltd&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This post is password protected. You must visit the website and enter the password to continue reading.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/webpurityltd.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/webpurityltd.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/webpurityltd.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/webpurityltd.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/webpurityltd.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/webpurityltd.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/webpurityltd.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/webpurityltd.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/webpurityltd.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/webpurityltd.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/webpurityltd.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/webpurityltd.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/webpurityltd.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/webpurityltd.wordpress.com/51/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webpurityltd.wordpress.com&amp;blog=3263781&amp;post=51&amp;subd=webpurityltd&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://webpurityltd.wordpress.com/2008/11/17/howto-rebuild-and-deploy-a-new-pre-requisite/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/85c0ff9fbed8b4cf82628a0018b96856?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">webpurity</media:title>
		</media:content>
	</item>
		<item>
		<title>The importance of DLI (Developer Loses Interest)</title>
		<link>http://webpurityltd.wordpress.com/2008/09/24/the-importance-of-dli-developer-loses-interest/</link>
		<comments>http://webpurityltd.wordpress.com/2008/09/24/the-importance-of-dli-developer-loses-interest/#comments</comments>
		<pubDate>Wed, 24 Sep 2008 13:33:13 +0000</pubDate>
		<dc:creator>webpurity</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[bug fixing]]></category>
		<category><![CDATA[pair programming]]></category>
		<category><![CDATA[test driven development]]></category>

		<guid isPermaLink="false">http://webpurityltd.wordpress.com/2008/09/24/the-importance-of-dli-developer-loses-interest/</guid>
		<description><![CDATA[I was developing a wee web-based application the other day, playing around with parsing HTML and developing my love hate relationship with regular expressions.  The same relationship I have with CSS. Don&#8217;t get me wrong I love them! They are both extremely powerful and the deeper I delve the more respect I gain.  However my [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webpurityltd.wordpress.com&amp;blog=3263781&amp;post=33&amp;subd=webpurityltd&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I was developing a wee web-based application the other day, playing around with parsing HTML and developing my love hate relationship with regular expressions.  The same relationship I have with CSS.</p>
<p>Don&#8217;t get me wrong I love them! They are both extremely powerful and the deeper I delve the more respect I gain.  However my lack of experience leads to frustration as debugging them is a nightmare.</p>
<p>Stop me if you&#8217;ve heard this one.  You get it working&#8230;you tinker a little&#8230;it breaks!  You cannot step into it or have some compiler tell you where it went wrong it&#8217;s just broken till you work methodically back through all the changes you made just to reach square one again!</p>
<h2>What is DLI?</h2>
<p>This got me thinking.  What I was feeling was very similar to how I feel about some parts of software I have maintained over the years.  I am sure everyone at some point has had some code where debugging an issue was a laborious and tedious task.</p>
<p>Indulge me as I attempt to define this through the following formula <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p align="center"><strong>IF</strong> <em><span style="text-decoration:underline;">TIME TO REPRODUCE</span></em> &gt;= <em><span style="text-decoration:underline;">DEVELOPER&#8217;S ATTENTION SPAN</span> </em><strong>THEN </strong></p>
<h3><strong>DEVELOPER LOSES INTEREST</strong></h3>
<p>If the time it takes to reproduce the issue and therefore debug the exact point where it goes wrong is longer than the attention span of the developer, the developer loses interest.</p>
<h2>The Cost of DLI</h2>
<p>When a developer loses interest they are much more likely to take their eye off the ball.  Best case scenario would be a sloppy check-in which breaks the build!  Worst case is a very bug-centric fix which in fact creates more bugs, which may or may not be found until a much later date (hopefully before it&#8217;s released) when the developer has left and it takes someone else ten times the effort to resolve.</p>
<p>Now it is easy to determine the cost of fixing an issue. We can simply use the time spent fixing it along with the developer&#8217;s rate.  I am not going to go into the cost of bug fixing here, but if you are interested check out <a title="Understanding Opportunity Cost" href="http://www.wtfdeveloper.com/Default11.aspx" target="_blank">Economics for Developers: Understanding Opportunity Cost</a> by Joseph Finsterwald.</p>
<p>I would say however the cost of DLI is far greater than the time taken to resolve the issue.  I would also say it is even greater than the cost of not fixing the bug at all.  The cost of DLI lies in the time spent fixing waves of bugs specific to one functional area.  Bugs which pop up in a variety of disguises but all smell the same.  Bugs which could have been prevented.  In fact the true cost of DLI may not surface in a project until it is too late and your developer has moved on!</p>
<h2>Keeping the cost down</h2>
<p>Here are my top 3 tips to ensuring your project does not suffer from DLI:</p>
<ol>
<li><strong>Test Driven Development</strong> &#8211; Unit tests can significantly reduce the time taken to reproduce issues.  Less <em><span style="text-decoration:underline;">TIME TO REPRODUCE</span></em> is less likely to lead to DLI!</li>
<li><strong>Keep those creative juices flowing</strong> &#8211; Don&#8217;t let your developer&#8217;s stagnate.  Have them work on new areas of functionality.  Increase the <em><span style="text-decoration:underline;">DEVELOPER&#8217;S ATTENTION SPAN</span></em> as well as spread knowledge throughout the team.</li>
<li><strong>Pair Programming</strong> &#8211; Having developers verify each other&#8217;s work ensures they care more about the code they produce.  Less likely to let DLI get in the way of a good job.</li>
</ol>
<p>Of course you could just bin my CV when it comes your way <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>NOTE</strong>: I am a developer so I am not having a dig.  I have a short attention span and this article is purely based on my personal experience.  For all I know DLI may be solvable with a quick trip to the psychiatrist <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/webpurityltd.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/webpurityltd.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/webpurityltd.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/webpurityltd.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/webpurityltd.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/webpurityltd.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/webpurityltd.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/webpurityltd.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/webpurityltd.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/webpurityltd.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/webpurityltd.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/webpurityltd.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/webpurityltd.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/webpurityltd.wordpress.com/33/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webpurityltd.wordpress.com&amp;blog=3263781&amp;post=33&amp;subd=webpurityltd&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://webpurityltd.wordpress.com/2008/09/24/the-importance-of-dli-developer-loses-interest/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/85c0ff9fbed8b4cf82628a0018b96856?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">webpurity</media:title>
		</media:content>
	</item>
		<item>
		<title>Vista doesn&#8217;t trust me!</title>
		<link>http://webpurityltd.wordpress.com/2008/08/20/vista-doesnt-trust-me/</link>
		<comments>http://webpurityltd.wordpress.com/2008/08/20/vista-doesnt-trust-me/#comments</comments>
		<pubDate>Wed, 20 Aug 2008 21:42:48 +0000</pubDate>
		<dc:creator>webpurity</dc:creator>
				<category><![CDATA[visual studio]]></category>
		<category><![CDATA[internet explorer]]></category>
		<category><![CDATA[vista]]></category>
		<category><![CDATA[vista security]]></category>

		<guid isPermaLink="false">http://webpurityltd.wordpress.com/2008/08/20/vista-doesnt-trust-me/</guid>
		<description><![CDATA[I finally made the leap to Vista, which in truth was more down to my laptop requiring a complete overhaul than my desire to keep up with the Jones&#8217;s After the hours of installs, service packs and updates I was up and running and ready to dev again. I recently downloaded some code to play [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webpurityltd.wordpress.com&amp;blog=3263781&amp;post=30&amp;subd=webpurityltd&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I finally made the leap to Vista, which in truth was more down to my laptop requiring a complete overhaul than my desire to keep up with the Jones&#8217;s <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>After the hours of installs, service packs and updates I was up and running and ready to dev again.</p>
<p>I recently downloaded some code to play around with and on extracting the zip file, opening Visual Studio 2008 and attempting the run the unit tests I got this error:</p>
<p><strong><em>Test Run deployment issue.  File or location &#8230; isn&#8217;t trusted</em></strong></p>
<p>&#8230;and all of my unit tests failed to execute.</p>
<p>I searched the web and finally found out that Vista had blocked the zip file I downloaded and subsequently the files extracted from it (strangely though&#8230;not all of them).</p>
<p>This issue is easily overcome by clicking the <strong>Unblock</strong> button under <strong>right click -&gt; properties </strong>for each offending file.</p>
<p><a href="http://webpurityltd.files.wordpress.com/2008/08/file-properties-unblock.png"><img style="border-right:0;border-top:0;border-left:0;border-bottom:0;" src="http://webpurityltd.files.wordpress.com/2008/08/file-properties-unblock-thumb.png?w=438&#038;h=596" border="0" alt="File Properties Unblock" width="438" height="596" /></a></p>
<p><strong>NOTE:</strong> The screenshot here is of my actual solution file which I have not unblocked as it does not seem to cause a problem.</p>
<p><strong>If you have a load of files you need to unblock then look </strong><a href="http://blogs.msdn.com/gblock/archive/2006/12/19/tips-steams-zones-vista-and-blocked-files-in-ie.aspx"><strong>here</strong></a><strong>.</strong></p>
<p><strong>Resources</strong></p>
<p><a href="http://www.infosysblogs.com/microsoft-mt/mt-tb.fcgi/149" target="_blank">Unit Test Trust Issue on Vista</a></p>
<p><a href="http://blogs.msdn.com/gblock/archive/2006/12/19/tips-steams-zones-vista-and-blocked-files-in-ie.aspx" target="_blank">Tips: Streams, Zones, Vista and Blocked Files in IE</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/webpurityltd.wordpress.com/30/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/webpurityltd.wordpress.com/30/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/webpurityltd.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/webpurityltd.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/webpurityltd.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/webpurityltd.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/webpurityltd.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/webpurityltd.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/webpurityltd.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/webpurityltd.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/webpurityltd.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/webpurityltd.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/webpurityltd.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/webpurityltd.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/webpurityltd.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/webpurityltd.wordpress.com/30/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webpurityltd.wordpress.com&amp;blog=3263781&amp;post=30&amp;subd=webpurityltd&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://webpurityltd.wordpress.com/2008/08/20/vista-doesnt-trust-me/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/85c0ff9fbed8b4cf82628a0018b96856?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">webpurity</media:title>
		</media:content>

		<media:content url="http://webpurityltd.files.wordpress.com/2008/08/file-properties-unblock-thumb.png" medium="image">
			<media:title type="html">File Properties Unblock</media:title>
		</media:content>
	</item>
		<item>
		<title>WPF: User settings anyone?</title>
		<link>http://webpurityltd.wordpress.com/2008/05/11/wpf-user-settings-anyone/</link>
		<comments>http://webpurityltd.wordpress.com/2008/05/11/wpf-user-settings-anyone/#comments</comments>
		<pubDate>Sun, 11 May 2008 10:27:36 +0000</pubDate>
		<dc:creator>webpurity</dc:creator>
				<category><![CDATA[WPF]]></category>
		<category><![CDATA[datasourceprovider]]></category>
		<category><![CDATA[observablecollection]]></category>
		<category><![CDATA[settingsprovider]]></category>
		<category><![CDATA[usersettings]]></category>
		<category><![CDATA[xaml]]></category>

		<guid isPermaLink="false">http://webpurityltd.wordpress.com/2008/05/11/wpf-user-settings-anyone/</guid>
		<description><![CDATA[I wanted to knock up a simple window to view and edit all the available user settings for an application. I thought this would be a nice article as it shows how to make use of the DataSourceProvider and ObservableCollection. The first step was to get the settings (SettingsPropertyCollection) into something more manageable. public class [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webpurityltd.wordpress.com&amp;blog=3263781&amp;post=27&amp;subd=webpurityltd&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I wanted to knock up a simple window to view and edit all the available user settings for an application.  I thought this would be a nice article as it shows how to make use of the <strong>DataSourceProvider</strong> and <strong>ObservableCollection</strong>.</p>
<p>The first step was to get the settings (<strong>SettingsPropertyCollection</strong>) into something more manageable.</p>
<div id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:6bc3e963-ea29-497d-ba51-2ee27745795f" class="wlWriterSmartContent" style="display:inline;float:none;margin:0;padding:0;">
<pre style="background-color:White;overflow:auto;">
<div><span style="color:#0000ff;">public</span><span style="color:#000000;"> </span><span style="color:#0000ff;">class</span><span style="color:#000000;"> UserSettingsCollection : ObservableCollection</span><span style="color:#000000;">&lt;</span><span style="color:#000000;">UserSetting</span><span style="color:#000000;">&gt;</span><span style="color:#000000;">
    {
        </span><span style="color:#0000ff;">public</span><span style="color:#000000;"> UserSettingsCollection(SettingsPropertyCollection settings)
            : </span><span style="color:#0000ff;">base</span><span style="color:#000000;">()
        {
            </span><span style="color:#0000ff;">foreach</span><span style="color:#000000;"> (SettingsProperty prop </span><span style="color:#0000ff;">in</span><span style="color:#000000;"> settings)
            {
                UserSetting setting </span><span style="color:#000000;">=</span><span style="color:#000000;"> </span><span style="color:#0000ff;">new</span><span style="color:#000000;"> UserSetting(prop.Name, prop.DefaultValue);
                </span><span style="color:#0000ff;">if</span><span style="color:#000000;"> (</span><span style="color:#000000;">!</span><span style="color:#0000ff;">base</span><span style="color:#000000;">.Contains(setting))
                {
                    </span><span style="color:#0000ff;">base</span><span style="color:#000000;">.Add(setting);
                }
            }
        }
    }</span></div>
</pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
<p>The <strong>UserSetting</strong> object starts out very simple (Name/Value) but you will probably want to add some validation and notify the UI when something has changed.</p>
<div id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:9fe4151c-c551-422a-9c89-382df4d3b4dc" class="wlWriterSmartContent" style="display:inline;float:none;margin:0;padding:0;">
<pre style="background-color:White;overflow:auto;">
<div><span style="color:#000000;"> </span><span style="color:#0000ff;">public</span><span style="color:#000000;"> </span><span style="color:#0000ff;">class</span><span style="color:#000000;"> UserSetting
    {
        </span><span style="color:#0000ff;">public</span><span style="color:#000000;"> UserSetting(</span><span style="color:#0000ff;">string</span><span style="color:#000000;"> name, </span><span style="color:#0000ff;">object</span><span style="color:#000000;"> value)
        {
            Name </span><span style="color:#000000;">=</span><span style="color:#000000;"> name;
            Value </span><span style="color:#000000;">=</span><span style="color:#000000;"> value;
        }

        </span><span style="color:#0000ff;">public</span><span style="color:#000000;"> </span><span style="color:#0000ff;">string</span><span style="color:#000000;"> Name { </span><span style="color:#0000ff;">get</span><span style="color:#000000;">; </span><span style="color:#0000ff;">set</span><span style="color:#000000;">; }
        </span><span style="color:#0000ff;">public</span><span style="color:#000000;"> </span><span style="color:#0000ff;">object</span><span style="color:#000000;"> Value { </span><span style="color:#0000ff;">get</span><span style="color:#000000;">; </span><span style="color:#0000ff;">set</span><span style="color:#000000;">; }
    }</span></div>
</pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
<p>The only other object I required was some sort of provider to handle the reading and writing of the settings which I called the <strong>UserSettingsProvider</strong>.</p>
<div id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:efc75da6-5c6a-478d-b9e8-16064b3dcb4c" class="wlWriterSmartContent" style="display:inline;float:none;margin:0;padding:0;">
<pre style="background-color:White;overflow:auto;">
<div><span style="color:#0000ff;">public</span><span style="color:#000000;"> </span><span style="color:#0000ff;">class</span><span style="color:#000000;"> UserSettingsProvider : DataSourceProvider
    {
        </span><span style="color:#0000ff;">private</span><span style="color:#000000;"> UserSettingsCollection _settings;

        </span><span style="color:#0000ff;">protected</span><span style="color:#000000;"> </span><span style="color:#0000ff;">override</span><span style="color:#000000;"> </span><span style="color:#0000ff;">void</span><span style="color:#000000;"> BeginQuery()
        {
            _settings </span><span style="color:#000000;">=</span><span style="color:#000000;"> </span><span style="color:#0000ff;">new</span><span style="color:#000000;"> UserSettingsCollection(Properties.User.Default.Properties);
            </span><span style="color:#0000ff;">base</span><span style="color:#000000;">.OnQueryFinished(_settings);
        }

        </span><span style="color:#0000ff;">public</span><span style="color:#000000;"> </span><span style="color:#0000ff;">void</span><span style="color:#000000;"> Save()
        {
            </span><span style="color:#0000ff;">foreach</span><span style="color:#000000;"> (UserSetting setting </span><span style="color:#0000ff;">in</span><span style="color:#000000;"> _settings)
            {
                Properties.User.Default.Properties[setting.Name].DefaultValue </span><span style="color:#000000;">=</span><span style="color:#000000;"> setting.Value;
            }
            Properties.User.Default.Save();
        }
    }</span></div>
</pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
<p>The XAML is pretty straightforward mainly because it is not my strong point and partly because I just created it manually and therefore didn&#8217;t pimp it up in Blend!</p>
<div id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:be2637e2-17a3-40ff-a088-f343c9ba5d86" class="wlWriterSmartContent" style="display:inline;float:none;margin:0;padding:0;">
<pre style="background-color:White;overflow:auto;">
<div><span style="color:#000000;">    </span><span style="color:#000000;">&lt;</span><span style="color:#000000;">Window.Resources</span><span style="color:#000000;">&gt;</span><span style="color:#000000;">
        </span><span style="color:#000000;">&lt;</span><span style="color:#000000;">ResourceDictionary</span><span style="color:#000000;">&gt;</span><span style="color:#000000;">
            </span><span style="color:#000000;">&lt;</span><span style="color:#000000;">local:UserSettingsProvider x:Key</span><span style="color:#000000;">=</span><span style="color:#800000;">"</span><span style="color:#800000;">settingsProvider</span><span style="color:#800000;">"</span><span style="color:#000000;">/&gt;</span><span style="color:#000000;">
        </span><span style="color:#000000;">&lt;/</span><span style="color:#000000;">ResourceDictionary</span><span style="color:#000000;">&gt;</span><span style="color:#000000;">
    </span><span style="color:#000000;">&lt;/</span><span style="color:#000000;">Window.Resources</span><span style="color:#000000;">&gt;</span><span style="color:#000000;">

    </span><span style="color:#000000;">&lt;</span><span style="color:#000000;">Grid</span><span style="color:#000000;">&gt;</span><span style="color:#000000;">
        </span><span style="color:#000000;">&lt;</span><span style="color:#000000;">DockPanel DataContext</span><span style="color:#000000;">=</span><span style="color:#800000;">"</span><span style="color:#800000;">{StaticResource settingsProvider}</span><span style="color:#800000;">"</span><span style="color:#000000;">&gt;</span><span style="color:#000000;">
            </span><span style="color:#000000;">&lt;</span><span style="color:#000000;">ItemsControl DockPanel.Dock</span><span style="color:#000000;">=</span><span style="color:#800000;">"</span><span style="color:#800000;">Top</span><span style="color:#800000;">"</span><span style="color:#000000;"> ItemsSource</span><span style="color:#000000;">=</span><span style="color:#800000;">"</span><span style="color:#800000;">{Binding Path=.}</span><span style="color:#800000;">"</span><span style="color:#000000;">&gt;</span><span style="color:#000000;">
                </span><span style="color:#000000;">&lt;</span><span style="color:#000000;">ItemsControl.ItemsPanel</span><span style="color:#000000;">&gt;</span><span style="color:#000000;">
                    </span><span style="color:#000000;">&lt;</span><span style="color:#000000;">ItemsPanelTemplate</span><span style="color:#000000;">&gt;</span><span style="color:#000000;">
                        </span><span style="color:#000000;">&lt;</span><span style="color:#000000;">WrapPanel </span><span style="color:#000000;">/&gt;</span><span style="color:#000000;">
                    </span><span style="color:#000000;">&lt;/</span><span style="color:#000000;">ItemsPanelTemplate</span><span style="color:#000000;">&gt;</span><span style="color:#000000;">
                </span><span style="color:#000000;">&lt;/</span><span style="color:#000000;">ItemsControl.ItemsPanel</span><span style="color:#000000;">&gt;</span><span style="color:#000000;">
                </span><span style="color:#000000;">&lt;</span><span style="color:#000000;">ItemsControl.ItemTemplate</span><span style="color:#000000;">&gt;</span><span style="color:#000000;">
                    </span><span style="color:#000000;">&lt;</span><span style="color:#000000;">DataTemplate</span><span style="color:#000000;">&gt;</span><span style="color:#000000;">
                        </span><span style="color:#000000;">&lt;</span><span style="color:#000000;">StackPanel Orientation</span><span style="color:#000000;">=</span><span style="color:#800000;">"</span><span style="color:#800000;">Vertical</span><span style="color:#800000;">"</span><span style="color:#000000;">&gt;</span><span style="color:#000000;">
                            </span><span style="color:#000000;">&lt;</span><span style="color:#000000;">Label x:Name</span><span style="color:#000000;">=</span><span style="color:#800000;">"</span><span style="color:#800000;">NameLabel</span><span style="color:#800000;">"</span><span style="color:#000000;"> Content</span><span style="color:#000000;">=</span><span style="color:#800000;">"</span><span style="color:#800000;">{Binding Path=Name}</span><span style="color:#800000;">"</span><span style="color:#000000;">/&gt;</span><span style="color:#000000;">
                            </span><span style="color:#000000;">&lt;</span><span style="color:#000000;">TextBox x:Name</span><span style="color:#000000;">=</span><span style="color:#800000;">"</span><span style="color:#800000;">ValueTextBox</span><span style="color:#800000;">"</span><span style="color:#000000;"> Text</span><span style="color:#000000;">=</span><span style="color:#800000;">"</span><span style="color:#800000;">{Binding Path=Value}</span><span style="color:#800000;">"</span><span style="color:#000000;">  Width</span><span style="color:#000000;">=</span><span style="color:#800000;">"</span><span style="color:#800000;">200</span><span style="color:#800000;">"</span><span style="color:#000000;">/&gt;</span><span style="color:#000000;">
                        </span><span style="color:#000000;">&lt;/</span><span style="color:#000000;">StackPanel</span><span style="color:#000000;">&gt;</span><span style="color:#000000;">
                    </span><span style="color:#000000;">&lt;/</span><span style="color:#000000;">DataTemplate</span><span style="color:#000000;">&gt;</span><span style="color:#000000;">
                </span><span style="color:#000000;">&lt;/</span><span style="color:#000000;">ItemsControl.ItemTemplate</span><span style="color:#000000;">&gt;</span><span style="color:#000000;">
            </span><span style="color:#000000;">&lt;/</span><span style="color:#000000;">ItemsControl</span><span style="color:#000000;">&gt;</span><span style="color:#000000;">
            </span><span style="color:#000000;">&lt;</span><span style="color:#000000;">Button x:Name</span><span style="color:#000000;">=</span><span style="color:#800000;">"</span><span style="color:#800000;">SaveButton</span><span style="color:#800000;">"</span><span style="color:#000000;"> Content</span><span style="color:#000000;">=</span><span style="color:#800000;">"</span><span style="color:#800000;">Save</span><span style="color:#800000;">"</span><span style="color:#000000;"> Command</span><span style="color:#000000;">=</span><span style="color:#800000;">"</span><span style="color:#800000;">Save</span><span style="color:#800000;">"</span><span style="color:#000000;"> Height</span><span style="color:#000000;">=</span><span style="color:#800000;">"</span><span style="color:#800000;">20</span><span style="color:#800000;">"</span><span style="color:#000000;"> Width</span><span style="color:#000000;">=</span><span style="color:#800000;">"</span><span style="color:#800000;">50</span><span style="color:#800000;">"</span><span style="color:#000000;"> </span><span style="color:#000000;">/&gt;</span><span style="color:#000000;">
        </span><span style="color:#000000;">&lt;/</span><span style="color:#000000;">DockPanel</span><span style="color:#000000;">&gt;</span><span style="color:#000000;">
    </span><span style="color:#000000;">&lt;/</span><span style="color:#000000;">Grid</span><span style="color:#000000;">&gt;</span></div>
</pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
<p>Only thing worth noting here is that the <strong>UserSettingsProvider</strong> is bound to the <strong>DockPanel</strong> (not the <strong>ItemsControl</strong>).  I basically did this so I could pick up the provider from the button&#8217;s <strong>DataContext</strong> when executing the save command like so:</p>
<div id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:dc6b3b78-ede1-4866-81d2-9d55efbc8784" class="wlWriterSmartContent" style="display:inline;float:none;margin:0;padding:0;">
<pre style="background-color:White;overflow:auto;">
<div><span style="color:#0000ff;">public</span><span style="color:#000000;"> </span><span style="color:#0000ff;">partial</span><span style="color:#000000;"> </span><span style="color:#0000ff;">class</span><span style="color:#000000;"> UserSettings : Window
    {
        </span><span style="color:#0000ff;">public</span><span style="color:#000000;"> UserSettings()
        {
            InitializeComponent();

            CommandBinding saveCommand </span><span style="color:#000000;">=</span><span style="color:#000000;"> </span><span style="color:#0000ff;">new</span><span style="color:#000000;"> CommandBinding();
            saveCommand.Command </span><span style="color:#000000;">=</span><span style="color:#000000;"> ApplicationCommands.Save;
            saveCommand.CanExecute </span><span style="color:#000000;">+=</span><span style="color:#000000;"> </span><span style="color:#0000ff;">this</span><span style="color:#000000;">.CanExecuteSave;
            saveCommand.Executed </span><span style="color:#000000;">+=</span><span style="color:#000000;"> </span><span style="color:#0000ff;">this</span><span style="color:#000000;">.Save;

            </span><span style="color:#0000ff;">this</span><span style="color:#000000;">.CommandBindings.Add(saveCommand);
        }

        </span><span style="color:#0000ff;">private</span><span style="color:#000000;"> </span><span style="color:#0000ff;">void</span><span style="color:#000000;"> Save(</span><span style="color:#0000ff;">object</span><span style="color:#000000;"> sender, ExecutedRoutedEventArgs e)
        {
            Button button </span><span style="color:#000000;">=</span><span style="color:#000000;"> e.OriginalSource </span><span style="color:#0000ff;">as</span><span style="color:#000000;"> Button;

            UserSettingsProvider provider </span><span style="color:#000000;">=</span><span style="color:#000000;"> button.DataContext </span><span style="color:#0000ff;">as</span><span style="color:#000000;"> UserSettingsProvider;
            </span><span style="color:#0000ff;">if</span><span style="color:#000000;"> (provider </span><span style="color:#000000;">==</span><span style="color:#000000;"> </span><span style="color:#0000ff;">null</span><span style="color:#000000;">)
            {
                </span><span style="color:#0000ff;">throw</span><span style="color:#000000;"> </span><span style="color:#0000ff;">new</span><span style="color:#000000;"> NullReferenceException(</span><span style="color:#800000;">"</span><span style="color:#800000;">Failed to access the user settings provider.</span><span style="color:#800000;">"</span><span style="color:#000000;">);
            }

            provider.Save();
        }

        </span><span style="color:#0000ff;">private</span><span style="color:#000000;"> </span><span style="color:#0000ff;">void</span><span style="color:#000000;"> CanExecuteSave(</span><span style="color:#0000ff;">object</span><span style="color:#000000;"> sender, CanExecuteRoutedEventArgs e)
        {
            e.CanExecute </span><span style="color:#000000;">=</span><span style="color:#000000;"> </span><span style="color:#0000ff;">true</span><span style="color:#000000;">;
        }
    }</span></div>
</pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
<p>When it is all put together you get a simple little dialog like this.</p>
<p><a href="http://webpurityltd.files.wordpress.com/2008/05/usersettings.png"><img style="border-width:0;" src="http://webpurityltd.files.wordpress.com/2008/05/usersettings-thumb.png?w=326&#038;h=249" border="0" alt="UserSettings" width="326" height="249" /></a></p>
<p>I haven&#8217;t posted any code files to download for this one because all the code is shown here.</p>
<p>If you did want to take it further and add custom validation or fancy up the UI then feel free to let me know how you get on.</p>
<p><strong></strong></p>
<p><strong>Resources</strong></p>
<p><a href="http://joshsmithonwpf.wordpress.com/2007/10/07/binding-to-the-file-system/" target="_blank">Josh Smith: Binding to the file system</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/webpurityltd.wordpress.com/27/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/webpurityltd.wordpress.com/27/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/webpurityltd.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/webpurityltd.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/webpurityltd.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/webpurityltd.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/webpurityltd.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/webpurityltd.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/webpurityltd.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/webpurityltd.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/webpurityltd.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/webpurityltd.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/webpurityltd.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/webpurityltd.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/webpurityltd.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/webpurityltd.wordpress.com/27/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webpurityltd.wordpress.com&amp;blog=3263781&amp;post=27&amp;subd=webpurityltd&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://webpurityltd.wordpress.com/2008/05/11/wpf-user-settings-anyone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/85c0ff9fbed8b4cf82628a0018b96856?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">webpurity</media:title>
		</media:content>

		<media:content url="http://webpurityltd.files.wordpress.com/2008/05/usersettings-thumb.png" medium="image">
			<media:title type="html">UserSettings</media:title>
		</media:content>
	</item>
		<item>
		<title>ASP.NET: Users, roles and profiles</title>
		<link>http://webpurityltd.wordpress.com/2008/05/01/aspnet-users-roles-and-profiles/</link>
		<comments>http://webpurityltd.wordpress.com/2008/05/01/aspnet-users-roles-and-profiles/#comments</comments>
		<pubDate>Thu, 01 May 2008 14:48:00 +0000</pubDate>
		<dc:creator>webpurity</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[membership]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[profiles]]></category>
		<category><![CDATA[providers]]></category>
		<category><![CDATA[roles]]></category>

		<guid isPermaLink="false">http://webpurityltd.wordpress.com/?p=24</guid>
		<description><![CDATA[The 4GuysFromRolla.com have a monster series packed with all the information you need to effectively manage users on your website &#8211; ASP.NET 2.0&#8242;s Membership, Roles and Profile. The series is based around the SQL Server membership provider but Part 8 specifically shows you how setup an Access-based provider! If you use MySQL (and I often [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webpurityltd.wordpress.com&amp;blog=3263781&amp;post=24&amp;subd=webpurityltd&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://http://www.4guysfromrolla.com/" target="_blank">4GuysFromRolla.com</a> have a monster series packed with all the information you need to effectively manage users on your website &#8211; <a href="http://aspnet.4guysfromrolla.com/articles/120705-1.aspx" target="_blank">ASP.NET 2.0&#8242;s Membership, Roles and Profile</a>.  The series is based around the SQL Server membership provider but <a href="http://aspnet.4guysfromrolla.com/articles/010307-1.aspx" target="_blank">Part 8</a> specifically shows you how setup an Access-based provider!</p>
<p>If you use MySQL (and I often do) then you can get one of many providers <a href="http://www.codeproject.com/KB/database/mysqlmembershipprovider.aspx" target="_self">here</a>.  I tried this one about a year (or two) ago and seem to remember it working without too much trouble.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/webpurityltd.wordpress.com/24/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/webpurityltd.wordpress.com/24/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/webpurityltd.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/webpurityltd.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/webpurityltd.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/webpurityltd.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/webpurityltd.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/webpurityltd.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/webpurityltd.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/webpurityltd.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/webpurityltd.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/webpurityltd.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/webpurityltd.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/webpurityltd.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/webpurityltd.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/webpurityltd.wordpress.com/24/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webpurityltd.wordpress.com&amp;blog=3263781&amp;post=24&amp;subd=webpurityltd&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://webpurityltd.wordpress.com/2008/05/01/aspnet-users-roles-and-profiles/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/85c0ff9fbed8b4cf82628a0018b96856?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">webpurity</media:title>
		</media:content>
	</item>
		<item>
		<title>ASP.NET: MVC Framework Refresh</title>
		<link>http://webpurityltd.wordpress.com/2008/04/17/aspnet-mvc-framework-refresh/</link>
		<comments>http://webpurityltd.wordpress.com/2008/04/17/aspnet-mvc-framework-refresh/#comments</comments>
		<pubDate>Thu, 17 Apr 2008 14:52:21 +0000</pubDate>
		<dc:creator>webpurity</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[codeplex]]></category>
		<category><![CDATA[moq]]></category>
		<category><![CDATA[mvc]]></category>

		<guid isPermaLink="false">http://webpurityltd.wordpress.com/2008/04/17/aspnet-mvc-framework-refresh/</guid>
		<description><![CDATA[There has been an unofficial release of the ASP.NET MVC Source Code which is now available on the new ASP.NET CodePlex Project. It now includes unit tests (using Moq &#8211; will be blogging on that soon) and some support for testing controllers Scott Guthrie has posted everything you need to know about the refresh: ASP.NET [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webpurityltd.wordpress.com&amp;blog=3263781&amp;post=23&amp;subd=webpurityltd&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>There has been an unofficial release of the ASP.NET MVC Source Code which is now available on the new <a href="http://www.codeplex.com/aspnet" target="_blank">ASP.NET CodePlex Project</a>.  It now includes unit tests (using <a href="http://code.google.com/p/moq/" target="_blank">Moq</a> &#8211; will be blogging on that soon) and some support for testing controllers <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://weblogs.asp.net/scottgu/default.aspx" target="_blank">Scott Guthrie</a> has posted everything you need to know about the refresh: <a href="http://weblogs.asp.net/scottgu/archive/2008/04/16/asp-net-mvc-source-refresh-preview.aspx" target="_blank">ASP.NET MVC Source Refresh Preview</a>.  Well worth a read if you are into MVC or MVP!</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/webpurityltd.wordpress.com/23/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/webpurityltd.wordpress.com/23/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/webpurityltd.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/webpurityltd.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/webpurityltd.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/webpurityltd.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/webpurityltd.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/webpurityltd.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/webpurityltd.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/webpurityltd.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/webpurityltd.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/webpurityltd.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/webpurityltd.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/webpurityltd.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/webpurityltd.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/webpurityltd.wordpress.com/23/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webpurityltd.wordpress.com&amp;blog=3263781&amp;post=23&amp;subd=webpurityltd&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://webpurityltd.wordpress.com/2008/04/17/aspnet-mvc-framework-refresh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/85c0ff9fbed8b4cf82628a0018b96856?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">webpurity</media:title>
		</media:content>
	</item>
		<item>
		<title>WPF: Applications for the real world</title>
		<link>http://webpurityltd.wordpress.com/2008/04/16/wpf-applications-for-the-real-world/</link>
		<comments>http://webpurityltd.wordpress.com/2008/04/16/wpf-applications-for-the-real-world/#comments</comments>
		<pubDate>Wed, 16 Apr 2008 11:51:08 +0000</pubDate>
		<dc:creator>webpurity</dc:creator>
				<category><![CDATA[WPF]]></category>
		<category><![CDATA[applications]]></category>
		<category><![CDATA[CodeProject]]></category>
		<category><![CDATA[Karl Schifflett]]></category>

		<guid isPermaLink="false">http://webpurityltd.wordpress.com/2008/04/16/wpf-applications-for-the-real-world/</guid>
		<description><![CDATA[Karl Schifflett has started a monster series on WPF for business applications which is winning awards on CodeProject. He makes some very strong cases for WPF and how it can meet the demands of real world business applications. This series promises to cover every aspect of WPF and shows how to tackle a business application [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webpurityltd.wordpress.com&amp;blog=3263781&amp;post=21&amp;subd=webpurityltd&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://karlshifflett.wordpress.com" target="_blank">Karl Schifflett</a> has started a monster series on WPF for business applications which is winning awards on <a href="http://www.codeproject.com" target="_blank">CodeProject</a>.</p>
<p>He makes some very strong cases for WPF and how it can meet the demands of real world business applications.  This series promises to cover every aspect of WPF and shows how to tackle a business application with WPF effectively.  Check out <a href="http://www.codeproject.com/KB/WPF/WPFBusinessAppsPartOne.aspx">Part One of the series</a></p>
<p>Also worth checking out this article by Karl:  <a href="http://karlshifflett.wordpress.com/2007/12/20/reasons-for-choosing-wpf-over-aspnet-for-very-large-project/">Reasons for choosing WPF over ASP.NET&#8230;</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/webpurityltd.wordpress.com/21/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/webpurityltd.wordpress.com/21/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/webpurityltd.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/webpurityltd.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/webpurityltd.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/webpurityltd.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/webpurityltd.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/webpurityltd.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/webpurityltd.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/webpurityltd.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/webpurityltd.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/webpurityltd.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/webpurityltd.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/webpurityltd.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/webpurityltd.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/webpurityltd.wordpress.com/21/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webpurityltd.wordpress.com&amp;blog=3263781&amp;post=21&amp;subd=webpurityltd&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://webpurityltd.wordpress.com/2008/04/16/wpf-applications-for-the-real-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/85c0ff9fbed8b4cf82628a0018b96856?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">webpurity</media:title>
		</media:content>
	</item>
		<item>
		<title>WPF: Making good progress</title>
		<link>http://webpurityltd.wordpress.com/2008/04/15/wpf-making-good-progress/</link>
		<comments>http://webpurityltd.wordpress.com/2008/04/15/wpf-making-good-progress/#comments</comments>
		<pubDate>Tue, 15 Apr 2008 22:19:53 +0000</pubDate>
		<dc:creator>webpurity</dc:creator>
				<category><![CDATA[WPF]]></category>
		<category><![CDATA[backgroundworker]]></category>
		<category><![CDATA[datatemplate]]></category>
		<category><![CDATA[dispatcher]]></category>
		<category><![CDATA[findname]]></category>
		<category><![CDATA[progressbar]]></category>
		<category><![CDATA[threading]]></category>

		<guid isPermaLink="false">http://webpurityltd.wordpress.com/2008/04/15/wpf-making-good-progress/</guid>
		<description><![CDATA[Recently I came across a situation where I had a list box of items which I wanted to process on separate threads but report progress to the user. I had never had to do something like this in Win32 let alone WPF so I decided to knock up a little prototype which is the basis [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webpurityltd.wordpress.com&amp;blog=3263781&amp;post=20&amp;subd=webpurityltd&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Recently I came across a situation where I had a list box of items which I wanted to process on separate threads but report progress to the user.  I had never had to do something like this in Win32 let alone WPF so I decided to knock up a little prototype which is the basis for this blog entry.</p>
<p>Download the source code: <a href="http://webpurity.co.uk/documents/wpf_progress.zip">WPF_Progress.zip</a></p>
<p>The prototype application basically contains a list of video clips which need to be converted.  User selects a clip and presses the Convert button which kicks of a new thread to perform the conversion and shows progress through a <strong>ProgressBar</strong> which is part of the <strong>DataTemplate</strong>.</p>
<p><a href="http://webpurityltd.files.wordpress.com/2008/04/sampleapprunning.png"><img style="border-width:0;" src="http://webpurityltd.files.wordpress.com/2008/04/sampleapprunning-thumb.png?w=200&#038;h=273" border="0" alt="SampleAppRunning" width="200" height="273" /></a></p>
<p>First off I defined some simple XAML for the ListBox items:</p>
<div id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:ee52cd11-4102-4015-9342-3d76c3dc12dd" class="wlWriterSmartContent" style="display:inline;float:none;margin:0;padding:0;">
<pre style="background-color:White;overflow:auto;">
<div><span style="color:#0000ff;">&lt;</span><span style="color:#800000;">Window.Resources</span><span style="color:#0000ff;">&gt;</span><span style="color:#000000;">
   </span><span style="color:#0000ff;">&lt;</span><span style="color:#800000;">DataTemplate </span><span style="color:#ff0000;">DataType</span><span style="color:#0000ff;">="</span><span style="color:#808000;">{x:Type local:VideoClip}</span><span style="color:#0000ff;">"</span><span style="color:#0000ff;">&gt;</span><span style="color:#000000;">
      </span><span style="color:#0000ff;">&lt;</span><span style="color:#800000;">StackPanel </span><span style="color:#ff0000;">x:Name</span><span style="color:#0000ff;">="stack"</span><span style="color:#ff0000;"> Background</span><span style="color:#0000ff;">="Gainsboro"</span><span style="color:#ff0000;"> Width</span><span style="color:#0000ff;">="200"</span><span style="color:#0000ff;">&gt;</span><span style="color:#000000;">
         </span><span style="color:#0000ff;">&lt;</span><span style="color:#800000;">Button </span><span style="color:#ff0000;">x:Name</span><span style="color:#0000ff;">="save"</span><span style="color:#ff0000;"> Width</span><span style="color:#0000ff;">="60"</span><span style="color:#ff0000;"> Height</span><span style="color:#0000ff;">="20"</span><span style="color:#ff0000;"> Click</span><span style="color:#0000ff;">="convert_Click"</span><span style="color:#0000ff;">&gt;</span><span style="color:#000000;">Convert</span><span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">Button</span><span style="color:#0000ff;">&gt;</span><span style="color:#000000;">
         </span><span style="color:#0000ff;">&lt;</span><span style="color:#800000;">Label </span><span style="color:#ff0000;">Content</span><span style="color:#0000ff;">="</span><span style="color:#808000;">{Binding Name}</span><span style="color:#0000ff;">"</span><span style="color:#0000ff;">/&gt;</span><span style="color:#000000;">
         </span><span style="color:#0000ff;">&lt;</span><span style="color:#800000;">ProgressBar </span><span style="color:#ff0000;">x:Name</span><span style="color:#0000ff;">="progress"</span><span style="color:#ff0000;"> Width</span><span style="color:#0000ff;">="100"</span><span style="color:#ff0000;"> Height</span><span style="color:#0000ff;">="15"</span><span style="color:#ff0000;"> Maximum</span><span style="color:#0000ff;">="100"</span><span style="color:#ff0000;"> Value</span><span style="color:#0000ff;">="</span><span style="color:#808000;">{Binding SaveProgress}</span><span style="color:#0000ff;">"</span><span style="color:#0000ff;">/&gt;</span><span style="color:#000000;">
         </span><span style="color:#0000ff;">&lt;</span><span style="color:#800000;">Label </span><span style="color:#ff0000;">Content</span><span style="color:#0000ff;">="</span><span style="color:#808000;">{Binding Status}</span><span style="color:#0000ff;">"</span><span style="color:#0000ff;">/&gt;</span><span style="color:#000000;">
      </span><span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">StackPanel</span><span style="color:#0000ff;">&gt;</span><span style="color:#000000;">
   </span><span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">DataTemplate</span><span style="color:#0000ff;">&gt;</span><span style="color:#000000;">
</span><span style="color:#0000ff;">&lt;/</span><span style="color:#800000;">Window.Resources</span><span style="color:#0000ff;">&gt;</span></div>
</pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
<p>Then I wired up the convert_Click event to start a <strong>BackgroundWorker</strong> thread which runs some code to mimic the conversion.  This simply loops for a period of time reporting progress each second or so.  The main window hooks into an event on the converter to pick up the progress which can then be set on the <strong>ProgressBar.Value.</strong></p>
<p>There were two issues which I came across during this prototype:</p>
<h3>1. Accessing the ProgressBar inside a DataTemplate</h3>
<p>WPF provides a handy little method called <strong>FindName</strong> which you can use to find controls within a given <strong>ContentPresenter</strong>.  Not quite as straightforward as the old favourite <strong>FindControl</strong> <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<div id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:72c65ede-1c04-4263-82d2-51fc5c2fd925" class="wlWriterSmartContent" style="display:inline;float:none;width:851px;margin:0;padding:0;">
<pre style="background-color:White;overflow:auto;">
<div><span style="color:#000000;"> </span><span style="color:#0000ff;">private</span><span style="color:#000000;"> ProgressBar GetProgressBar(VideoClip clip)
{
</span><span style="color:#0000ff;">int</span><span style="color:#000000;"> index </span><span style="color:#000000;">=</span><span style="color:#000000;"> clips.Items.IndexOf(clip);
ListBoxItem selectedItem </span><span style="color:#000000;">=</span><span style="color:#000000;"> clips.ItemContainerGenerator.ContainerFromIndex(index) </span><span style="color:#0000ff;">as</span><span style="color:#000000;"> ListBoxItem;
</span><span style="color:#0000ff;">if</span><span style="color:#000000;"> (selectedItem </span><span style="color:#000000;">==</span><span style="color:#000000;"> </span><span style="color:#0000ff;">null</span><span style="color:#000000;">) </span><span style="color:#0000ff;">return</span><span style="color:#000000;"> </span><span style="color:#0000ff;">null</span><span style="color:#000000;">;

DataTemplateKey key </span><span style="color:#000000;">=</span><span style="color:#000000;"> </span><span style="color:#0000ff;">new</span><span style="color:#000000;"> DataTemplateKey(</span><span style="color:#0000ff;">typeof</span><span style="color:#000000;">(VideoClip));
DataTemplate template </span><span style="color:#000000;">=</span><span style="color:#000000;"> </span><span style="color:#0000ff;">base</span><span style="color:#000000;">.FindResource(key) </span><span style="color:#0000ff;">as</span><span style="color:#000000;"> DataTemplate;
Border border </span><span style="color:#000000;">=</span><span style="color:#000000;"> VisualTreeHelper.GetChild(selectedItem, </span><span style="color:#800080;">0</span><span style="color:#000000;">) </span><span style="color:#0000ff;">as</span><span style="color:#000000;"> Border;
ContentPresenter presenter </span><span style="color:#000000;">=</span><span style="color:#000000;"> border.Child </span><span style="color:#0000ff;">as</span><span style="color:#000000;"> ContentPresenter;
ProgressBar progress </span><span style="color:#000000;">=</span><span style="color:#000000;"> template.FindName(</span><span style="color:#800000;">"</span><span style="color:#800000;">progress</span><span style="color:#800000;">"</span><span style="color:#000000;">, presenter) </span><span style="color:#0000ff;">as</span><span style="color:#000000;"> ProgressBar;
</span><span style="color:#0000ff;">return</span><span style="color:#000000;"> progress;
}</span></div>
</pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
<p>This method allows me to take an object (which is the data type for the <strong>DataTemplate</strong>) from the list and use it to access the <strong>ProgressBar</strong> control.</p>
<h3>2. Update the ProgressBar from a different thread</h3>
<div id="scid:57F11A72-B0E5-49c7-9094-E3A15BD5B5E7:fc0b22c7-1744-47c7-b9a7-a3e65f07a2bf" class="wlWriterSmartContent" style="display:inline;float:none;margin:0;padding:0;">
<pre style="background-color:White;overflow:auto;">
<div><span style="color:#000000;">Converter converter </span><span style="color:#000000;">=</span><span style="color:#000000;"> </span><span style="color:#0000ff;">new</span><span style="color:#000000;"> Converter();
converter.OnConvertProgress </span><span style="color:#000000;">+=</span><span style="color:#000000;"> </span><span style="color:#0000ff;">delegate</span><span style="color:#000000;">(</span><span style="color:#0000ff;">object</span><span style="color:#000000;"> sender1, ConvertEventArgs args)
{
Dispatcher.BeginInvoke(DispatcherPriority.Normal,
(SendOrPostCallback)</span><span style="color:#0000ff;">delegate</span><span style="color:#000000;">
      {
         ProgressBar bar </span><span style="color:#000000;">=</span><span style="color:#000000;"> GetProgressBar(args.Clip);
</span><span style="color:#0000ff;">if</span><span style="color:#000000;"> (bar </span><span style="color:#000000;">!=</span><span style="color:#000000;"> </span><span style="color:#0000ff;">null</span><span style="color:#000000;">) bar.Value </span><span style="color:#000000;">=</span><span style="color:#000000;"> args.Clip.SaveProgress;
}
, </span><span style="color:#0000ff;">null</span><span style="color:#000000;">);
};</span></div>
</pre>
<p><!-- Code inserted with Steve Dunn's Windows Live Writer Code Formatter Plugin.  http://dunnhq.com --></div>
<p>Using the <strong>Dispatcher</strong> I get hold of the specific <strong>ProgressBar</strong> I want to update and simply set the value.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/webpurityltd.wordpress.com/20/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/webpurityltd.wordpress.com/20/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/webpurityltd.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/webpurityltd.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/webpurityltd.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/webpurityltd.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/webpurityltd.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/webpurityltd.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/webpurityltd.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/webpurityltd.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/webpurityltd.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/webpurityltd.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/webpurityltd.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/webpurityltd.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/webpurityltd.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/webpurityltd.wordpress.com/20/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webpurityltd.wordpress.com&amp;blog=3263781&amp;post=20&amp;subd=webpurityltd&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://webpurityltd.wordpress.com/2008/04/15/wpf-making-good-progress/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/85c0ff9fbed8b4cf82628a0018b96856?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">webpurity</media:title>
		</media:content>

		<media:content url="http://webpurityltd.files.wordpress.com/2008/04/sampleapprunning-thumb.png" medium="image">
			<media:title type="html">SampleAppRunning</media:title>
		</media:content>
	</item>
	</channel>
</rss>
