<?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>Anything They Can Do &#187; Silverlight</title>
	<atom:link href="http://www.anythingtheycando.com/blog/index.php/category/silverlight/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.anythingtheycando.com/blog</link>
	<description>Why can&#039;t you?</description>
	<lastBuildDate>Wed, 16 Nov 2011 20:23:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Silverlight Temp File Issue</title>
		<link>http://www.anythingtheycando.com/blog/index.php/2010/02/02/silverlight-temp-file-issue/</link>
		<comments>http://www.anythingtheycando.com/blog/index.php/2010/02/02/silverlight-temp-file-issue/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 19:15:35 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[.Net]]></category>
		<category><![CDATA[Bugs]]></category>
		<category><![CDATA[Garbage Collection]]></category>
		<category><![CDATA[Performance]]></category>

		<guid isPermaLink="false">http://www.anythingtheycando.com/blog/?p=190</guid>
		<description><![CDATA[I don't know how well known this issue is with Silverlight or exactly what versions that it effects I saw a few form posts about it. But my company has several applications written in Silverlight that use Web Services and it affects all of them. When Silverlight calls a web service it seems to create [...]]]></description>
			<content:encoded><![CDATA[<p>I don't know how well known this issue is with Silverlight or exactly what versions that it effects I saw a few form posts about it. But my company has several applications written in Silverlight that use Web Services and it affects all of them. When Silverlight calls a web service it seems to create a temp file of exactly 20,971,520 bytes (exactly 20MB) each time . This is not a big deal if you call a web service only once or even ten times for that matter but when you have your app set to call it every 10 seconds at this rate you application will require 120MB per minute of hard disk space to continue running. It seems that when you reload the page the temp files are cleared but if you want the app to run for weeks on end to drive a display for example you have to manually force them to be cleared out. The files will be created in the %temp% folder and will follow a naming convention of XCP*.tmp (XCP833C.tmp, XCP6FAB.tmp, ect)</p>
<p>This is not so much a bug as something that you need to keep in mind when your using Silverlight to constantly refresh data from the server.</p>
<p>The fix for this is as follows:</p>
<div class="codecolorer-container csharp blackboard" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:710px;"><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">GC.<span style="color: #0000FF;">Collect</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span></div></div>
<p>If you just put that one line of code at the end of your Async Completed handler and all you massive hard drive usage issues will be a thing of the past.</p>
<p>It should also be noted that I can't recreate this issue when the app is running off the development server built into Visual Studio. It seems to only have this issue once I publish to IIS.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a title="Click me to see the sites." href="#" onclick="$$('div.d190').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;"><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d190" style="overflow:hidden">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://blinklist.com/index.php?Action=Blink/addblink.php&amp;Name=Silverlight+Temp+File+Issue&amp;Description=Silverlight+Temp+File+Issue&amp;Url=http://www.anythingtheycando.com/blog/index.php/2010/02/02/silverlight-temp-file-issue/" rel="nofollow" title="Add to&nbsp;BlinkList"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/blinklist.png" title="Add to&nbsp;BlinkList" alt="Add to&nbsp;BlinkList" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://blogmarks.net/my/new.php?mini=1&amp;simple=1&amp;url=http://www.anythingtheycando.com/blog/index.php/2010/02/02/silverlight-temp-file-issue/&amp;title=Silverlight+Temp+File+Issue" rel="nofollow" title="Add to&nbsp;Blogmarks"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/bmarks.png" title="Add to&nbsp;Blogmarks" alt="Add to&nbsp;Blogmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http://www.anythingtheycando.com/blog/index.php/2010/02/02/silverlight-temp-file-issue/&amp;submitHeadline=Silverlight+Temp+File+Issue&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.connotea.org/addpopup?continue=confirm&amp;uri=http://www.anythingtheycando.com/blog/index.php/2010/02/02/silverlight-temp-file-issue/&amp;title=Silverlight+Temp+File+Issue" rel="nofollow" title="Add to&nbsp;Connotea"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/connotea.png" title="Add to&nbsp;Connotea" alt="Add to&nbsp;Connotea" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.anythingtheycando.com/blog/index.php/2010/02/02/silverlight-temp-file-issue/&amp;title=Silverlight+Temp+File+Issue" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.diigo.com/post?url=http://www.anythingtheycando.com/blog/index.php/2010/02/02/silverlight-temp-file-issue/&amp;title=Silverlight+Temp+File+Issue" rel="nofollow" title="Add to&nbsp;Diigo"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/diigo.png" title="Add to&nbsp;Diigo" alt="Add to&nbsp;Diigo" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.anythingtheycando.com/blog/index.php/2010/02/02/silverlight-temp-file-issue/&amp;title=Silverlight+Temp+File+Issue" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.dotnetkicks.com/kick/?url=http://www.anythingtheycando.com/blog/index.php/2010/02/02/silverlight-temp-file-issue/&amp;title=Silverlight+Temp+File+Issue" rel="nofollow" title="Add to&nbsp;DotNetKicks"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/dotnetkicks.png" title="Add to&nbsp;DotNetKicks" alt="Add to&nbsp;DotNetKicks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.dzone.com/links/add.html?description=Silverlight+Temp+File+Issue&amp;url=http://www.anythingtheycando.com/blog/index.php/2010/02/02/silverlight-temp-file-issue/&amp;title=Silverlight+Temp+File+Issue" rel="nofollow" title="Add to&nbsp;DZone"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/dzone.png" title="Add to&nbsp;DZone" alt="Add to&nbsp;DZone" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://www.anythingtheycando.com/blog/index.php/2010/02/02/silverlight-temp-file-issue/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://cgi.fark.com/cgi/fark/farkit.pl?u=http://www.anythingtheycando.com/blog/index.php/2010/02/02/silverlight-temp-file-issue/&amp;h=Silverlight+Temp+File+Issue" rel="nofollow" title="Add to&nbsp;Fark"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/fark.png" title="Add to&nbsp;Fark" alt="Add to&nbsp;Fark" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://faves.com/Authoring.aspx?u=http://www.anythingtheycando.com/blog/index.php/2010/02/02/silverlight-temp-file-issue/&amp;t=Silverlight+Temp+File+Issue" rel="nofollow" title="Add to&nbsp;Faves"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/bluedot.png" title="Add to&nbsp;Faves" alt="Add to&nbsp;Faves" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://fleck.com/litebookmarklet.php?url=http://www.anythingtheycando.com/blog/index.php/2010/02/02/silverlight-temp-file-issue/&amp;title=Silverlight+Temp+File+Issue" rel="nofollow" title="Add to&nbsp;Fleck"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/fleck.png" title="Add to&nbsp;Fleck" alt="Add to&nbsp;Fleck" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://FriendSite.com/users/bookmarks/?u=http://www.anythingtheycando.com/blog/index.php/2010/02/02/silverlight-temp-file-issue/&amp;t=Silverlight+Temp+File+Issue" rel="nofollow" title="Add to&nbsp;FriendSite"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/friendsite.png" title="Add to&nbsp;FriendSite" alt="Add to&nbsp;FriendSite" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.anythingtheycando.com/blog/index.php/2010/02/02/silverlight-temp-file-issue/&amp;title=Silverlight+Temp+File+Issue" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.kaboodle.com/za/selectpage?p_pop=false&amp;pa=url&amp;u=http://www.anythingtheycando.com/blog/index.php/2010/02/02/silverlight-temp-file-issue/" rel="nofollow" title="Add to&nbsp;Kaboodle"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/kaboodle.png" title="Add to&nbsp;Kaboodle" alt="Add to&nbsp;Kaboodle" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.maple.nu/cgi-bin/search6/usa/ss_submit.cgi?fct=100&amp;url=http://www.anythingtheycando.com/blog/index.php/2010/02/02/silverlight-temp-file-issue/&amp;title=Silverlight+Temp+File+Issue" rel="nofollow" title="Add to&nbsp;Maple"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/maple.png" title="Add to&nbsp;Maple" alt="Add to&nbsp;Maple" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/index.php?action=addurl&amp;bm_url=http://www.anythingtheycando.com/blog/index.php/2010/02/02/silverlight-temp-file-issue/&amp;bm_description=Silverlight+Temp+File+Issue" rel="nofollow" title="Add to&nbsp;Mister Wong"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/misterwong.png" title="Add to&nbsp;Mister Wong" alt="Add to&nbsp;Mister Wong" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http://www.anythingtheycando.com/blog/index.php/2010/02/02/silverlight-temp-file-issue/&amp;T=Silverlight+Temp+File+Issue" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://netvouz.com/action/submitBookmark?url=http://www.anythingtheycando.com/blog/index.php/2010/02/02/silverlight-temp-file-issue/&amp;title=Silverlight+Temp+File+Issue&amp;popup=no" rel="nofollow" title="Add to&nbsp;Netvouz"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/netvouz.png" title="Add to&nbsp;Netvouz" alt="Add to&nbsp;Netvouz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.newsvine.com/_wine/save?u=http://www.anythingtheycando.com/blog/index.php/2010/02/02/silverlight-temp-file-issue/&amp;h=Silverlight+Temp+File+Issue" rel="nofollow" title="Add to&nbsp;Newsvine"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/newsvine.png" title="Add to&nbsp;Newsvine" alt="Add to&nbsp;Newsvine" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.plugim.com/submit?url=http://www.anythingtheycando.com/blog/index.php/2010/02/02/silverlight-temp-file-issue/&amp;title=Silverlight+Temp+File+Issue" rel="nofollow" title="Add to&nbsp;PlugIM"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/plugim.png" title="Add to&nbsp;PlugIM" alt="Add to&nbsp;PlugIM" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://www.anythingtheycando.com/blog/index.php/2010/02/02/silverlight-temp-file-issue/&amp;title=Silverlight+Temp+File+Issue" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.simpy.com/simpy/LinkAdd.do?href=http://www.anythingtheycando.com/blog/index.php/2010/02/02/silverlight-temp-file-issue/&amp;title=Silverlight+Temp+File+Issue" rel="nofollow" title="Add to&nbsp;Simpy"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/simpy.png" title="Add to&nbsp;Simpy" alt="Add to&nbsp;Simpy" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.kirtsy.com//submit.php?url=http://www.anythingtheycando.com/blog/index.php/2010/02/02/silverlight-temp-file-issue/" rel="nofollow" title="Add to&nbsp;Kirtsy"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/skirt.png" title="Add to&nbsp;Kirtsy" alt="Add to&nbsp;Kirtsy" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?url=http://www.anythingtheycando.com/blog/index.php/2010/02/02/silverlight-temp-file-issue/&amp;title=Silverlight+Temp+File+Issue" rel="nofollow" title="Add to&nbsp;Slashdot"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/slashdot.png" title="Add to&nbsp;Slashdot" alt="Add to&nbsp;Slashdot" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http://www.anythingtheycando.com/blog/index.php/2010/02/02/silverlight-temp-file-issue/&amp;title=Silverlight+Temp+File+Issue" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.shoutwire.com/?p=submit&amp;link=http://www.anythingtheycando.com/blog/index.php/2010/02/02/silverlight-temp-file-issue/" rel="nofollow" title="Add to&nbsp;Shoutwire"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/shoutwire.png" title="Add to&nbsp;Shoutwire" alt="Add to&nbsp;Shoutwire" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.squidoo.com/lensmaster/bookmark?http://www.anythingtheycando.com/blog/index.php/2010/02/02/silverlight-temp-file-issue/" rel="nofollow" title="Add to&nbsp;Squidoo"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/squidoo.png" title="Add to&nbsp;Squidoo" alt="Add to&nbsp;Squidoo" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.sphere.com/sphereit/http://www.anythingtheycando.com/blog/index.php/2010/02/02/silverlight-temp-file-issue/" rel="nofollow" title="Add to&nbsp;SphereIt"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/sphereit.png" title="Add to&nbsp;SphereIt" alt="Add to&nbsp;SphereIt" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.spurl.net/spurl.php?url=http://www.anythingtheycando.com/blog/index.php/2010/02/02/silverlight-temp-file-issue/&amp;title=Silverlight+Temp+File+Issue" rel="nofollow" title="Add to&nbsp;Spurl"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/spurl.png" title="Add to&nbsp;Spurl" alt="Add to&nbsp;Spurl" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.anythingtheycando.com/blog/index.php/2010/02/02/silverlight-temp-file-issue/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.thisnext.com/pick/new/submit/sociable/?url=http://www.anythingtheycando.com/blog/index.php/2010/02/02/silverlight-temp-file-issue/&amp;name=Silverlight+Temp+File+Issue" rel="nofollow" title="Add to&nbsp;ThisNext"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/thisnext.png" title="Add to&nbsp;ThisNext" alt="Add to&nbsp;ThisNext" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http://www.anythingtheycando.com/blog/index.php/2010/02/02/silverlight-temp-file-issue/" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Silverlight+Temp+File+Issue+@+http://www.anythingtheycando.com/blog/index.php/2010/02/02/silverlight-temp-file-issue/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://webride.org/discuss/split.php?uri=http://www.anythingtheycando.com/blog/index.php/2010/02/02/silverlight-temp-file-issue/&amp;title=Silverlight+Temp+File+Issue" rel="nofollow" title="Add to&nbsp;Webride"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/webride.png" title="Add to&nbsp;Webride" alt="Add to&nbsp;Webride" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.wists.com/t.php?c=null&amp;r=http://www.anythingtheycando.com/blog/index.php/2010/02/02/silverlight-temp-file-issue/&amp;u=http://www.anythingtheycando.com/blog/index.php/2010/02/02/silverlight-temp-file-issue/&amp;title={text}" rel="nofollow" title="Add to&nbsp;Wists"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/wists.png" title="Add to&nbsp;Wists" alt="Add to&nbsp;Wists" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http://www.anythingtheycando.com/blog/index.php/2010/02/02/silverlight-temp-file-issue/&amp;t=Silverlight+Temp+File+Issue" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
<a style="font-size:90%;text-align: right; " title="Click me to hide the sites." href="#" onclick="$$('div.d190').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); return false;">Hide Sites</a>
</div>
</div>
<!-- Social Bookmarks END -->
<script type="text/javascript">$$('div.d190').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); </script>]]></content:encoded>
			<wfw:commentRss>http://www.anythingtheycando.com/blog/index.php/2010/02/02/silverlight-temp-file-issue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple Tree Part 1</title>
		<link>http://www.anythingtheycando.com/blog/index.php/2009/10/29/simple-tree-part-1/</link>
		<comments>http://www.anythingtheycando.com/blog/index.php/2009/10/29/simple-tree-part-1/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 09:10:06 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[.Net]]></category>
		<category><![CDATA[Useful IRL]]></category>
		<category><![CDATA[XAML]]></category>

		<guid isPermaLink="false">http://anythingtheycando.com/blog/?p=31</guid>
		<description><![CDATA[For those of you that have been enjoying some of the features in the Silverlight Toolkit over on codeplex like I have been you may have noticed the same things that I have about it. First it works but thats a given after all its made by the same company that brought you Songsmith, and [...]]]></description>
			<content:encoded><![CDATA[<p>For those of you that have been enjoying some of the features in the <a title="Silverlight Toolkit" href="http://www.codeplex.com/Silverlight" target="_blank">Silverlight Toolkit</a> over on codeplex like I have been you may have noticed the same things that I have about it. First it works but thats a given after all its made by the same company that brought you <a title="Microsoft" href="http://www.youtube.com/watch?v=3oGFogwcx-E" target="_blank">Songsmith</a>, and since its from Microsoft you know its easy to use.</p>
<p>But other than that it does way more with visual states then the average developer can probably understand given our limited understanding of the ever so complicated art of making things look pretty. More over it works like a champ if you want to use it with a limited number of levels of depth but as far as I can see with out looking at source for it there is no way for it to automatically go to the <em>n </em>level<em> </em>of depth on its own. So for us data driven guys it wets the appetite but leaves us feeling totally unsatisfied much like running any version of 7 other than Ultimate.</p>
<p>I would like to present a simple solution to give those of you looking for a simple solution to avoid defining a template for each level of depth in you tree. This post is part 1 of a hopeful 3 part look at how to make a slick DynamicTreeView. In part 1 I'll show you how to make the basic tree saving the styling for part 2. In part 3 we will roll the entire thing in to nice reusable UserControl that allows you easily make this fit into your application.</p>
<p><a href="http://anythingtheycando.com/blog/wp-content/uploads/2009/10/Solution_Files.jpg"><img class="alignleft size-medium wp-image-37" title="Solution_Files" src="http://anythingtheycando.com/blog/wp-content/uploads/2009/10/Solution_Files-172x300.jpg" alt="Solution_Files" width="172" height="300" /></a> For this demo go ahead an make yourself a new Silverlight Application or Silverlight Class Library in Visual Studio 2008 either will do. I am going to use Silverlight Application so that I can just hit F5 to preview at any time but the Solution that I'll post with this will be a Silverlight Class Library. Now go ahead and make 2 User Controls AutoNode.xaml and DynamicTreeView.xaml.  AutoNode is where all the magic happens and DynamicTreeView is the finished product that will work like the current TreeView in the Silverlight Toolkit.<br />
At this point you should have a solution similar to the one on the left. </p>
<p><br clear="all" /><br />
Lets start with DynamicTreeView.xaml and put an ItemsControl in LayoutRoot like this.</p>
<div class="codecolorer-container xml blackboard" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:710px;"><div class="xml codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;UserControl</span> </span><br />
<span style="color: #009900;"> &nbsp; &nbsp;<span style="color: #000066;">x:Class</span>=<span style="color: #ff0000;">&quot;SilverlightApplication1.DynamicTreeView&quot;</span></span><br />
<span style="color: #009900;"> &nbsp; &nbsp;<span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;</span> </span><br />
<span style="color: #009900;"> &nbsp; &nbsp;<span style="color: #000066;">xmlns:x</span>=<span style="color: #ff0000;">&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;</span> </span><br />
<span style="color: #009900;"> &nbsp; &nbsp;<span style="color: #000066;">Width</span>=<span style="color: #ff0000;">&quot;200&quot;</span> <span style="color: #000066;">Height</span>=<span style="color: #ff0000;">&quot;400&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid</span> <span style="color: #000066;">x:Name</span>=<span style="color: #ff0000;">&quot;LayoutRoot&quot;</span> <span style="color: #000066;">Background</span>=<span style="color: #ff0000;">&quot;Black&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ItemsControl</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/UserControl<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></div>
<p>Go ahead an build you solution so that everything will be ready to work with Blend when we open it.</p>
<p>For those of you with Expression Blend Lets right click on the DynamicTreeView.xaml in our Solution Explorer and open it with Expression Blend (you can do this with out Expression Blend but for god sakes use Expression Blend cause you don't get extra points for doing it the hard way) on the Objects and Timelines area lets right click on our ItemsControl then go to <br /> Edit Additional Templates -> Edit Generated Items Template (ItemTemplate) -> Create Empty <br />like shown below.<br />
<a href="http://anythingtheycando.com/blog/wp-content/uploads/2009/10/DynamicTreeView-VisualTree-1.jpg"><img src="http://anythingtheycando.com/blog/wp-content/uploads/2009/10/DynamicTreeView-VisualTree-1-300x255.jpg" alt="DynamicTreeView VisualTree 1" title="DynamicTreeView VisualTree 1" width="300" height="255" class="alignnone size-medium wp-image-45" /></a></p>
<p><a href="http://anythingtheycando.com/blog/wp-content/uploads/2009/10/DataTemplate-RootTreeViewItem.jpg"><img src="http://anythingtheycando.com/blog/wp-content/uploads/2009/10/DataTemplate-RootTreeViewItem-300x168.jpg" alt="DataTemplate RootTreeViewItem" title="DataTemplate RootTreeViewItem" width="300" height="168" class="aligncenter size-medium wp-image-48" /></a><br />
This is creating the template that will house all of the top level tree items for our tree view. You'll be presented with the dialog shown above enter the name you want to call this template I am using RootTreeViewItem. Once you click ok you will be presented with a empty template that has a grid and nothing else.  At the far left toolbar select the assets icon and type "auto", you should be able to select the AutoNode UserControl and add it to the grid and clear any attributes for the AutoNode in the XAML.<br />
<a href="http://anythingtheycando.com/blog/wp-content/uploads/2009/10/select-autonode.jpg"><img src="http://anythingtheycando.com/blog/wp-content/uploads/2009/10/select-autonode-300x193.jpg" alt="select autonode" title="select autonode" width="300" height="193" class="aligncenter size-medium wp-image-49" /></a><br />
At this point your XAML should now have a pretty simple data template added to it like the following</p>
<div class="codecolorer-container xml blackboard" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:710px;"><div class="xml codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;UserControl</span></span><br />
<span style="color: #009900;"> &nbsp; &nbsp;<span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;</span> </span><br />
<span style="color: #009900;"> &nbsp; &nbsp;<span style="color: #000066;">xmlns:x</span>=<span style="color: #ff0000;">&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;</span> </span><br />
<span style="color: #009900;"> &nbsp; &nbsp;<span style="color: #000066;">xmlns:local</span>=<span style="color: #ff0000;">&quot;clr-namespace:SilverlightApplication1&quot;</span> <span style="color: #000066;">x:Class</span>=<span style="color: #ff0000;">&quot;SilverlightApplication1.DynamicTreeView&quot;</span> </span><br />
<span style="color: #009900;"> &nbsp; &nbsp;<span style="color: #000066;">Width</span>=<span style="color: #ff0000;">&quot;200&quot;</span> <span style="color: #000066;">Height</span>=<span style="color: #ff0000;">&quot;400&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;UserControl.Resources<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DataTemplate</span> <span style="color: #000066;">x:Key</span>=<span style="color: #ff0000;">&quot;RootTreeViewItem&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;local:AutoNode</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/DataTemplate<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/UserControl.Resources<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid</span> <span style="color: #000066;">x:Name</span>=<span style="color: #ff0000;">&quot;LayoutRoot&quot;</span> <span style="color: #000066;">Background</span>=<span style="color: #ff0000;">&quot;Black&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ItemsControl</span> <span style="color: #000066;">ItemTemplate</span>=<span style="color: #ff0000;">&quot;{StaticResource RootTreeViewItem}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/UserControl<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></div>
<p>OK next up lets open up AutoNode.xaml and finish the basic function of this tutorial. I am not going to go over the details of the layout as teaching basics of layouts in Silverlight is beyond the scope of this tutorial so lets use this XAML. Interesting note I was seemingly unable to add a instance of AutoNode to a template that lived on AutoNode using drag and drop with Expression Blend (guessing that this is a safe guard against accidental recursion. If anyone can confirm this I would appreciate it.)</p>
<div class="codecolorer-container xml blackboard" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:710px;"><div class="xml codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;UserControl</span></span><br />
<span style="color: #009900;"> &nbsp; &nbsp;<span style="color: #000066;">x:Class</span>=<span style="color: #ff0000;">&quot;SilverlightApplication1.AutoNode&quot;</span></span><br />
<span style="color: #009900;"> &nbsp; &nbsp;<span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;</span></span><br />
<span style="color: #009900;"> &nbsp; &nbsp;<span style="color: #000066;">xmlns:x</span>=<span style="color: #ff0000;">&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;</span></span><br />
<span style="color: #009900;"> &nbsp; &nbsp;<span style="color: #000066;">xmlns:d</span>=<span style="color: #ff0000;">&quot;http://schemas.microsoft.com/expression/blend/2008&quot;</span></span><br />
<span style="color: #009900;"> &nbsp; &nbsp;<span style="color: #000066;">xmlns:mc</span>=<span style="color: #ff0000;">&quot;http://schemas.openxmlformats.org/markup-compatibility/2006&quot;</span></span><br />
<span style="color: #009900;"> &nbsp; &nbsp;<span style="color: #000066;">mc:Ignorable</span>=<span style="color: #ff0000;">&quot;d&quot;</span></span><br />
<span style="color: #009900;"> &nbsp; &nbsp;<span style="color: #000066;">d:DesignWidth</span>=<span style="color: #ff0000;">&quot;273&quot;</span> </span><br />
<span style="color: #009900;"> &nbsp; &nbsp;<span style="color: #000066;">d:DesignHeight</span>=<span style="color: #ff0000;">&quot;87&quot;</span> </span><br />
<span style="color: #009900;"> &nbsp; &nbsp;<span style="color: #000066;">VerticalContentAlignment</span>=<span style="color: #ff0000;">&quot;Top&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;UserControl.Resources<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DataTemplate</span> <span style="color: #000066;">x:Key</span>=<span style="color: #ff0000;">&quot;Children&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;auto:AutoNode</span> <span style="color: #000066;">VerticalAlignment</span>=<span style="color: #ff0000;">&quot;Top&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/DataTemplate<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/UserControl.Resources<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid</span> <span style="color: #000066;">x:Name</span>=<span style="color: #ff0000;">&quot;LayoutRoot&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid.ColumnDefinitions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ColumnDefinition</span> <span style="color: #000066;">Width</span>=<span style="color: #ff0000;">&quot;21&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ColumnDefinition</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid.ColumnDefinitions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid.RowDefinitions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;RowDefinition</span> <span style="color: #000066;">Height</span>=<span style="color: #ff0000;">&quot;20&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;RowDefinition</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid.RowDefinitions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;TextBlock</span> <span style="color: #000066;">Grid.Column</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ItemsControl</span> <span style="color: #000066;">Grid.Column</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">Grid.Row</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">ItemTemplate</span>=<span style="color: #ff0000;">&quot;{StaticResource Children}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/UserControl<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></div>
<p>But the above is somewhat simular to one of the templates used for the TreeViewItem in the Silverlight Toolkit. With just a little bit of data binding this will populate a Tree of nodes that conforms to the same convention for each level with no limit of depth. (short of running out of memory in theory) <br />
I used the following Simple class that would mimic a file system recursive directory listing. If your running a x64 system the paths used should map to real paths on your system. The FileNode class is intended to eventually provide the needed data so that this tree view by the end of part 3 will be able to visually identify if a node is a file or a directory with a different icon.</p>
<div class="codecolorer-container csharp blackboard" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:710px;height:300px;"><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0600FF;">public</span> <span style="color: #FF0000;">class</span> FileNode<br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #0600FF;">public</span> <span style="color: #FF0000;">string</span> DisplayValue <span style="color: #000000;">&#123;</span> get<span style="color: #008000;">;</span> set<span style="color: #008000;">;</span> <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #0600FF;">public</span> <span style="color: #FF0000;">string</span> Path <span style="color: #000000;">&#123;</span> get<span style="color: #008000;">;</span> set<span style="color: #008000;">;</span> <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #0600FF;">public</span> <span style="color: #FF0000;">bool</span> IsFolder <span style="color: #000000;">&#123;</span> get<span style="color: #008000;">;</span> set<span style="color: #008000;">;</span> <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #0600FF;">private</span> ObservableCollection _children <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> ObservableCollection<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; <span style="color: #0600FF;">public</span> ObservableCollection Children<br />
&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; get <span style="color: #000000;">&#123;</span> <span style="color: #0600FF;">return</span> _children<span style="color: #008000;">;</span> <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; set <span style="color: #000000;">&#123;</span> _children <span style="color: #008000;">=</span> value<span style="color: #008000;">;</span> <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #0600FF;">public</span> FileNode<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />
<span style="color: #000000;">&#125;</span><br />
<span style="color: #0600FF;">public</span> <span style="color: #FF0000;">class</span> FileSystemHelper<br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #0600FF;">private</span> ObservableCollection nodes <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> ObservableCollection<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; <span style="color: #0600FF;">public</span> FileSystemHelper<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Nodes.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span><a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> FileNode<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DisplayValue <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;Windows&quot;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Path <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;C:<span style="color: #008080; font-weight: bold;">\\</span>Windows&quot;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IsFolder <span style="color: #008000;">=</span> <span style="color: #0600FF;">true</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Nodes<span style="color: #000000;">&#91;</span>0<span style="color: #000000;">&#93;</span>.<span style="color: #0000FF;">Children</span>.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span><a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> FileNode<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DisplayValue <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;Microsoft.NET&quot;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Path <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;C:<span style="color: #008080; font-weight: bold;">\\</span>Windows<span style="color: #008080; font-weight: bold;">\\</span>Microsoft.NET&quot;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IsFolder <span style="color: #008000;">=</span> <span style="color: #0600FF;">true</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Nodes<span style="color: #000000;">&#91;</span>0<span style="color: #000000;">&#93;</span>.<span style="color: #0000FF;">Children</span><span style="color: #000000;">&#91;</span>0<span style="color: #000000;">&#93;</span>.<span style="color: #0000FF;">Children</span>.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span><a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> FileNode<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DisplayValue <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;Framework64&quot;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Path <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;C:<span style="color: #008080; font-weight: bold;">\\</span>Windows<span style="color: #008080; font-weight: bold;">\\</span>Microsoft.NET<span style="color: #008080; font-weight: bold;">\\</span>Framework64&quot;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IsFolder <span style="color: #008000;">=</span> <span style="color: #0600FF;">true</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Nodes<span style="color: #000000;">&#91;</span>0<span style="color: #000000;">&#93;</span>.<span style="color: #0000FF;">Children</span><span style="color: #000000;">&#91;</span>0<span style="color: #000000;">&#93;</span>.<span style="color: #0000FF;">Children</span>.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span><a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> FileNode<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DisplayValue <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;Framework&quot;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Path <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;C:<span style="color: #008080; font-weight: bold;">\\</span>Windows<span style="color: #008080; font-weight: bold;">\\</span>Microsoft.NET<span style="color: #008080; font-weight: bold;">\\</span>Framework&quot;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IsFolder <span style="color: #008000;">=</span> <span style="color: #0600FF;">true</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Nodes<span style="color: #000000;">&#91;</span>0<span style="color: #000000;">&#93;</span>.<span style="color: #0000FF;">Children</span><span style="color: #000000;">&#91;</span>0<span style="color: #000000;">&#93;</span>.<span style="color: #0000FF;">Children</span><span style="color: #000000;">&#91;</span>0<span style="color: #000000;">&#93;</span>.<span style="color: #0000FF;">Children</span>.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span><a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> FileNode<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DisplayValue <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;v3.5&quot;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Path <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;C:<span style="color: #008080; font-weight: bold;">\\</span>Windows<span style="color: #008080; font-weight: bold;">\\</span>Microsoft.NET<span style="color: #008080; font-weight: bold;">\\</span>Framework64<span style="color: #008080; font-weight: bold;">\\</span>v3.5&quot;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IsFolder <span style="color: #008000;">=</span> <span style="color: #0600FF;">true</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Nodes<span style="color: #000000;">&#91;</span>0<span style="color: #000000;">&#93;</span>.<span style="color: #0000FF;">Children</span><span style="color: #000000;">&#91;</span>0<span style="color: #000000;">&#93;</span>.<span style="color: #0000FF;">Children</span><span style="color: #000000;">&#91;</span>0<span style="color: #000000;">&#93;</span>.<span style="color: #0000FF;">Children</span>.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span><a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> FileNode<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DisplayValue <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;sbscmp10.dll&quot;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Path <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;C:<span style="color: #008080; font-weight: bold;">\\</span>Windows<span style="color: #008080; font-weight: bold;">\\</span>Microsoft.NET<span style="color: #008080; font-weight: bold;">\\</span>Framework64<span style="color: #008080; font-weight: bold;">\\</span>v3.5<span style="color: #008080; font-weight: bold;">\\</span>sbscmp10.dll&quot;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IsFolder <span style="color: #008000;">=</span> <span style="color: #0600FF;">false</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Nodes<span style="color: #000000;">&#91;</span>0<span style="color: #000000;">&#93;</span>.<span style="color: #0000FF;">Children</span><span style="color: #000000;">&#91;</span>0<span style="color: #000000;">&#93;</span>.<span style="color: #0000FF;">Children</span><span style="color: #000000;">&#91;</span>0<span style="color: #000000;">&#93;</span>.<span style="color: #0000FF;">Children</span>.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span><a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> FileNode<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DisplayValue <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;sbscmp20_mscorwks.dll&quot;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Path <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;C:<span style="color: #008080; font-weight: bold;">\\</span>Windows<span style="color: #008080; font-weight: bold;">\\</span>Microsoft.NET<span style="color: #008080; font-weight: bold;">\\</span>Framework64<span style="color: #008080; font-weight: bold;">\\</span>v3.5<span style="color: #008080; font-weight: bold;">\\</span>sbscmp20_mscorwks.dll&quot;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IsFolder <span style="color: #008000;">=</span> <span style="color: #0600FF;">false</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">public</span> ObservableCollection<span style="color: #008000;">&lt;</span>FileNode<span style="color: #008000;">&gt;</span> Nodes<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; get <span style="color: #000000;">&#123;</span> <span style="color: #0600FF;">return</span> nodes<span style="color: #008000;">;</span> <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set <span style="color: #000000;">&#123;</span> nodes <span style="color: #008000;">=</span> value<span style="color: #008000;">;</span> <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<span style="color: #000000;">&#125;</span></div></div>
<p>Currently we only care about the DisplayValue, Path, and Children properties so lets go ahead and add the data binding to AutoNode.xaml. Change the TextBlock and the ItemsControl to the following</p>
<div class="codecolorer-container xml blackboard" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:710px;"><div class="xml codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;TextBlock</span> <span style="color: #000066;">Text</span>=<span style="color: #ff0000;">&quot;{Binding DisplayValue}&quot;</span> <span style="color: #000066;">TextWrapping</span>=<span style="color: #ff0000;">&quot;Wrap&quot;</span> <span style="color: #000066;">Grid.Column</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">ToolTipService.ToolTip</span>=<span style="color: #ff0000;">&quot;{Binding Path}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ItemsControl</span> <span style="color: #000066;">Grid.Column</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">Grid.Row</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">ItemTemplate</span>=<span style="color: #ff0000;">&quot;{StaticResource Children}&quot;</span> <span style="color: #000066;">ItemsSource</span>=<span style="color: #ff0000;">&quot;{Binding Children}&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span></div></div>
<p>The Last step that we need to add a data context to the grid on DynamicTreeView.xaml and set an ItemsSource binding for the ItemsControl below is what the final DynamicTreeView.xaml should look like.</p>
<div class="codecolorer-container xml blackboard" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:710px;"><div class="xml codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;UserControl</span></span><br />
<span style="color: #009900;"> &nbsp; &nbsp;<span style="color: #000066;">x:Class</span>=<span style="color: #ff0000;">&quot;SilverlightApplication1.DynamicTreeView&quot;</span> </span><br />
<span style="color: #009900;"> &nbsp; &nbsp;<span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;</span> </span><br />
<span style="color: #009900;"> &nbsp; &nbsp;<span style="color: #000066;">xmlns:x</span>=<span style="color: #ff0000;">&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;</span> </span><br />
<span style="color: #009900;"> &nbsp; &nbsp;<span style="color: #000066;">xmlns:local</span>=<span style="color: #ff0000;">&quot;clr-namespace:SilverlightApplication1&quot;</span> </span><br />
<span style="color: #009900;"> &nbsp; &nbsp;<span style="color: #000066;">Width</span>=<span style="color: #ff0000;">&quot;300&quot;</span> <span style="color: #000066;">Height</span>=<span style="color: #ff0000;">&quot;400&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;UserControl.Resources<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;DataTemplate</span> <span style="color: #000066;">x:Key</span>=<span style="color: #ff0000;">&quot;RootTreeViewItem&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;local:AutoNode</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/DataTemplate<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/UserControl.Resources<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid</span> <span style="color: #000066;">x:Name</span>=<span style="color: #ff0000;">&quot;LayoutRoot&quot;</span> <span style="color: #000066;">Background</span>=<span style="color: #ff0000;">&quot;Black&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid.DataContext<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;local:FileSystemHelper</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid.DataContext<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;ItemsControl</span> <span style="color: #000066;">ItemTemplate</span>=<span style="color: #ff0000;">&quot;{StaticResource RootTreeViewItem}&quot;</span> <span style="color: #000066;">ItemsSource</span>=<span style="color: #ff0000;">&quot;{Binding Nodes}&quot;</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/UserControl<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></div>
<p>Lets not forget to add the DynamicTreeView to the MainPage.xaml so it shows up when we hit preview.</p>
<div class="codecolorer-container xml blackboard" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:710px;"><div class="xml codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;UserControl</span></span><br />
<span style="color: #009900;"> &nbsp; &nbsp;<span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;</span> </span><br />
<span style="color: #009900;"> &nbsp; &nbsp;<span style="color: #000066;">xmlns:x</span>=<span style="color: #ff0000;">&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;</span> </span><br />
<span style="color: #009900;"> &nbsp; &nbsp;<span style="color: #000066;">xmlns:local</span>=<span style="color: #ff0000;">&quot;clr-namespace:SilverlightApplication1&quot;</span></span><br />
<span style="color: #009900;"> &nbsp; &nbsp;<span style="color: #000066;">x:Class</span>=<span style="color: #ff0000;">&quot;SilverlightApplication1.MainPage&quot;</span></span><br />
<span style="color: #009900;"> &nbsp; &nbsp;<span style="color: #000066;">Foreground</span>=<span style="color: #ff0000;">&quot;White&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;Grid</span> <span style="color: #000066;">HorizontalAlignment</span>=<span style="color: #ff0000;">&quot;Left&quot;</span> <span style="color: #000066;">VerticalAlignment</span>=<span style="color: #ff0000;">&quot;Top&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;local:DynamicTreeView</span> <span style="color: #000000; font-weight: bold;">/&gt;</span></span><br />
&nbsp; &nbsp; <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/Grid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><br />
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/UserControl<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></div></div>
<p><a href="http://anythingtheycando.com/blog/wp-content/uploads/2009/10/IE-Part-1-finished.jpg"><img src="http://anythingtheycando.com/blog/wp-content/uploads/2009/10/IE-Part-1-finished-232x300.jpg" alt="IE Part 1 finished" title="IE Part 1 finished" width="232" height="300" class="alignleft size-medium wp-image-54" /></a><br />
To the left you can see that we currently have a stunningly bland proof of concept for our recursive TreeView. Its worth noting that there is not one line of programmatic code that is making this happen (other than the code to generate the items to display but with some work you can make the AutoNode use reflection to check to see if its DataContext has any property that implements ICollection/IList/IEnumerable and if so try to map that to the children field.)</p>
<p>Now you must be thinking OK but what can I do with this? Well I was thinking that myself after this was done and so here is an example of what to do with it. With a few changes to the code we had that defined the FileSystemHelper and FileNode classes we can make VisualFamilyTree and FrameworkElementNode classes as below.<br />
<br clear="all" /></p>
<div class="codecolorer-container csharp blackboard" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:710px;height:300px;"><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; &nbsp; <span style="color: #008080; font-style: italic;">/// &lt;summary&gt;</span><br />
&nbsp; &nbsp; <span style="color: #008080; font-style: italic;">/// Modified from FileSystemHelper</span><br />
&nbsp; &nbsp; <span style="color: #008080; font-style: italic;">/// &lt;/summary&gt;</span><br />
&nbsp; &nbsp; <span style="color: #0600FF;">public</span> <span style="color: #FF0000;">class</span> VisualFamilyTree<br />
&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">private</span> ObservableCollection<span style="color: #008000;">&lt;</span>FrameworkElementNode<span style="color: #008000;">&gt;</span> nodes <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> ObservableCollection<span style="color: #008000;">&lt;</span>FrameworkElementNode<span style="color: #008000;">&gt;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">public</span> VisualFamilyTree<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008080; font-style: italic;">/// &lt;summary&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008080; font-style: italic;">/// This method will be called after the rootElement has fully loaded and is ready to be transversed </span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008080; font-style: italic;">/// &lt;/summary&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008080; font-style: italic;">/// &lt;param name=&quot;rootElement&quot;&gt;&lt;/param&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">public</span> <span style="color: #0600FF;">void</span> Populate<span style="color: #000000;">&#40;</span>FrameworkElement rootElement<span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Nodes.<span style="color: #0000FF;">Clear</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span> <span style="color: #008080; font-style: italic;">// this is done to make the tree only ever have one node</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Nodes.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span><a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> FrameworkElementNode<span style="color: #000000;">&#40;</span>rootElement<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">public</span> ObservableCollection<span style="color: #008000;">&lt;</span>FrameworkElementNode<span style="color: #008000;">&gt;</span> Nodes<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; get <span style="color: #000000;">&#123;</span> <span style="color: #0600FF;">return</span> nodes<span style="color: #008000;">;</span> <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #008080; font-style: italic;">/// &lt;summary&gt;</span><br />
&nbsp; &nbsp; <span style="color: #008080; font-style: italic;">/// Modified from FileNode</span><br />
&nbsp; &nbsp; <span style="color: #008080; font-style: italic;">/// &lt;/summary&gt;</span><br />
&nbsp; &nbsp; <span style="color: #0600FF;">public</span> <span style="color: #FF0000;">class</span> FrameworkElementNode<br />
&nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">public</span> <span style="color: #FF0000;">string</span> DisplayValue <span style="color: #000000;">&#123;</span> get<span style="color: #008000;">;</span> set<span style="color: #008000;">;</span> <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">public</span> <span style="color: #FF0000;">string</span> Path <span style="color: #000000;">&#123;</span> get<span style="color: #008000;">;</span> set<span style="color: #008000;">;</span> <span style="color: #000000;">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">private</span> ObservableCollection<span style="color: #008000;">&lt;</span>FrameworkElementNode<span style="color: #008000;">&gt;</span> _children <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> ObservableCollection<span style="color: #008000;">&lt;</span>FrameworkElementNode<span style="color: #008000;">&gt;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">public</span> ObservableCollection<span style="color: #008000;">&lt;</span>FrameworkElementNode<span style="color: #008000;">&gt;</span> Children<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; get <span style="color: #000000;">&#123;</span> <span style="color: #0600FF;">return</span> _children<span style="color: #008000;">;</span> <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; set <span style="color: #000000;">&#123;</span> _children <span style="color: #008000;">=</span> value<span style="color: #008000;">;</span> <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">public</span> FrameworkElementNode<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span> <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008080; font-style: italic;">/// &lt;summary&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008080; font-style: italic;">/// constructor that auto builds off of a FrameworkElement</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008080; font-style: italic;">/// &lt;/summary&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">public</span> FrameworkElementNode<span style="color: #000000;">&#40;</span>FrameworkElement fe<span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008080; font-style: italic;">// how many child nodes does this element have that are direct children of this FrameworkElement</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #FF0000;">int</span> childNodes <span style="color: #008000;">=</span> VisualTreeHelper.<span style="color: #0000FF;">GetChildrenCount</span><span style="color: #000000;">&#40;</span>fe<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">if</span><span style="color: #000000;">&#40;</span>childNodes<span style="color: #008000;">&gt;</span> 0<span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0600FF;">for</span> <span style="color: #000000;">&#40;</span><span style="color: #FF0000;">int</span> i <span style="color: #008000;">=</span> <span style="color: #FF0000;">0</span><span style="color: #008000;">;</span> i <span style="color: #008000;">&lt;</span> childNodes<span style="color: #008000;">;</span> i<span style="color: #008000;">++</span><span style="color: #000000;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008080; font-style: italic;">// recursively call this for each FrameworkElement that is a child element of the FrameworkElement fe</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Children.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span><a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> FrameworkElementNode<span style="color: #000000;">&#40;</span>VisualTreeHelper.<span style="color: #0000FF;">GetChild</span><span style="color: #000000;">&#40;</span>fe, i<span style="color: #000000;">&#41;</span> <span style="color: #0600FF;">as</span> FrameworkElement<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008080; font-style: italic;">// using path for name so we didn't have to make any changes to the AutoNode.xaml</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Path <span style="color: #008000;">=</span> fe.<span style="color: #0000FF;">Name</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #008080; font-style: italic;">// the node &quot;header&quot; will be x:Name ( type of this FrameworkElement ) </span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DisplayValue <span style="color: #008000;">=</span> Path<span style="color: #008000;">+</span> <span style="color: #666666;">&quot;( &quot;</span> <span style="color: #008000;">+</span> fe.<span style="color: #0000FF;">GetType</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>.<span style="color: #0000FF;">Name</span> <span style="color: #008000;">+</span> <span style="color: #666666;">&quot; )&quot;</span><span style="color: #008000;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #000000;">&#125;</span></div></div>
<p>The goal of this is to make our recursive TreeView build in real time from the live code that is running in browser to give us the same kind visual tree that we have in Expression Blend at design time. Looking below you can see a quick collection of controls that I threw on a page. A quick search didn't bring up anyone doing anything like this in real time running in Silverlight. The closest that I could find to doing something like this was <a href="http://firstfloorsoftware.com/blog/visualtreehelper-is-a-spy-s-best-friend/">Silverlight Spy</a>. Granted currently it only looks for simple parent child relationships and wont peek into templates of any kind (though that should be pretty straight forward to implement) on the other hand the code to make the live tree only took like 10 min so its a fair trade I guess.</p>
<p><a href="http://anythingtheycando.com/blog/wp-content/uploads/2009/10/random-items.jpg"><img src="http://anythingtheycando.com/blog/wp-content/uploads/2009/10/random-items-300x127.jpg" alt="random items" title="random items" width="300" height="127" class="aligncenter size-medium wp-image-55" /></a></p>
<p>Now here is a screen shot of it running live in Silverlight and note that the tree is the same.<br />
<a href="http://anythingtheycando.com/blog/wp-content/uploads/2009/10/random-items-in-browser.jpg"><img src="http://anythingtheycando.com/blog/wp-content/uploads/2009/10/random-items-in-browser-300x194.jpg" alt="random items in browser" title="random items in browser" width="300" height="194" class="aligncenter size-medium wp-image-56" /></a></p>
<p>Download the full solution for <a href="http://anythingtheycando.com/blog/wp-content/uploads/2009/10/SilverlightApplication1-Part-1.zip">Here</a>.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a title="Click me to see the sites." href="#" onclick="$$('div.d31').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;"><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d31" style="overflow:hidden">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://blinklist.com/index.php?Action=Blink/addblink.php&amp;Name=Simple+Tree+Part+1&amp;Description=Simple+Tree+Part+1&amp;Url=http://www.anythingtheycando.com/blog/index.php/2009/10/29/simple-tree-part-1/" rel="nofollow" title="Add to&nbsp;BlinkList"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/blinklist.png" title="Add to&nbsp;BlinkList" alt="Add to&nbsp;BlinkList" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://blogmarks.net/my/new.php?mini=1&amp;simple=1&amp;url=http://www.anythingtheycando.com/blog/index.php/2009/10/29/simple-tree-part-1/&amp;title=Simple+Tree+Part+1" rel="nofollow" title="Add to&nbsp;Blogmarks"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/bmarks.png" title="Add to&nbsp;Blogmarks" alt="Add to&nbsp;Blogmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http://www.anythingtheycando.com/blog/index.php/2009/10/29/simple-tree-part-1/&amp;submitHeadline=Simple+Tree+Part+1&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.connotea.org/addpopup?continue=confirm&amp;uri=http://www.anythingtheycando.com/blog/index.php/2009/10/29/simple-tree-part-1/&amp;title=Simple+Tree+Part+1" rel="nofollow" title="Add to&nbsp;Connotea"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/connotea.png" title="Add to&nbsp;Connotea" alt="Add to&nbsp;Connotea" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.anythingtheycando.com/blog/index.php/2009/10/29/simple-tree-part-1/&amp;title=Simple+Tree+Part+1" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.diigo.com/post?url=http://www.anythingtheycando.com/blog/index.php/2009/10/29/simple-tree-part-1/&amp;title=Simple+Tree+Part+1" rel="nofollow" title="Add to&nbsp;Diigo"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/diigo.png" title="Add to&nbsp;Diigo" alt="Add to&nbsp;Diigo" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.anythingtheycando.com/blog/index.php/2009/10/29/simple-tree-part-1/&amp;title=Simple+Tree+Part+1" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.dotnetkicks.com/kick/?url=http://www.anythingtheycando.com/blog/index.php/2009/10/29/simple-tree-part-1/&amp;title=Simple+Tree+Part+1" rel="nofollow" title="Add to&nbsp;DotNetKicks"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/dotnetkicks.png" title="Add to&nbsp;DotNetKicks" alt="Add to&nbsp;DotNetKicks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.dzone.com/links/add.html?description=Simple+Tree+Part+1&amp;url=http://www.anythingtheycando.com/blog/index.php/2009/10/29/simple-tree-part-1/&amp;title=Simple+Tree+Part+1" rel="nofollow" title="Add to&nbsp;DZone"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/dzone.png" title="Add to&nbsp;DZone" alt="Add to&nbsp;DZone" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://www.anythingtheycando.com/blog/index.php/2009/10/29/simple-tree-part-1/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://cgi.fark.com/cgi/fark/farkit.pl?u=http://www.anythingtheycando.com/blog/index.php/2009/10/29/simple-tree-part-1/&amp;h=Simple+Tree+Part+1" rel="nofollow" title="Add to&nbsp;Fark"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/fark.png" title="Add to&nbsp;Fark" alt="Add to&nbsp;Fark" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://faves.com/Authoring.aspx?u=http://www.anythingtheycando.com/blog/index.php/2009/10/29/simple-tree-part-1/&amp;t=Simple+Tree+Part+1" rel="nofollow" title="Add to&nbsp;Faves"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/bluedot.png" title="Add to&nbsp;Faves" alt="Add to&nbsp;Faves" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://fleck.com/litebookmarklet.php?url=http://www.anythingtheycando.com/blog/index.php/2009/10/29/simple-tree-part-1/&amp;title=Simple+Tree+Part+1" rel="nofollow" title="Add to&nbsp;Fleck"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/fleck.png" title="Add to&nbsp;Fleck" alt="Add to&nbsp;Fleck" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://FriendSite.com/users/bookmarks/?u=http://www.anythingtheycando.com/blog/index.php/2009/10/29/simple-tree-part-1/&amp;t=Simple+Tree+Part+1" rel="nofollow" title="Add to&nbsp;FriendSite"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/friendsite.png" title="Add to&nbsp;FriendSite" alt="Add to&nbsp;FriendSite" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.anythingtheycando.com/blog/index.php/2009/10/29/simple-tree-part-1/&amp;title=Simple+Tree+Part+1" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.kaboodle.com/za/selectpage?p_pop=false&amp;pa=url&amp;u=http://www.anythingtheycando.com/blog/index.php/2009/10/29/simple-tree-part-1/" rel="nofollow" title="Add to&nbsp;Kaboodle"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/kaboodle.png" title="Add to&nbsp;Kaboodle" alt="Add to&nbsp;Kaboodle" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.maple.nu/cgi-bin/search6/usa/ss_submit.cgi?fct=100&amp;url=http://www.anythingtheycando.com/blog/index.php/2009/10/29/simple-tree-part-1/&amp;title=Simple+Tree+Part+1" rel="nofollow" title="Add to&nbsp;Maple"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/maple.png" title="Add to&nbsp;Maple" alt="Add to&nbsp;Maple" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/index.php?action=addurl&amp;bm_url=http://www.anythingtheycando.com/blog/index.php/2009/10/29/simple-tree-part-1/&amp;bm_description=Simple+Tree+Part+1" rel="nofollow" title="Add to&nbsp;Mister Wong"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/misterwong.png" title="Add to&nbsp;Mister Wong" alt="Add to&nbsp;Mister Wong" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http://www.anythingtheycando.com/blog/index.php/2009/10/29/simple-tree-part-1/&amp;T=Simple+Tree+Part+1" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://netvouz.com/action/submitBookmark?url=http://www.anythingtheycando.com/blog/index.php/2009/10/29/simple-tree-part-1/&amp;title=Simple+Tree+Part+1&amp;popup=no" rel="nofollow" title="Add to&nbsp;Netvouz"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/netvouz.png" title="Add to&nbsp;Netvouz" alt="Add to&nbsp;Netvouz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.newsvine.com/_wine/save?u=http://www.anythingtheycando.com/blog/index.php/2009/10/29/simple-tree-part-1/&amp;h=Simple+Tree+Part+1" rel="nofollow" title="Add to&nbsp;Newsvine"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/newsvine.png" title="Add to&nbsp;Newsvine" alt="Add to&nbsp;Newsvine" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.plugim.com/submit?url=http://www.anythingtheycando.com/blog/index.php/2009/10/29/simple-tree-part-1/&amp;title=Simple+Tree+Part+1" rel="nofollow" title="Add to&nbsp;PlugIM"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/plugim.png" title="Add to&nbsp;PlugIM" alt="Add to&nbsp;PlugIM" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://www.anythingtheycando.com/blog/index.php/2009/10/29/simple-tree-part-1/&amp;title=Simple+Tree+Part+1" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.simpy.com/simpy/LinkAdd.do?href=http://www.anythingtheycando.com/blog/index.php/2009/10/29/simple-tree-part-1/&amp;title=Simple+Tree+Part+1" rel="nofollow" title="Add to&nbsp;Simpy"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/simpy.png" title="Add to&nbsp;Simpy" alt="Add to&nbsp;Simpy" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.kirtsy.com//submit.php?url=http://www.anythingtheycando.com/blog/index.php/2009/10/29/simple-tree-part-1/" rel="nofollow" title="Add to&nbsp;Kirtsy"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/skirt.png" title="Add to&nbsp;Kirtsy" alt="Add to&nbsp;Kirtsy" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?url=http://www.anythingtheycando.com/blog/index.php/2009/10/29/simple-tree-part-1/&amp;title=Simple+Tree+Part+1" rel="nofollow" title="Add to&nbsp;Slashdot"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/slashdot.png" title="Add to&nbsp;Slashdot" alt="Add to&nbsp;Slashdot" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http://www.anythingtheycando.com/blog/index.php/2009/10/29/simple-tree-part-1/&amp;title=Simple+Tree+Part+1" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.shoutwire.com/?p=submit&amp;link=http://www.anythingtheycando.com/blog/index.php/2009/10/29/simple-tree-part-1/" rel="nofollow" title="Add to&nbsp;Shoutwire"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/shoutwire.png" title="Add to&nbsp;Shoutwire" alt="Add to&nbsp;Shoutwire" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.squidoo.com/lensmaster/bookmark?http://www.anythingtheycando.com/blog/index.php/2009/10/29/simple-tree-part-1/" rel="nofollow" title="Add to&nbsp;Squidoo"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/squidoo.png" title="Add to&nbsp;Squidoo" alt="Add to&nbsp;Squidoo" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.sphere.com/sphereit/http://www.anythingtheycando.com/blog/index.php/2009/10/29/simple-tree-part-1/" rel="nofollow" title="Add to&nbsp;SphereIt"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/sphereit.png" title="Add to&nbsp;SphereIt" alt="Add to&nbsp;SphereIt" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.spurl.net/spurl.php?url=http://www.anythingtheycando.com/blog/index.php/2009/10/29/simple-tree-part-1/&amp;title=Simple+Tree+Part+1" rel="nofollow" title="Add to&nbsp;Spurl"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/spurl.png" title="Add to&nbsp;Spurl" alt="Add to&nbsp;Spurl" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.anythingtheycando.com/blog/index.php/2009/10/29/simple-tree-part-1/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.thisnext.com/pick/new/submit/sociable/?url=http://www.anythingtheycando.com/blog/index.php/2009/10/29/simple-tree-part-1/&amp;name=Simple+Tree+Part+1" rel="nofollow" title="Add to&nbsp;ThisNext"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/thisnext.png" title="Add to&nbsp;ThisNext" alt="Add to&nbsp;ThisNext" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http://www.anythingtheycando.com/blog/index.php/2009/10/29/simple-tree-part-1/" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Simple+Tree+Part+1+@+http://www.anythingtheycando.com/blog/index.php/2009/10/29/simple-tree-part-1/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://webride.org/discuss/split.php?uri=http://www.anythingtheycando.com/blog/index.php/2009/10/29/simple-tree-part-1/&amp;title=Simple+Tree+Part+1" rel="nofollow" title="Add to&nbsp;Webride"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/webride.png" title="Add to&nbsp;Webride" alt="Add to&nbsp;Webride" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.wists.com/t.php?c=null&amp;r=http://www.anythingtheycando.com/blog/index.php/2009/10/29/simple-tree-part-1/&amp;u=http://www.anythingtheycando.com/blog/index.php/2009/10/29/simple-tree-part-1/&amp;title={text}" rel="nofollow" title="Add to&nbsp;Wists"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/wists.png" title="Add to&nbsp;Wists" alt="Add to&nbsp;Wists" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http://www.anythingtheycando.com/blog/index.php/2009/10/29/simple-tree-part-1/&amp;t=Simple+Tree+Part+1" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
<a style="font-size:90%;text-align: right; " title="Click me to hide the sites." href="#" onclick="$$('div.d31').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); return false;">Hide Sites</a>
</div>
</div>
<!-- Social Bookmarks END -->
<script type="text/javascript">$$('div.d31').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); </script>]]></content:encoded>
			<wfw:commentRss>http://www.anythingtheycando.com/blog/index.php/2009/10/29/simple-tree-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Silverlight ComboBox Strong Typed Selected Object</title>
		<link>http://www.anythingtheycando.com/blog/index.php/2009/10/05/silverlight-combobox-strong-typed-selected-object/</link>
		<comments>http://www.anythingtheycando.com/blog/index.php/2009/10/05/silverlight-combobox-strong-typed-selected-object/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 01:16:16 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[.Net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Extension Methods]]></category>
		<category><![CDATA[Generics]]></category>

		<guid isPermaLink="false">http://anythingtheycando.com/blog/?p=5</guid>
		<description><![CDATA[For those of you that use Silverlight and the built in ComboBox here is something that works a little cleaner than the default casting of the SelectedItem on a ComboBox. I am a big fan of extension methods and I plan to post a lot about them in the future so I decided to start [...]]]></description>
			<content:encoded><![CDATA[<p>For those of you that use Silverlight and the built in ComboBox here is something that works a little cleaner than the default casting of the SelectedItem on a ComboBox. I am a big fan of extension methods and I plan to post a lot about them in the future so I decided to start with something small.</p>
<div class="codecolorer-container csharp blackboard" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:710px;"><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0600FF;">public</span> <span style="color: #0600FF;">static</span> T GetSelectedObject<span style="color: #000000;">&#40;</span><span style="color: #0600FF;">this</span> ComboBox cb<span style="color: #000000;">&#41;</span> where T<span style="color: #008000;">:</span><span style="color: #FF0000;">class</span><br />
<span style="color: #000000;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #0600FF;">return</span> cb.<span style="color: #0000FF;">SelectedItem</span> <span style="color: #0600FF;">as</span> T<span style="color: #008000;">;</span><br />
<span style="color: #000000;">&#125;</span></div></div>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a title="Click me to see the sites." href="#" onclick="$$('div.d5').each( function(e) { e.visualEffect('slide_down',{duration:2.5}) }); return false;"><strong><em>Bookmark It</em></strong></a>
<br />
<div class="d5" style="overflow:hidden">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://blinklist.com/index.php?Action=Blink/addblink.php&amp;Name=Silverlight+ComboBox+Strong+Typed+Selected+Object&amp;Description=Silverlight+ComboBox+Strong+Typed+Selected+Object&amp;Url=http://www.anythingtheycando.com/blog/index.php/2009/10/05/silverlight-combobox-strong-typed-selected-object/" rel="nofollow" title="Add to&nbsp;BlinkList"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/blinklist.png" title="Add to&nbsp;BlinkList" alt="Add to&nbsp;BlinkList" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://blogmarks.net/my/new.php?mini=1&amp;simple=1&amp;url=http://www.anythingtheycando.com/blog/index.php/2009/10/05/silverlight-combobox-strong-typed-selected-object/&amp;title=Silverlight+ComboBox+Strong+Typed+Selected+Object" rel="nofollow" title="Add to&nbsp;Blogmarks"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/bmarks.png" title="Add to&nbsp;Blogmarks" alt="Add to&nbsp;Blogmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http://www.anythingtheycando.com/blog/index.php/2009/10/05/silverlight-combobox-strong-typed-selected-object/&amp;submitHeadline=Silverlight+ComboBox+Strong+Typed+Selected+Object&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.connotea.org/addpopup?continue=confirm&amp;uri=http://www.anythingtheycando.com/blog/index.php/2009/10/05/silverlight-combobox-strong-typed-selected-object/&amp;title=Silverlight+ComboBox+Strong+Typed+Selected+Object" rel="nofollow" title="Add to&nbsp;Connotea"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/connotea.png" title="Add to&nbsp;Connotea" alt="Add to&nbsp;Connotea" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.anythingtheycando.com/blog/index.php/2009/10/05/silverlight-combobox-strong-typed-selected-object/&amp;title=Silverlight+ComboBox+Strong+Typed+Selected+Object" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.diigo.com/post?url=http://www.anythingtheycando.com/blog/index.php/2009/10/05/silverlight-combobox-strong-typed-selected-object/&amp;title=Silverlight+ComboBox+Strong+Typed+Selected+Object" rel="nofollow" title="Add to&nbsp;Diigo"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/diigo.png" title="Add to&nbsp;Diigo" alt="Add to&nbsp;Diigo" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.anythingtheycando.com/blog/index.php/2009/10/05/silverlight-combobox-strong-typed-selected-object/&amp;title=Silverlight+ComboBox+Strong+Typed+Selected+Object" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.dotnetkicks.com/kick/?url=http://www.anythingtheycando.com/blog/index.php/2009/10/05/silverlight-combobox-strong-typed-selected-object/&amp;title=Silverlight+ComboBox+Strong+Typed+Selected+Object" rel="nofollow" title="Add to&nbsp;DotNetKicks"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/dotnetkicks.png" title="Add to&nbsp;DotNetKicks" alt="Add to&nbsp;DotNetKicks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.dzone.com/links/add.html?description=Silverlight+ComboBox+Strong+Typed+Selected+Object&amp;url=http://www.anythingtheycando.com/blog/index.php/2009/10/05/silverlight-combobox-strong-typed-selected-object/&amp;title=Silverlight+ComboBox+Strong+Typed+Selected+Object" rel="nofollow" title="Add to&nbsp;DZone"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/dzone.png" title="Add to&nbsp;DZone" alt="Add to&nbsp;DZone" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://www.anythingtheycando.com/blog/index.php/2009/10/05/silverlight-combobox-strong-typed-selected-object/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://cgi.fark.com/cgi/fark/farkit.pl?u=http://www.anythingtheycando.com/blog/index.php/2009/10/05/silverlight-combobox-strong-typed-selected-object/&amp;h=Silverlight+ComboBox+Strong+Typed+Selected+Object" rel="nofollow" title="Add to&nbsp;Fark"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/fark.png" title="Add to&nbsp;Fark" alt="Add to&nbsp;Fark" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://faves.com/Authoring.aspx?u=http://www.anythingtheycando.com/blog/index.php/2009/10/05/silverlight-combobox-strong-typed-selected-object/&amp;t=Silverlight+ComboBox+Strong+Typed+Selected+Object" rel="nofollow" title="Add to&nbsp;Faves"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/bluedot.png" title="Add to&nbsp;Faves" alt="Add to&nbsp;Faves" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://fleck.com/litebookmarklet.php?url=http://www.anythingtheycando.com/blog/index.php/2009/10/05/silverlight-combobox-strong-typed-selected-object/&amp;title=Silverlight+ComboBox+Strong+Typed+Selected+Object" rel="nofollow" title="Add to&nbsp;Fleck"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/fleck.png" title="Add to&nbsp;Fleck" alt="Add to&nbsp;Fleck" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://FriendSite.com/users/bookmarks/?u=http://www.anythingtheycando.com/blog/index.php/2009/10/05/silverlight-combobox-strong-typed-selected-object/&amp;t=Silverlight+ComboBox+Strong+Typed+Selected+Object" rel="nofollow" title="Add to&nbsp;FriendSite"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/friendsite.png" title="Add to&nbsp;FriendSite" alt="Add to&nbsp;FriendSite" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.anythingtheycando.com/blog/index.php/2009/10/05/silverlight-combobox-strong-typed-selected-object/&amp;title=Silverlight+ComboBox+Strong+Typed+Selected+Object" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.kaboodle.com/za/selectpage?p_pop=false&amp;pa=url&amp;u=http://www.anythingtheycando.com/blog/index.php/2009/10/05/silverlight-combobox-strong-typed-selected-object/" rel="nofollow" title="Add to&nbsp;Kaboodle"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/kaboodle.png" title="Add to&nbsp;Kaboodle" alt="Add to&nbsp;Kaboodle" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.maple.nu/cgi-bin/search6/usa/ss_submit.cgi?fct=100&amp;url=http://www.anythingtheycando.com/blog/index.php/2009/10/05/silverlight-combobox-strong-typed-selected-object/&amp;title=Silverlight+ComboBox+Strong+Typed+Selected+Object" rel="nofollow" title="Add to&nbsp;Maple"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/maple.png" title="Add to&nbsp;Maple" alt="Add to&nbsp;Maple" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/index.php?action=addurl&amp;bm_url=http://www.anythingtheycando.com/blog/index.php/2009/10/05/silverlight-combobox-strong-typed-selected-object/&amp;bm_description=Silverlight+ComboBox+Strong+Typed+Selected+Object" rel="nofollow" title="Add to&nbsp;Mister Wong"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/misterwong.png" title="Add to&nbsp;Mister Wong" alt="Add to&nbsp;Mister Wong" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http://www.anythingtheycando.com/blog/index.php/2009/10/05/silverlight-combobox-strong-typed-selected-object/&amp;T=Silverlight+ComboBox+Strong+Typed+Selected+Object" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://netvouz.com/action/submitBookmark?url=http://www.anythingtheycando.com/blog/index.php/2009/10/05/silverlight-combobox-strong-typed-selected-object/&amp;title=Silverlight+ComboBox+Strong+Typed+Selected+Object&amp;popup=no" rel="nofollow" title="Add to&nbsp;Netvouz"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/netvouz.png" title="Add to&nbsp;Netvouz" alt="Add to&nbsp;Netvouz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.newsvine.com/_wine/save?u=http://www.anythingtheycando.com/blog/index.php/2009/10/05/silverlight-combobox-strong-typed-selected-object/&amp;h=Silverlight+ComboBox+Strong+Typed+Selected+Object" rel="nofollow" title="Add to&nbsp;Newsvine"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/newsvine.png" title="Add to&nbsp;Newsvine" alt="Add to&nbsp;Newsvine" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.plugim.com/submit?url=http://www.anythingtheycando.com/blog/index.php/2009/10/05/silverlight-combobox-strong-typed-selected-object/&amp;title=Silverlight+ComboBox+Strong+Typed+Selected+Object" rel="nofollow" title="Add to&nbsp;PlugIM"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/plugim.png" title="Add to&nbsp;PlugIM" alt="Add to&nbsp;PlugIM" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://www.anythingtheycando.com/blog/index.php/2009/10/05/silverlight-combobox-strong-typed-selected-object/&amp;title=Silverlight+ComboBox+Strong+Typed+Selected+Object" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.simpy.com/simpy/LinkAdd.do?href=http://www.anythingtheycando.com/blog/index.php/2009/10/05/silverlight-combobox-strong-typed-selected-object/&amp;title=Silverlight+ComboBox+Strong+Typed+Selected+Object" rel="nofollow" title="Add to&nbsp;Simpy"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/simpy.png" title="Add to&nbsp;Simpy" alt="Add to&nbsp;Simpy" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.kirtsy.com//submit.php?url=http://www.anythingtheycando.com/blog/index.php/2009/10/05/silverlight-combobox-strong-typed-selected-object/" rel="nofollow" title="Add to&nbsp;Kirtsy"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/skirt.png" title="Add to&nbsp;Kirtsy" alt="Add to&nbsp;Kirtsy" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?url=http://www.anythingtheycando.com/blog/index.php/2009/10/05/silverlight-combobox-strong-typed-selected-object/&amp;title=Silverlight+ComboBox+Strong+Typed+Selected+Object" rel="nofollow" title="Add to&nbsp;Slashdot"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/slashdot.png" title="Add to&nbsp;Slashdot" alt="Add to&nbsp;Slashdot" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http://www.anythingtheycando.com/blog/index.php/2009/10/05/silverlight-combobox-strong-typed-selected-object/&amp;title=Silverlight+ComboBox+Strong+Typed+Selected+Object" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.shoutwire.com/?p=submit&amp;link=http://www.anythingtheycando.com/blog/index.php/2009/10/05/silverlight-combobox-strong-typed-selected-object/" rel="nofollow" title="Add to&nbsp;Shoutwire"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/shoutwire.png" title="Add to&nbsp;Shoutwire" alt="Add to&nbsp;Shoutwire" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.squidoo.com/lensmaster/bookmark?http://www.anythingtheycando.com/blog/index.php/2009/10/05/silverlight-combobox-strong-typed-selected-object/" rel="nofollow" title="Add to&nbsp;Squidoo"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/squidoo.png" title="Add to&nbsp;Squidoo" alt="Add to&nbsp;Squidoo" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.sphere.com/sphereit/http://www.anythingtheycando.com/blog/index.php/2009/10/05/silverlight-combobox-strong-typed-selected-object/" rel="nofollow" title="Add to&nbsp;SphereIt"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/sphereit.png" title="Add to&nbsp;SphereIt" alt="Add to&nbsp;SphereIt" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.spurl.net/spurl.php?url=http://www.anythingtheycando.com/blog/index.php/2009/10/05/silverlight-combobox-strong-typed-selected-object/&amp;title=Silverlight+ComboBox+Strong+Typed+Selected+Object" rel="nofollow" title="Add to&nbsp;Spurl"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/spurl.png" title="Add to&nbsp;Spurl" alt="Add to&nbsp;Spurl" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.anythingtheycando.com/blog/index.php/2009/10/05/silverlight-combobox-strong-typed-selected-object/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.thisnext.com/pick/new/submit/sociable/?url=http://www.anythingtheycando.com/blog/index.php/2009/10/05/silverlight-combobox-strong-typed-selected-object/&amp;name=Silverlight+ComboBox+Strong+Typed+Selected+Object" rel="nofollow" title="Add to&nbsp;ThisNext"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/thisnext.png" title="Add to&nbsp;ThisNext" alt="Add to&nbsp;ThisNext" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http://www.anythingtheycando.com/blog/index.php/2009/10/05/silverlight-combobox-strong-typed-selected-object/" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Silverlight+ComboBox+Strong+Typed+Selected+Object+@+http://www.anythingtheycando.com/blog/index.php/2009/10/05/silverlight-combobox-strong-typed-selected-object/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://webride.org/discuss/split.php?uri=http://www.anythingtheycando.com/blog/index.php/2009/10/05/silverlight-combobox-strong-typed-selected-object/&amp;title=Silverlight+ComboBox+Strong+Typed+Selected+Object" rel="nofollow" title="Add to&nbsp;Webride"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/webride.png" title="Add to&nbsp;Webride" alt="Add to&nbsp;Webride" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.wists.com/t.php?c=null&amp;r=http://www.anythingtheycando.com/blog/index.php/2009/10/05/silverlight-combobox-strong-typed-selected-object/&amp;u=http://www.anythingtheycando.com/blog/index.php/2009/10/05/silverlight-combobox-strong-typed-selected-object/&amp;title={text}" rel="nofollow" title="Add to&nbsp;Wists"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/wists.png" title="Add to&nbsp;Wists" alt="Add to&nbsp;Wists" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http://www.anythingtheycando.com/blog/index.php/2009/10/05/silverlight-combobox-strong-typed-selected-object/&amp;t=Silverlight+ComboBox+Strong+Typed+Selected+Object" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://www.anythingtheycando.com/blog/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
<a style="font-size:90%;text-align: right; " title="Click me to hide the sites." href="#" onclick="$$('div.d5').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); return false;">Hide Sites</a>
</div>
</div>
<!-- Social Bookmarks END -->
<script type="text/javascript">$$('div.d5').each( function(e) { e.visualEffect('slide_up',{duration:0.5}) }); </script>]]></content:encoded>
			<wfw:commentRss>http://www.anythingtheycando.com/blog/index.php/2009/10/05/silverlight-combobox-strong-typed-selected-object/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

