<?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>Jeff Wilcox &#187; MIX</title>
	<atom:link href="http://www.jeff.wilcox.name/topics/conferences/mix/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jeff.wilcox.name</link>
	<description>Silverlight, rich client apps and web development</description>
	<lastBuildDate>Wed, 18 Aug 2010 01:33:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>&#8220;Peppermint&#8221; MIX demo sources</title>
		<link>http://www.jeff.wilcox.name/2010/03/peppermint-src/</link>
		<comments>http://www.jeff.wilcox.name/2010/03/peppermint-src/#comments</comments>
		<pubDate>Fri, 26 Mar 2010 21:30:53 +0000</pubDate>
		<dc:creator>Jeff Wilcox</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[MIX]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Windows Phone]]></category>

		<guid isPermaLink="false">http://www.jeff.wilcox.name/2010/03/peppermint-src/</guid>
		<description><![CDATA[At MIX, during my talk on unit testing Silverlight and Windows Phone applications, I demoed a simple application called ‘Peppermint’. Here’s the source; I’ll be writing up a full tutorial on Windows Phone later, so these are just ‘bleeding-edge bits’. Peppermint-Demo.zip [Zip, 1.2 MB] Silverlight: Requires Visual Studio 2010 (or express) Requires the Silverlight Toolkit [...]]]></description>
			<content:encoded><![CDATA[<p>At MIX, during my talk on <a href="http://live.visitmix.com/MIX10/Sessions/CL59">unit testing Silverlight and Windows Phone applications</a>, I demoed a simple application called ‘Peppermint’. Here’s the source; I’ll be writing up a full tutorial on Windows Phone later, so these are just ‘bleeding-edge bits’.</p>
<p><a href="http://www.jeff.wilcox.name/wp-content/uploads/2010/03/Peppermint-Demo.zip"><strong>Peppermint-Demo.zip</strong></a> [Zip, 1.2 MB]</p>
<p>Silverlight:</p>
<blockquote><p>Requires Visual Studio 2010 (or express)     <br />Requires the <a href="http://silverlight.codeplex.com/">Silverlight Toolkit</a>      <br />Requires the test framework binaries included in the zip</p>
</blockquote>
<p>Windows Phone:</p>
<blockquote><p>Requires the <a href="http://www.silverlight.net/getstarted/devices/windows-phone/">Windows Phone development tools CTP</a>      <br />Requires the test framework binaries included in the zip</p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.jeff.wilcox.name/2010/03/peppermint-src/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Unit Testing Silverlight &amp; Windows Phone Applications &#8211; talk now online</title>
		<link>http://www.jeff.wilcox.name/2010/03/mix10-testing-talk-online/</link>
		<comments>http://www.jeff.wilcox.name/2010/03/mix10-testing-talk-online/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 22:07:26 +0000</pubDate>
		<dc:creator>Jeff Wilcox</dc:creator>
				<category><![CDATA[MIX]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Silverlight Toolkit]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Windows Phone]]></category>

		<guid isPermaLink="false">http://www.jeff.wilcox.name/2010/03/mix10-testing-talk-online/</guid>
		<description><![CDATA[My MIX 10 talk, an introduction to unit testing on Silverlight and the Windows Phone, is now online for streaming and download. Thank you to everyone who attended. An early preview set of bits are online at http://jeffatmix.com/ – and the next release of the Silverlight Toolkit when Silverlight 4 ships will contain support for [...]]]></description>
			<content:encoded><![CDATA[<p>My <a href="http://live.visitmix.com/MIX10/Sessions/CL59">MIX 10 talk</a>, an introduction to unit testing on Silverlight and the Windows Phone, <a href="http://live.visitmix.com/MIX10/Sessions/CL59">is now online</a> for streaming and download. Thank you to everyone who attended.</p>
<p>An early preview set of bits are online at <a href="http://jeffatmix.com/">http://jeffatmix.com/</a> – and the next release of the Silverlight Toolkit when Silverlight 4 ships will contain support for the phone officially. Stay tuned for more.</p>
<p><a href="http://www.jeff.wilcox.name/2010/03/mix10-testing-talk-online/"><img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="SilverlightUnitTestFrameworkforWindowsPhone[1]" border="0" alt="SilverlightUnitTestFrameworkforWindowsPhone[1]" src="http://www.jeff.wilcox.name/wp-content/uploads/2010/03/SilverlightUnitTestFrameworkforWindowsPhone1_thumb.jpg" width="360" height="480" /></a> </p>
<p>Over the next few weeks, I’ll be blogging plenty on these subjects.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeff.wilcox.name/2010/03/mix10-testing-talk-online/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Ready to test those Silverlight and Windows Phone 7 Series apps?</title>
		<link>http://www.jeff.wilcox.name/2010/03/mix10-cl59-intro/</link>
		<comments>http://www.jeff.wilcox.name/2010/03/mix10-cl59-intro/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 02:54:33 +0000</pubDate>
		<dc:creator>Jeff Wilcox</dc:creator>
				<category><![CDATA[Conferences]]></category>
		<category><![CDATA[MIX]]></category>
		<category><![CDATA[Presentations]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Silverlight Toolkit]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Windows Phone]]></category>

		<guid isPermaLink="false">http://www.jeff.wilcox.name/2010/03/mix10-cl59-intro/</guid>
		<description><![CDATA[At MIX 10 this year, Tues. 3/16 at 2pm: Learn from Jeff Wilcox how to create and maintain Silverlight and Windows Phone 7 Series applications using the Silverlight Unit Test Framework.]]></description>
			<content:encoded><![CDATA[<p><img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="Mix10_LoveTheWeb_blk_240" border="0" alt="Mix10_LoveTheWeb_blk_240" align="right" src="http://www.jeff.wilcox.name/wp-content/uploads/2010/03/Mix10_LoveTheWeb_blk_240.jpg" width="240" height="320" /> That’s right, my MIX 10 session’s been announced! Come learn about testing those apps.</p>
<p><a href="http://live.visitmix.com/MIX10/Sessions/CL59"><strong>UNIT TESTING SILVERLIGHT AND WINDOWS PHONE APPLICATIONS</strong></a>    <br />Jeff Wilcox in Lagoon B (Mandalay Bay)    <br />Tuesday, March 16, 2010 2:05 PM (30 minutes)</p>
<p>Session materials, slides and code will be posted after the session at <a href="http://jeffatmix.com/">http://jeffatmix.com/</a>.</p>
<p>Synposis from <a href="http://live.visitmix.com/MIX10/Sessions/CL59">http://live.visitmix.com/MIX10/Sessions/CL59</a>:</p>
<blockquote><p>Learn how to create and maintain Silverlight and Windows Phone 7 Series applications using the Silverlight Unit Test Framework. See what tools are available to easily validate controls and application interfaces, add automatic testing to builds, and gain a solid understanding of test principles to deliver great experiences for your clients and customers.</p>
</blockquote>
<p><em>What’ll be new at MIX for testing?</em></p>
<ul>
<li>Support for testing those Windows Phone 7 Series apps!</li>
<li>New release of the Silverlight Unit Test Framework, with a modern user interface, Out of Browser support, and more.</li>
</ul>
<p>Hope to see you all in Vegas! And if not – these sessions always make it online super quick. Let me know if there’s anything in particular you want covered in the talk.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeff.wilcox.name/2010/03/mix10-cl59-intro/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>WPF Toolkit: Charting release</title>
		<link>http://www.jeff.wilcox.name/2009/06/wpf-charting-release/</link>
		<comments>http://www.jeff.wilcox.name/2009/06/wpf-charting-release/#comments</comments>
		<pubDate>Mon, 29 Jun 2009 20:04:41 +0000</pubDate>
		<dc:creator>Jeff Wilcox</dc:creator>
				<category><![CDATA[MIX]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Silverlight Toolkit]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://www.jeff.wilcox.name/?p=417</guid>
		<description><![CDATA[The Silverlight Toolkit's chart controls have made their way into the WPF Toolkit! More details on David's blog.]]></description>
			<content:encoded><![CDATA[<p>Just passing along the word, if you caught my <a href="http://www.jeff.wilcox.name/2009/03/mymix09-session/">MIX &#8217;09 talk</a> this year (or grabbed the <a href="http://www.jeff.wilcox.name/2009/04/mix09-source/">sources</a>), I demonstrated the Silverlight Toolkit&#8217;s charting components running on WPF. At the time, I mentioned that we had high hopes to bring them into WPF, and that has finally happened!</p>
<p><img alt="Charting in WPF" src="http://media.jeff.wilcox.name/blog/mix09/HousingPricesWpfApp.png" class="alignnone" width="685" height="528" /></p>
<p>More on <a href="http://blogs.msdn.com/delay/archive/2009/06/25/wpf-charting-it-s-official-june-2009-release-of-the-wpf-toolkit-is-now-available.aspx">David Anson&#8217;s blog post</a> about the WPF charting components.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeff.wilcox.name/2009/06/wpf-charting-release/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Sharing Source and Skills &#8211; Source download</title>
		<link>http://www.jeff.wilcox.name/2009/04/mix09-source/</link>
		<comments>http://www.jeff.wilcox.name/2009/04/mix09-source/#comments</comments>
		<pubDate>Fri, 03 Apr 2009 19:30:15 +0000</pubDate>
		<dc:creator>Jeff Wilcox</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[MIX]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Silverlight Toolkit]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://www.jeff.wilcox.name/?p=378</guid>
		<description><![CDATA[This post contains the sample app and control source code from Jeff Wilcox's MIX '09 talk, Sharing Skills and Code with Silverlight and WPF.]]></description>
			<content:encoded><![CDATA[<p>At the MIX &#8217;09 conference this year, I presented a talk, &#8220;<a href="http://www.jeff.wilcox.name/2009/03/mymix09-session/">Sharing Skills and Code with Silverlight &amp; WPF</a>&#8220;. Here&#8217;s the sample application and control source code that was used throughout the talk.</p>
<p>It demonstrates simple concepts for linking files from a Silverlight to WPF project, using partial classes and partial methods, preprocessor directives, and other tools to create projects that work throughout the Microsoft Client Platform.</p>
<h4>Silverlight sample application</h4>
<p><img alt="Silverlight Application" src="http://media.jeff.wilcox.name/blog/mix09/HousingPricesApp.png" title="Housing prices - Silverlight Application" width="685" height="620" /></p>
<h4>WPF sample application -100% the same source</h4>
<p><img alt="WPF Application" src="http://media.jeff.wilcox.name/blog/mix09/HousingPricesWpfApp.png" title="Housing prices - WPF Application" width="685" height="528" /></p>
<p><a href="http://media.jeff.wilcox.name/blog/mix09/SharingSkillsAndCode.zip">Download the samples</a> &#8211; Zip, 596 KB<br />
The Zip contains the following work:</p>
<ul>
<li>Toolbar control for Silverlight and WPF</li>
<li>Sample application for the Toolbox</li>
<li>Continuum application &#8211; same XAML and CS shared between a Silverlight and WPF application that uses the DataGrid, charting controls, and our custom Toolbar control</li>
<li>Value-add code, Awesome.cs, that adds some simple functionality to the WPF application only</li>
</ul>
<p>Hope this helps.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeff.wilcox.name/2009/04/mix09-source/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>The Silverlight Toolkit grows up a little with an install experience</title>
		<link>http://www.jeff.wilcox.name/2009/03/silverlight-toolkit-installer/</link>
		<comments>http://www.jeff.wilcox.name/2009/03/silverlight-toolkit-installer/#comments</comments>
		<pubDate>Mon, 23 Mar 2009 08:06:24 +0000</pubDate>
		<dc:creator>Jeff Wilcox</dc:creator>
				<category><![CDATA[Infrastructure]]></category>
		<category><![CDATA[MIX]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Silverlight Toolkit]]></category>

		<guid isPermaLink="false">http://www.jeff.wilcox.name/?p=330</guid>
		<description><![CDATA[The Silverlight Toolkit's March 2009 release is out, now with an installation experience that adds controls to the Visual Studio and Expression Blend toolbox, and improves the design experience.]]></description>
			<content:encoded><![CDATA[<p><img alt="Silverlight 3 Visual Studio Toolbox" src="http://media.jeff.wilcox.name/blog/mix09/Silverlight3Toolbox.png" title="Silverlight 3 Visual Studio Toolbox" width="240" height="1946" align="right" hspace="4" vspace="4" />The <a href="http://silverlight.codeplex.com/">Silverlight Toolkit March 2009</a> includes an install experience for the first time. Instead of having to download a Zip file with all the bits and little instruction, we now have a complete installation experience for Windows.</p>
<p>This provides a very nice experience when using Visual Studio 2008 and Expression Blend 3, since the Toolkit&#8217;s controls appear alongside all other Silverlight SDK controls now.</p>
<p>I wanted to take a few minutes and record a few questions and answers about the new experience. Let me know if there are some other questions you&#8217;d like answered.</p>
<h3>Why are there two setup downloads for the March 2009 release?</h3>
<p>The March 2009 release is available for targeting Silverlight 2 applications (recommended for most developers and designers working on current production Silverlight 2 apps), and a Silverlight 3 Beta release.</p>
<p>Since the target platform is important, you can make a choice. Of course, both the Silverlight 2 and Silverlight 3 Beta installs for the Silverlight Toolkit support side-by-side; however, the Visual Studio 2008&#8242;s Silverlight Tools do not support &#8220;multi-targeting,&#8221; so you really should decide and stick to a single target development environment for Silverlight coding today.</p>
<h3>What are the system requirements?</h3>
<p>The Silverlight Toolkit only requires a recent version of the .NET framework to install. However, for the best experience, you should have one of these development environments installed and configured:</p>
<ul>
<li>Visual Studio 2008 SP1 with the Silverlight Tools (Silverlight 2 or Silverlight 3 Beta)</li>
<li>Visual Web Developer Express with the Silverlight Tools (Silverlight 2 or Silverlight 3 Beta)</li>
<li>Expression Blend 2 SP1 with Silverlight 2</li>
<li>Expression Blend 3 MIX &#8217;09 Preview with Silverlight 3 Beta</li>
</ul>
<p>More information about these tools and downloads is available at <a href="http://silverlight.net/getstarted/silverlight3/default.aspx">http://silverlight.net/getstarted/silverlight3/default.aspx</a>.</p>
<p>You can install the Silverlight Toolkit before or after the Silverlight Tools installation.</p>
<h3>What&#8217;s with the namespace change to System.Windows.Controls?</h3>
<p>As the Silverlight Toolkit has begun delivering controls into the official Silverlight SDK, it became apparent that we should be consistent across the Silverlight platform with regard to the namespace used for the Microsoft controls. As a result, we decided to make this namespace change along with the new &#8220;.Toolkit&#8221; assembly name scheme.</p>
<h3>Where&#8217;s the AutoCompleteBox control? How about TreeView?</h3>
<p>Some of the &#8220;Stable&#8221; controls were moved to the official Microsoft Silverlight 3 Beta SDK, since they are trending towards the &#8220;Mature&#8221; quality band. As a result, the controls live in different assemblies depending on whether you are performing Silverlight 2 or Silverlight 3 Beta development.</p>
<p>In the Silverlight 2 Toolkit March 2009 release, AutoCompleteBox is in System.Windows.Controls.Input.Toolkit. TreeView is in System.Windows.Controls.Toolkit.</p>
<p>In the Silverlight 3 Toolkit March 2009 release, AutoCompleteBox is in System.Windows.Controls.Input. TreeView is in System.Windows.Controls. <i>These assemblies are part of the Silverlight 3 Beta SDK and DO NOT require installation of the Silverlight Toolkit.</i></p>
<p>The Silverlight 2 controls are compatible with Silverlight 3, so existing applications will continue to work &#8211; but we do highly recommend that you update to the appropriate Silverlight Toolkit for your target Silverlight version, since we  do add version-enhanced features, such as animation easing for the Silverlight Toolkit charts in the Silverlight 3 Beta.</p>
<p>More information about the assembly and namespace name changes is available in <a href="http://blogs.msdn.com/sburke/archive/2009/03/20/silverlight-toolkit-march-2009-release.aspx">this post by Shawn Burke</a>.</p>
<h3>What is installed with the Silverlight Toolkit now?</h3>
<p>You&#8217;ll find the same basics as before, plus some. You&#8217;ll find these in the &#8220;Microsoft Silverlight 3 Toolkit March 2009&#8243; (or similarly named folder for the Silverlight 2 version) folder in your Start Menu.<br />
<img alt="" src="http://media.jeff.wilcox.name/blog/mix09/StartMenu.png" title="Start Menu" class="alignnone" width="267" height="295" /></p>
<ul>
<li>New &#8220;Welcome&#8221; page with general information about the release, plus a link to the breaking changes and release notes for the release.</li>
<li>Links to the CodePlex site for the Toolkit, plus the Silverlight.net discussion forums</li>
<li>A link to the sample application for the Toolkit, served from the local system</li>
<li>Links to Zip files containing the control source code and/or the sample source code</li>
<li>The documentation for the Toolkit controls in CHM format. The documentation file no longer requires the &#8220;Unlock&#8221; workaround step on Windows Vista and Windows 7. Do note that the documentation for former Silverlight Toolkit controls that now appear in the Silverlight 3 SDK, such as AutoCompleteBox, are now located in the official Silverlight documentation. An <a href="http://blogs.msdn.com/silverlight_sdk/archive/2009/03/18/silverlight-3-beta-offline-msdn-docs-chm-is-available.aspx">offline download of the SDK documentation</a> is also available.</li>
</ul>
<h3>What rocked about the Zip?</h3>
<p>Well, in my mind, it was:</p>
<ul>
<li>Transparent experience</li>
<li>Nothing fancy</li>
<li>Lightweight. Nothing to install, so if you didn&#8217;t want it anymore, you could just delete the files, for instance.</li>
</ul>
<h3>What was so bad about the Zip?</h3>
<ul>
<li>No integration into Visual Studio or Expression Blend out-of-the-box, without doing some manual file copy or registry work</li>
<li>Confusing to users used to a setup experience</li>
<li>CHM documentation files downloaded in a Zip require &#8220;Unlocking&#8221; before they work. Until then, they appear broken.</li>
</ul>
<h3>Would you consider offering releases in a Zip file, optionally, still?</h3>
<p>We&#8217;re open to the idea. Especially now that there&#8217;s an Eclipse Silverlight development experience, we do need to be mindful of the need to use the releases on other platforms.</p>
<p>Since our packaging infrastructure was initially designed to output these nice .Zip files, it wouldn&#8217;t be too tough for us to get this going. We&#8217;ll see what the customer requests look like.</p>
<h3>How do I select whether I want to get the source code to the controls?</h3>
<p>There is an installation option for a feature called &#8220;Source code,&#8221; you can click on the box to the left of the item and remove the component if you would not like to install the source package.</p>
<p>If you do select this feature (per the default), a .Zip file is placed on the system that contains the source code. You can extract the zip file into a location of your selection to build or view the source.</p>
<p><img alt="Setup Options" src="http://media.jeff.wilcox.name/blog/mix09/SetupOptions.png" title="Setup Options" class="alignnone" width="509" height="398" /></p>
<p>As always, the source is also available on the <a href="http://silverlight.codeplex.com/">Silverlight Toolkit CodePlex site</a>.</p>
<h3>What about Microsoft Expression Blend integration?</h3>
<p>The Blend 3 MIX09 Preview release includes support for having the Silverlight Toolkit appear in the &#8220;Custom Controls&#8221; tab of the Asset Library. This is only available for Silverlight 3 Beta, not the Silverlight 2 / Expression Blend 2 product.</p>
<p><img alt="" src="http://media.jeff.wilcox.name/blog/mix09/Blend3Toolbox.png" title="Blend 3 Toolbox" class="alignnone" width="685" height="323" /></p>
<p>There is some really great design time support in this release. For instance, if you just drop a &#8220;Chart&#8221; control onto your Blend design canvas, you&#8217;re greeted with a chart that has simple design time data! It might look a little like one of those &#8220;the most bars anywhere&#8221; cell phone commercials, but it is very helpful for styling.</p>
<p><img alt="" src="http://media.jeff.wilcox.name/blog/mix09/ChartDesignTime.png" title="Chart design time" class="alignnone" width="685" height="347" /></p>
<h3>What powers the installer?</h3>
<p>We leveraged the open source <a href="http://wix.sourceforge.net/">Windows Installer XML (WiX) toolset</a>, an excellent and easy way to build Windows Installer packages. Kudos to Eric St. John, a Microsoft developer who contributes to WiX, for excellent advice, btw!</p>
<p><img alt="" src="http://media.jeff.wilcox.name/blog/mix09/SilverlightToolkitInstaller.png" title="Silverlight Toolkit Installer" class="alignnone" width="509" height="398" /></p>
<p>This was important to our small development team, since we wanted to spend time working on new features like <b>awesome design-time integration</b> and new controls like <b>accordion</b> instead of assigning a developer to the setup full-time.</p>
<p>Hope you like the new experience. Let us know!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeff.wilcox.name/2009/03/silverlight-toolkit-installer/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Sharing skills and code with Silverlight and WPF: MIX ‘09 session video and deck</title>
		<link>http://www.jeff.wilcox.name/2009/03/mymix09-session/</link>
		<comments>http://www.jeff.wilcox.name/2009/03/mymix09-session/#comments</comments>
		<pubDate>Mon, 23 Mar 2009 01:04:38 +0000</pubDate>
		<dc:creator>Jeff Wilcox</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[MIX]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Silverlight Toolkit]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://www.jeff.wilcox.name/?p=321</guid>
		<description><![CDATA[Check out my Sharing Skills and Code with Silverlight and WPF talk from MIX '09. Yeah, what happens in Vegas doesn't always stay there!]]></description>
			<content:encoded><![CDATA[<p>What happens in Vegas doesn’t always stay there. On Friday, I gave a talk at the MIX ‘09 conference about sharing skills and code between Silverlight and Windows Presentation Foundation (WPF).</p>
<p>One of the most important messages that I had during the talk is the flexibility that the Microsoft Client Platform enables: you can be a Rich Internet App developer today, and build an enterprise Line of Business app tomorrow, since so many of the concepts, APIs, and ideas are shared between these frameworks.</p>
<p><a href="http://media.jeff.wilcox.name/blog/mix09/MIX09_Wilcox_T87F.pptx"><strong>Download</strong> session deck</a> (4.7 MB PowerPoint 2007)<br />
<strong>View</strong> the session on the VisitMix.com site: <a title="http://videos.visitmix.com/MIX09/T87F" href="http://videos.visitmix.com/MIX09/T87F">http://videos.visitmix.com/MIX09/T87F</a></p>
<p><a href="http://videos.visitmix.com/MIX09/T87F"><img src="http://media.jeff.wilcox.name/blog/mix09/SharingSkillsThumbnail.jpg" width="685" height="385" /></a></p>
<p>Check out other awesome <a href="https://content.visitmix.com/2009/sessions/?categories=Silverlight">Silverlight</a>, <a href="https://content.visitmix.com/2009/sessions/?categories=WPF">WPF</a>, and <a href="https://content.visitmix.com/2009/sessions/?categories=Expression">Expression</a>. Hope this helps. Let me know what you think.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeff.wilcox.name/2009/03/mymix09-session/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>MIX’09 – the intersection of design &amp; technology… Silverlight Toolkit FTW!</title>
		<link>http://www.jeff.wilcox.name/2009/03/mix09-talks/</link>
		<comments>http://www.jeff.wilcox.name/2009/03/mix09-talks/#comments</comments>
		<pubDate>Sat, 07 Mar 2009 23:15:53 +0000</pubDate>
		<dc:creator>Jeff Wilcox</dc:creator>
				<category><![CDATA[MIX]]></category>
		<category><![CDATA[Presentations]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Silverlight Toolkit]]></category>

		<guid isPermaLink="false">http://www.jeff.wilcox.name/?p=298</guid>
		<description><![CDATA[If you're headed to MIX'09, there are some great talks available on the Silverlight Toolkit, Silverlight controls, rich Internet applications, and more...]]></description>
			<content:encoded><![CDATA[<p>We’re less than two weeks away from <a href="http://2009.visitmix.com/">MIX 09</a>, a fun, intimate, trendy Microsoft conference that is all about the conversations and the intersection of design and technology.</p>
<p>I’ve enjoyed the conversations that I have had with many of you in prior years, and this year won’t be any different – although the breadth of Silverlight geek knowledge I’m interested in sharing and discussing sure is growing:</p>
<ul>
<li>The Silverlight Toolkit </li>
<li>Silverlight unit testing </li>
<li>The client continuum – Silverlight and WPF source and knowledge sharing </li>
</ul>
<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="Continuum" border="0" alt="Continuum[1]" align="right" src="http://media.jeff.wilcox.name/blog/view/Continuum.png" width="200" height="198" /> Did I mention that I’ll be speaking at MIX this year?</p>
<p>The session schedule is a little fluid at times, but as of right now, MIX attendees can can come hear the talk on Friday the 20th, talk MIX09-T87F, in the San Polo 3501 room in The Venetian. I’ll be discussing the compatibility work that we’re doing to work towards a world where you can write your code once, and share it between your WPF and Silverlight projects.</p>
<blockquote>
<p><strong>Microsoft Silverlight and Windows Presentation Foundation (WPF): Sharing Skills and Code</strong></p>
<p>Friday March 20 | 2:00 PM – 3:15 PM | San Polo 3501<br />
    <br /><em>Jeff Wilcox, Silverlight Toolkit</em></p>
<p>Come get an in-depth understanding of the compatibility between WPF and Silverlight. Learn the relationship between WPF and the various subsystems of Silverlight including: XAML parsing and serialization, control instantiation, styling and templating, layout, rendering, and more. Also, learn how to build applications that fully exploit both Silverlight and WPF.</p>
</blockquote>
<p>Best of all, like other MIX conferences, these sessions should make their way online for the world to view.</p>
<p><a href="http://2009.visitmix.com/"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Visit MIX" border="0" alt="Visit MIX" src="http://media.jeff.wilcox.name/blog/view/MIX_Logo.gif" width="329" height="73" /></a> </p>
<h3>Other awesome talks</h3>
<p>There are a ton of talks scheduled, and I’ve had the honor of getting a preview of some of the content. In no particular order, I wanted to share the synopsis from a few other talks…</p>
<blockquote>
<p><strong>High-Speed RIA Development with the Microsoft Silverlight Toolkit</strong> MIX09-T15F </p>
<p><em>Shawn Oster, Silverlight Toolkit</em></p>
<p>Come learn how the Silverlight Toolkit can help jumpstart development of stunning Web experiences, and learn how to use the latest controls to create more immersive, more manageable user experiences.. Using Microsoft Visual Studio and Microsoft Expression Blend, explore advanced debugging and unit testing techniques for building components that work across Silverlight and Windows Presentation Foundation (WPF).</p>
</blockquote>
<p>Brad and Nikhil have been hard at work on some exciting new projects, and I bet these will be exciting:</p>
<blockquote>
<p><strong>Building Amazing Business Centric Applications with Microsoft Silverlight 3</strong> MIX09-T40F </p>
<p><em>Brad Abrams</em></p>
<p>This will be a great Silverlight session, but we won&#8217;t be able to release any details until after MIX09 Keynotes. Check this abstract after MIX09 Keynotes for a complete session description.</p>
</blockquote>
<p>Plus,</p>
<blockquote>
<p><strong>Building Data-Driven Applications with Microsoft Silverlight and Microsoft ASP.NET</strong> MIX09-T41F </p>
<p><em>Nikhil Kothari</em></p>
<p>This will be a great Silverlight session, but we won&#8217;t be able to release any details until after MIX09 Keynotes. Check this abstract after MIX09 Keynotes for a complete session description.</p>
</blockquote>
<p>And, if you’re looking to build out controls for Silverlight, check out Karen’s talk:</p>
<blockquote>
<p><strong>Building Microsoft Silverlight Controls MIX09-T16F</strong> </p>
<p><em>Karen Corby, Silverlight</em></p>
<p>Learn how to encapsulate structure, animation, and logic inside custom controls that handle theming, layout, validation, and data binding. Using Microsoft Visual Studio and Microsoft Expression Blend, explore advanced design, coding, debugging, and testing techniques for building components that work interchangeably in Silverlight and Windows Presentation Foundation (WPF).</p>
</blockquote>
<p>[ <a href="https://content.visitmix.com/2009/sessions/?categories=Silverlight">Full list of Silverlight-tagged sessions at MIX’09</a> ]</p>
<h3>Let’s chat!</h3>
<p>In preparation for MIX, I’m going to have to cut back my sleep a little bit to acclimate my system to the 24-7 experience that is the conference and Las Vegas.</p>
<p>If you want to chat Silverlight controls, Silverlight Toolkit, unit testing, or fine beers, you name it, I want to talk about it. <a href="http://blogs.msdn.com/sburke/">Shawn Burke</a> and <a href="http://blog.enginefour.com/">Shawn Oster</a> from the <a href="http://silverlight.codeplex.com/">Silverlight Toolkit</a> should also be in attendance, so you might even be able to corner a few of us to get a great idea of what’s going on with the Silverlight Toolkit.</p>
<h3>Get ready for some Twitter action</h3>
<p>I have a love-hate relationship with Twitter… but the good news is that I’m actively on Twitter again. It was fun participating in #mvp09 this year, and Twitter makes it easy to stay in touch, meet up, and enjoy the conference experience.</p>
<p><a href="http://twitter.com/jeffwilcox">http://twitter.com/jeffwilcox</a></p>
<p>Hope to see you there!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeff.wilcox.name/2009/03/mix09-talks/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Unit Testing with Silverlight 2</title>
		<link>http://www.jeff.wilcox.name/2008/03/silverlight2-unit-testing/</link>
		<comments>http://www.jeff.wilcox.name/2008/03/silverlight2-unit-testing/#comments</comments>
		<pubDate>Tue, 01 Apr 2008 03:00:53 +0000</pubDate>
		<dc:creator>Jeff Wilcox</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[MIX]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[popular]]></category>
		<category><![CDATA[silverlight 2]]></category>
		<category><![CDATA[unit testing]]></category>

		<guid isPermaLink="false">http://www.jeff.wilcox.name/2008/03/31/silverlight2-unit-testing/</guid>
		<description><![CDATA[9/15/08 Update: The Microsoft unit test framework now has its own MSDN Code Gallery site, where you&#8217;ll find the latest framework releases and other information. http://code.msdn.microsoft.com/silverlightut/ 1/6/09 Update: Updated templates are available that should be used for the final Silverlight 2 release. Please see the MSDN Code Gallery site and/or this post from October &#8217;08. [...]]]></description>
			<content:encoded><![CDATA[<p><em>9/15/08 Update:</em> The Microsoft unit test framework now has its <a href="http://code.msdn.microsoft.com/silverlightut/">own MSDN Code Gallery site</a>, where you&#8217;ll find the latest framework releases and other information. <a href="http://code.msdn.microsoft.com/silverlightut/"><strong><span style="color: #669966;">http://code.msdn.microsoft.com/silverlightut/</span></strong></a></p>
<p><em>1/6/09 Update:</em> Updated templates are available that should be used for the final Silverlight 2 release. Please see the MSDN Code Gallery site and/or <a href="http://www.jeff.wilcox.name/2008/10/final-ut-templates/ ">this post from October &#8217;08</a>.</p>
<p>Test-driven development is something that every developer can appreciate once they’ve tried it, and something that I’ve worked hard to enable for Silverlight with the release of the controls source.  <a href="http://weblogs.asp.net/scottgu/">Scott Guthrie</a> previously posted about the Silverlight 2 Beta 1 release, with a <a href="http://weblogs.asp.net/scottgu/archive/2008/02/22/first-look-at-silverlight-2.aspx">First Look at Silverlight 2</a> post followed by the <a href="http://weblogs.asp.net/scottgu/archive/2008/02/28/first-look-at-using-expression-blend-with-silverlight-2.aspx">First Look at Using Expression Blend with Silverlight 2</a>.  If we could take the same application from the Blend post &amp; create a set of unit tests for the components in the app, it would pay dividends once we start adding new features or working with other developers on the project.</p>
<p>If you’d like to hear more about any part of the framework, let me know in the comments and I’ll come back with that information.  Previous posts that may be helpful if you don’t have time to complete this tutorial today: a <a href="http://www.jeff.wilcox.name/2008/03/20/vid-silverlight-control-ut/">video walkthrough of the control unit tests</a>, and a quick introduction to the unit testing bits with <a href="http://www.jeff.wilcox.name/2008/03/07/silverlight-unit-testing/">download locations and installation instructions</a>.</p>
<h3><span style="text-decoration: underline;">Test support for Silverlight</span></h3>
<p>At <a href="http://sessions.visitmix.com/">MIX</a> we released source code to the controls, unit tests, and we including a unit test framework that runs in the web browser using Silverlight on the Mac and PC.  The Microsoft.Silverlight.Testing framework is simple, easy-to-use, and will give developers yet another way to increase their productivity and application quality.</p>
<p>In today&#8217;s post we’ll take our working chat interface from Scott’s last tutorial, improve its testability, and add some simple tests.  At the end we’ll have a set of cross-platform, cross-browser tests that can run everywhere:</p>
<p><img src="http://media.jeff.wilcox.name/blog/ut/1/ut1.png" alt="" /></p>
<p>The framework will be familiar to anyone who&#8217;s used the desktop unit testing tools inside Visual Studio Team Test (and also now available with Visual Studio 2008 Professional): the same <a href="http://msdn2.microsoft.com/en-us/library/microsoft.visualstudio.testtools.unittesting.assert.aspx">types</a> and <a href="http://msdn2.microsoft.com/en-us/library/microsoft.visualstudio.testtools.unittesting.aspx">attributes</a> are available for unit testing now in Silverlight.</p>
<p>Having unit tests is extremely useful because the more test scenarios you create, the more confidence you&#8217;ll have when adding features and fixing bugs, especially if you&#8217;re working with a team of developers.  Since the test projects are packaged like any other Silverlight application, there&#8217;s no special installation process to run the tests.  <em>On the Silverlight controls team we&#8217;ve built thousands of these tests!</em></p>
<p>A PDF of this tutorial is also available for <a href="http://media.jeff.wilcox.name/blog/ut/UnitTestingSilverlight2.pdf">download here</a>.</p>
<h2><strong><span style="text-decoration: underline;">Getting started with unit test projects</span></strong></h2>
<p>At the end of ScottGu’s last post, we were in Visual Studio, having just hooked up the UI data binding and wiring up the SendButton&#8217;s Click method. </p>
<p>There are now two choices we have for adding a ‘test project’ to the solution.  Option 1 will explain how the testing hooks up to run in the browser.  Option 2 (<a href="#option2">skip ahead</a>) is what you’d probably <em>actually</em> want to do.</p>
<h2><strong>Option 1: Adding a new project and manually hooking up the test framework</strong></h2>
<h3><span style="text-decoration: underline;">Add a New Silverlight Application to use as a test project</span></h3>
<p>We&#8217;ll create a new test project by selecting the File-&gt;Add-&gt;Project menu item within Visual Studio 2008.  Inside the New Project dialog, drill down into the Silverlight project types and select &#8220;Silverlight Application&#8221;:</p>
<p><img src="http://media.jeff.wilcox.name/blog/ut/1/ut2.png" alt="" /></p>
<p><em>Note: Make sure not to accidentally select the &#8220;Test&#8221; project types, since that&#8217;s for the desktop framework and not Silverlight.  Silverlight unit test projects are <span style="text-decoration: underline;">not</span> integrated with Visual Studio, so the integrated test features will not work-Silverlight unit tests run in the web browser host.</em></p>
<p>We&#8217;ll name the project &#8220;Test&#8221;, although if your solution has many discrete components, you may want to pick a better identifier.  When we click the &#8220;OK&#8221; button, Visual Studio will ask us to choose the type of application project.  To keep it simple, let&#8217;s just use the option to automatically generate an HTML test page:</p>
<p><img src="http://media.jeff.wilcox.name/blog/ut/1/ut3.png" alt="" /></p>
<p>After clicking &#8220;OK&#8221;, we&#8217;ll then have 2 projects within the ChatClient solution.  You can switch between the startup projects by right-clicking on either the ChatClient or Test project and choosing &#8220;Set StartUp Project&#8221;.  Next up, adding the unit test assemblies.</p>
<h3><span style="text-decoration: underline;">Adding references to the unit test framework</span></h3>
<p>The unit test framework is being provided as a download separate from the SDK, as part of the <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=EA93DD89-3AF2-4ACB-9CF4-BFE01B3F02D4&amp;displaylang=en">control source code package</a> that you can <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=EA93DD89-3AF2-4ACB-9CF4-BFE01B3F02D4&amp;displaylang=en">download here</a>.</p>
<p>If we place the test framework assemblies in a directory within the solution, we can then add them as references to the test project by going to the Project-&gt;Add Reference menu item and then clicking on the &#8220;Browse&#8221; tab and finding that folder:</p>
<p><img src="http://media.jeff.wilcox.name/blog/ut/1/ut4.png" alt="" /></p>
<p>Select all three of the files and click &#8220;OK&#8221;.</p>
<h3><span style="text-decoration: underline;">Wiring up the test framework</span></h3>
<p>We now need to make some quick changes to the default project to wire up the test framework:</p>
<ul>
<li>Removing Page.xaml and the Page.xaml.cs code-behind file</li>
<li>Updating App.xaml&#8217;s code-behind file to create a unit test page</li>
</ul>
<p>First, highlight the Page.xaml file within the Test project.  Go to the Edit-&gt;Delete menu item and when prompted to confirm the operation, select &#8220;OK&#8221;.</p>
<p>Your Visual Studio solution should now look like this:</p>
<p><img src="http://media.jeff.wilcox.name/blog/ut/1/ut5.png" alt="" /></p>
<p>Next, we need to replace the RootVisual with a call to create the test page.  The test page handles preparing the framework, starting up the unit test engine, and then running through test classes found and reporting results on the web page.</p>
<p>To wire up the framework,</p>
<ul>
<li>Add a reference to the namespace Microsoft.Silverlight.Testing</li>
<li>Replace the RootVisual with a call to UnitTestSystem.CreateTestPage.  The parameter to the method enables the framework&#8217;s test engine to reflect on your test assembly.</li>
</ul>
<p>Here&#8217;s the updated App.xaml.cs:</p>
<p><img src="http://media.jeff.wilcox.name/blog/ut/1/ut6.png" alt="" /></p>
<p>Now we’re ready to start adding tests.</p>
<h2><strong><a name="option2">Option 2</a>: Adding a new test project using prebuilt templates</strong></h2>
<p>It’s much easier to use Visual Studio project templates to do all the work above.  Previously posted about <a href="http://www.jeff.wilcox.name/2008/03/25/test-templates/">here</a>.</p>
<h3><span style="text-decoration: underline;">Download the templates</span></h3>
<ul>
<li><a href="http://media.jeff.wilcox.name/blog/mix08/SilverlightTestProject.zip">SilverlightTestProject.zip</a> (project template, adds a test project Silverlight application to the solution)<br />
Copy this into your “%userprofile%\Documents\Visual Studio 2008\Templates\ProjectTemplates”</li>
<li><a href="http://media.jeff.wilcox.name/blog/mix08/SilverlightTestClass.zip">SilverlightTestClass.zip</a> (item template, adds a test class to your Silverlight test project)<br />
Copy this into your “%userprofile%\Documents\Visual Studio 2008\Templates\ItemTemplates”</li>
</ul>
<h3><span style="text-decoration: underline;">Add a test project to your solution</span></h3>
<p>To create a new Silverlight test project, with your Silverlight application or class library open:</p>
<ul>
<li>Right-click on the solution</li>
<li>Select the Add-&gt;New Project menu item</li>
<li>Click on the root &#8220;Visual C#&#8221; project type node</li>
<li>Under &#8220;My Templates&#8221;, select &#8220;Silverlight Test Project&#8221;, and give your test project a name</li>
</ul>
<p><img src="http://media.jeff.wilcox.name/blog/mix08/NewProjectWithTemplate2.png" alt="" /></p>
<p>There&#8217;s a default test.cs file that you can use as a starting point, or to add additional test classes to your test project in the future, you can:</p>
<ul>
<li>Right-click on the test project</li>
<li>Select the Add-&gt;New Item menu option</li>
<li>Click on the root &#8220;Visual C#&#8221; category</li>
<li>Select &#8220;Silverlight Test Class&#8221; and provide a name for your new class</li>
</ul>
<p><img src="http://media.jeff.wilcox.name/blog/mix08/AddNewItemTemplate.png" alt="" /></p>
<h2><span style="text-decoration: underline;"><strong>Adding the first test</strong></span></h2>
<p>All that&#8217;s left for us to do now is start adding unit tests.  To verify that everything&#8217;s hooked up and we can start testing, let&#8217;s add a no-op test that will always pass.</p>
<p>Even if you haven&#8217;t used the Visual Studio unit test framework before, it&#8217;s really easy to pick up since the attributes are self describing:</p>
<ul>
<li>The metadata and assertion types can be found within the <a href="http://msdn2.microsoft.com/en-us/library/microsoft.visualstudio.testtools.unittesting.aspx">Microsoft.VisualStudio.TestTools.UnitTesting</a> namespace</li>
<li>Tests are made up of test classes and test methods</li>
</ul>
<p>Add a new class to the test project by going to the Project-&gt;Add Class menu item, provide the name &#8220;SampleTest.cs&#8221; and click &#8220;OK&#8221;.  Here&#8217;s a simple test file:</p>
<p><img src="http://media.jeff.wilcox.name/blog/ut/1/ut9.png" alt="" /></p>
<p>Although we&#8217;re building a C# test project today, here&#8217;s what the same test would look like in Visual Basic:</p>
<p><img src="http://media.jeff.wilcox.name/blog/ut/1/ut10.png" alt="" /></p>
<h3><span style="text-decoration: underline;">Run the unit tests</span></h3>
<p>To run the test project, make sure that it is set as the StartUp project by going to the Project-&gt;Set as StartUp Project menu item.  Then, simply press F5 to start debugging (and your web browser).</p>
<p>Since this is a test without any Silverlight controls or interface, nothing is displayed on the plugin&#8217;s surface.  Only the test log, created by the HTML DOM bridge feature in Silverlight 2, is displayed.  The log shows the test classes and methods that run, any failures, and a clear indication of the number of tests that ran:</p>
<p><img src="http://media.jeff.wilcox.name/blog/ut/1/ut11.png" alt="" /></p>
<h2><strong><span style="text-decoration: underline;">API Unit Tests</span></strong></h2>
<p>Now that we know how to prepare a test project, add test classes, and run the tests, we can add some useful tests.  A well-designed application might follow a Model-View pattern that decouples the UI.  Not only does this make development easier, but using this common pattern will make our application easier to test.</p>
<p>Thankfully our chat client that we built previously did make use of data binding to abstract away the underlying application state from the user interface.</p>
<h3><span style="text-decoration: underline;">Testing our application code</span></h3>
<p>The first test we created didn&#8217;t actually exercise any of our application&#8217;s components and always passed.  Let&#8217;s go ahead and delete the SampleTest.cs file by highlighting it, right-clicking and choosing the &#8220;Delete&#8221; menu option, and then confirming the deletion.</p>
<p>To get started we&#8217;ll need to add a reference to the app project so that the types are available to the test code.  Select the &#8216;Test&#8217; project in Visual Studio, navigate to the Project-&gt;Add Reference menu item, and then click the Projects tab.  Select the ChatClient and click the &#8220;OK&#8221; button:</p>
<p><img src="http://media.jeff.wilcox.name/blog/ut/1/ut12.png" alt="" /></p>
<h3><span style="text-decoration: underline;">Testing our ChatSession class</span></h3>
<p>For our first &#8220;real&#8221; test, let&#8217;s create a new test class titled &#8220;ChatSessionTest.cs&#8221; within the test project.  ChatSession is an interesting type because it implements the INotifyPropertyChanged interface and contains an ObservableCollection.  Here&#8217;s a snippet of these declarations from the code:</p>
<p><img src="http://media.jeff.wilcox.name/blog/ut/1/ut13.png" alt="" /></p>
<p>Since the ChatSession doesn&#8217;t need to know anything about the types that are subscribing to changes notices through the MessageHistory collection, it enforces the Model-View separation and means that we can add a unit test that verifies that the ObservableCollection is properly firing events.</p>
<p>Go ahead and add a new unit test: create a new class inside the Test project named ChatSessionTest.  We&#8217;ll then decorate the ChatSessionTest.cs file by importing the unit test metadata namespace, and also the namespace for the chat application:</p>
<p><img src="http://media.jeff.wilcox.name/blog/ut/1/ut14.png" alt="" /></p>
<p><strong><span style="text-decoration: underline;">Performing Negative Testing</span></strong></p>
<p>You can use the ExpectedExceptionAttribute to indicate to the unit test runtime that an Exception should be thrown, and that the test is considered to pass if the type is equal to the type provided in metadata.  This is handy to add unit tests to verify your assumptions and how your components react to unexpected data.</p>
<p>Let&#8217;s go ahead and use this to add a test called &#8220;NullInstance&#8221; whose purpose is to try reading a property from a null instance of ChatSession, and verify that the NullReferenceException is thrown by the CLR:</p>
<p><img src="http://media.jeff.wilcox.name/blog/ut/1/ut15.png" alt="" /></p>
<p>If we go ahead and run the tests now by pressing F5, we&#8217;ll be greeted by the bright green &#8220;success&#8221; indicator in the log.</p>
<p><strong><span style="text-decoration: underline;">Testing the designer data</span></strong></p>
<p>While we were working with Expression Blend before, there was a set of sample data that helped the design-time experience by showing a preview with some fake data. </p>
<p>Since the method which adds this fake data to a ChatSession instance is a private method, and we want designers to have a consistent experience while working in their design tools, it only makes sense that we should probably add some test coverage here.  In order to verify this data, we&#8217;ll need to make the chat client a little easier to test first – this is one of those sticky test issues that is less than ideal, especially since Silverlight client code is ‘transparent,’ and so private reflection isn’t available.</p>
<p>To do our testing, we have to use the <a href="http://msdn2.microsoft.com/en-us/library/system.runtime.compilerservices.internalsvisibletoattribute.aspx">InternalsVisibleTo</a> attribute to allow our test assembly to view internal types and methods of the ChatClient assembly.  Within the ChatClient project, open the &#8220;Properties&#8221; folder and select the AssemblyInfo.cs file.  If the file doesn&#8217;t exist, simply add a new code file.  At a minimum, make sure to add the InternalsVisibleTo declaration.   The parameter to the attribute is the name of your test assembly-only that assembly will be able to access the internal members of ChatClient.</p>
<p><img src="http://media.jeff.wilcox.name/blog/ut/1/ut16.png" alt="" /></p>
<p>Then, open up the ChatSession.cs file and add the keyword &#8220;internal&#8221; to the method called PopulateDummyData.  This will change the method from being private to internal:</p>
<p><img src="http://media.jeff.wilcox.name/blog/ut/1/ut17.png" alt="" /></p>
<p>Now, jump back to our ChatSessionTest and add a test method that creates a new chat session instance, populates the designer data by calling the internal PopulateWithDummyData method (which is now accessible to our test code), and then performs some validation:</p>
<p><img src="http://media.jeff.wilcox.name/blog/ut/1/ut18.png" alt="" /></p>
<p>Inside this test, we&#8217;ve used some new functionality: the Description attribute acts like a comment that can help with analyzing any test failures in the future, and we&#8217;re also using the CollectionAssert verification routines.</p>
<p><strong><span style="text-decoration: underline;">Testing the CollectionChanged event</span></strong></p>
<p>For good measure, let&#8217;s add one more test: let&#8217;s make sure that the ObservableCollection is actually observing:</p>
<p><img src="http://media.jeff.wilcox.name/blog/ut/1/ut19.png" alt="" /></p>
<p>We have a lot going on here, but it&#8217;s easy to break down:</p>
<ul>
<li>a new ChatSession instance is created</li>
<li>a local boolean is created to track whether our event listener has been called successfully</li>
<li>assertions have been added in for robustness. </li>
<li>the SendMessage method on the ChatSession instance is called, which should immediately fire the CollectionChanged event and call the delegate that we wired up to the change event.</li>
</ul>
<p>To make sure all the tests are passing before continuing, build the project and press <strong>F5</strong> to run the tests:</p>
<p><img src="http://media.jeff.wilcox.name/blog/ut/1/ut20.png" alt="" /></p>
<p>Surprisingly, we have a unit test failure! The log now has a summary of the failures (this is useful if running thousands of tests), and the failing method has some exception information.</p>
<p>Some quick analysis will show us that inside ChatSession.cs&#8217;s ConnectWithRemoteUser method, we&#8217;re assuming that the PropertyChanged event handler is not null:</p>
<p><img src="http://media.jeff.wilcox.name/blog/ut/1/ut21.png" alt="" /></p>
<p>The fix is to encase the event handler calls with a check for null:</p>
<p><img src="http://media.jeff.wilcox.name/blog/ut/1/ut22.png" alt="" /></p>
<p>After marking the fix, a quick <strong>F5</strong> run of the tests will confirm our fix:</p>
<p><img src="http://media.jeff.wilcox.name/blog/ut/1/ut24.png" alt="" /></p>
<p>Now we have some good API tests that are well suited for testing Silverlight class library projects, including validating data structures and business objects.  Having a large suite of such tests will give us a lot more confidence when we add the complexity of the user interface into the equation.</p>
<h2><strong><span style="text-decoration: underline;">Simple UI Tests</span></strong></h2>
<p>Beyond API tests, you can also build tests that simulate user activity by calling methods that glue together your interface with your application logic.  You can examine the visual tree, modify control properties, and perform a number of useful tests with your application code. </p>
<p>Although we aren&#8217;t looking to simulate mouse events or key presses, we can still validate a large set of the functionality in our chat app by programming against the Page type defined in ChatClient.</p>
<h3><span style="text-decoration: underline;">Moving our resources into Page.xaml</span></h3>
<p>Since we defined a number of application resources inside the App.xaml file for the chat client, these key resources that define the history view and send button won&#8217;t be available to our test application (they&#8217;re separate <em>apps</em>).</p>
<p>To demonstrate testing our ChatClient’s Page, which makes up the bulk of our ‘app’, we&#8217;ll need to move the resources from App.xaml to Page.xaml inside the chat client project.  This is actually extremely easy to do using Expression Blend (or manually, using the XAML text editor in Visual Studio and some cut-and-paste).</p>
<p>We should open up Expression Blend 2.5 March 2008 Preview again and open our ChatClient solution.  Inside, we can double-click on Page.xaml to open that view again. The first thing you&#8217;ll notice is that the test project is also now available inside Expression Blend:</p>
<p><img src="http://media.jeff.wilcox.name/blog/ut/1/ut25.png" alt="" /></p>
<p>If we wanted to run the tests right now, we could right-click on the test project, set is as the Startup Project, and then if we went to the Project-&gt;Test Solution menu item (or pressed <strong>F5</strong>), all of our unit tests would run without us having to be in Visual Studio, a good time saver.</p>
<p>To move the two application resources from the application level to the page level, we need to click on the Resources tab in the upper right corner of Blend.  Then, expand both the App.xaml and Page.xaml elements so that we can see all of the available resources:</p>
<p><img src="http://media.jeff.wilcox.name/blog/ut/1/ut26.png" alt="" /></p>
<p>Now we just have to select each resource individually and drag them into the Page.xaml area.</p>
<p>The resources should now look like this:</p>
<p><img src="http://media.jeff.wilcox.name/blog/ut/1/ut27.png" alt="" /></p>
<p>Go ahead and exit Blend now, saving your changes to App.xaml and Page.xaml.</p>
<h3><span style="text-decoration: underline;">Creating a test class to test our UI</span></h3>
<p>The last thing to do now is create a few tests to actually exercise our application as our end users will.  Since the Silverlight test project is actually just another Silverlight application, we don&#8217;t have the ability to simulate user-initiated actions (no fancy UI automation here), such as mouse clicks and key presses.  What we can do, however, is test: that the code that wires up our button events works, that the visual tree is updated, and that the data source is reflecting the expected set of data.</p>
<p>The first thing we need to do is create a new test class.  With Visual Studio open and the test project highlighted, select the Project-&gt;Add Class menu item, give the new class the name &#8220;ClientTest.cs&#8221;, and then press &#8220;OK&#8221;.</p>
<p><strong><span style="text-decoration: underline;">Understanding the SilverlightTest base class</span></strong></p>
<p>If you&#8217;re authoring Silverlight-specific tests and would like the ability to write much more advanced tests, you can inherit from the base class SilverlightTest, which is in the Microsoft.Silverlight.Testing namespace.</p>
<p>The base class provides support for interacting with the root visual and HTML DOM bridge.  Additionally, the base class defines a number of helper methods that can be used in conjunction with the [Asynchronous] attribute to create tests that run beyond the scope of the test method, until the TestComplete method is called.  Such tests are beyond the scope of what I&#8217;d like to present in this tutorial, but you could use these methods to verify network requests, background worker events, and other interesting scenarios.</p>
<p>In a future blog post I’ll jump into some of the advanced functionality, including the ‘Asynchronous’ test concept, so subscribe to my blog if you haven’t already!</p>
<p>To prepare to use this base class with our ClientTest, we need to:</p>
<ul>
<li>Add a using statement for Microsoft.Silverlight.Testing</li>
<li>Add a using statement for Microsoft.VisualStudio.TestTools.UnitTesting</li>
<li>Add a using statement for ChatClient</li>
<li>Inherit from the SilverlightTest base class and mark our class as a test</li>
</ul>
<p><strong><span style="text-decoration: underline;">Add our first interface test</span></strong></p>
<p>Our test class should also be customized for testing our application page, so we need to add a private member variable to save our current instance of the ChatClient&#8217;s Page type. </p>
<p>To make testing many scenarios easy, we&#8217;ll create a TestInitialize method that will be called before each TestMethod.  Inside the initialization routine, we&#8217;ll use some of the functionality that the SilverlightTest base class exposes to interact with the TestSurface.  This is a special type created specifically for this kind of testing: if you access the TestSurface in a test, the contents of the TestSurface (which is a Grid) will be cleared before the next test method runs.  This saves you from having to write code to cleanup temporary visuals used in tests. </p>
<p>We&#8217;ll use TestSurface to add a new instance of our Page before each test. Let&#8217;s have a look at our initial work on ClientTest:</p>
<p><img src="http://media.jeff.wilcox.name/blog/ut/1/ut28.png" alt="" /></p>
<p>And so next we can add a test method to verify that the object has a width greater than zero:</p>
<p><img src="http://media.jeff.wilcox.name/blog/ut/1/ut29.png" alt="" /></p>
<p>If you instead wanted to test a fixed width, and validate that the actual width is applied after the layout is updated, then you could use a test like this:</p>
<p><img src="http://media.jeff.wilcox.name/blog/ut/1/ut30.png" alt="" /></p>
<p>For now let&#8217;s just keep the DisplayDefaultSize test.  If we go ahead and run the tests right now, we&#8217;ll see the chat application popup for a very brief second before being removed from the TestSurface.</p>
<p><strong><span style="text-decoration: underline;">Add an interface test that simulates sending messages using the TextBox:</span></strong></p>
<p>The most interesting thing that we can test is that when a user enters text into the TextBox and then clicks the button, that the message is reflected in the data source and is displayed correctly.  To do this, we need to:</p>
<ul>
<li>Set the MessageBox&#8217;s Text value to represent the user&#8217;s chat string</li>
<li>Simulate the Button&#8217;s Click event by calling our underlying SendButton_Click method inside Page.xaml.cs</li>
<li>Send some messages</li>
<li>Verify the data source</li>
</ul>
<p>Optionally, you could also spend time to jump into the visual tree and verify the various control values.</p>
<p>This is pretty straightforward.  To call the SendButton_Click method we need to make it an internal method, so go back into Page.xaml.cs for the chat application and make that change:</p>
<p><img src="http://media.jeff.wilcox.name/blog/ut/1/ut31.png" alt="" /></p>
<p>Next, back inside our ClientTest.cs file, let&#8217;s add a helper method called SendMessage that works with the text box and calls the SendButton_Click method.  Then we can write a quick string of calls to SendMessage and then verify the result in the data source:</p>
<p><img src="http://media.jeff.wilcox.name/blog/ut/1/ut32.png" alt="" /></p>
<p>That&#8217;s it!  We now have an end-to-end test that sends messages within the app.  To perform some final testing, we could either press F5 to debug and run the test project, or navigate to the test project&#8217;s page with another browser such as Firefox or Safari.  On my machine the test page for the test project is located in &#8220;C:\Silverlight2\ChatClient\Test\ClientBin\TestPage.html&#8221;.</p>
<p>The good and bad news is that if we run these tests, they happen extremely fast.  You can efficiently easily run thousands of tests using this simple in-browser test experience.  Here&#8217;s what it would look like if we froze the screen right when the SendManyMessages test ran on my Mac Pro:</p>
<p><img src="http://media.jeff.wilcox.name/blog/ut/1/ut1.png" alt="" /></p>
<p>There&#8217;s a lot of useful functionality in the unit test framework, including the same metadata and assertions as the desktop&#8217;s.  I&#8217;ll be including more information about this framework on my blog.</p>
<h2><strong><span style="text-decoration: underline;">Summary</span></strong></h2>
<p>By creating and running unit tests inside the web browser, you&#8217;ve now learned another way to build solid, usable, testable applications using Silverlight 2 Beta 1.  Having this unit test capability available to the community is important, and I hope that you&#8217;ll see great use for this while developing your applications.  The Microsoft.Silverlight.Testing framework is simple, easy-to-use and will give developers yet another way to increase their productivity and application quality.</p>
<p>Since simple unit tests are source-compatible with the desktop unit test framework in Visual Studio, it will be easy to move existing desktop developers onto Silverlight application work.  Kudos to the Visual Studio Team Test team who created a rock-solid unit test foundation, having the same capability here for Silverlight is key: I’ve been able to move many of my class libraries to Silverlight and keep the same exact unit test source that was written for the unit test framework in VS.</p>
<p>If you haven&#8217;t had experience with this great unit test framework before, you&#8217;ll be able to take that metadata knowledge back to your desktop developers as well.</p>
<p><em>Hope all of you that are test-driven development fans find this a good start to bringing that to your Silverlight work,<br />
Jeff Wilcox</em></p>
<h3><span style="text-decoration: underline;">p.s. Feedback</span></h3>
<p>I’m definitely interested to know if you’re able to make use of this framework, so please use this post to discuss the framework at length!</p>
<p>A few things to call out that are known issues or differences: data-driven tests aren’t available in Silverlight, there’s no direct Visual Studio intergration (the “Create Unit Tests” feature shouldn’t be used), negative testing with ExpectedExceptionAttribute needs a fix at the framework level, and without private reflection in the Silverlight product for apps, the ability to get to private types like you can in the full desktop unit test framework isn’t there today.</p>
<p>I’ve already received some great feedback and as a result of that, am going to look into what we can do to polish the framework further.  We’ll also look into what it would take to release the source code of the framework itself, since that’d be much more helpful to folks building this into their existing test infrastructure – Reflector only gets you so far.</p>
<p><strong><span style="text-decoration: underline;">PDF Available</span></strong><br />
Download a <a href="http://media.jeff.wilcox.name/blog/ut/UnitTestingSilverlight2.pdf">PDF</a> of this tutorial <a href="http://media.jeff.wilcox.name/blog/ut/UnitTestingSilverlight2.pdf">here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeff.wilcox.name/2008/03/silverlight2-unit-testing/feed/</wfw:commentRss>
		<slash:comments>70</slash:comments>
		</item>
		<item>
		<title>Video walkthrough of the Silverlight 2 control unit tests</title>
		<link>http://www.jeff.wilcox.name/2008/03/vid-silverlight-control-ut/</link>
		<comments>http://www.jeff.wilcox.name/2008/03/vid-silverlight-control-ut/#comments</comments>
		<pubDate>Fri, 21 Mar 2008 02:09:16 +0000</pubDate>
		<dc:creator>Jeff Wilcox</dc:creator>
				<category><![CDATA[MIX]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://www.jeff.wilcox.name/2008/03/20/videosilverlightunittesting1/</guid>
		<description><![CDATA[A few weeks back at MIX’08 I took along my $150 Aiptek A-HD camera with the intention of shooting some quick video footage while at MIX and using it to start learning Expression Encoder.  It was a success!  Instead of a thorough trip report, I’m going to walk you through the control source download quickly. [...]]]></description>
			<content:encoded><![CDATA[<p>A few weeks back at <a href="http://sessions.visitmix.com/">MIX’08</a> I took along my <a href="http://www.amazon.com/gp/product/B000UO796Y?ie=UTF8&amp;tag=jwilcoxblog-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B000UO796Y">$150 Aiptek A-HD camera</a> with the intention of shooting some quick video footage while at MIX and using it to start learning Expression Encoder.  It was a success!  Instead of a thorough trip report, I’m going to walk you through the <a href="http://www.microsoft.com/downloads/details.aspx?familyid=EA93DD89-3AF2-4ACB-9CF4-BFE01B3F02D4&amp;displaylang=en">control source download</a> quickly.</p>
<p><object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="640" height="380"><param name="source" value="http://media.jeff.wilcox.name/video/MediaPlayerTemplate.xap" /><param name="initparams" value="autoplay=False,autoload=False,enablecaptions=False,muted=False,stretchmode=0,<br />
displaytimecode=False,playlist=&lt;playList&gt;&lt;playListItems&gt;&lt;playListItem title=&quot;Silverlight unit testing MIX 08 video&quot; description=&quot;&quot; mediaSource=&quot;http://silverlight.services.live.com/56373/Silverlight%20Unit%20Testing%20-%20MIX'08/video.wmv&quot; adaptiveStreaming=&quot;False&quot; thumbSource=&quot;http://media.jeff.wilcox.name/video/ut_frame.jpg&quot; frameRate=&quot;30.00003000003&quot; width=&quot;640&quot; height=&quot;380&quot; &gt;&lt;/playListItem&gt;&lt;/playListItems&gt;&lt;/playList&gt;" />Your news reader may not permit Silverlight content. Please click-through to the original post to see this plugin. 	You may also not have Silverlight 2 installed on your machine:<br /><a href="http://go2.microsoft.com/fwlink/?LinkID=124807" style="text-decoration: none;"><img src="http://go2.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none" /></a></object></p>
<p>In this video I introduce the control source and unit test announcement from MIX, and then walk you through:</p>
<ul>
<li>exploring the Silverlight 2 Beta 1 control source code, unit test and unit test framework <a href="http://www.microsoft.com/downloads/details.aspx?familyid=EA93DD89-3AF2-4ACB-9CF4-BFE01B3F02D4&amp;displaylang=en">download</a></li>
<li>using Visual Studio 2008 to run the control unit tests</li>
<li>adding the Exclusive attribute to narrow the test(s) that run in the browser when analyzing tests</li>
<li>running the tests in Firefox</li>
<li>running the tests in Expression Blend 2.5</li>
</ul>
<p>I hope you find this useful, I’m planning on screencasting a more in-depth look at the test framework in the future.  I’ll try and enunciate a little better next time, the audio could have been clearer.</p>
<p>Speaking of video, don’t forget that all of the sessions for the MIX conference are online at <a href="http://sessions.visitmix.com/">http://sessions.visitmix.com/</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeff.wilcox.name/2008/03/vid-silverlight-control-ut/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
<enclosure url="http://silverlight.services.live.com/56373/Silverlight%20Unit%20Testing%20-%20MIX'08/video.wmv" length="53639597" type="video/x-ms-wmv" />
		</item>
		<item>
		<title>Silverlight 2: Introducing Microsoft.Silverlight.Testing</title>
		<link>http://www.jeff.wilcox.name/2008/03/silverlight-unit-testing/</link>
		<comments>http://www.jeff.wilcox.name/2008/03/silverlight-unit-testing/#comments</comments>
		<pubDate>Sat, 08 Mar 2008 00:32:31 +0000</pubDate>
		<dc:creator>Jeff Wilcox</dc:creator>
				<category><![CDATA[MIX]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Testing]]></category>

		<guid isPermaLink="false">http://www.jeff.wilcox.name/2008/03/07/silverlight-2-introducing-microsoftsilverlighttesting/</guid>
		<description><![CDATA[As announced during the MIX&#8217;08 keynote by Scott Guthrie, not only are we making available the source code of the Silverlight controls, but we&#8217;re also releasing nearly 2,000 unit tests and a unit test framework for the Silverlight runtime.  This is a project I&#8217;ve been working on for some time now, so I&#8217;m planning on [...]]]></description>
			<content:encoded><![CDATA[<p>As announced during the MIX&#8217;08 keynote by Scott Guthrie, not only are we making available the <a href="http://www.jeff.wilcox.name/2008/03/05/silverlight-controls-source-code/">source code of the Silverlight controls</a>, but we&#8217;re also releasing nearly 2,000 unit tests and a unit test framework for the Silverlight runtime.  This is a project I&#8217;ve been working on for some time now, so I&#8217;m planning on a series of in-depth tutorials about this exciting ability.  In the meantime, I&#8217;ll send you towards some other links and a quick preview&#8230;</p>
<p>It is my hope that this provides the ability for teams to do some level of test-driven development using Silverlight, and so I&#8217;m very interested in receiving your feedback on how it works.  We&#8217;ve had pretty good success using this framework for developing the managed Silverlight controls that were released in the <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=4E03409A-77F3-413F-B108-1243C243C4FE&amp;displaylang=en">Silverlight 2 Beta 1 SDK</a> at MIX.</p>
<p><strong>Exploring the control unit tests:</strong><br />
<a href="http://blogs.msdn.com/sburke/archive/2008/03/05/silverlight-2-beta-1-controls-available-including-source-and-unit-tests.aspx">Shawn Burke gives an overview</a> of the control source code, unit tests and framework<br />
<em>3/20 Update</em>: I&#8217;ve also added a <a href="http://www.jeff.wilcox.name/2008/03/20/vid-silverlight-control-ut/">quick video post</a> with a screencast that shows the control tests running.</p>
<p><strong>Using the unit test framework:<br />
</strong>Coming soon <img src='http://www.jeff.wilcox.name/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> , once I&#8217;m back from MIX&#8217;08 I&#8217;ll get the tutorial posts off to a start &#8211; <a href="http://feeds.feedburner.com/JeffWilcox">subscribe to my feed</a>!</p>
<p><img src="http://media.jeff.wilcox.name/blog/mix08/SilverlightTesting.png" /> <br />
<em>Microsoft.Silverlight.Testing running DataGrid control tests</em></p>
<h3><strong>Built on the power of the Visual Studio Team Test unit test framework</strong></h3>
<p>If you&#8217;ve used the unit test framework built into the Visual Studio Team Test editions (now available with Visual Studio 2008 Professional as well), then you know just how easy and powerful the framework is. </p>
<p>You&#8217;ll find that pretty much everything in the desktop unit test framework is available here when it comes to metadata and attributes.  There&#8217;s no data-driven tests or advanced host attribute support, but we&#8217;ve also added some helpful attributes such as &#8220;Exclusive&#8221; attribute (that lives in the Microsoft.Silverlight.Testing namespace), since there&#8217;s no Visual Studio integration with the framework.</p>
<p>Hopefully this will also help you to get more familiar with the Visual Studio unit test framework so that you can use it for your desktop apps, since the metadata and assertion class knowledge transfers perfectly.</p>
<p>If you&#8217;re new to the unit test framework, check out the MSDN documentation on the Assert, StringAssert, and CollectionAssert classes, plus of course the attribute metadata.</p>
<p>MSDN Library Documentation: <a href="http://msdn2.microsoft.com/en-us/library/microsoft.visualstudio.testtools.unittesting.aspx">Microsoft.VisualStudio.TestTools.UnitTesting</a></p>
<p><img src="http://media.jeff.wilcox.name/blog/mix08/ShoppingTest.png" /><br />
<em>A sample testcase that uses the unit test framework&#8217;s attributes; this particular test source code can run using Microsoft.Silverlight.Testing or the desktop Visual Studio Team Test unit test framework, if the references for the project are updated.</em></p>
<h3><strong>Downloading the framework</strong></h3>
<p>To get started, <a href="http://www.microsoft.com/downloads/details.aspx?familyid=EA93DD89-3AF2-4ACB-9CF4-BFE01B3F02D4&amp;displaylang=en">download</a> the <a href="http://www.microsoft.com/downloads/details.aspx?familyid=EA93DD89-3AF2-4ACB-9CF4-BFE01B3F02D4&amp;displaylang=en">Silverlight 2 Beta 1 controls source code</a>.  Inside the self-extracted Zip file, there is a subdirectory called &#8216;bin&#8217; that contains the three assemblies that make up the unit test framework:</p>
<table width="100%" cellPadding="2" cellSpacing="0" border="0">
<tr>
<td width="396" vAlign="top"><strong>Assembly</strong></td>
<td width="485" vAlign="top"><strong>Purpose</strong></td>
</tr>
<tr>
<td width="396" vAlign="top">Microsoft.Silverlight.Testing</td>
<td width="485" vAlign="top">Unit test framework</td>
</tr>
<tr>
<td width="396" vAlign="top">Microsoft.Silverlight.Testing.Framework</td>
<td width="485" vAlign="top">Base classes and interfaces for test harnesses</td>
</tr>
<tr>
<td width="396" vAlign="top">Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll</td>
<td width="485" vAlign="top">Visual Studio Team Test metadata built against the Silverlight libraries</td>
</tr>
</table>
<p>These are typical Silverlight class library assemblies, so you can reference them in your projects like any other library.</p>
<h3><strong>Installing the framework</strong></h3>
<p>To make it easier to add the test framework assemblies as references&#8217; to your projects, I&#8217;d recommend copying the framework assemblies into the client libraries directory where the SDK installs the controls and other bits.</p>
<p>To do this, simply copy the three into &#8220;%programfiles%\Microsoft SDKs\Silverlight\v2.0\Libraries\Client&#8221;.  The next time you use Visual Studio&#8217;s Add Reference window from within a Silverlight application project, you&#8217;ll see the assemblies present:</p>
<p><a href="http://www.jeff.wilcox.name/wp-content/uploads/2008/03/add-reference-2.png"><img height="438" width="514" src="http://www.jeff.wilcox.name/wp-content/uploads/2008/03/add-reference-2-thumb.png" alt="Add Reference (2)" border="0" /></a></p>
<p>Please note that the unit test framework isn&#8217;t part of the SDK, but this is a convenient place to store them.</p>
<h3><strong>Helpful C# test project templates</strong></h3>
<p>Although it&#8217;s pretty easy to tie into the framework by adding a new Silverlight application project to your solution, that requires a few hookup details, such as removing Page.xaml.cs, updating the root visual, and some other magic.</p>
<p>It&#8217;s much easier to instead use these helpful Visual Studio 2008 project and item templates:</p>
<ul>
<li><a href="http://media.jeff.wilcox.name/blog/mix08/SilverlightTestProject.zip">SilverlightTestProject.zip</a> (project template, adds a test project Silverlight application to the solution)<br />
Copy this into your &#8220;%userprofile%\Documents\Visual Studio 2008\Templates\ProjectTemplates&#8221;</li>
<li><a href="http://media.jeff.wilcox.name/blog/mix08/SilverlightTestClass.zip">SilverlightTestClass.zip</a> (item template, adds a test class to your Silverlight test project)<br />
Copy this into your &#8220;%userprofile%\Documents\Visual Studio 2008\Templates\ItemTemplates&#8221;</li>
</ul>
<h3><strong>Using the C# test project templates</strong></h3>
<p>To create a new Silverlight test project, with your Silverlight application or class library open:</p>
<ul>
<li>Right-click on the solution</li>
<li>Select the Add-&gt;New Project menu item</li>
<li>Click on the root &#8220;Visual C#&#8221; project type node</li>
<li>Under &#8220;My Templates&#8221;, select &#8220;Silverlight Test Project&#8221;, and give your test project a name</li>
</ul>
<p><img src="http://media.jeff.wilcox.name/blog/mix08/NewProjectWithTemplate2.png" /></p>
<p>There&#8217;s a default test.cs file that you can use as a starting point, or to add additional test classes to your test project:</p>
<ul>
<li>Right-click on the test project</li>
<li>Select the Add-&gt;New Item menu option</li>
<li>Click on the root &#8220;Visual C#&#8221; category</li>
<li>Select &#8220;Silverlight Test Class&#8221; and provide a name for your new class</li>
</ul>
<p><img src="http://media.jeff.wilcox.name/blog/mix08/AddNewItemTemplate.png" /></p>
<p>Hope you find this is pretty useful, let me know!<br />
Jeff</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeff.wilcox.name/2008/03/silverlight-unit-testing/feed/</wfw:commentRss>
		<slash:comments>28</slash:comments>
		</item>
		<item>
		<title>Silverlight 2: Updated HtmlExtensions.cs utility class</title>
		<link>http://www.jeff.wilcox.name/2008/03/silverlight2-htmlextensions/</link>
		<comments>http://www.jeff.wilcox.name/2008/03/silverlight2-htmlextensions/#comments</comments>
		<pubDate>Wed, 05 Mar 2008 22:29:27 +0000</pubDate>
		<dc:creator>Jeff Wilcox</dc:creator>
				<category><![CDATA[MIX]]></category>
		<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://www.jeff.wilcox.name/2008/03/05/silverlight2-htmlextensions/</guid>
		<description><![CDATA[I&#8217;ve gone ahead and updated the HtmlExtensions class that I previously blogged.&#160; The class is now updated to reflect the new HTML DOM bridge APIs in Silverlight 2.&#160; To be honest, I&#8217;d recommend dropping this class as a lot of its functionality (JavaScript eval, alert, and retrieving the &#60;body /&#62; element) are now available within [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve gone ahead and updated the HtmlExtensions class that I <a href="http://www.jeff.wilcox.name/2007/09/30/managed-html-extensions/">previously</a> blogged.&nbsp; The class is now updated to reflect the new HTML DOM bridge APIs in Silverlight 2.&nbsp; To be honest, I&#8217;d recommend dropping this class as a lot of its functionality (JavaScript eval, alert, and retrieving the &lt;body /&gt; element) are now available within Silverlight 2 Beta 1, which rocks!</p>
<p><strong>To use this component in your own Silverlight 2 Beta 1 project</strong>, you can grab the bits either way:<br />Download <a href="http://media.jeff.wilcox.name/blog/mix08/HtmlExtensions.cs.txt">HtmlExtensions.cs</a><br />Download <a href="http://media.jeff.wilcox.name/blog/mix08/HtmlExtensions.zip ">HtmlExtensions.dll</a> (zip, referenced component can be used by C# and VB Silverlight 2 beta 1 apps)
<p>New HTML DOM bridge APIs that relate to this, and can be used directly from the Window instance of HtmlPage: Eval, Alert, and on HtmlPage, Body:</p>
<p><img src="http://media.jeff.wilcox.name/blog/mix08/NewHtmlMethods.png"/> </p>
<p>I&#8217;m also now offering a small assembly version of this class for any Visual Basic developers to use in their application targeting Silverlight 2.</p>
<p>Hope this helps!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeff.wilcox.name/2008/03/silverlight2-htmlextensions/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Silverlight 2: MD5 hash string provider implementation</title>
		<link>http://www.jeff.wilcox.name/2008/03/silverlight-2-md5/</link>
		<comments>http://www.jeff.wilcox.name/2008/03/silverlight-2-md5/#comments</comments>
		<pubDate>Wed, 05 Mar 2008 22:04:25 +0000</pubDate>
		<dc:creator>Jeff Wilcox</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[MIX]]></category>
		<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://www.jeff.wilcox.name/2008/03/05/silverlight-2-md5-hash-string-provider-implementation/</guid>
		<description><![CDATA[The cryptography services in Silverlight today only include the SH1 algorithm.  That&#8217;s quite useful, but throughout the web there is still a significant use of the MD5 algorithm today.  This is a re-post of a managed code implementation of MD5 that has been working great for my Flickr API work. To use this component in [...]]]></description>
			<content:encoded><![CDATA[<p>The cryptography services in Silverlight today only include the SH1 algorithm.  That&#8217;s quite useful, but throughout the web there is still a significant use of the MD5 algorithm today.  This is a re-post of a managed code implementation of MD5 that has been working great for my Flickr API work.</p>
<p><strong>To use this component in your own Silverlight 2 Beta 1 project</strong>, you can grab the bits either way:<br />
Download <a href="http://media.jeff.wilcox.name/blog/mix08/Md5.cs.txt">Md5.cs</a><br />
Download <a href="http://media.jeff.wilcox.name/blog/mix08/Silverlight.Md5.zip">JeffWilcox.Md5.dll</a> (zip, referenced component can be used by C# and VB Silverlight 2 beta 1 apps)</p>
<p>The MD5 types are in the namespace JeffWilcox.Utilities.Silverlight, so that it doesn&#8217;t clash with anything.  Feel free to rename the namespace to suit your project&#8217;s needs.  The easiest way to use these bits is just to add a reference to the assembly to your project, the MD5 assembly will then be included in your finished app&#8217;s .Xap file.</p>
<p>While working on implementing the <a href="http://flickr.com/services/">Flickr web services API</a> within a .NET-enabled Silverlight sample application, I needed to use the MD5 algorithm that isn’t available within the cryptography APIs. Like many REST-based web services, the simple Flickr API uses MD5 along with a form of “signing” with a known secret.</p>
<p>The excellent MD5 implementation was created by the <a href="http://www.flowgroup.fr/en/kb/technical/md5.aspx">GL Conseil/Flow Group SAS</a>; they did this work to enable MD5 within the Compact Framework 2.0.</p>
<p>Calling the function is very simple.  In C#:</p>
<p><img src="http://media.jeff.wilcox.name/blog/mix08/MD5-CS.png" /></p>
<p>And in VB:</p>
<p><img src="http://media.jeff.wilcox.name/blog/mix08/MD5-VB.png" /> </p>
<p>Hope this helps!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeff.wilcox.name/2008/03/silverlight-2-md5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Silverlight 2: Download the source, unit tests and unit test framework</title>
		<link>http://www.jeff.wilcox.name/2008/03/silverlight-controls-source-code/</link>
		<comments>http://www.jeff.wilcox.name/2008/03/silverlight-controls-source-code/#comments</comments>
		<pubDate>Wed, 05 Mar 2008 20:08:47 +0000</pubDate>
		<dc:creator>Jeff Wilcox</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[MIX]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Testing]]></category>

		<guid isPermaLink="false">http://www.jeff.wilcox.name/2008/03/05/silverlight-2-download-the-source-unit-tests-and-unit-test-framework/</guid>
		<description><![CDATA[The download is now live for the Silverlight 2 controls source code package.  The controls are included in the Silverlight 2 SDK, but if you&#8217;re a control developer, interested to learn more about how we implemented our controls, this will serve as a great reference.  There&#8217;s also around 2,000 unit tests that target the core [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=EA93DD89-3AF2-4ACB-9CF4-BFE01B3F02D4&amp;displaylang=en">download is now live</a> for the Silverlight 2 controls source code package.  The controls are included in the Silverlight 2 SDK, but if you&#8217;re a control developer, interested to learn more about how we implemented our controls, this will serve as a great reference.  There&#8217;s also around 2,000 unit tests that target the core controls, extended controls, and even the DataGrid!</p>
<p>I&#8217;ll be posting a lot more great information about this in the coming weeks, but wanted to get the link out there!</p>
<p>The source code for the Silverlight 2 Beta 1 controls includes implementations for the following controls:</p>
<ul>
<li>Button</li>
<li>ButtonBase</li>
<li>Calendar</li>
<li>CheckBox</li>
<li>ContentControl</li>
<li>DataGrid</li>
<li>DatePicker</li>
<li>GridSplitter</li>
<li>HyperlinkButton</li>
<li>ListBox</li>
<li>RadioButton</li>
<li>RangeBase</li>
<li>RepeatButton</li>
<li>ScrollViewer</li>
<li>Slider</li>
<li>ToogleButton</li>
<li>ToolTip</li>
<li>WatermarkedTextBox</li>
</ul>
<p>Unit tests for the controls are located in respective ‘Test’ subdirectories, which use Microsoft.Silverlight.Testing.dll and related test framework binaries located in the ‘Bin’ directory.</p>
<p>For more information about Silverlight 2 Beta 1, see the <a href="http://go.microsoft.com/fwlink/?LinkID=111096&amp;clcid=0x409">Silverlight 2 SDK Beta 1</a>. To get the Silverlight 2 Beta 1 browser plug-in, go to <a href="http://go.microsoft.com/fwlink/?LinkID=101894">this page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeff.wilcox.name/2008/03/silverlight-controls-source-code/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Why I&#8217;m looking forward to MIX this year</title>
		<link>http://www.jeff.wilcox.name/2008/03/mix08-preview/</link>
		<comments>http://www.jeff.wilcox.name/2008/03/mix08-preview/#comments</comments>
		<pubDate>Sun, 02 Mar 2008 11:06:24 +0000</pubDate>
		<dc:creator>Jeff Wilcox</dc:creator>
				<category><![CDATA[MIX]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.jeff.wilcox.name/2008/03/02/why-im-looking-forward-to-mix-this-year/</guid>
		<description><![CDATA[Last year I had the opportunity to attend the MIX conference and I absolutely loved the event.  Brilliant minds from all over the web were walking the halls, the energy level was high, and I think we surprised a lot of people in a great way.  This weekend I&#8217;m packing my luggage full of gadgets, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.jeff.wilcox.name/wp-content/uploads/2008/03/vectormark-blue.png"><img height="216" width="223" src="http://www.jeff.wilcox.name/wp-content/uploads/2008/03/vectormark-blue-thumb.png" align="left" alt="vectormark_blue" border="0" style="margin: 0px 8px 0px 0px; border-width: 0px" /></a> Last year I had the opportunity to attend the MIX conference and I absolutely loved the event.  Brilliant minds from all over the web were walking the halls, the energy level was high, and I think we surprised a lot of people in a great way.  This weekend I&#8217;m packing my luggage full of gadgets, building some cool apps on my MacBook Pro, and just itching to see what people are talking about and creating at Microsoft&#8217;s <a href="http://visitmix.com/2008/default.aspx">MIX&#8217;08 Conference</a> 3/5-3/7 at the Venetian in Las Vegas.</p>
<p>There were legends in the crowd last year, from all over the web and world, and the discussions were awesome.  <a href="http://blogs.smugmug.com/don/">Don MacAskill</a> and <a href="http://www.jeff-barr.com/">Jeff Barr</a> in a web services panel; the legendary <a href="http://weblogs.asp.net/scottgu/">Scott Guthrie</a> wooing the audience with pure coder awesomeness; MySpace and Facebook threw some parties that just paled in comparison to the Silverlight party at <a href="http://www.purethenightclub.com/">PURE</a>&#8230; but that was oh so last year!</p>
<p>Since that conference, the rich client has just continued to evolve and it is obvious that there&#8217;s a lot of goodness in taking the web experience to the next level.  Every day I&#8217;m seeing more and more Flash in use across the web, so it&#8217;s a growing technology space.  The experience of using <a href="http://www.highrisehq.com/">Highrise</a> to manage tasks and projects is sweet, simple and backed by solid JavaScript and Ruby coders.  More companies are recognizing the importance of front-end engineers.  People are starting to get serious about testability.  This is a <strong>fun industry</strong> to be in.</p>
<p>Ok, so what am I looking forward to in particular?</p>
<ul>
<li><strong>Controls</strong><br />
Just look what ScottGu&#8217;s showing <a href="http://weblogs.asp.net/scottgu/archive/2008/02/22/first-look-at-silverlight-2.aspx">here</a> and <a href="http://weblogs.asp.net/scottgu/archive/2008/02/28/first-look-at-using-expression-blend-with-silverlight-2.aspx">here</a>- there&#8217;s a button. there&#8217;s a datagrid. very good!</li>
<li><strong>Testing Silverlight apps</strong><br />
Learning what designs and developers of rich client apps expect with regards to testing, testability of apps, how test-driven development can work with Silverlight, if designers would find unit tests useful, and so on&#8230;</li>
<li><strong>Learning how people are using Silverlight</strong> so that I can do a better job giving people what they expect and want in a rich client platform</li>
<li>Seeing how people are using the <strong>HTML DOM bridge</strong></li>
<li>Seeing what <a href="http://www.fluxcapacity.net/">fluxcapacity</a>&#8216;s up to</li>
<li>Networking and hearing what everyone has to say!</li>
<li>Warmer weather than Seattle&#8217;s been having</li>
</ul>
<p>Whether you&#8217;ll be in Vegas for MIX or not, drop me a line and stay in touch, I&#8217;m hoping to post quite a bit about the Silverlight 2 goodness on my blog once I have some time to stop and catch my breath.</p>
<p>See you there!</p>
<p><a href="http://www.jeff.wilcox.name/">My Blog</a> • <a href="http://twitter.com/jeffwilcox/">Twitter</a> • <a href="http://www.linkedin.com/in/jeffreywilcox">LinkedIn</a> • <a href="http://www.facebook.com/people/Jeff_Wilcox/2214354">Facebook</a> • <a href="http://www.flickr.com/photos/jeffwilcox/tags/MIX08">Flickr MIX&#8217;08 photos</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeff.wilcox.name/2008/03/mix08-preview/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
