<?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>Geert van der Cruijsen</title>
	<atom:link href="http://vdcruijsen.net/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://vdcruijsen.net</link>
	<description>a blog about Windows Phone 7 and .Net development</description>
	<lastBuildDate>Thu, 12 Apr 2012 18:45:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<meta xmlns="http://www.w3.org/1999/xhtml" name="robots" content="noindex,follow" />
		<item>
		<title>Introducing: PhoneCompare for Windows Phone 7</title>
		<link>http://vdcruijsen.net/2012/04/introducing-phonecompare-for-windows-phone-7/</link>
		<comments>http://vdcruijsen.net/2012/04/introducing-phonecompare-for-windows-phone-7/#comments</comments>
		<pubDate>Thu, 12 Apr 2012 18:45:32 +0000</pubDate>
		<dc:creator>Geert van der Cruijsen</dc:creator>
				<category><![CDATA[Geert's Projects]]></category>
		<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[PhoneCompare]]></category>
		<category><![CDATA[Windows Phone]]></category>
		<category><![CDATA[WP7]]></category>

		<guid isPermaLink="false">http://vdcruijsen.net/?p=234</guid>
		<description><![CDATA[I’ve built a new Windows Phone App that lets you compare 2 Windows Phone devices with all available specs right next to each other to see which is the best. You can also just check the specifications of one of &#8230; <a href="http://vdcruijsen.net/2012/04/introducing-phonecompare-for-windows-phone-7/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I’ve built a new Windows Phone App that lets you compare 2 Windows Phone devices with all available specs right next to each other to see which is the best. You can also just check the specifications of one of the available windows phones at this moment when you are in a heated argument with friends or colleagues again where you are not sure if that phone had a 1.4GHZ processor or a 1.5 GHZ processor.</p>
<p>My new app is called PhoneCompare and is available in all Windows Phone Marketplaces for 99 cents. you can also install a free trial that has 100% of the functionality but shows ads.</p>
<p><img src="http://vdcruijsen.net/phonecompare/images/screenshots/phonecomparepano.png" /></p>
<p>PhoneCompare has the following features:</p>
<ul>
<li>List all available Windows Phones </li>
<li>Check specifications for a single phone to see its screen size, dimensions, weight, processor, storage, memory, battery and camera. </li>
<li>Select 2 phones to compare all these specs next to each other </li>
<li>Check the specs of your current phone </li>
<li>Browse phones by brand </li>
<li>View a list of new phones that are just released or are about to get released </li>
</ul>
<p><a href="http://windowsphone.com/s?appid=b9cd55b4-3cb2-4136-b1bc-ab248a56e43d"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" border="0" src="http://vdcruijsen.net/phonecompare/images/download.png" /></a></p>
<p>My plans for the future are to also make it possible to rate phones so you can see which phones are rated the highest and I also want to store most used phones by visitors of the app. All this in version 1.1 <img src='http://vdcruijsen.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; border-top: 0px; border-right: 0px; padding-top: 0px" border="0" src="http://vdcruijsen.net/phonecompare/images/screenshots/1.png" width="190" height="316" />&#160;<img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; border-top: 0px; border-right: 0px; padding-top: 0px" border="0" src="http://vdcruijsen.net/phonecompare/images/screenshots/2.png" width="190" height="316" />&#160;<img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; border-top: 0px; border-right: 0px; padding-top: 0px" border="0" src="http://vdcruijsen.net/phonecompare/images/screenshots/3.png" width="190" height="316" /></p>
<p><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; border-top: 0px; border-right: 0px; padding-top: 0px" border="0" src="http://vdcruijsen.net/phonecompare/images/screenshots/4.png" width="190" height="316" />&#160;<img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; border-top: 0px; border-right: 0px; padding-top: 0px" border="0" src="http://vdcruijsen.net/phonecompare/images/screenshots/5.png" width="190" height="316" />&#160;<img src="http://vdcruijsen.net/phonecompare/images/screenshots/6.png" width="190" height="316" /></p>
<p><img src="http://vdcruijsen.net/phonecompare/images/screenshots/7.png" width="190" height="316" />&#160;<img src="http://vdcruijsen.net/phonecompare/images/screenshots/8.png" width="190" height="316" /></p>
<p>If you have any feedback on this app please let me know by a comment on this post, by sending me a tweet <a href="http://twitter.com/geertvdc">@geertvdc</a> or by rating or using the in app mail function</p>
<p>Enjoy!</p>
<p>Geert van der Cruijsen</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Introducing%3A+PhoneCompare+for+Windows+Phone+7&amp;u=http%3A%2F%2Fvdcruijsen.net%2F2012%2F04%2Fintroducing-phonecompare-for-windows-phone-7%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Introducing%3A+PhoneCompare+for+Windows+Phone+7&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2012%2F04%2Fintroducing-phonecompare-for-windows-phone-7%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Introducing%3A+PhoneCompare+for+Windows+Phone+7&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2012%2F04%2Fintroducing-phonecompare-for-windows-phone-7%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fvdcruijsen.net%2F2012%2F04%2Fintroducing-phonecompare-for-windows-phone-7%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://vdcruijsen.net/2012/04/introducing-phonecompare-for-windows-phone-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows Phone developer introduction sessions at UTwente &amp; TU/E</title>
		<link>http://vdcruijsen.net/2012/04/windows-phone-developer-introduction-sessions-at-utwente-tue/</link>
		<comments>http://vdcruijsen.net/2012/04/windows-phone-developer-introduction-sessions-at-utwente-tue/#comments</comments>
		<pubDate>Tue, 03 Apr 2012 07:21:03 +0000</pubDate>
		<dc:creator>Geert van der Cruijsen</dc:creator>
				<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[Windows Phone]]></category>
		<category><![CDATA[WP7]]></category>

		<guid isPermaLink="false">http://vdcruijsen.net/?p=231</guid>
		<description><![CDATA[Last week I visited Twente University and today I went to the University of Eindhoven to do a session on building your first Windows Phone App. This post is mainly created for visitors of those sessions so they can download &#8230; <a href="http://vdcruijsen.net/2012/04/windows-phone-developer-introduction-sessions-at-utwente-tue/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Last week I visited Twente University and today I went to the University of Eindhoven to do a session on building your first Windows Phone App. This post is mainly created for visitors of those sessions so they can download the slide deck and sample code we’ve created during the session.</p>
<p><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="imaginecup" border="0" alt="imaginecup" src="http://vdcruijsen.net/wp-content/uploads/2012/04/imaginecup.jpg" width="216" height="80" />&#160; <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="utwente" border="0" alt="utwente" src="http://vdcruijsen.net/wp-content/uploads/2012/04/utwente.jpg" width="183" height="80" />&#160; <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="tue" border="0" alt="tue" src="http://vdcruijsen.net/wp-content/uploads/2012/04/tue.png" width="139" height="80" /></p>
<p>My sample code and powerpoint deck including lots of resources to start developing for windows phone can be found here:</p>
<p><a title="https://skydrive.live.com/redir.aspx?cid=ef12210979e9f6b0&amp;resid=EF12210979E9F6B0!1485&amp;parid=EF12210979E9F6B0!1463" href="https://skydrive.live.com/redir.aspx?cid=ef12210979e9f6b0&amp;resid=EF12210979E9F6B0!1485&amp;parid=EF12210979E9F6B0!1463">https://skydrive.live.com/redir.aspx?cid=ef12210979e9f6b0&amp;resid=EF12210979E9F6B0!1485&amp;parid=EF12210979E9F6B0!1463</a></p>
<p>During the session we created a twitter app that downloads the data from an xml feed asynchronous and placing this list of twitter items in a listbox. After that we created some sample data and created a template for the listbox so the twitter list looks nice.</p>
<p>Hopefully these sessions made you join the Windows Phone community and I expect to see your apps in the marketplace soon <img src='http://vdcruijsen.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>If you have any questions regarding Windows Phone development please send me an email or contact me on twitter <a href="http://twitter.com/GeertvdC">@geertvdc</a></p>
<p>Happy Coding!</p>
<p>Geert van der Cruijsen</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Windows+Phone+developer+introduction+sessions+at+UTwente+%26amp%3B+TU%2FE&amp;u=http%3A%2F%2Fvdcruijsen.net%2F2012%2F04%2Fwindows-phone-developer-introduction-sessions-at-utwente-tue%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Windows+Phone+developer+introduction+sessions+at+UTwente+%26amp%3B+TU%2FE&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2012%2F04%2Fwindows-phone-developer-introduction-sessions-at-utwente-tue%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Windows+Phone+developer+introduction+sessions+at+UTwente+%26amp%3B+TU%2FE&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2012%2F04%2Fwindows-phone-developer-introduction-sessions-at-utwente-tue%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fvdcruijsen.net%2F2012%2F04%2Fwindows-phone-developer-introduction-sessions-at-utwente-tue%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://vdcruijsen.net/2012/04/windows-phone-developer-introduction-sessions-at-utwente-tue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using the complementary color of the phone accent color in your WP7 app</title>
		<link>http://vdcruijsen.net/2012/03/using-the-complementary-color-of-the-phone-accent-color-in-your-wp7-app/</link>
		<comments>http://vdcruijsen.net/2012/03/using-the-complementary-color-of-the-phone-accent-color-in-your-wp7-app/#comments</comments>
		<pubDate>Mon, 26 Mar 2012 06:43:48 +0000</pubDate>
		<dc:creator>Geert van der Cruijsen</dc:creator>
				<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[Blend]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[Expression Blend]]></category>
		<category><![CDATA[Windows Phone]]></category>
		<category><![CDATA[WP7]]></category>

		<guid isPermaLink="false">http://vdcruijsen.net/?p=226</guid>
		<description><![CDATA[I’m building a Windows Phone app where I want to compare 2 objects to each other visually by showing graphs on how good each of the objects is performing. because I like to use the accent color in my apps &#8230; <a href="http://vdcruijsen.net/2012/03/using-the-complementary-color-of-the-phone-accent-color-in-your-wp7-app/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I’m building a Windows Phone app where I want to compare 2 objects to each other visually by showing graphs on how good each of the objects is performing. because I like to use the accent color in my apps I was thinking of what would be a good second color for the other graph. Since I’m not a designer I did some research on colors and found out that every color has a complementary color that is exactly the opposite color of your primary color. (Probably some basic design knowledge I didn’t know that.</p>
<p>Calculating this color is done by simple math. Your primary color + the complementary color should add up to hex value FFFFFF (white) so if you just remove the R G and B values of your color from the max value 255 you’ll end up with your complementary color.</p>
<p>So how to do this in your windows phone project? Let me first show you the results and after that I’ll explain how I created a resource you can use in blend to bind to your complementary color. Below are screenshots of a sample app (download at the end of this post) that displays the phone accent color and its complementary color. I’ve taken screenshots of every color so you can see what the results look like. The first rectangle shows the phone accent color while the second shows it’s complementary color.</p>
<p><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="complementary1" border="0" alt="complementary1" src="http://vdcruijsen.net/wp-content/uploads/2012/03/complementary1.png" width="126" height="240" /><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="complementary2" border="0" alt="complementary2" src="http://vdcruijsen.net/wp-content/uploads/2012/03/complementary2.png" width="126" height="240" /><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="complementary3" border="0" alt="complementary3" src="http://vdcruijsen.net/wp-content/uploads/2012/03/complementary3.png" width="126" height="240" /><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="complementary4" border="0" alt="complementary4" src="http://vdcruijsen.net/wp-content/uploads/2012/03/complementary4.png" width="126" height="240" /><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="complementary5" border="0" alt="complementary5" src="http://vdcruijsen.net/wp-content/uploads/2012/03/complementary5.png" width="126" height="240" /><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="complementary6" border="0" alt="complementary6" src="http://vdcruijsen.net/wp-content/uploads/2012/03/complementary6.png" width="126" height="240" /><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="complementary7" border="0" alt="complementary7" src="http://vdcruijsen.net/wp-content/uploads/2012/03/complementary7.png" width="126" height="240" /><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="complementary8" border="0" alt="complementary8" src="http://vdcruijsen.net/wp-content/uploads/2012/03/complementary8.png" width="126" height="240" /><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="complementary9" border="0" alt="complementary9" src="http://vdcruijsen.net/wp-content/uploads/2012/03/complementary9.png" width="126" height="240" /><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="complementary10" border="0" alt="complementary10" src="http://vdcruijsen.net/wp-content/uploads/2012/03/complementary10.png" width="126" height="240" /></p>
<p>So let’s see how to use this color in code. I’ve created a class calles “Resources” and I’ve added 2 public static properties in it. 1 called ComplementaryColor and 1 called ComplementaryColorBrush. You’ll use the Brush property mostly when binding but if you would like to have the color it’s also available.</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">class</span> Resources</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2">   2:</span> {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3">   3:</span>     <span style="color: #0000ff">private</span> <span style="color: #0000ff">static</span> Color _complementaryColor = <span style="color: #0000ff">new</span> Color()</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4">   4:</span>     {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5">   5:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6">   6:</span>         R = (<span style="color: #0000ff">byte</span>)(255 - ((Color)Application.Current.Resources[<span style="color: #006080">&quot;PhoneAccentColor&quot;</span>]).R),</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7">   7:</span>         G = (<span style="color: #0000ff">byte</span>)(255 - ((Color)Application.Current.Resources[<span style="color: #006080">&quot;PhoneAccentColor&quot;</span>]).G),</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8">   8:</span>         B = (<span style="color: #0000ff">byte</span>)(255 - ((Color)Application.Current.Resources[<span style="color: #006080">&quot;PhoneAccentColor&quot;</span>]).B),</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum9">   9:</span>         A = ((Color)Application.Current.Resources[<span style="color: #006080">&quot;PhoneAccentColor&quot;</span>]).A</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum10">  10:</span>     };</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum11">  11:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum12">  12:</span>     <span style="color: #0000ff">private</span> <span style="color: #0000ff">static</span> Brush _complementaryColorBrush = <span style="color: #0000ff">new</span> SolidColorBrush(_complementaryColor);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum13">  13:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum14">  14:</span>     <span style="color: #0000ff">public</span> <span style="color: #0000ff">static</span> Color ComplementaryColor</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum15">  15:</span>     {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum16">  16:</span>         get</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum17">  17:</span>         {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum18">  18:</span>             <span style="color: #0000ff">return</span> _complementaryColor;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum19">  19:</span>         }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum20">  20:</span>     }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum21">  21:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum22">  22:</span>     <span style="color: #0000ff">public</span> <span style="color: #0000ff">static</span> Brush ComplementaryColorBrush</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum23">  23:</span>     {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum24">  24:</span>         get</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum25">  25:</span>         {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum26">  26:</span>             <span style="color: #0000ff">return</span> _complementaryColorBrush;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum27">  27:</span>         }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum28">  28:</span>     }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum29">  29:</span> }</pre>
<p><!--CRLF--></div>
</div>
<p>The calculations of the complementary color is done by subtracting the R G and B values from the&#160; max of 255 and they are stored in a new Color property. this color is then used in our ComplementaryColorBrush.</p>
<p>To use these properties in blend we’ll just add this class as a resource in the App.xaml file:</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> <span style="color: #0000ff">&lt;</span><span style="color: #800000">Application.Resources</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2">   2:</span>     <span style="color: #0000ff">&lt;</span><span style="color: #800000">ResourceDictionary</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3">   3:</span>         <span style="color: #0000ff">&lt;</span><span style="color: #800000">resources:Resources</span> <span style="color: #ff0000">x:Key</span><span style="color: #0000ff">=&quot;Resources&quot;</span> <span style="color: #ff0000">d:IsDataSource</span><span style="color: #0000ff">=&quot;True&quot;</span><span style="color: #0000ff">/&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4">   4:</span>     <span style="color: #0000ff">&lt;/</span><span style="color: #800000">ResourceDictionary</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5">   5:</span> <span style="color: #0000ff">&lt;/</span><span style="color: #800000">Application.Resources</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></div>
</div>
<p>When we build our project and open up Expression blend we can now use this color by selecting the rectangle and going into the databinding menu for the fill property and then selecting the ComplementaryColorBrush.</p>
<p><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://vdcruijsen.net/wp-content/uploads/2012/03/image.png" width="427" height="400" /></p>
<p>There you go. when you run your project now you’ll see the complementary color of your selected phone accent color</p>
<p><a href="http://vdcruijsen.net/wp-content/uploads/2012/03/complementary91.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="complementary9" border="0" alt="complementary9" src="http://vdcruijsen.net/wp-content/uploads/2012/03/complementary9_thumb.png" width="229" height="436" /></a></p>
<p>You can download my sample application incudling source from my skydrive <a href="https://skydrive.live.com/redir.aspx?cid=ef12210979e9f6b0&amp;resid=EF12210979E9F6B0!1484&amp;parid=EF12210979E9F6B0!1483">here</a></p>
<p>Happy Coding!</p>
<p>Geert van der Cruijsen</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Using+the+complementary+color+of+the+phone+accent+color+in+your+WP7+app&amp;u=http%3A%2F%2Fvdcruijsen.net%2F2012%2F03%2Fusing-the-complementary-color-of-the-phone-accent-color-in-your-wp7-app%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Using+the+complementary+color+of+the+phone+accent+color+in+your+WP7+app&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2012%2F03%2Fusing-the-complementary-color-of-the-phone-accent-color-in-your-wp7-app%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Using+the+complementary+color+of+the+phone+accent+color+in+your+WP7+app&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2012%2F03%2Fusing-the-complementary-color-of-the-phone-accent-color-in-your-wp7-app%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fvdcruijsen.net%2F2012%2F03%2Fusing-the-complementary-color-of-the-phone-accent-color-in-your-wp7-app%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://vdcruijsen.net/2012/03/using-the-complementary-color-of-the-phone-accent-color-in-your-wp7-app/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Build your first Windows Phone app sample code and powerpoint deck from my session @ Windesheim Zwolle</title>
		<link>http://vdcruijsen.net/2012/03/build-your-first-windows-phone-app-sample-code-and-powerpoint-deck-from-my-session-windesheim-zwolle/</link>
		<comments>http://vdcruijsen.net/2012/03/build-your-first-windows-phone-app-sample-code-and-powerpoint-deck-from-my-session-windesheim-zwolle/#comments</comments>
		<pubDate>Tue, 06 Mar 2012 19:59:16 +0000</pubDate>
		<dc:creator>Geert van der Cruijsen</dc:creator>
				<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[Windows Phone]]></category>
		<category><![CDATA[WP7]]></category>

		<guid isPermaLink="false">http://vdcruijsen.net/?p=211</guid>
		<description><![CDATA[Yesterday I did a hands on Windows Phone development session to show students of the Windesheim in Zwolle how to build their first application. If you were at yesterdays session I hope you got inspired to start making Windows Phone &#8230; <a href="http://vdcruijsen.net/2012/03/build-your-first-windows-phone-app-sample-code-and-powerpoint-deck-from-my-session-windesheim-zwolle/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Yesterday I did a hands on Windows Phone development session to show students of the Windesheim in Zwolle how to build their first application.</p>
<p>If you were at yesterdays session I hope you got inspired to start making Windows Phone apps and hope to see your apps in the Imagine Cup this year.</p>
<p><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="imaginecup" border="0" alt="imaginecup" src="http://vdcruijsen.net/wp-content/uploads/2012/03/imaginecup.jpg" width="243" height="90" />&#160;<img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="windesheim" border="0" alt="windesheim" src="http://vdcruijsen.net/wp-content/uploads/2012/03/windesheim.png" width="136" height="90" /></p>
<p><a title="https://www.imaginecup.com/" href="https://www.imaginecup.com/">https://www.imaginecup.com/</a></p>
<p>The app we’ve build during the class was a simple twitter app that downloads json data asynchronous and parses the json objects to c# objects. We then bind a list of these TwitterItems to a listbox on the MainPage.xaml and create a ItemTemplate for the listbox items by using Expression Blend Sample data created from the&#160; TwitterItem object.</p>
<p>The visual studio project and powerpoint deck can be downloaded here on my skydrive:</p>
<p><a title="https://skydrive.live.com/redir.aspx?cid=ef12210979e9f6b0&amp;resid=EF12210979E9F6B0!1480&amp;parid=EF12210979E9F6B0!1463" href="https://skydrive.live.com/redir.aspx?cid=ef12210979e9f6b0&amp;resid=EF12210979E9F6B0!1480&amp;parid=EF12210979E9F6B0!1463">https://skydrive.live.com/redir.aspx?cid=ef12210979e9f6b0&amp;resid=EF12210979E9F6B0!1480&amp;parid=EF12210979E9F6B0!1463</a></p>
<p>The sample project contains a few extra steps that I didn’t have time for during the session itself but it shows how to post a message to a social network by using the ShareStatusTask and it also contains basic navigation.</p>
<p>During the session I also showed the use of a open source tool to generate classes from json. you can download this tool from codeplex here:</p>
<p><a title="http://jsonclassgenerator.codeplex.com/" href="http://jsonclassgenerator.codeplex.com/">http://jsonclassgenerator.codeplex.com/</a></p>
<p>to use these classes you’ll need a dll compiled for windows phone. you can get that one here on codeplex:</p>
<p><a title="http://json.codeplex.com/" href="http://json.codeplex.com/">http://json.codeplex.com/</a></p>
<p>If you have any question about the sample code or Windows Phone in general contact my by mail or send me a tweet at <a href="http://twitter.com/geertvdc">@geertvdc</a></p>
<p>Happy Coding!</p>
<p>Geert van der Cruijsen</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Build+your+first+Windows+Phone+app+sample+code+and+powerpoint+deck+from+my+session+%40+Windesheim+Zwolle&amp;u=http%3A%2F%2Fvdcruijsen.net%2F2012%2F03%2Fbuild-your-first-windows-phone-app-sample-code-and-powerpoint-deck-from-my-session-windesheim-zwolle%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Build+your+first+Windows+Phone+app+sample+code+and+powerpoint+deck+from+my+session+%40+Windesheim+Zwolle&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2012%2F03%2Fbuild-your-first-windows-phone-app-sample-code-and-powerpoint-deck-from-my-session-windesheim-zwolle%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Build+your+first+Windows+Phone+app+sample+code+and+powerpoint+deck+from+my+session+%40+Windesheim+Zwolle&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2012%2F03%2Fbuild-your-first-windows-phone-app-sample-code-and-powerpoint-deck-from-my-session-windesheim-zwolle%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fvdcruijsen.net%2F2012%2F03%2Fbuild-your-first-windows-phone-app-sample-code-and-powerpoint-deck-from-my-session-windesheim-zwolle%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://vdcruijsen.net/2012/03/build-your-first-windows-phone-app-sample-code-and-powerpoint-deck-from-my-session-windesheim-zwolle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Demo code and ppt deck from my Techdays talk on WP7 Push notifications, Live tiles and background agents available</title>
		<link>http://vdcruijsen.net/2012/02/demo-code-and-ppt-deck-from-my-techdays-talk-on-wp7-push-notifications-live-tiles-and-background-agents-available/</link>
		<comments>http://vdcruijsen.net/2012/02/demo-code-and-ppt-deck-from-my-techdays-talk-on-wp7-push-notifications-live-tiles-and-background-agents-available/#comments</comments>
		<pubDate>Sat, 18 Feb 2012 15:39:40 +0000</pubDate>
		<dc:creator>Geert van der Cruijsen</dc:creator>
				<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[dotnetmag]]></category>
		<category><![CDATA[Techdays]]></category>
		<category><![CDATA[WP7]]></category>

		<guid isPermaLink="false">http://vdcruijsen.net/?p=205</guid>
		<description><![CDATA[It’s they day after the Techdays 2012 in the Netherlands and everyone is fully inspired by all the new knowledge they acquired at the event. I got questions from people asking for the powerpoint deck and my demo code so &#8230; <a href="http://vdcruijsen.net/2012/02/demo-code-and-ppt-deck-from-my-techdays-talk-on-wp7-push-notifications-live-tiles-and-background-agents-available/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>It’s they day after the Techdays 2012 in the Netherlands and everyone is fully inspired by all the new knowledge they acquired at the event. I got questions from people asking for the powerpoint deck and my demo code so I told them I would upload it here. I had 2 sessions on the Techdays and both were on Windows Phone push notifications and live tiles. The session on the Geeknight was an introduction level session and in the session on Friday I showed all the details on how to use them with lots of code.</p>
<p><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="techdays_logo_2" border="0" alt="techdays_logo_2" src="http://vdcruijsen.net/wp-content/uploads/2012/02/techdays_logo_21.jpg" width="171" height="240" /></p>
<p>The PowerPoint deck from my geeknight session on push notifications and livetiles&#160; is available here: <a title="https://skydrive.live.com/#!/view.aspx?cid=EF12210979E9F6B0&amp;resid=EF12210979E9F6B0%211464" href="https://skydrive.live.com/#!/view.aspx?cid=EF12210979E9F6B0&amp;resid=EF12210979E9F6B0%211464">Download or View PPT</a></p>
<p>The PowerPoint deck from the level 300 Push notifications, live tiles and background agents session is available here: <a title="https://skydrive.live.com/#!/view.aspx?cid=EF12210979E9F6B0&amp;resid=EF12210979E9F6B0%211465" href="https://skydrive.live.com/#!/view.aspx?cid=EF12210979E9F6B0&amp;resid=EF12210979E9F6B0%211465">Download or View PPT</a></p>
<p>In both sessions I used the same demo project that can be downloaded here: <a href="https://skydrive.live.com/redir.aspx?cid=ef12210979e9f6b0&amp;resid=EF12210979E9F6B0!1467&amp;parid=EF12210979E9F6B0!1463">Download ZIP file</a></p>
<p><strike>My session that was held on Friday was also filmed for Channel 9. I’ll add a link to the video when it’s uploaded there.</strike></p>
<p>Update: the session is now available on Channel 9. you can watch it here:</p>
<p> <iframe style="width: 600px; height: 304px" src="http://channel9.msdn.com/Events/TechDays/Techdays-2012-the-Netherlands/Push-notifications-live-tiles-and-background-agents-for-Windows-Phone-7/player?w=600&amp;h=304" frameborder="0" scrolling="no"></iframe>
<p><a title="http://channel9.msdn.com/Events/TechDays/Techdays-2012-the-Netherlands/Push-notifications-live-tiles-and-background-agents-for-Windows-Phone-7" href="http://channel9.msdn.com/Events/TechDays/Techdays-2012-the-Netherlands/Push-notifications-live-tiles-and-background-agents-for-Windows-Phone-7">http://channel9.msdn.com/Events/TechDays/Techdays-2012-the-Netherlands/Push-notifications-live-tiles-and-background-agents-for-Windows-Phone-7</a></p>
<p>If you have any questions on implementing push notifications, live tiles or background agents send me a tweet on <a href="http://twitter.com/geertvdc">@geertvdc</a> or comment on this post.</p>
<p>Happy Coding</p>
<p>Geert van der Cruijsen</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Demo+code+and+ppt+deck+from+my+Techdays+talk+on+WP7+Push+notifications%2C+Live+tiles+and+background+agents+available&amp;u=http%3A%2F%2Fvdcruijsen.net%2F2012%2F02%2Fdemo-code-and-ppt-deck-from-my-techdays-talk-on-wp7-push-notifications-live-tiles-and-background-agents-available%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Demo+code+and+ppt+deck+from+my+Techdays+talk+on+WP7+Push+notifications%2C+Live+tiles+and+background+agents+available&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2012%2F02%2Fdemo-code-and-ppt-deck-from-my-techdays-talk-on-wp7-push-notifications-live-tiles-and-background-agents-available%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Demo+code+and+ppt+deck+from+my+Techdays+talk+on+WP7+Push+notifications%2C+Live+tiles+and+background+agents+available&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2012%2F02%2Fdemo-code-and-ppt-deck-from-my-techdays-talk-on-wp7-push-notifications-live-tiles-and-background-agents-available%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fvdcruijsen.net%2F2012%2F02%2Fdemo-code-and-ppt-deck-from-my-techdays-talk-on-wp7-push-notifications-live-tiles-and-background-agents-available%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://vdcruijsen.net/2012/02/demo-code-and-ppt-deck-from-my-techdays-talk-on-wp7-push-notifications-live-tiles-and-background-agents-available/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>TechdaysNL 2012 Lots of WP7, Win8, Metro and ASP.NET MVC sessions. Which sessions to pick?</title>
		<link>http://vdcruijsen.net/2012/02/techdaysnl-2012-lots-of-wp7-win8-metro-and-asp-net-mvc-sessions-which-sessions-to-pick/</link>
		<comments>http://vdcruijsen.net/2012/02/techdaysnl-2012-lots-of-wp7-win8-metro-and-asp-net-mvc-sessions-which-sessions-to-pick/#comments</comments>
		<pubDate>Tue, 14 Feb 2012 21:57:41 +0000</pubDate>
		<dc:creator>Geert van der Cruijsen</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[Metro]]></category>
		<category><![CDATA[Techdays]]></category>
		<category><![CDATA[Windows 8]]></category>
		<category><![CDATA[WP7]]></category>

		<guid isPermaLink="false">http://vdcruijsen.net/?p=198</guid>
		<description><![CDATA[This thursday Microsoft Techdays 2012 kicks off for Dutch developers working on the Microsoft platform. This year I’m speaking at 2 sessions on Windows Phone but I’m also going to visit other sessions during the 2 days of the conventions. &#8230; <a href="http://vdcruijsen.net/2012/02/techdaysnl-2012-lots-of-wp7-win8-metro-and-asp-net-mvc-sessions-which-sessions-to-pick/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This thursday Microsoft Techdays 2012 kicks off for Dutch developers working on the Microsoft platform. This year I’m speaking at 2 sessions on Windows Phone but I’m also going to visit other sessions during the 2 days of the conventions. Here is the schedule I made with sessions I’m planning on going to. It seems there are some really cool Windows Phone sessions but Windows 8 and ASP.NET MVC also has my interests. During the event I’ll keep you posted with updates on twitter and afterwards I’ll write my experiences in a new blogpost again. Here are the sessions I’m going to visit.</p>
<p><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="badge_speaking" border="0" alt="badge_speaking" src="http://vdcruijsen.net/wp-content/uploads/2012/02/badge_speaking.png" width="240" height="155" /></p>
<h2>Thursday February 16th</h2>
<h2>09:15 &#8211; 10:45 – Keynote</h2>
<p>Ofcourse I’m going to visit the keynote session that kicks off the event. This year the keynote is presented by 5 speakers: <a href="http://techdays.nl/SprekerDetail.aspx?cid=1989">Ben Riga</a>, <a href="http://techdays.nl/SprekerDetail.aspx?cid=2248">Brian Keller </a>, <a href="http://techdays.nl/SprekerDetail.aspx?cid=2326">Serge van Schie</a>, <a href="http://techdays.nl/SprekerDetail.aspx?cid=2327">Theo Rinsema</a>, <a href="http://techdays.nl/SprekerDetail.aspx?cid=2510">Bryan Agnetta</a></p>
<h2>11:05 &#8211; 12:20 – <strong><a href="http://techdays.nl/AgendaDetail.aspx?cid=2261">What&#8217;s new in ASP.NET 4.5 + Visual Studio 11</a> &#8211; <a href="http://techdays.nl/SprekerDetail.aspx?cid=2244">Mads Kristensen</a></strong></h2>
<p>I haven’t seen that much of asp.net 4.5 since my focus lately was on Windows Phone and Windows 8 development so I’m really curious on what Mads is going to show us here.</p>
<h2></h2>
<h2>13:30 &#8211; 14:45 – <strong><a href="http://techdays.nl/AgendaDetail.aspx?cid=2256">Deep Dive into Metro</a> &#8211; <a href="http://techdays.nl/SprekerDetail.aspx?cid=2510">Bryan Agnetta</a></strong></h2>
<p>Since I already am quite up to date with Windows Phone Localization I’m skipping Ben Riga’s session on that subject (which is really important to know if you’re developing WP7 apps!) and going to widen my horizon to become a better “DeVigner” by improving my design skills in the session of Bryan Agnetta.</p>
<h2>15:05 &#8211; 16:20 – <strong><a href="http://techdays.nl/AgendaDetail.aspx?cid=2364">A look at ASP.NET MVC 4</a> &#8211; <a href="http://techdays.nl/SprekerDetail.aspx?cid=2356">Scott Guthrie </a></strong></h2>
<p>When “the Gu” is speaking on an event it’s not an option not to visit at least 1 of his sessions. I’m a big fan of ASP.NET MVC since the first technical preview but haven’t seen that much of the 4th version except for some videos from BUILD. Really looking forward on hearing what Scott has to say on this subject.</p>
<h2></h2>
<h2>16:30 &#8211; 17:45 – <strong><a href="http://techdays.nl/AgendaDetail.aspx?cid=2371">Scott Guthrie Unplugged</a> &#8211; <a href="http://techdays.nl/SprekerDetail.aspx?cid=2356">Scott Guthrie </a></strong></h2>
<p>Really looking forward on this session. Scott is a reall “Gu”ru and I’m really curios on seeing him answer questions from the audience. I have some questions for him on his vision on the future of mobile and the web. Let’s see if he can answer it <img src='http://vdcruijsen.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Another session that I would like to visit but is at the same time is: <a href="http://techdays.nl/AgendaDetail.aspx?cid=2262">Fully leverage the Microsoft application platform with BizTalk, Server AppFabric and Azure AppFabric</a>. Ah well I’ll watch that one on channel 9 later then.</p>
<h2>&#160;</h2>
<h2>GeekNight</h2>
<h2>19:15 &#8211; 19:55 – <strong><a href="http://techdays.nl/AgendaDetail.aspx?cid=2421">Beginnen met ontwikkelen voor Windows Phone</a> &#8211; <a href="http://techdays.nl/SprekerDetail.aspx?cid=2255">Maarten Struys</a></strong></h2>
<p>This session is in the same room as my session that held is right after this session. Ok I’m not a starting wp7 developer but It’s good to see this session so I can adapt my session to this one if a lot of people are staying after this session for my session.</p>
<h2>20:05 &#8211; 20:45 – <strong><a href="http://techdays.nl/AgendaDetail.aspx?cid=2422">Push notifications en live tiles</a> &#8211; <a href="http://techdays.nl/SprekerDetail.aspx?cid=2409">Geert van de Cruijsen</a></strong></h2>
<p>Time to do my own session. In this session I’ll give an introduction to push notifications and live tiles in your Windows Phone applications. If you are a starting wp7 developer this is the session for you. If you are a more advanced wp7 developer come to my session on friday on the Techdays on the same subject.</p>
<h2>20:55 &#8211; 21:35 – <strong><a href="http://techdays.nl/AgendaDetail.aspx?cid=2446">Stand Up Windows Phone Development</a> &#8211; <a href="http://techdays.nl/SprekerDetail.aspx?cid=2238">Fons Sonnemans</a></strong></h2>
<p>After my session Fons Sonnemans is doing the next session in the WP7 track. He’s going to build an application in 1 hour. Let’s see what he’s up to.</p>
<p>&#160;</p>
<h2>Friday February 17th</h2>
<h2>09:15 &#8211; 10:30 – <strong><a href="http://techdays.nl/AgendaDetail.aspx?cid=2302">Going mobile with ASP.NET MVC 4</a> &#8211; <a href="http://techdays.nl/SprekerDetail.aspx?cid=2233">Erik van Appeldoorn</a></strong></h2>
<p>The debate on building native phone applications vs mobile web is an ongoing discussion. Let’s see what Erik can do using ASP.NET MVC4 for the mobile platform. Another session that got my attention is a session from my collegue Jesse Houwing: <a href="http://techdays.nl/AgendaDetail.aspx?cid=2523">Code review features in TFS vNext</a> so there is a chance I’m visiting that one instead.</p>
<h2>10:50 &#8211; 12:05 – <strong><a href="http://techdays.nl/AgendaDetail.aspx?cid=2282">Building Services for Phone / Tablet using WebAPI</a> &#8211; <a href="http://techdays.nl/SprekerDetail.aspx?cid=2229">Matt Milner</a></strong></h2>
<p>This session can be really usefull if you are planning on doing push notifications for a mobile app for example or if you just want to create an app using your own created API for your website. WebAPI is a really nice new framework by Microsoft which I don’t know that much about right now. hopefully this session will give me some good info on that.</p>
<h2>13:15 &#8211; 14:30 – <strong><a href="http://techdays.nl/AgendaDetail.aspx?cid=2524">Laat je Windows Phone 7 app tot leven komen met push notifications, live tiles en background agents</a> &#8211; <a href="http://techdays.nl/SprekerDetail.aspx?cid=2409">Geert van de Cruijsen</a></strong></h2>
<p>It’s time again to do a presentation myself. This session will explain all the ins and outs of push notifications, live tiles and background agents in your wp7 applications. If you don’t like Windows Phone visit my colleague Christiaan Veeningen’s session: <a href="http://techdays.nl/AgendaDetail.aspx?cid=2480">Bouw Metro apps met Javascript voor Windows 8</a>. In our original planning I was going to do this presentation together with him but doing 3 sessions was a bit to much for me to prepare for.</p>
<h2>14:50 &#8211; 16:05 – <strong><a href="http://techdays.nl/AgendaDetail.aspx?cid=2289">Windows Phone Metro Design Session End-to-End</a> &#8211; <a href="http://techdays.nl/SprekerDetail.aspx?cid=2511">Tom Eddings</a>, <a href="http://techdays.nl/SprekerDetail.aspx?cid=2512">Dave Crawford</a></strong></h2>
<p>Another UX session I’m going to visit. My last project building Windows Phone applications where I worked together with Avanade UX colleagues really got me interested in the design parts so I’m exited on what Tom and Dave are going to tell us.</p>
<h2>16:15 &#8211; 17:30 – <strong><a href="http://techdays.nl/AgendaDetail.aspx?cid=2308">Unit testing your Windows Phone 7 applications</a> &#8211; <a href="http://techdays.nl/SprekerDetail.aspx?cid=2138">Olaf Conijn</a></strong></h2>
<p>Picking a level 400 session as the last session on a Friday a smart choice? We’ll see. I already have experience in unit testing wp7 applications but I’m sure Olaf has some really nice tips for us.</p>
<p>So this is my list of sessions I’m visiting at the TechDays. Please let me know which ones you are visiting in the comments</p>
<p>Geert van der Cruijsen</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=TechdaysNL+2012+Lots+of+WP7%2C+Win8%2C+Metro+and+ASP.NET+MVC+sessions.+Which+sessions+to+pick%3F&amp;u=http%3A%2F%2Fvdcruijsen.net%2F2012%2F02%2Ftechdaysnl-2012-lots-of-wp7-win8-metro-and-asp-net-mvc-sessions-which-sessions-to-pick%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=TechdaysNL+2012+Lots+of+WP7%2C+Win8%2C+Metro+and+ASP.NET+MVC+sessions.+Which+sessions+to+pick%3F&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2012%2F02%2Ftechdaysnl-2012-lots-of-wp7-win8-metro-and-asp-net-mvc-sessions-which-sessions-to-pick%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=TechdaysNL+2012+Lots+of+WP7%2C+Win8%2C+Metro+and+ASP.NET+MVC+sessions.+Which+sessions+to+pick%3F&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2012%2F02%2Ftechdaysnl-2012-lots-of-wp7-win8-metro-and-asp-net-mvc-sessions-which-sessions-to-pick%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fvdcruijsen.net%2F2012%2F02%2Ftechdaysnl-2012-lots-of-wp7-win8-metro-and-asp-net-mvc-sessions-which-sessions-to-pick%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://vdcruijsen.net/2012/02/techdaysnl-2012-lots-of-wp7-win8-metro-and-asp-net-mvc-sessions-which-sessions-to-pick/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows Phone 7 emulator skin switcher 1.2 released on Codeplex</title>
		<link>http://vdcruijsen.net/2012/01/windows-phone-7-emulator-skin-switcher-1-2-released-on-codeplex/</link>
		<comments>http://vdcruijsen.net/2012/01/windows-phone-7-emulator-skin-switcher-1-2-released-on-codeplex/#comments</comments>
		<pubDate>Sun, 15 Jan 2012 09:45:23 +0000</pubDate>
		<dc:creator>Geert van der Cruijsen</dc:creator>
				<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[WP7]]></category>

		<guid isPermaLink="false">http://vdcruijsen.net/?p=192</guid>
		<description><![CDATA[Version 1.0 and 1.1 of my Windows Phone 7 emulator skin switcher were hosted on my SkyDrive but I got several requests from people to move it to Codeplex so I did that this afternoon. From now on the latest &#8230; <a href="http://vdcruijsen.net/2012/01/windows-phone-7-emulator-skin-switcher-1-2-released-on-codeplex/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Version 1.0 and 1.1 of my Windows Phone 7 emulator skin switcher were hosted on my SkyDrive but I got several requests from people to move it to Codeplex so I did that this afternoon.</p>
<p>From now on the latest version + source can be found on <a title="http://wp7emuskinswitcher.codeplex.com/" href="http://wp7emuskinswitcher.codeplex.com/">http://wp7emuskinswitcher.codeplex.com/</a></p>
<p>With the move to Codeplex I also upgraded the version to 1.2. here is the Changelog:</p>
<ul>
<li>Fixed a bug where the skin switcher broke the back button of the emulator when people used certain custom skins before they used the skin switcher.</li>
<li>Added working volume, camera + power buttons on the Lumia 800 skins</li>
<li>Added a White Lumia 800 skin made by Derek Orr</li>
<li>Added a Zune HD skin made by Ben Pinkerton</li>
</ul>
<p><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="phones" border="0" alt="phones" src="http://vdcruijsen.net/wp-content/uploads/2012/01/phones1.png" width="531" height="200" /></p>
<p>Enjoy!</p>
<p>Geert van der Cruijsen</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Windows+Phone+7+emulator+skin+switcher+1.2+released+on+Codeplex&amp;u=http%3A%2F%2Fvdcruijsen.net%2F2012%2F01%2Fwindows-phone-7-emulator-skin-switcher-1-2-released-on-codeplex%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Windows+Phone+7+emulator+skin+switcher+1.2+released+on+Codeplex&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2012%2F01%2Fwindows-phone-7-emulator-skin-switcher-1-2-released-on-codeplex%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Windows+Phone+7+emulator+skin+switcher+1.2+released+on+Codeplex&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2012%2F01%2Fwindows-phone-7-emulator-skin-switcher-1-2-released-on-codeplex%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fvdcruijsen.net%2F2012%2F01%2Fwindows-phone-7-emulator-skin-switcher-1-2-released-on-codeplex%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://vdcruijsen.net/2012/01/windows-phone-7-emulator-skin-switcher-1-2-released-on-codeplex/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Testing the SH WP ApplicationBar in an Multiselectlist MVVM scenario</title>
		<link>http://vdcruijsen.net/2012/01/testing-the-sh-wp-applicationbar-in-an-multiselectlist-mvvm-scenario/</link>
		<comments>http://vdcruijsen.net/2012/01/testing-the-sh-wp-applicationbar-in-an-multiselectlist-mvvm-scenario/#comments</comments>
		<pubDate>Fri, 06 Jan 2012 17:06:16 +0000</pubDate>
		<dc:creator>Geert van der Cruijsen</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[ApplicationBar]]></category>
		<category><![CDATA[codeplex]]></category>
		<category><![CDATA[MVVM]]></category>
		<category><![CDATA[WP7]]></category>

		<guid isPermaLink="false">http://vdcruijsen.net/?p=188</guid>
		<description><![CDATA[If you’re developing for Windows Phone 7 and are using MVVM you’re probably familiar with the problem that you cannot bind the out of the box ApplicationBar because it is not a silverlight control. Since the early days of WP7 &#8230; <a href="http://vdcruijsen.net/2012/01/testing-the-sh-wp-applicationbar-in-an-multiselectlist-mvvm-scenario/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you’re developing for Windows Phone 7 and are using MVVM you’re probably familiar with the problem that you cannot bind the out of the box ApplicationBar because it is not a silverlight control. Since the early days of WP7 there are lots of solutions and workarounds to work with the application bar but most of them do have some (minor) downsides in using them. The application bar solutions that are used the most are probably the <a href="http://phone7.codeplex.com/">BindableApplicationBar from PhoneFX</a>, another <a href="http://bindableapplicationb.codeplex.com/">BindableApplicationBar</a> or <a href="http://appbarutils.codeplex.com/">AppBarUtils</a>.</p>
<p>Up untill now I was using the PhoneFX BindableApplicationBar but I really disliked the problem that you can’t bind the visibility property of the ApplicationBarButtons to hide or show them when you need them. A common example where you use this is in a Scenario with a MultiSelectList on a page where you want to be able to hide the “Remove” button as long as you didn’t select an item yet and hide the “Select” button when you are already in the selection mode. This week I was reading a blogpost on <a href="http://www.windowsphonegeek.com/articles/Advanced-ApplicationBar-for-Windows-Phone">Windows Phone Geek about the AdvancedApplicationBar</a> and I read that this new ApplicationBar solution did support binding the Visibility of ApplicationBarButtons so it was time to put this one to the test.</p>
<p>In this post I’ll walk you through my the code I produced to get a nice MultiSelectList control (from the silverlight wp7 toolkit ) working with the applicationbar without writing any codebehind. I used <a href="http://mvvmlight.codeplex.com/">MVVM light</a> for this sample so an empty <a href="http://mvvmlight.codeplex.com/">MVVM light</a> project with references added to the <a href="http://silverlight.codeplex.com/">Silverlight Toolkit</a> and the <a href="http://shwp.codeplex.com/">SH WP ApplicationBar</a> will be my starting point.</p>
<p>The idea is to build an application showing a MultiSelectList with some messages that you can select and delete by using the ApplicationBarButtons just as the build in Mail application does.</p>
<p>Lets first start of building some of the plumbing to get this application going. We’ll create a Message Class that is going to be our Class containing the information for each message. We’ll keep this Class plain and simple:</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">class</span> Message</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2">   2:</span> {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3">   3:</span>     <span style="color: #0000ff">public</span> <span style="color: #0000ff">string</span> Sender { get; set; }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4">   4:</span>     <span style="color: #0000ff">public</span> DateTime Date { get; set; }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5">   5:</span>     <span style="color: #0000ff">public</span> <span style="color: #0000ff">string</span> Content { get; set; }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6">   6:</span> }</pre>
<p><!--CRLF--></div>
</div>
<p>We’ll also need a property in the ViewModel to expose a list of these Messages which we can fill with dummy data and that can be bound in the MultiSelectList. We’ll create a property in the ViewModel called Messages and will fill these for this small example in the constructor of the MainViewModel.</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> <span style="color: #008000">/// &lt;summary&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2">   2:</span> <span style="color: #008000">/// Initializes a new instance of the MainViewModel class.</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3">   3:</span> <span style="color: #008000">/// &lt;/summary&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4">   4:</span> <span style="color: #0000ff">public</span> MainViewModel()</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5">   5:</span> {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6">   6:</span>     <span style="color: #0000ff">for</span> (<span style="color: #0000ff">int</span> i = 0; i &lt; 10; i++)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7">   7:</span>     {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8">   8:</span>         Message m = <span style="color: #0000ff">new</span> Message();</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum9">   9:</span>         m.Sender = <span style="color: #006080">&quot;Sender &quot;</span> + i.ToString();</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum10">  10:</span>         m.Date = DateTime.Now.AddHours(i);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum11">  11:</span>         m.Content = <span style="color: #006080">&quot;This is a sample message &quot;</span> + i.ToString();</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum12">  12:</span>         Messages.Add(m);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum13">  13:</span>     }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum14">  14:</span> }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum15">  15:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum16">  16:</span> <span style="color: #008000">/// &lt;summary&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum17">  17:</span> <span style="color: #008000">/// The &lt;see cref=&quot;Messages&quot; /&gt; property's name.</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum18">  18:</span> <span style="color: #008000">/// &lt;/summary&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum19">  19:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">const</span> <span style="color: #0000ff">string</span> MessagesPropertyName = <span style="color: #006080">&quot;Messages&quot;</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum20">  20:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum21">  21:</span> <span style="color: #0000ff">private</span> ObservableCollection&lt;Message&gt; _messages = <span style="color: #0000ff">null</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum22">  22:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum23">  23:</span> <span style="color: #008000">/// &lt;summary&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum24">  24:</span> <span style="color: #008000">/// Sets and gets the Messages property.</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum25">  25:</span> <span style="color: #008000">/// Changes to that property's value raise the PropertyChanged event. </span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum26">  26:</span> <span style="color: #008000">/// &lt;/summary&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum27">  27:</span> <span style="color: #0000ff">public</span> ObservableCollection&lt;Message&gt; Messages</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum28">  28:</span> {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum29">  29:</span>     get</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum30">  30:</span>     {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum31">  31:</span>         <span style="color: #0000ff">return</span> _messages;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum32">  32:</span>     }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum33">  33:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum34">  34:</span>     set</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum35">  35:</span>     {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum36">  36:</span>         <span style="color: #0000ff">if</span> (_messages == <span style="color: #0000ff">value</span>)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum37">  37:</span>         {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum38">  38:</span>             <span style="color: #0000ff">return</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum39">  39:</span>         }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum40">  40:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum41">  41:</span>         _messages = <span style="color: #0000ff">value</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum42">  42:</span>         RaisePropertyChanged(MessagesPropertyName);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum43">  43:</span>     }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum44">  44:</span> }</pre>
<p><!--CRLF--></div>
</div>
<p>Now the data is there it’s time to create the UI. One of the best parts of using MVVM is creating the UI in Expression Blend so lets use that. We’ll add a MultiSelectList Control to the page (it’s a control that comes in the silverlight toolkit for wp7) and bind the itemsource to the Messages property. We’ll also add the AdvancedApplicationBar from the SH WP library to the page and create 2 buttons to be used on the ApplicationBar, a select button and a delete button. Set the size of the MultiSelectList to Autosize –&gt; full and make sure the AdvancedApplicationBar control is located in the Layoutroot. Set the text of the 2 ApplicationBarButtons to Select and Remove and also select an image for the buttons.</p>
<p><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="multiselectlist" border="0" alt="multiselectlist" src="http://vdcruijsen.net/wp-content/uploads/2012/01/multiselectlist.png" width="400" height="250" /></p>
<p>When you rebuild now you’ll see 10 lines of code in the multiselect list. Change the ItemTemplate for the MultiSelectList by creating an empty template and adding 3 textboxes to them binding them to our 3 fields in our Message Class: Sender, Date and Content. Give all of them a pretty style and we’re ready to go on.</p>
<p><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="itemtemplate" border="0" alt="itemtemplate" src="http://vdcruijsen.net/wp-content/uploads/2012/01/itemtemplate.png" width="399" height="165" /></p>
<p>Your Xaml for the contentgrid should look like this</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> <span style="color: #0000ff">&lt;</span><span style="color: #800000">Grid</span> <span style="color: #ff0000">x:Name</span><span style="color: #0000ff">=&quot;ContentGrid&quot;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2">   2:</span>       <span style="color: #ff0000">Grid</span>.<span style="color: #ff0000">Row</span><span style="color: #0000ff">=&quot;1&quot;</span> <span style="color: #ff0000">Height</span><span style="color: #0000ff">=&quot;537&quot;</span> <span style="color: #ff0000">VerticalAlignment</span><span style="color: #0000ff">=&quot;Top&quot;</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3">   3:</span>     <span style="color: #0000ff">&lt;</span><span style="color: #800000">toolkit:MultiselectList</span> <span style="color: #ff0000">ItemsSource</span><span style="color: #0000ff">=&quot;{Binding Messages}&quot;</span> <span style="color: #ff0000">ItemTemplate</span><span style="color: #0000ff">=&quot;{StaticResource MessageTemplate}&quot;</span><span style="color: #0000ff">/&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4">   4:</span>     <span style="color: #0000ff">&lt;</span><span style="color: #800000">Sh:AdvancedApplicationBar</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5">   5:</span>         <span style="color: #0000ff">&lt;</span><span style="color: #800000">Sh:AdvancedApplicationBarIconButton</span> <span style="color: #ff0000">Text</span><span style="color: #0000ff">=&quot;Select&quot;</span> <span style="color: #ff0000">IconUri</span><span style="color: #0000ff">=&quot;/Images/ApplicationBar.Select.png&quot;</span><span style="color: #0000ff">/&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6">   6:</span>         <span style="color: #0000ff">&lt;</span><span style="color: #800000">Sh:AdvancedApplicationBarIconButton</span> <span style="color: #ff0000">Text</span><span style="color: #0000ff">=&quot;Remove&quot;</span> <span style="color: #ff0000">IconUri</span><span style="color: #0000ff">=&quot;/Images/ApplicationBar.Delete.png&quot;</span><span style="color: #0000ff">/&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7">   7:</span>     <span style="color: #0000ff">&lt;/</span><span style="color: #800000">Sh:AdvancedApplicationBar</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8">   8:</span> <span style="color: #0000ff">&lt;/</span><span style="color: #800000">Grid</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></div>
</div>
<p>The Xaml for the ItemTemplate looks like this</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> <span style="color: #0000ff">&lt;</span><span style="color: #800000">phone:PhoneApplicationPage.Resources</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2">   2:</span>     <span style="color: #0000ff">&lt;</span><span style="color: #800000">DataTemplate</span> <span style="color: #ff0000">x:Key</span><span style="color: #0000ff">=&quot;MessageTemplate&quot;</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3">   3:</span>         <span style="color: #0000ff">&lt;</span><span style="color: #800000">StackPanel</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4">   4:</span>             <span style="color: #0000ff">&lt;</span><span style="color: #800000">TextBlock</span> <span style="color: #ff0000">TextWrapping</span><span style="color: #0000ff">=&quot;Wrap&quot;</span> <span style="color: #ff0000">Text</span><span style="color: #0000ff">=&quot;{Binding Sender}&quot;</span> <span style="color: #ff0000">Style</span><span style="color: #0000ff">=&quot;{StaticResource PhoneTextLargeStyle}&quot;</span><span style="color: #0000ff">/&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5">   5:</span>             <span style="color: #0000ff">&lt;</span><span style="color: #800000">TextBlock</span> <span style="color: #ff0000">TextWrapping</span><span style="color: #0000ff">=&quot;Wrap&quot;</span> <span style="color: #ff0000">Text</span><span style="color: #0000ff">=&quot;{Binding Date}&quot;</span> <span style="color: #ff0000">Style</span><span style="color: #0000ff">=&quot;{StaticResource PhoneTextAccentStyle}&quot;</span><span style="color: #0000ff">/&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6">   6:</span>             <span style="color: #0000ff">&lt;</span><span style="color: #800000">TextBlock</span> <span style="color: #ff0000">TextWrapping</span><span style="color: #0000ff">=&quot;Wrap&quot;</span> <span style="color: #ff0000">Text</span><span style="color: #0000ff">=&quot;{Binding Content}&quot;</span> <span style="color: #ff0000">Style</span><span style="color: #0000ff">=&quot;{StaticResource PhoneTextNormalStyle}&quot;</span><span style="color: #0000ff">/&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7">   7:</span>         <span style="color: #0000ff">&lt;/</span><span style="color: #800000">StackPanel</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8">   8:</span>     <span style="color: #0000ff">&lt;/</span><span style="color: #800000">DataTemplate</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum9">   9:</span> <span style="color: #0000ff">&lt;/</span><span style="color: #800000">phone:PhoneApplicationPage.Resources</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></div>
</div>
<p>When we run our application now the output should be similar to this. You can tap on the left side of the screen to select items in the list just like you can in the build in mail application.</p>
<p><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="messages1" border="0" alt="messages1" src="http://vdcruijsen.net/wp-content/uploads/2012/01/messages1.png" width="250" height="417" />&#160;<img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="messages2" border="0" alt="messages2" src="http://vdcruijsen.net/wp-content/uploads/2012/01/messages2.png" width="250" height="417" /></p>
<p>It is pretty weird to have the Remove button visible when you’re not in selection mode of the MultiSelectList and the same thing goes for the Select button that’s still visible when the MultiSelectList is in selectionMode. To fix this we’ll bind the Visibility property of these ApplicationBarButtons to a boolean property that is also 2 way bound to the IsSelectionEnabled property of the MultiSelectList.</p>
<p>To do this we first need to add a boolean property to the ViewModel called IsInSelectionMode</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> <span style="color: #008000">/// &lt;summary&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2">   2:</span> <span style="color: #008000">/// The &lt;see cref=&quot;IsInSelectionMode&quot; /&gt; property's name.</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3">   3:</span> <span style="color: #008000">/// &lt;/summary&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4">   4:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">const</span> <span style="color: #0000ff">string</span> IsInSelectionModePropertyName = <span style="color: #006080">&quot;IsInSelectionMode&quot;</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5">   5:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6">   6:</span> <span style="color: #0000ff">private</span> <span style="color: #0000ff">bool</span> _isInSelectionMode = <span style="color: #0000ff">false</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7">   7:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8">   8:</span> <span style="color: #008000">/// &lt;summary&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum9">   9:</span> <span style="color: #008000">/// Sets and gets the IsInSelectionMode property.</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum10">  10:</span> <span style="color: #008000">/// Changes to that property's value raise the PropertyChanged event. </span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum11">  11:</span> <span style="color: #008000">/// &lt;/summary&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum12">  12:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">bool</span> IsInSelectionMode</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum13">  13:</span> {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum14">  14:</span>     get</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum15">  15:</span>     {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum16">  16:</span>         <span style="color: #0000ff">return</span> _isInSelectionMode;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum17">  17:</span>     }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum18">  18:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum19">  19:</span>     set</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum20">  20:</span>     {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum21">  21:</span>         <span style="color: #0000ff">if</span> (_isInSelectionMode == <span style="color: #0000ff">value</span>)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum22">  22:</span>         {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum23">  23:</span>             <span style="color: #0000ff">return</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum24">  24:</span>         }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum25">  25:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum26">  26:</span>         _isInSelectionMode = <span style="color: #0000ff">value</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum27">  27:</span>         RaisePropertyChanged(IsInSelectionModePropertyName);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum28">  28:</span>     }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum29">  29:</span> }</pre>
<p><!--CRLF--></div>
</div>
<p>When we have this property we can bind the property to the IsSelectionEnabled property of the MultiSelectList. For some reason this can’t be done in Blend since the DataBinding button is greyed out but coding it in Xaml does work. The binding looks like this in Xaml</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> <span style="color: #0000ff">&lt;</span><span style="color: #800000">toolkit:MultiselectList</span> <span style="color: #ff0000">ItemsSource</span><span style="color: #0000ff">=&quot;{Binding Messages}&quot;</span> <span style="color: #ff0000">ItemTemplate</span><span style="color: #0000ff">=&quot;{StaticResource MessageTemplate}&quot;</span> <span style="color: #ff0000">IsSelectionEnabled</span><span style="color: #0000ff">=&quot;{Binding IsInSelectionMode, Mode=TwoWay}&quot;</span><span style="color: #0000ff">/&gt;</span></pre>
<p><!--CRLF--></div>
</div>
<p>The Visibility property of the ApplicationBarButtons isn’t a boolean type so we’ll need a converter to convert the boolean to a Visibility Property. I’m using 2 converters here. 1 is converting the boolean value True to Visibility.Visible and the other converter is also an inverter and is converting True to Visibility.Collapsed. </p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> <span style="color: #008000">/// &lt;summary&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2">   2:</span> <span style="color: #008000">/// Converts a boolean to Visibililty</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3">   3:</span> <span style="color: #008000">/// &lt;/summary&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4">   4:</span> <span style="color: #008000">///[ValueConversion(typeof(bool), typeof(Visibility))]</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5">   5:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">class</span> BooleanToVisibilityConverter : IValueConverter</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6">   6:</span> {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7">   7:</span>     <span style="color: #cc6633">#region</span> IValueConverter Members</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8">   8:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum9">   9:</span>     <span style="color: #0000ff">public</span> <span style="color: #0000ff">object</span> Convert(<span style="color: #0000ff">object</span> <span style="color: #0000ff">value</span>, Type targetType, <span style="color: #0000ff">object</span> parameter, System.Globalization.CultureInfo culture)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum10">  10:</span>     {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum11">  11:</span>         Visibility result = Visibility.Collapsed;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum12">  12:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum13">  13:</span>         <span style="color: #0000ff">bool</span> val;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum14">  14:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum15">  15:</span>         <span style="color: #0000ff">if</span> (<span style="color: #0000ff">value</span> != <span style="color: #0000ff">null</span> &amp;&amp;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum16">  16:</span>             <span style="color: #0000ff">bool</span>.TryParse(<span style="color: #0000ff">value</span>.ToString(), <span style="color: #0000ff">out</span> val))</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum17">  17:</span>         {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum18">  18:</span>             result = val ? Visibility.Visible : Visibility.Collapsed;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum19">  19:</span>         }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum20">  20:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum21">  21:</span>         <span style="color: #0000ff">return</span> result;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum22">  22:</span>     }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum23">  23:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum24">  24:</span>     <span style="color: #0000ff">public</span> <span style="color: #0000ff">object</span> ConvertBack(<span style="color: #0000ff">object</span> <span style="color: #0000ff">value</span>, Type targetType, <span style="color: #0000ff">object</span> parameter, System.Globalization.CultureInfo culture)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum25">  25:</span>     {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum26">  26:</span>         <span style="color: #008000">//You can't convert back</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum27">  27:</span>         <span style="color: #0000ff">return</span> <span style="color: #0000ff">null</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum28">  28:</span>     }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum29">  29:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum30">  30:</span>     <span style="color: #cc6633">#endregion</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum31">  31:</span> }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum32">  32:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum33">  33:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum34">  34:</span> <span style="color: #008000">/// &lt;summary&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum35">  35:</span> <span style="color: #008000">/// Converts a boolean to Collapsed Visibililty</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum36">  36:</span> <span style="color: #008000">/// &lt;/summary&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum37">  37:</span> <span style="color: #008000">///[ValueConversion(typeof(bool), typeof(Visibility))]</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum38">  38:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">class</span> BooleanInverterToVisibilityConverter : IValueConverter</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum39">  39:</span> {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum40">  40:</span>     <span style="color: #cc6633">#region</span> IValueConverter Members</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum41">  41:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum42">  42:</span>     <span style="color: #0000ff">public</span> <span style="color: #0000ff">object</span> Convert(<span style="color: #0000ff">object</span> <span style="color: #0000ff">value</span>, Type targetType, <span style="color: #0000ff">object</span> parameter, System.Globalization.CultureInfo culture)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum43">  43:</span>         {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum44">  44:</span>             Visibility result = Visibility.Collapsed;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum45">  45:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum46">  46:</span>             <span style="color: #0000ff">bool</span> val;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum47">  47:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum48">  48:</span>             <span style="color: #0000ff">if</span> (<span style="color: #0000ff">value</span> != <span style="color: #0000ff">null</span> &amp;&amp;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum49">  49:</span>                 <span style="color: #0000ff">bool</span>.TryParse(<span style="color: #0000ff">value</span>.ToString(), <span style="color: #0000ff">out</span> val))</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum50">  50:</span>             {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum51">  51:</span>                 result = val ? Visibility.Collapsed : Visibility.Visible;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum52">  52:</span>             }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum53">  53:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum54">  54:</span>             <span style="color: #0000ff">return</span> result;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum55">  55:</span>         }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum56">  56:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum57">  57:</span>         <span style="color: #0000ff">public</span> <span style="color: #0000ff">object</span> ConvertBack(<span style="color: #0000ff">object</span> <span style="color: #0000ff">value</span>, Type targetType, <span style="color: #0000ff">object</span> parameter, System.Globalization.CultureInfo culture)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum58">  58:</span>         {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum59">  59:</span>             <span style="color: #008000">//You can't convert back</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum60">  60:</span>             <span style="color: #0000ff">return</span> <span style="color: #0000ff">null</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum61">  61:</span>         }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum62">  62:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum63">  63:</span>         <span style="color: #cc6633">#endregion</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum64">  64:</span>     }</pre>
<p><!--CRLF--></div>
</div>
<p>Lets Bind the boolean value using the converter to the ApplicationBarIcons. Your Xaml should look like this:</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> <span style="color: #0000ff">&lt;</span><span style="color: #800000">Sh:AdvancedApplicationBarIconButton</span> <span style="color: #ff0000">Text</span><span style="color: #0000ff">=&quot;Select&quot;</span> <span style="color: #ff0000">IconUri</span><span style="color: #0000ff">=&quot;/Images/ApplicationBar.Select.png&quot;</span> <span style="color: #ff0000">Visibility</span><span style="color: #0000ff">=&quot;{Binding IsInSelectionMode, Converter={StaticResource BooleanInverterToVisibilityConverter}}&quot;</span><span style="color: #0000ff">/&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2">   2:</span> <span style="color: #0000ff">&lt;</span><span style="color: #800000">Sh:AdvancedApplicationBarIconButton</span> <span style="color: #ff0000">Text</span><span style="color: #0000ff">=&quot;Remove&quot;</span> <span style="color: #ff0000">IconUri</span><span style="color: #0000ff">=&quot;/Images/ApplicationBar.Delete.png&quot;</span> <span style="color: #ff0000">Visibility</span><span style="color: #0000ff">=&quot;{Binding IsInSelectionMode, Converter={StaticResource BooleanToVisibilityConverter}}&quot;</span><span style="color: #0000ff">/&gt;</span></pre>
<p><!--CRLF--></div>
</div>
<p>If you run the application again you should be able to see the icons showing up and hiding at the correct times now.</p>
<p>To finish this sample and blogpost up we want the Select button to put the MultiSelectMode in selection mode and the remove button should remove the selected items. Lets start with the Select button. We’ll create a RelayCommand in the viewmodel that puts the MultiSelectList into selectionMode.</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> <span style="color: #0000ff">private</span> RelayCommand _messageListToSelectModeCommand;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2">   2:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3">   3:</span> <span style="color: #008000">/// &lt;summary&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4">   4:</span> <span style="color: #008000">/// Gets the MessageListToSelectModeCommand.</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5">   5:</span> <span style="color: #008000">/// &lt;/summary&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6">   6:</span> <span style="color: #0000ff">public</span> RelayCommand MessageListToSelectModeCommand</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7">   7:</span> {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8">   8:</span>     get</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum9">   9:</span>     {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum10">  10:</span>         <span style="color: #0000ff">return</span> _messageListToSelectModeCommand</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum11">  11:</span>             ?? (_messageListToSelectModeCommand = <span style="color: #0000ff">new</span> RelayCommand(</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum12">  12:</span>                 () =&gt;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum13">  13:</span>                 {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum14">  14:</span>                     IsInSelectionMode = <span style="color: #0000ff">true</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum15">  15:</span>                 }));</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum16">  16:</span>     }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum17">  17:</span> }</pre>
<p><!--CRLF--></div>
</div>
<p>On the Select ApplicationBarButton we’ll add an EventToCommand behavior that will trigger this RelayCommand. I did this in Blend but the Xaml that is created will look like this:</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> <span style="color: #0000ff">&lt;</span><span style="color: #800000">Sh:AdvancedApplicationBarIconButton</span> <span style="color: #ff0000">Text</span><span style="color: #0000ff">=&quot;Select&quot;</span> <span style="color: #ff0000">IconUri</span><span style="color: #0000ff">=&quot;/Images/ApplicationBar.Select.png&quot;</span> <span style="color: #ff0000">Visibility</span><span style="color: #0000ff">=&quot;{Binding IsInSelectionMode, Converter={StaticResource BooleanInverterToVisibilityConverter}}&quot;</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2">   2:</span>     <span style="color: #0000ff">&lt;</span><span style="color: #800000">i:Interaction.Triggers</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3">   3:</span>         <span style="color: #0000ff">&lt;</span><span style="color: #800000">i:EventTrigger</span> <span style="color: #ff0000">EventName</span><span style="color: #0000ff">=&quot;Click&quot;</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4">   4:</span>             <span style="color: #0000ff">&lt;</span><span style="color: #800000">GalaSoft_MvvmLight_Command:EventToCommand</span> <span style="color: #ff0000">Command</span><span style="color: #0000ff">=&quot;{Binding MessageListToSelectModeCommand, Mode=OneWay}&quot;</span><span style="color: #0000ff">/&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5">   5:</span>         <span style="color: #0000ff">&lt;/</span><span style="color: #800000">i:EventTrigger</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6">   6:</span>     <span style="color: #0000ff">&lt;/</span><span style="color: #800000">i:Interaction.Triggers</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7">   7:</span> <span style="color: #0000ff">&lt;/</span><span style="color: #800000">Sh:AdvancedApplicationBarIconButton</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></div>
</div>
<p>Running the application again will show us that using the select button puts the MultiSelectList in selectionmode so that part is finished. It only took 1 line of code in the relaycommand.</p>
<p>Removing the items is a bit more work since you can’t do a 2 way binding on the SelectedItems of a MultiSelectList because it is not a dependency property. The best way to get this working is setting up a property in the Viewmodel that is going to contain the selected items and update this list every time the selectionchanged event is fired by another EventToCommandBehavior that triggers a RelayCommand called SelectedMessagesChangedCommand. The SelectedMessagesChangedCommand will update the ViewModel property that will later be used to delete the items.</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> <span style="color: #008000">/// &lt;summary&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2">   2:</span> <span style="color: #008000">/// The &lt;see cref=&quot;SelectedMessages&quot; /&gt; property's name.</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3">   3:</span> <span style="color: #008000">/// &lt;/summary&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4">   4:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">const</span> <span style="color: #0000ff">string</span> SelectedMessagesPropertyName = <span style="color: #006080">&quot;SelectedMessages&quot;</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5">   5:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6">   6:</span> <span style="color: #0000ff">private</span> ObservableCollection&lt;Message&gt; _selectedMessages = <span style="color: #0000ff">null</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7">   7:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8">   8:</span> <span style="color: #008000">/// &lt;summary&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum9">   9:</span> <span style="color: #008000">/// Sets and gets the SelectedMessages property.</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum10">  10:</span> <span style="color: #008000">/// Changes to that property's value raise the PropertyChanged event. </span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum11">  11:</span> <span style="color: #008000">/// &lt;/summary&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum12">  12:</span> <span style="color: #0000ff">public</span> ObservableCollection&lt;Message&gt; SelectedMessages</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum13">  13:</span> {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum14">  14:</span>     get</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum15">  15:</span>     {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum16">  16:</span>         <span style="color: #0000ff">return</span> _selectedMessages;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum17">  17:</span>     }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum18">  18:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum19">  19:</span>     set</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum20">  20:</span>     {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum21">  21:</span>         <span style="color: #0000ff">if</span> (_selectedMessages == <span style="color: #0000ff">value</span>)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum22">  22:</span>         {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum23">  23:</span>             <span style="color: #0000ff">return</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum24">  24:</span>         }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum25">  25:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum26">  26:</span>         _selectedMessages = <span style="color: #0000ff">value</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum27">  27:</span>         RaisePropertyChanged(SelectedMessagesPropertyName);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum28">  28:</span>     }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum29">  29:</span> }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum30">  30:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum31">  31:</span> <span style="color: #0000ff">private</span> RelayCommand&lt;IList&gt; _selectedMessagesChangedCommand;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum32">  32:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum33">  33:</span> <span style="color: #008000">/// &lt;summary&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum34">  34:</span> <span style="color: #008000">/// Gets the SelectedMessagesChangedCommand.</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum35">  35:</span> <span style="color: #008000">/// &lt;/summary&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum36">  36:</span> <span style="color: #0000ff">public</span> RelayCommand&lt;IList&gt; SelectedMessagesChangedCommand</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum37">  37:</span> {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum38">  38:</span>     get</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum39">  39:</span>     {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum40">  40:</span>         <span style="color: #0000ff">return</span> _selectedMessagesChangedCommand</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum41">  41:</span>             ?? (_selectedMessagesChangedCommand = <span style="color: #0000ff">new</span> RelayCommand&lt;IList&gt;(ExecuteSelectedMessagesChangedCommand));</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum42">  42:</span>     }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum43">  43:</span> }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum44">  44:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum45">  45:</span> <span style="color: #0000ff">private</span> <span style="color: #0000ff">void</span> ExecuteSelectedMessagesChangedCommand(IList parameter)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum46">  46:</span> {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum47">  47:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum48">  48:</span>     SelectedMessages = <span style="color: #0000ff">new</span> ObservableCollection&lt;Message&gt;(parameter.Cast&lt;Message&gt;());</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum49">  49:</span> }</pre>
<p><!--CRLF--></div>
</div>
<p>Make sure the EventToCommand behavior is passing the SelectedItems as a command property. This can all be done in Blend but here is the Xaml that should be generated by Blend</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> <span style="color: #0000ff">&lt;</span><span style="color: #800000">i:Interaction.Triggers</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2">   2:</span>     <span style="color: #0000ff">&lt;</span><span style="color: #800000">i:EventTrigger</span> <span style="color: #ff0000">EventName</span><span style="color: #0000ff">=&quot;SelectionChanged&quot;</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3">   3:</span>         <span style="color: #0000ff">&lt;</span><span style="color: #800000">GalaSoft_MvvmLight_Command:EventToCommand</span> <span style="color: #ff0000">Command</span><span style="color: #0000ff">=&quot;{Binding SelectedMessagesChangedCommand, Mode=OneWay}&quot;</span> <span style="color: #ff0000">CommandParameter</span><span style="color: #0000ff">=&quot;{Binding SelectedItems, ElementName=multiselectList}&quot;</span><span style="color: #0000ff">/&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4">   4:</span>     <span style="color: #0000ff">&lt;/</span><span style="color: #800000">i:EventTrigger</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5">   5:</span> <span style="color: #0000ff">&lt;/</span><span style="color: #800000">i:Interaction.Triggers</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></div>
</div>
<p>Now we have the selected messages in our viewmodel we can use our last RelayCommand called DeleteSelectedMessagesCommand to remove the selected messages.</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> <span style="color: #0000ff">private</span> RelayCommand _deleteSelectedMessagesCommand;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2">   2:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3">   3:</span> <span style="color: #008000">/// &lt;summary&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4">   4:</span> <span style="color: #008000">/// Gets the DeleteSelectedMessagesCommand.</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5">   5:</span> <span style="color: #008000">/// &lt;/summary&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6">   6:</span> <span style="color: #0000ff">public</span> RelayCommand DeleteSelectedMessagesCommand</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7">   7:</span> {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8">   8:</span>     get</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum9">   9:</span>     {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum10">  10:</span>         <span style="color: #0000ff">return</span> _deleteSelectedMessagesCommand</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum11">  11:</span>             ?? (_deleteSelectedMessagesCommand = <span style="color: #0000ff">new</span> RelayCommand(</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum12">  12:</span>                 () =&gt;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum13">  13:</span>                 {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum14">  14:</span>                     <span style="color: #0000ff">foreach</span> (Message m <span style="color: #0000ff">in</span> SelectedMessages)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum15">  15:</span>                     {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum16">  16:</span>                         Messages.Remove(m);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum17">  17:</span>                     }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum18">  18:</span>                 }));</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum19">  19:</span>     }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum20">  20:</span> }</pre>
<p><!--CRLF--></div>
</div>
<p>This needs to be triggered again from an EventToCommand behavior attached to the remove ApplicationBarButton.</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> <span style="color: #0000ff">&lt;</span><span style="color: #800000">i:Interaction.Triggers</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2">   2:</span>     <span style="color: #0000ff">&lt;</span><span style="color: #800000">i:EventTrigger</span> <span style="color: #ff0000">EventName</span><span style="color: #0000ff">=&quot;Click&quot;</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3">   3:</span>         <span style="color: #0000ff">&lt;</span><span style="color: #800000">GalaSoft_MvvmLight_Command:EventToCommand</span> <span style="color: #ff0000">Command</span><span style="color: #0000ff">=&quot;{Binding DeleteSelectedMessagesCommand, Mode=OneWay}&quot;</span><span style="color: #0000ff">/&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4">   4:</span>     <span style="color: #0000ff">&lt;/</span><span style="color: #800000">i:EventTrigger</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5">   5:</span> <span style="color: #0000ff">&lt;/</span><span style="color: #800000">i:Interaction.Triggers</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></div>
</div>
<p>We can run our application again and when you press the remove button the selected items should be removed.</p>
<p>This sample proves the SH WP AdvancedApplicationBar is working pretty good and it proves it has features that I didn’t get to work in the BindableApplicationBar for example the Visibility of the ApplicationBarButtons. I think I’m going to use this ApplicationBar more often in my projects.</p>
<p>Hopefully this sample is usefull for you to see what the SH WP ApplicationBar is up to or just to get an impression on how to work with a bit more advanced ApplicationBar scenario’s using MVVM.</p>
<p>Sourcecode for the sample project can be downloaded <a href="https://skydrive.live.com/redir.aspx?cid=ef12210979e9f6b0&amp;resid=EF12210979E9F6B0!1459&amp;parid=EF12210979E9F6B0!134">here</a></p>
<p>Happy Coding</p>
<p>Geert van der Cruijsen</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Testing+the+SH+WP+ApplicationBar+in+an+Multiselectlist+MVVM+scenario&amp;u=http%3A%2F%2Fvdcruijsen.net%2F2012%2F01%2Ftesting-the-sh-wp-applicationbar-in-an-multiselectlist-mvvm-scenario%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Testing+the+SH+WP+ApplicationBar+in+an+Multiselectlist+MVVM+scenario&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2012%2F01%2Ftesting-the-sh-wp-applicationbar-in-an-multiselectlist-mvvm-scenario%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Testing+the+SH+WP+ApplicationBar+in+an+Multiselectlist+MVVM+scenario&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2012%2F01%2Ftesting-the-sh-wp-applicationbar-in-an-multiselectlist-mvvm-scenario%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fvdcruijsen.net%2F2012%2F01%2Ftesting-the-sh-wp-applicationbar-in-an-multiselectlist-mvvm-scenario%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://vdcruijsen.net/2012/01/testing-the-sh-wp-applicationbar-in-an-multiselectlist-mvvm-scenario/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Fixing the The Target &#8220;GetCopyToOutputDirectoryContentProjectItems&#8221; does not exist in the project exception when building your WP7 project</title>
		<link>http://vdcruijsen.net/2012/01/fixing-the-the-target-getcopytooutputdirectorycontentprojectitems-does-not-exist-in-the-project-exception-when-building-your-wp7-project/</link>
		<comments>http://vdcruijsen.net/2012/01/fixing-the-the-target-getcopytooutputdirectorycontentprojectitems-does-not-exist-in-the-project-exception-when-building-your-wp7-project/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 14:28:37 +0000</pubDate>
		<dc:creator>Geert van der Cruijsen</dc:creator>
				<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[Blend]]></category>
		<category><![CDATA[Expression Blend]]></category>
		<category><![CDATA[SDK]]></category>
		<category><![CDATA[WP7]]></category>
		<category><![CDATA[XNA]]></category>

		<guid isPermaLink="false">http://vdcruijsen.net/?p=180</guid>
		<description><![CDATA[My colleague was installing the Windows Phone 7.1 SDK today and we received the following errors during installation plus a popup box that the bootstrapper had an exception: Setup could not install the following components: Microsoft XNA game Studio 4.0 &#8230; <a href="http://vdcruijsen.net/2012/01/fixing-the-the-target-getcopytooutputdirectorycontentprojectitems-does-not-exist-in-the-project-exception-when-building-your-wp7-project/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>My colleague was installing the Windows Phone 7.1 SDK today and we received the following errors during installation plus a popup box that the bootstrapper had an exception:</p>
<p>Setup could not install the following components:</p>
<ul>
<li>Microsoft XNA game Studio 4.0 Refresh</li>
<li>Windows Phone SDK 7.1 Extensions for XNA Game Studio 4.0</li>
</ul>
<p><a href="http://vdcruijsen.net/wp-content/uploads/2012/01/sdk-error.jpg"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="sdk error" border="0" alt="sdk error" src="http://vdcruijsen.net/wp-content/uploads/2012/01/sdk-error_thumb.jpg" width="516" height="462" /></a></p>
<p>We retried installing the SDK after a full uninstall and a reboot but this wouldn’t help. This error kept appearing. In the end my idea was that we didn’t need XNA any time soon so we would just let this rest and see if everything was still working. Visual studio 2010 opened up fine, Blend&#160; was working All the templates for a&#160; phone project were there so everything seemed ok.</p>
<p>A few hours later when my colleague opened up an already made project from source control and tried to build the project she informed me that she was getting build errors so I had a look. The exception was </p>
<p><strong><em>The Target “GetCopyToOutputDirectoryContentProjectItems” does not exist in the project</em> </strong></p>
<p>I never heard of this error before and checked if the project was still building on my machine. Ofcourse it was so the problem was somewhere in her environment. I didn’t immediately make the connection of the XNA installation failure but after some searching I found out that it had to do with some of the MSBUILD .target files that Windows Phone 7.1 projects use that have dependencies on the XNA Game studio.</p>
<p>Getting XNA Game studio installed properly seemed the solution so we tried to get that fixed. The solution is in getting the XNA studio installed without use of the bootstrapper that was crashing and Aaron Stebner made a good post on how to do that <a href="http://blogs.msdn.com/b/astebner/archive/2009/06/12/9740290.aspx">here</a>.</p>
<p>Follow all the steps in Aarons guide (the file from step 9 didn’t exist for me so I skipped it) and after this the project would build again.</p>
<p>Everyone happy and back to coding <img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://vdcruijsen.net/wp-content/uploads/2012/01/wlEmoticon-smile.png" /> Hopefully this post can help someone else when they run into the same problems as we did because we’ve spend to much precious time to fix this.</p>
<p>Geert van der Cruijsen</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Fixing+the+The+Target+%26ldquo%3BGetCopyToOutputDirectoryContentProjectItems%26rdquo%3B+does+not+exist+in+the+project+exception+when+building+your+WP7+project&amp;u=http%3A%2F%2Fvdcruijsen.net%2F2012%2F01%2Ffixing-the-the-target-getcopytooutputdirectorycontentprojectitems-does-not-exist-in-the-project-exception-when-building-your-wp7-project%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Fixing+the+The+Target+%26ldquo%3BGetCopyToOutputDirectoryContentProjectItems%26rdquo%3B+does+not+exist+in+the+project+exception+when+building+your+WP7+project&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2012%2F01%2Ffixing-the-the-target-getcopytooutputdirectorycontentprojectitems-does-not-exist-in-the-project-exception-when-building-your-wp7-project%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Fixing+the+The+Target+%26ldquo%3BGetCopyToOutputDirectoryContentProjectItems%26rdquo%3B+does+not+exist+in+the+project+exception+when+building+your+WP7+project&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2012%2F01%2Ffixing-the-the-target-getcopytooutputdirectorycontentprojectitems-does-not-exist-in-the-project-exception-when-building-your-wp7-project%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fvdcruijsen.net%2F2012%2F01%2Ffixing-the-the-target-getcopytooutputdirectorycontentprojectitems-does-not-exist-in-the-project-exception-when-building-your-wp7-project%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://vdcruijsen.net/2012/01/fixing-the-the-target-getcopytooutputdirectorycontentprojectitems-does-not-exist-in-the-project-exception-when-building-your-wp7-project/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>WP7 Emulator Skin Switcher v1.1 released &#8211; now containing 23 skins (Nokia, Samsung, HTC and more)</title>
		<link>http://vdcruijsen.net/2011/12/wp7-emulator-skin-switcher-v1-1-released-now-containing-23-skins-nokia-samsung-htc-and-more/</link>
		<comments>http://vdcruijsen.net/2011/12/wp7-emulator-skin-switcher-v1-1-released-now-containing-23-skins-nokia-samsung-htc-and-more/#comments</comments>
		<pubDate>Sun, 25 Dec 2011 10:15:18 +0000</pubDate>
		<dc:creator>Geert van der Cruijsen</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://vdcruijsen.net/?p=172</guid>
		<description><![CDATA[After the first release of my skin switcher last week I got replies from a lot of people asking for more skins of Samsung, HTC and other devices. I tried to get in contact with all the skin creators out &#8230; <a href="http://vdcruijsen.net/2011/12/wp7-emulator-skin-switcher-v1-1-released-now-containing-23-skins-nokia-samsung-htc-and-more/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>After the first release of my skin switcher last week I got replies from a lot of people asking for more skins of Samsung, HTC and other devices. I tried to get in contact with all the skin creators out there who had published a skin to ask if I could add it to the application. Luckily all said yes so I’ve included a lot of new skins. I also used my spare time in this holiday season to create some new skins that I couldn’t find online yet.</p>
<p>Version 1.1 contains a total of 23 emulator skins from popular devices as the HTC Titan, HTC Radar, HTC Trophy, HTC Mozart, HTC HD7, Samsung Focus S, Samsung Omnia W, Samsung Omnia 7, Samsung Focus, Fujitsu IS12T in green and black, ZTE Tania, Nokia Lumia 710 and the Nokia Lumia 800.</p>
<p>Big thanks to Jeff Wilcox, Jeff Blankenburg, Danijel Malik, Georg Kalus and Pedro Lamas for adding their skins to the application. </p>
<p><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="emulator skin switcher" border="0" alt="emulator skin switcher" src="http://vdcruijsen.net/wp-content/uploads/2011/12/emulator-skin-switcher.png" width="520" height="360" /></p>
<p><strike>You can download version 1.1 here now: </strike></p>
<p><strong>Update! version 1.2 is released and the project is moved to codeplex. you can find the newest version here: </strong><a title="http://wp7emuskinswitcher.codeplex.com/" href="http://wp7emuskinswitcher.codeplex.com/"><strong>http://wp7emuskinswitcher.codeplex.com/</strong></a></p>
<p>Total list of skins:</p>
<ul>
<li>Default skin – Microsoft </li>
<li>Fujitsu IS12T Green &#8211; <a href="http://twitter.com/geertvdc" target="_blank">Geert van der Cruijsen</a> </li>
<li>Fujitsu IS12T Black &#8211; <a href="http://twitter.com/geertvdc" target="_blank">Geert van der Cruijsen</a> </li>
<li>Generic unbranded skin &#8211; <a href="http://www.jeff.wilcox.name/" target="_blank">Jeff Wilcox</a> </li>
<li>HTC Arrive (7pro) &#8211; <a href="http://www.jeffblankenburg.com/2011/12/17/want-to-change-your-windows-phone-emulator/" target="_blank">Jeff Blankenburg</a> </li>
<li>HTC HD7 &#8211; <a href="http://twitter.com/geertvdc" target="_blank">Geert van der Cruijsen</a> </li>
<li>HTC Mozart &#8211; <a href="http://arkcore.wordpress.com/2011/04/28/windows-phone-7-emulator-htc-mozart-skin/" target="_blank">Danijel Malik</a> </li>
<li>HTC Radar Silver &#8211; <a href="http://twitter.com/geertvdc" target="_blank">Geert van der Cruijsen</a> </li>
<li>HTC Titan &#8211; <a href="http://twitter.com/geertvdc" target="_blank">Geert van der Cruijsen</a> </li>
<li>HTC Trophy &#8211; <a href="http://twitter.com/geertvdc" target="_blank">Geert van der Cruijsen</a> </li>
<li>Nokia Lumia 710 Black Blue &#8211; <a href="http://twitter.com/geertvdc" target="_blank">Geert van der Cruijsen</a> </li>
<li>Nokia Lumia 710 Black Yellow &#8211; <a href="http://twitter.com/geertvdc" target="_blank">Geert van der Cruijsen</a> </li>
<li>Nokia Lumia 710 White Black &#8211; <a href="http://twitter.com/geertvdc" target="_blank">Geert van der Cruijsen</a> </li>
<li>Nokia Lumia 710 White Blue &#8211; <a href="http://twitter.com/geertvdc" target="_blank">Geert van der Cruijsen</a> </li>
<li>Nokia Lumia 710 White Pink &#8211; <a href="http://www.leitning.de/2011/nokia-lumia-800-windows-phone-emulator-skin/" target="_blank">Georg Kalus</a> </li>
<li>Nokia Lumia 800 Black &#8211; <a href="http://www.pedrolamas.com/windows-phone/nokia-lumia-800-skin/" target="_blank">Pedro Lamas</a> </li>
<li>Nokia Lumia 800 Blue &#8211; <a href="http://www.leitning.de/2011/nokia-lumia-800-windows-phone-emulator-skin/" target="_blank">Georg Kalus</a> </li>
<li>Nokia Lumia 800 Pink &#8211; <a href="http://twitter.com/geertvdc" target="_blank">Geert van der Cruijsen</a> </li>
<li>Samsung Focus &#8211; <a href="http://www.jeff.wilcox.name/" target="_blank">Jeff Wilcox</a> </li>
<li>Samsung Focus S &#8211; <a href="http://twitter.com/geertvdc" target="_blank">Geert van der Cruijsen</a> </li>
<li>Samsung Omnia 7 &#8211; <a href="http://twitter.com/geertvdc" target="_blank">Geert van der Cruijsen</a> </li>
<li>Samsung Omnia W &#8211; <a href="http://twitter.com/geertvdc" target="_blank">Geert van der Cruijsen</a> </li>
<li>ZTE Tania &#8211; <a href="http://twitter.com/geertvdc" target="_blank">Geert van der Cruijsen</a> </li>
</ul>
<p>If you created a skin or want to create a skin that’s not included and you want to get it listed in the application yet let me know and I’ll add it for you including your name and a link to your blog or website.</p>
<p><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="emulator skin switcher 2" border="0" alt="emulator skin switcher 2" src="http://vdcruijsen.net/wp-content/uploads/2011/12/emulator-skin-switcher-2.png" width="520" height="360" /></p>
<p>Here are some screenshots of newly added skins</p>
<p><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="fujitsuis12t" border="0" alt="fujitsuis12t" src="http://vdcruijsen.net/wp-content/uploads/2011/12/fujitsuis12t.png" width="180" height="357" /><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="htcradar" border="0" alt="htcradar" src="http://vdcruijsen.net/wp-content/uploads/2011/12/htcradar.png" width="183" height="358" /><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="htctitan" border="0" alt="htctitan" src="http://vdcruijsen.net/wp-content/uploads/2011/12/htctitan.png" width="196" height="357" /><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="samsungfocuss" border="0" alt="samsungfocuss" src="http://vdcruijsen.net/wp-content/uploads/2011/12/samsungfocuss.png" width="195" height="357" /><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="samsungomniaw" border="0" alt="samsungomniaw" src="http://vdcruijsen.net/wp-content/uploads/2011/12/samsungomniaw.png" width="192" height="357" /><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="ztetania" border="0" alt="ztetania" src="http://vdcruijsen.net/wp-content/uploads/2011/12/ztetania.png" width="192" height="357" /></p>
<p>If for some reason the application is not working and your emulator stopped working after usage of the application let me know and I’ll help you to get everything working again!</p>
<p>Happy coding!</p>
<p>Geert van der Cruijsen</p>
<ul><!--EndFragment--></ul>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=WP7+Emulator+Skin+Switcher+v1.1+released+-+now+containing+23+skins+%28Nokia%2C+Samsung%2C+HTC+and+more%29&amp;u=http%3A%2F%2Fvdcruijsen.net%2F2011%2F12%2Fwp7-emulator-skin-switcher-v1-1-released-now-containing-23-skins-nokia-samsung-htc-and-more%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=WP7+Emulator+Skin+Switcher+v1.1+released+-+now+containing+23+skins+%28Nokia%2C+Samsung%2C+HTC+and+more%29&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2011%2F12%2Fwp7-emulator-skin-switcher-v1-1-released-now-containing-23-skins-nokia-samsung-htc-and-more%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=WP7+Emulator+Skin+Switcher+v1.1+released+-+now+containing+23+skins+%28Nokia%2C+Samsung%2C+HTC+and+more%29&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2011%2F12%2Fwp7-emulator-skin-switcher-v1-1-released-now-containing-23-skins-nokia-samsung-htc-and-more%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fvdcruijsen.net%2F2011%2F12%2Fwp7-emulator-skin-switcher-v1-1-released-now-containing-23-skins-nokia-samsung-htc-and-more%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://vdcruijsen.net/2011/12/wp7-emulator-skin-switcher-v1-1-released-now-containing-23-skins-nokia-samsung-htc-and-more/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Windows Phone 7 Emulator Skin Switcher 1.0 Beta</title>
		<link>http://vdcruijsen.net/2011/12/windows-phone-7-emulator-skin-switcher-1-0-beta/</link>
		<comments>http://vdcruijsen.net/2011/12/windows-phone-7-emulator-skin-switcher-1-0-beta/#comments</comments>
		<pubDate>Tue, 20 Dec 2011 15:47:02 +0000</pubDate>
		<dc:creator>Geert van der Cruijsen</dc:creator>
				<category><![CDATA[Geert's Projects]]></category>
		<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[WP7]]></category>

		<guid isPermaLink="false">http://vdcruijsen.net/2011/12/windows-phone-7-emulator-skin-switcher-1-0-beta/</guid>
		<description><![CDATA[In the last few weeks several people started creating their own skins for the Windows Phone 7 Emulator. Switching between different skins was a lot of work by copying files manually to the emulator directory every time you wanted to &#8230; <a href="http://vdcruijsen.net/2011/12/windows-phone-7-emulator-skin-switcher-1-0-beta/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In the last few weeks several people started creating their own skins for the Windows Phone 7 Emulator. Switching between different skins was a lot of work by copying files manually to the emulator directory every time you wanted to switch. From now on this is not needed anymore because you can use the Windows Phone 7 Emulator Skin Switcher application I’ve created.</p>
<p><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="wp7EmulatorSkinSwitcher" border="0" alt="wp7EmulatorSkinSwitcher" src="http://vdcruijsen.net/wp-content/uploads/2011/12/wp7EmulatorSkinSwitcher.png" width="520" height="360" /></p>
<p><strike>You can download the application here: </strike><a href="https://skydrive.live.com/redir.aspx?cid=ef12210979e9f6b0&amp;resid=EF12210979E9F6B0!1458&amp;parid=EF12210979E9F6B0!124" target="_blank"><strike>Download</strike></a></p>
<p><strong>Update! version 1.2 is released and the project is moved to codeplex. you can find the newest version here: </strong><a title="http://wp7emuskinswitcher.codeplex.com/" href="http://wp7emuskinswitcher.codeplex.com/"><strong>http://wp7emuskinswitcher.codeplex.com/</strong></a></p>
<p>This version is the first <strong><u>beta</u></strong> release with my first set of skins. I added 2 skins from <a href="http://www.leitning.de/2011/nokia-lumia-800-windows-phone-emulator-skin/" target="_blank">Georg Kalus</a>: the Blue Nokia Lumia 800 and the White/Pink Nokia Lumia 710. I’ve also included the Black Nokia Lumia 800 skin from <a href="http://www.pedrolamas.com/windows-phone/nokia-lumia-800-skin/" target="_blank">Pedro Lamas</a></p>
<p>The complete list of skins included in the application now are:</p>
<ul>
<li>Default skin – Microsoft </li>
<li>Nokia Lumia 710 Black Blue &#8211; <a href="http://twitter.com/geertvdc" target="_blank">Geert van der Cruijsen</a> </li>
<li>Nokia Lumia 710 Black Yellow &#8211; <a href="http://twitter.com/geertvdc" target="_blank">Geert van der Cruijsen</a> </li>
<li>Nokia Lumia 710 White Black &#8211; <a href="http://twitter.com/geertvdc" target="_blank">Geert van der Cruijsen</a> </li>
<li>Nokia Lumia 710 White Blue &#8211; <a href="http://twitter.com/geertvdc" target="_blank">Geert van der Cruijsen</a> </li>
<li>Nokia Lumia 710 White Pink &#8211; <a href="http://www.leitning.de/2011/nokia-lumia-800-windows-phone-emulator-skin/" target="_blank">Georg Kalus</a> </li>
<li>Nokia Lumia 800 Black &#8211; <a href="http://www.pedrolamas.com/windows-phone/nokia-lumia-800-skin/" target="_blank">Pedro Lamas</a> </li>
<li>Nokia Lumia 800 Blue &#8211; <a href="http://www.leitning.de/2011/nokia-lumia-800-windows-phone-emulator-skin/" target="_blank">Georg Kalus</a> </li>
<li>Nokia Lumia 800 Pink &#8211; <a href="http://twitter.com/geertvdc" target="_blank">Geert van der Cruijsen</a> </li>
</ul>
<p>I’m planning on adding more skins in the near future but didn’t have time for it yet. If you have skins I can use please let me know by comment or on <a href="http://twitter.com/geertvdc" target="_blank">twitter</a></p>
<p><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="lumia710white" border="0" alt="lumia710white" src="http://vdcruijsen.net/wp-content/uploads/2011/12/lumia710white.png" width="190" height="359" /><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="lumia800pink" border="0" alt="lumia800pink" src="http://vdcruijsen.net/wp-content/uploads/2011/12/lumia800pink.png" width="190" height="345" /><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="lumia710black" border="0" alt="lumia710black" src="http://vdcruijsen.net/wp-content/uploads/2011/12/lumia710black.png" width="190" height="359" /></p>
<p>&#160;</p>
<p>Hopefully this will make your Windows Phone 7 projects even more fun to test!</p>
<p>Happy Coding</p>
<p>Geert van der Cruijsen</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Windows+Phone+7+Emulator+Skin+Switcher+1.0+Beta&amp;u=http%3A%2F%2Fvdcruijsen.net%2F2011%2F12%2Fwindows-phone-7-emulator-skin-switcher-1-0-beta%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Windows+Phone+7+Emulator+Skin+Switcher+1.0+Beta&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2011%2F12%2Fwindows-phone-7-emulator-skin-switcher-1-0-beta%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Windows+Phone+7+Emulator+Skin+Switcher+1.0+Beta&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2011%2F12%2Fwindows-phone-7-emulator-skin-switcher-1-0-beta%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fvdcruijsen.net%2F2011%2F12%2Fwindows-phone-7-emulator-skin-switcher-1-0-beta%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://vdcruijsen.net/2011/12/windows-phone-7-emulator-skin-switcher-1-0-beta/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>Creating dynamic Windows Phone 7 live tile images client side</title>
		<link>http://vdcruijsen.net/2011/12/creating-dynamic-windows-phone-7-live-tile-images-client-side/</link>
		<comments>http://vdcruijsen.net/2011/12/creating-dynamic-windows-phone-7-live-tile-images-client-side/#comments</comments>
		<pubDate>Mon, 12 Dec 2011 15:36:31 +0000</pubDate>
		<dc:creator>Geert van der Cruijsen</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[Live Tiles]]></category>
		<category><![CDATA[WP7]]></category>

		<guid isPermaLink="false">http://vdcruijsen.net/2011/12/creating-dynamic-windows-phone-7-live-tile-images-client-side/</guid>
		<description><![CDATA[One of the best parts of windows phone that makes Windows Phone stand out are the live tiles. Microsoft enables you to do a few out of the box customizations to the live tiles but&#160; when you want to go &#8230; <a href="http://vdcruijsen.net/2011/12/creating-dynamic-windows-phone-7-live-tile-images-client-side/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>One of the best parts of windows phone that makes Windows Phone stand out are the live tiles. Microsoft enables you to do a few out of the box customizations to the live tiles but&#160; when you want to go all out most people think you’ll need to generate the images on a server using ASP.NET and then send them to the application as a notification. This is not always the case, you can also create custom tiles client side running on your phone to show custom messages or imitate the outlook tile for example with a number of how many unread messages you have.</p>
<p>First lets sum up what you can do by default and after that we’ll go into going beyond this and creating even better live tiles by adding multiple images or multiple texts to a live tile using the colors and fonts of your choice.</p>
<p>By default you can set the following properties on a live tile</p>
<ul>
<li>Title (shown in the bottom left)</li>
<li>Count (black circle with a number between 1 and 99)</li>
<li>BackGroundImage (image to show on your tile)</li>
<li>BackTitle (shown in the bottom left on the backside of the tile)</li>
<li>BackContent (piece of text shown on the backside of the tile)</li>
<li>BackBackGroundImage (Image on the backside of the tile)</li>
</ul>
<p>Ok this is pretty cool but what if we want to make something like Runkeeper does in their app as shown in the following picture:<img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="runkeeper live tile" border="0" alt="runkeeper live tile" src="http://vdcruijsen.net/wp-content/uploads/2011/12/runkeeper-live-tile.png" width="600" height="200" /></p>
<p>So how do we generate such image on the client side in Silverlight? The trick behind all this is that you can render a user control as a WriteableBitmap and store this image in the isolated storage of your phone so you can use it as the tile BackGroundImage. The final working codesample is linked at the bottom of this post but I’ll show all code to build this example in this blogpost.</p>
<p>We start of creating a new Silverlight for Windows Phone project. Normally I would use MVVM but for this example I want to make it as simple as possible to focus on the tile part.</p>
<p>We’ll create a new UserControl called “TileControl” which is going to be used as our live tile and a “TileData” class to be used for containing the data we’ll be showing on the&#160; live tile.</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">class</span> TileData</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2">   2:</span> {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3">   3:</span>     <span style="color: #0000ff">public</span> <span style="color: #0000ff">string</span> Text1 { get; set; }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4">   4:</span>     <span style="color: #0000ff">public</span> <span style="color: #0000ff">string</span> Text2 { get; set; }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5">   5:</span>     <span style="color: #0000ff">public</span> <span style="color: #0000ff">string</span> ImageSource { get; set; }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6">   6:</span> }</pre>
<p><!--CRLF--></div>
</div>
<p>Create the TileControl, set it to 173 by 173pixels and set the background to use PhoneAccentBrush so the live tile has the color the user has selected. Lets make our designers happy and open up the TileControl in expression blend so our designers (or if you are a devigner you!) can design our live tile with dynamic data.</p>
<p>Add a few text boxes and a image to the control so you have something like this:</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> <span style="color: #0000ff">&lt;</span><span style="color: #800000">Grid</span> <span style="color: #ff0000">x:Name</span><span style="color: #0000ff">=&quot;LayoutRoot&quot;</span> <span style="color: #ff0000">Width</span><span style="color: #0000ff">=&quot;173&quot;</span> <span style="color: #ff0000">Height</span><span style="color: #0000ff">=&quot;173&quot;</span> <span style="color: #ff0000">Background</span><span style="color: #0000ff">=&quot;{StaticResource PhoneAccentBrush}&quot;</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2">   2:</span>     <span style="color: #0000ff">&lt;</span><span style="color: #800000">TextBlock</span> <span style="color: #ff0000">Height</span><span style="color: #0000ff">=&quot;55&quot;</span> <span style="color: #ff0000">Margin</span><span style="color: #0000ff">=&quot;4,4,3,0&quot;</span> <span style="color: #ff0000">TextWrapping</span><span style="color: #0000ff">=&quot;Wrap&quot;</span> <span style="color: #ff0000">VerticalAlignment</span><span style="color: #0000ff">=&quot;Top&quot;</span> <span style="color: #ff0000">Foreground</span><span style="color: #0000ff">=&quot;White&quot;</span> <span style="color: #ff0000">FontSize</span><span style="color: #0000ff">=&quot;24&quot;</span><span style="color: #0000ff">/&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3">   3:</span>     <span style="color: #0000ff">&lt;</span><span style="color: #800000">TextBlock</span> <span style="color: #ff0000">Margin</span><span style="color: #0000ff">=&quot;0,64,-17,-3&quot;</span> <span style="color: #ff0000">TextWrapping</span><span style="color: #0000ff">=&quot;Wrap&quot;</span> <span style="color: #ff0000">FontSize</span><span style="color: #0000ff">=&quot;64&quot;</span> <span style="color: #ff0000">HorizontalAlignment</span><span style="color: #0000ff">=&quot;Right&quot;</span> <span style="color: #ff0000">Width</span><span style="color: #0000ff">=&quot;70&quot;</span> <span style="color: #ff0000">Foreground</span><span style="color: #0000ff">=&quot;White&quot;</span><span style="color: #0000ff">/&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4">   4:</span>     <span style="color: #0000ff">&lt;</span><span style="color: #800000">Image</span> <span style="color: #ff0000">Margin</span><span style="color: #0000ff">=&quot;6,55,0,13&quot;</span> <span style="color: #ff0000">Width</span><span style="color: #0000ff">=&quot;100&quot;</span> <span style="color: #ff0000">HorizontalAlignment</span><span style="color: #0000ff">=&quot;Left&quot;</span><span style="color: #0000ff">/&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5">   5:</span> <span style="color: #0000ff">&lt;/</span><span style="color: #800000">Grid</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></div>
</div>
<p>In the Data window click the icon “Create sample data from class” and select the TileData class.</p>
<p><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="create sample data" border="0" alt="create sample data" src="http://vdcruijsen.net/wp-content/uploads/2011/12/create-sample-data.png" width="400" height="600" /></p>
<p>Edit the sample data so we have some nice data to show. I used the following data:</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> <span style="color: #0000ff">&lt;</span><span style="color: #800000">CustomLiveTileExample:TileData</span> <span style="color: #ff0000">xmlns:CustomLiveTileExample</span><span style="color: #0000ff">=&quot;clr-namespace:CustomLiveTileExample&quot;</span> </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2">   2:</span> <span style="color: #ff0000">ImageSource</span><span style="color: #0000ff">=&quot;ApplicationIcon.png&quot;</span> </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3">   3:</span> <span style="color: #ff0000">Text1</span><span style="color: #0000ff">=&quot;The first Text&quot;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4">   4:</span> <span style="color: #ff0000">Text2</span><span style="color: #0000ff">=&quot;9&quot;</span><span style="color: #0000ff">/&gt;</span></pre>
<p><!--CRLF--></div>
</div>
<p>Now drag the fields from the test data window to the text and image control to bind them. After this your XAML should look like this and the design surface should already show a nice live tile with an image and 2 texts. In our code we’ll databind this control to a programmatically filled TileData object.</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> <span style="color: #0000ff">&lt;</span><span style="color: #800000">Grid</span> <span style="color: #ff0000">x:Name</span><span style="color: #0000ff">=&quot;LayoutRoot&quot;</span> <span style="color: #ff0000">Width</span><span style="color: #0000ff">=&quot;137&quot;</span> <span style="color: #ff0000">Height</span><span style="color: #0000ff">=&quot;137&quot;</span> <span style="color: #ff0000">Background</span><span style="color: #0000ff">=&quot;{StaticResource PhoneAccentBrush}&quot;</span> <span style="color: #ff0000">d:DataContext</span><span style="color: #0000ff">=&quot;{d:DesignData /SampleData/TileDataSampleData.xaml}&quot;</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2">   2:</span>     <span style="color: #0000ff">&lt;</span><span style="color: #800000">TextBlock</span> <span style="color: #ff0000">Height</span><span style="color: #0000ff">=&quot;55&quot;</span> <span style="color: #ff0000">Margin</span><span style="color: #0000ff">=&quot;4,4,3,0&quot;</span> <span style="color: #ff0000">TextWrapping</span><span style="color: #0000ff">=&quot;Wrap&quot;</span> <span style="color: #ff0000">VerticalAlignment</span><span style="color: #0000ff">=&quot;Top&quot;</span> <span style="color: #ff0000">Foreground</span><span style="color: #0000ff">=&quot;White&quot;</span> <span style="color: #ff0000">FontSize</span><span style="color: #0000ff">=&quot;21.333&quot;</span> <span style="color: #ff0000">Text</span><span style="color: #0000ff">=&quot;{Binding Text1}&quot;</span><span style="color: #0000ff">/&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3">   3:</span>     <span style="color: #0000ff">&lt;</span><span style="color: #800000">TextBlock</span> <span style="color: #ff0000">Margin</span><span style="color: #0000ff">=&quot;0,50,-10,11&quot;</span> <span style="color: #ff0000">TextWrapping</span><span style="color: #0000ff">=&quot;Wrap&quot;</span> <span style="color: #ff0000">FontSize</span><span style="color: #0000ff">=&quot;48&quot;</span> <span style="color: #ff0000">HorizontalAlignment</span><span style="color: #0000ff">=&quot;Right&quot;</span> <span style="color: #ff0000">Width</span><span style="color: #0000ff">=&quot;70&quot;</span> <span style="color: #ff0000">Foreground</span><span style="color: #0000ff">=&quot;White&quot;</span> <span style="color: #ff0000">Text</span><span style="color: #0000ff">=&quot;{Binding Text2}&quot;</span><span style="color: #0000ff">/&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4">   4:</span>     <span style="color: #0000ff">&lt;</span><span style="color: #800000">Image</span> <span style="color: #ff0000">Margin</span><span style="color: #0000ff">=&quot;12,51,65,17&quot;</span> <span style="color: #ff0000">Width</span><span style="color: #0000ff">=&quot;60&quot;</span> <span style="color: #ff0000">Source</span><span style="color: #0000ff">=&quot;{Binding ImageSource}&quot;</span><span style="color: #0000ff">/&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5">   5:</span> <span style="color: #0000ff">&lt;/</span><span style="color: #800000">Grid</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></div>
</div>
<p><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="blend tile" border="0" alt="blend tile" src="http://vdcruijsen.net/wp-content/uploads/2011/12/blend-tile.png" width="201" height="199" /></p>
<p>The live tile is ready so lets head back to the main page of our application and add the logic to set the live tile. To trigger the creation of the live tile I’ve added a button on the page and attached a click event. in the button1_Click method I’ll add all code needed to create the live tile.</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> <span style="color: #0000ff">private</span> <span style="color: #0000ff">void</span> button1_Click(<span style="color: #0000ff">object</span> sender, RoutedEventArgs e)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2">   2:</span>         {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3">   3:</span>             TileControl frontTile = <span style="color: #0000ff">new</span> TileControl();</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4">   4:</span>             TileData tileData = <span style="color: #0000ff">new</span> TileData() { ImageSource = <span style="color: #006080">&quot;/ApplicationIcon.png&quot;</span>, Text1 = <span style="color: #006080">&quot;The first text&quot;</span>, Text2 = <span style="color: #006080">&quot;8&quot;</span> };</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5">   5:</span>             frontTile.DataContext = tileData;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6">   6:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7">   7:</span>             frontTile.Measure(<span style="color: #0000ff">new</span> Size(173, 173));</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8">   8:</span>             frontTile.Arrange(<span style="color: #0000ff">new</span> Rect(0, 0, 173, 173));</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum9">   9:</span>             var bmp = <span style="color: #0000ff">new</span> WriteableBitmap(173, 173);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum10">  10:</span>             bmp.Render(frontTile, <span style="color: #0000ff">null</span>);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum11">  11:</span>             bmp.Invalidate();</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum12">  12:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum13">  13:</span>             var isf = IsolatedStorageFile.GetUserStoreForApplication();</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum14">  14:</span>             var filename = <span style="color: #006080">&quot;/Shared/ShellContent/tile.jpg&quot;</span>;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum15">  15:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum16">  16:</span>             <span style="color: #0000ff">if</span> (!isf.DirectoryExists(<span style="color: #006080">&quot;/Shared/ShellContent&quot;</span>))</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum17">  17:</span>             {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum18">  18:</span>                 isf.CreateDirectory(<span style="color: #006080">&quot;/Shared/ShellContent&quot;</span>);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum19">  19:</span>             }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum20">  20:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum21">  21:</span>             <span style="color: #0000ff">using</span> (var stream = isf.OpenFile(filename, System.IO.FileMode.OpenOrCreate))</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum22">  22:</span>             {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum23">  23:</span>                 bmp.SaveJpeg(stream, 173, 173, 0, 100);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum24">  24:</span>             }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum25">  25:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum26">  26:</span>             var data = <span style="color: #0000ff">new</span> StandardTileData</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum27">  27:</span>             {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum28">  28:</span>                 BackgroundImage = <span style="color: #0000ff">new</span> Uri(<span style="color: #006080">&quot;isostore:&quot;</span> + filename, UriKind.Absolute)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum29">  29:</span>             };</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum30">  30:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum31">  31:</span>             ShellTile.Create(<span style="color: #0000ff">new</span> Uri(<span style="color: #006080">&quot;/MainPage.xaml&quot;</span>, UriKind.Relative), data);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum32">  32:</span>         }</pre>
<p><!--CRLF--></div>
</div>
<p>First we’ll create a TileControl object called frontTile, then we’ll fill it with our tileData by creating a TileData object and setting the DataContext to tileData. After this we’ll create a WriteableBitmap and set it to 173 by 173 pixels. Well use the Render method to render the usercontrol as a bitmap.</p>
<p>After that we’ll check if the directory in the isolated storage exists and if it doesn’t we’ll create it. After that we’ll open the tile file and use the SaveJpeg method to save the WritableBitmap as a .jpg file (bit of a shame you can’t do png that’s why we’ve set the background color to the PhoneAccentColor). after saving the image the only thing we need to do is Call Create on the ShellTile and we’re done.</p>
<p>Lets run the app, press the button and there it is, our dynamically created livetile.</p>
<p><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="app1" border="0" alt="app1" src="http://vdcruijsen.net/wp-content/uploads/2011/12/app1.png" width="250" height="476" />&#160;&#160;&#160; <img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="app2" border="0" alt="app2" src="http://vdcruijsen.net/wp-content/uploads/2011/12/app2.png" width="250" height="476" /></p>
<p>Download Sample project:</p>
<p><iframe style="padding-bottom: 0px; background-color: #fcfcfc; padding-left: 0px; padding-right: 0px; padding-top: 0px" title="Preview" height="120" marginheight="0" src="https://skydrive.live.com/embed?cid=EF12210979E9F6B0&amp;resid=EF12210979E9F6B0%211456&amp;authkey=AFWKfMr5Pk2Y0oY" frameborder="0" width="98" marginwidth="0" scrolling="no"></iframe></p>
<p>Happy coding!</p>
<p>Geert van der Cruijsen</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Creating+dynamic+Windows+Phone+7+live+tile+images+client+side&amp;u=http%3A%2F%2Fvdcruijsen.net%2F2011%2F12%2Fcreating-dynamic-windows-phone-7-live-tile-images-client-side%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Creating+dynamic+Windows+Phone+7+live+tile+images+client+side&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2011%2F12%2Fcreating-dynamic-windows-phone-7-live-tile-images-client-side%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Creating+dynamic+Windows+Phone+7+live+tile+images+client+side&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2011%2F12%2Fcreating-dynamic-windows-phone-7-live-tile-images-client-side%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fvdcruijsen.net%2F2011%2F12%2Fcreating-dynamic-windows-phone-7-live-tile-images-client-side%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://vdcruijsen.net/2011/12/creating-dynamic-windows-phone-7-live-tile-images-client-side/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Tutorial: How to use the Silverlight Toolkit transitions without writing XAML by using the Toolkit behavior extensions</title>
		<link>http://vdcruijsen.net/2011/12/tutorial-how-to-use-the-silverlight-toolkit-transitions-without-writing-xaml-by-using-the-toolkit-behavior-extensions/</link>
		<comments>http://vdcruijsen.net/2011/12/tutorial-how-to-use-the-silverlight-toolkit-transitions-without-writing-xaml-by-using-the-toolkit-behavior-extensions/#comments</comments>
		<pubDate>Sun, 04 Dec 2011 09:06:53 +0000</pubDate>
		<dc:creator>Geert van der Cruijsen</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[Blend]]></category>
		<category><![CDATA[codeplex]]></category>
		<category><![CDATA[WP7]]></category>

		<guid isPermaLink="false">http://vdcruijsen.net/2011/12/tutorial-how-to-use-the-silverlight-toolkit-transitions-without-writing-xaml-by-using-the-toolkit-behavior-extensions/</guid>
		<description><![CDATA[In my last post I announced the new Codeplex project I’ve started called the Windows Phone Silverlight toolkit behavior extensions. In this post I’ll explain how to use the behaviors in this project in Expression Blend to create beautiful page &#8230; <a href="http://vdcruijsen.net/2011/12/tutorial-how-to-use-the-silverlight-toolkit-transitions-without-writing-xaml-by-using-the-toolkit-behavior-extensions/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In my last post I announced the new Codeplex project I’ve started called the <a href="http://phonetoolkitbehavior.codeplex.com/" target="_blank">Windows Phone Silverlight toolkit behavior extensions</a>. In this post I’ll explain how to use the behaviors in this project in Expression Blend to create beautiful page transitions supplied by the <a href="http://silverlight.codeplex.com/" target="_blank">Silverlight Toolkit for windows Phone</a> without writing any code or XAML!</p>
<h1>how to get started</h1>
<p>Download the <a href="http://silverlight.codeplex.com/" target="_blank">silverlight toolkit for windows phone</a> and the <a href="http://phonetoolkitbehavior.codeplex.com/" target="_blank">Windows Phone Silverlight toolkit behavior extensions</a> and install both libraries on your system.</p>
<p>After the installation start Expression Blend and create a new Windows Phone 7 Project.</p>
<p>In the projects window right click “References” and select “Add Reference”<img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="add reference" border="0" alt="add reference" src="http://vdcruijsen.net/wp-content/uploads/2011/12/add-reference.png" width="521" height="269" /></p>
<p>Select the Microsoft.Phone.Controls.Toolkit.dll file and press “Open”<img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="add reference 2" border="0" alt="add reference 2" src="http://vdcruijsen.net/wp-content/uploads/2011/12/add-reference-2.png" width="525" height="367" /></p>
<p>Select the PhoneToolkit.Extensions.Behaviors.dll and press “Open”<img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="add reference 3" border="0" alt="add reference 3" src="http://vdcruijsen.net/wp-content/uploads/2011/12/add-reference-3.png" width="525" height="367" /></p>
<p>You should now have Microsoft.Phone.Controls.Toolkit.dll and PhoneToolkit.Extensions.Behaviors.dll in your References list.<img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="add reference 4" border="0" alt="add reference 4" src="http://vdcruijsen.net/wp-content/uploads/2011/12/add-reference-4.png" width="525" height="339" /></p>
<p>Before the transition behaviors work you will have to change 1 thing in the code because that is just how the Silverlight Toolkit Transitions work. so open App.xaml.cs and locate the following Class: “PhoneApplicationFrame”<img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="PhoneApplicationFrame" border="0" alt="PhoneApplicationFrame" src="http://vdcruijsen.net/wp-content/uploads/2011/12/PhoneApplicationFrame.png" width="472" height="176" /></p>
<p>And Change it to “TransitionFrame”<img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="TransitionFrame" border="0" alt="TransitionFrame" src="http://vdcruijsen.net/wp-content/uploads/2011/12/TransitionFrame.png" width="472" height="176" /></p>
<p>Build the project and after building the new behaviors will be added to the Assets window.</p>
<p><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="behavior" border="0" alt="behavior" src="http://vdcruijsen.net/wp-content/uploads/2011/12/behavior.png" width="519" height="324" /></p>
<p>You can drag and drop the new behaviors on your PhoneApplicationPage to enable the tilt effect or enable a page transition. In the Example below I’ve added the EnableTiltEffectBehavior to enable the tilting effect on every clickable usercontrol and I’ve added a TransitionTurnstileInBehavior to show a turnstile animation on entering the page and a TransitionTurnstileOutBehavior to show a turnstile animation on leaving the page.</p>
<p><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="objectsandtimeline" border="0" alt="objectsandtimeline" src="http://vdcruijsen.net/wp-content/uploads/2011/12/objectsandtimeline.png" width="521" height="241" /></p>
<p>The transition behaviors have 2 properties where you can set the animation for forward and backward transitions. by default the most common animations are selected.<img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="properties" border="0" alt="properties" src="http://vdcruijsen.net/wp-content/uploads/2011/12/properties.png" width="321" height="262" /></p>
<p>To test if everything is working drag a button on the content grid and add a second page to your application. The button should now have a tilt effect and you should have turnstile animations when navigating between the pages.</p>
<p>If you want to disable the tilt effect for a specific usercontrol you can add the SuppressTiltEffectBehavior on that control and the control will no longer have a tilt effect.</p>
<p>I’ve added a complete sample application showing all the transitions and tilt effect behaviors on the codeplex site of the <a href="http://phonetoolkitbehavior.codeplex.com/" target="_blank">Windows Phone Toolkit Behavior Extensions</a></p>
<p>If anything isn’t working contact me on <a href="http://twitter.com/geertvdc" target="_blank">twitter</a> or post a comment</p>
<p>Geert van der Cruijsen</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Tutorial%3A+How+to+use+the+Silverlight+Toolkit+transitions+without+writing+XAML+by+using+the+Toolkit+behavior+extensions&amp;u=http%3A%2F%2Fvdcruijsen.net%2F2011%2F12%2Ftutorial-how-to-use-the-silverlight-toolkit-transitions-without-writing-xaml-by-using-the-toolkit-behavior-extensions%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Tutorial%3A+How+to+use+the+Silverlight+Toolkit+transitions+without+writing+XAML+by+using+the+Toolkit+behavior+extensions&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2011%2F12%2Ftutorial-how-to-use-the-silverlight-toolkit-transitions-without-writing-xaml-by-using-the-toolkit-behavior-extensions%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Tutorial%3A+How+to+use+the+Silverlight+Toolkit+transitions+without+writing+XAML+by+using+the+Toolkit+behavior+extensions&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2011%2F12%2Ftutorial-how-to-use-the-silverlight-toolkit-transitions-without-writing-xaml-by-using-the-toolkit-behavior-extensions%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fvdcruijsen.net%2F2011%2F12%2Ftutorial-how-to-use-the-silverlight-toolkit-transitions-without-writing-xaml-by-using-the-toolkit-behavior-extensions%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://vdcruijsen.net/2011/12/tutorial-how-to-use-the-silverlight-toolkit-transitions-without-writing-xaml-by-using-the-toolkit-behavior-extensions/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Started a new Codeplex project: Windows Phone Silverlight Toolkit Behavior Extensions</title>
		<link>http://vdcruijsen.net/2011/12/started-a-new-codeplex-project-windows-phone-silverlight-toolkit-behavior-extensions/</link>
		<comments>http://vdcruijsen.net/2011/12/started-a-new-codeplex-project-windows-phone-silverlight-toolkit-behavior-extensions/#comments</comments>
		<pubDate>Sun, 04 Dec 2011 08:46:22 +0000</pubDate>
		<dc:creator>Geert van der Cruijsen</dc:creator>
				<category><![CDATA[Geert's Projects]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[Behaviors]]></category>
		<category><![CDATA[Blend]]></category>
		<category><![CDATA[codeplex]]></category>
		<category><![CDATA[Expression Blend]]></category>
		<category><![CDATA[WP7]]></category>

		<guid isPermaLink="false">http://vdcruijsen.net/2011/12/started-a-new-codeplex-project-windows-phone-silverlight-toolkit-behavior-extensions/</guid>
		<description><![CDATA[Of all windows phone development that is done in the world I think almost everyone is using the Windows Phone Silverlight Toolkit you can get from Codeplex. This toolkit adds a lot of new controls and also other cool features &#8230; <a href="http://vdcruijsen.net/2011/12/started-a-new-codeplex-project-windows-phone-silverlight-toolkit-behavior-extensions/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Of all windows phone development that is done in the world I think almost everyone is using the <a href="http://silverlight.codeplex.com/">Windows Phone Silverlight Toolkit</a> you can get from Codeplex. This toolkit adds a lot of new controls and also other cool features as page transitions and a tilt effect on usercontrols so users will get more feedback when clicking in the UI.</p>
<p>This week I started working on a new project with a <a href="https://twitter.com/#!/marklamb">designer</a> and he asked me how to insert the page transitions on a windows phone application page and I showed him that you’ll have to add a piece of XAML to your code and the page transitions will work. He asked me “Can’t I do this in the designer mode without touching any code?” I didn’t have any right answer for him so that’s why I’ve spend part of my weekend to build some behaviors that can be used to drag this functionality on pages in Expression Blend.</p>
<p>There are behaviors for every type of transition available in the silverlight toolkit. for each transitiontype there is an “in” and “out” behavior for entering and leaving the page. Besides the transition behaviors I’ve also created a behavior to turn the tilteffect on or off</p>
<ul>
<li>EnableTiltEffectBehavior </li>
<li>SuppressTiltBehavior </li>
<li>TransitionRollInBehavior </li>
<li>TransitionRollOutBehavior </li>
<li>TransitionRotateInBehavior </li>
<li>TransitionRotateOutBehavior </li>
<li>TransitionSlideInBehavior </li>
<li>TransitionSlideOutBehavior </li>
<li>TransitionSwivelInBehavior </li>
<li>TransitionSwivelOutBehavior </li>
<li>TransitionTurnstileInBehavior </li>
<li>TransitionTurnstileOutBehavior </li>
</ul>
<p>You can download the behaviors here: (important: you also need the silverlight toolkit for this to work)</p>
<p><a title="http://phonetoolkitbehavior.codeplex.com/" href="http://phonetoolkitbehavior.codeplex.com/">http://phonetoolkitbehavior.codeplex.com/</a></p>
<p>On the codeplex site you’ll find a msi release containing the dll that you can include in your project to use these behaviors and I’ve also included a sample application. I’ll also upload the sample application to the marketplace so you can easily test out the performance etc without any trouble.</p>
<p>For a compete tutorial check this <a href="http://vdcruijsen.net/2011/12/tutorial-how-to-use-the-silverlight-toolkit-transitions-without-writing-xaml-by-using-the-toolkit-behavior-extensions/" target="_blank">blogpost</a>.</p>
<p>This is currently the first release so every feedback is welcome. please let me know by adding a comment here or contact me on <a href="http://twitter.com/geertvdc">twitter</a></p>
<p>Geert van der Cruijsen</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Started+a+new+Codeplex+project%3A+Windows+Phone+Silverlight+Toolkit+Behavior+Extensions&amp;u=http%3A%2F%2Fvdcruijsen.net%2F2011%2F12%2Fstarted-a-new-codeplex-project-windows-phone-silverlight-toolkit-behavior-extensions%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Started+a+new+Codeplex+project%3A+Windows+Phone+Silverlight+Toolkit+Behavior+Extensions&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2011%2F12%2Fstarted-a-new-codeplex-project-windows-phone-silverlight-toolkit-behavior-extensions%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Started+a+new+Codeplex+project%3A+Windows+Phone+Silverlight+Toolkit+Behavior+Extensions&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2011%2F12%2Fstarted-a-new-codeplex-project-windows-phone-silverlight-toolkit-behavior-extensions%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fvdcruijsen.net%2F2011%2F12%2Fstarted-a-new-codeplex-project-windows-phone-silverlight-toolkit-behavior-extensions%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://vdcruijsen.net/2011/12/started-a-new-codeplex-project-windows-phone-silverlight-toolkit-behavior-extensions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New blog template</title>
		<link>http://vdcruijsen.net/2011/12/new-blog-template/</link>
		<comments>http://vdcruijsen.net/2011/12/new-blog-template/#comments</comments>
		<pubDate>Fri, 02 Dec 2011 16:30:30 +0000</pubDate>
		<dc:creator>Geert van der Cruijsen</dc:creator>
				<category><![CDATA[Geert's Projects]]></category>
		<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.vdcruijsen.net/2011/12/new-blog-template/</guid>
		<description><![CDATA[I got a bit bored with my old blog template so I finally switched to a new one that fitted me better. This new template is better readable and clean and I like the orange color that fits with my &#8230; <a href="http://vdcruijsen.net/2011/12/new-blog-template/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I got a bit bored with my old blog template so I finally switched to a new one that fitted me better. This new template is better readable and clean and I like the orange color that fits with my employer <a href="http://www.avanade.com">Avanade</a>. The top picture is inspired by my work and passion for Windows Phone so that’s why I’ve chosen an Image of a Metro line. <img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-winkingsmile" alt="Winking smile" src="http://www.vdcruijsen.net/wp-content/uploads/2011/12/wlEmoticon-winkingsmile.png" /></p>
<p>If you like my template it’s a free template for WordPress called “Twenty Eleven 1.2” and you can just download it from the template gallery in WordPress.</p>
<p>Enjoy!</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=New+blog+template&amp;u=http%3A%2F%2Fvdcruijsen.net%2F2011%2F12%2Fnew-blog-template%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=New+blog+template&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2011%2F12%2Fnew-blog-template%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=New+blog+template&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2011%2F12%2Fnew-blog-template%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fvdcruijsen.net%2F2011%2F12%2Fnew-blog-template%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://vdcruijsen.net/2011/12/new-blog-template/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Switching Dark/Light theme in Blend for Windows Phone</title>
		<link>http://vdcruijsen.net/2011/12/switching-darklight-theme-in-blend-for-windows-phone/</link>
		<comments>http://vdcruijsen.net/2011/12/switching-darklight-theme-in-blend-for-windows-phone/#comments</comments>
		<pubDate>Fri, 02 Dec 2011 08:52:32 +0000</pubDate>
		<dc:creator>Geert van der Cruijsen</dc:creator>
				<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[Blend]]></category>
		<category><![CDATA[Expression Blend]]></category>
		<category><![CDATA[WP7]]></category>

		<guid isPermaLink="false">http://www.vdcruijsen.net/2011/12/switching-darklight-theme-in-blend-for-windows-phone/</guid>
		<description><![CDATA[Today a small tip on how to change the design view of your windows phone 7 application in Expression Blend so you can see it in light or dark theme or check how all the different accent colors look: This &#8230; <a href="http://vdcruijsen.net/2011/12/switching-darklight-theme-in-blend-for-windows-phone/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Today a small tip on how to change the design view of your windows phone 7 application in Expression Blend so you can see it in light or dark theme or check how all the different accent colors look:</p>
<p>This is basic functionality but when I asked around I noticed most people don’t know about this feature so that’s why I wrote this blogpost.</p>
<p>By default in Expression Blend your app will show using the dark theme and the blue accent color. To see how your app looks in white just open the Device window by clicking “Window” –&gt; “Device”</p>
<p><img style="background-image: none; border-right-width: 0px; margin: 4px 10px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="blend device window" border="0" alt="blend device window" src="http://www.vdcruijsen.net/wp-content/uploads/2011/12/blend-device-window.png" width="370" height="224" /></p>
<p>When the device window is opened you can switch to the light or dark theme by clicking one of the icons. You can also select the accent color from the pulldown box on the right.</p>
<p><img style="background-image: none; border-right-width: 0px; margin: 4px 10px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="blend select white theme" border="0" alt="blend select white theme" src="http://www.vdcruijsen.net/wp-content/uploads/2011/12/blend-select-white-theme.png" width="322" height="197" /></p>
<p>The result:</p>
<p><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 4px 10px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="blackwhite blend" border="0" alt="blackwhite blend" src="http://www.vdcruijsen.net/wp-content/uploads/2011/12/blackwhite-blend1.png" width="514" height="157" /></p>
<p>Happy <strike>Coding!</strike> Designing!</p>
<p>Geert van der Cruijsen</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Switching+Dark%2FLight+theme+in+Blend+for+Windows+Phone&amp;u=http%3A%2F%2Fvdcruijsen.net%2F2011%2F12%2Fswitching-darklight-theme-in-blend-for-windows-phone%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Switching+Dark%2FLight+theme+in+Blend+for+Windows+Phone&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2011%2F12%2Fswitching-darklight-theme-in-blend-for-windows-phone%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Switching+Dark%2FLight+theme+in+Blend+for+Windows+Phone&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2011%2F12%2Fswitching-darklight-theme-in-blend-for-windows-phone%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fvdcruijsen.net%2F2011%2F12%2Fswitching-darklight-theme-in-blend-for-windows-phone%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://vdcruijsen.net/2011/12/switching-darklight-theme-in-blend-for-windows-phone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Microsoft Pubcenter not showing ads in your windows phone 7 app?</title>
		<link>http://vdcruijsen.net/2011/11/microsoft-pubcenter-not-showing-ads-in-your-windows-phone-7-app/</link>
		<comments>http://vdcruijsen.net/2011/11/microsoft-pubcenter-not-showing-ads-in-your-windows-phone-7-app/#comments</comments>
		<pubDate>Thu, 17 Nov 2011 19:26:55 +0000</pubDate>
		<dc:creator>Geert van der Cruijsen</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[Admob]]></category>
		<category><![CDATA[PubCenter]]></category>
		<category><![CDATA[WP7]]></category>
		<category><![CDATA[WP7 Mango]]></category>

		<guid isPermaLink="false">http://www.vdcruijsen.net/2011/11/microsoft-pubcenter-not-showing-ads-in-your-windows-phone-7-app/</guid>
		<description><![CDATA[The free apps I had in the marketplace were running Google’s Admob as adprovider because when I wrote the apps Microsoft Pubcenter wasn’t available in the Netherlands yet. When I was upgrading my Apps to Mango I found out that &#8230; <a href="http://vdcruijsen.net/2011/11/microsoft-pubcenter-not-showing-ads-in-your-windows-phone-7-app/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The free apps I had in the marketplace were running Google’s Admob as adprovider because when I wrote the apps Microsoft Pubcenter wasn’t available in the Netherlands yet. When I was upgrading my Apps to Mango I found out that version 4.0.4 that is currently the latest release of the Windows Phone Admob SDK is broken will always give you exceptions when you include this control. Seeing Google wasn’t to keen on fixing this since it was mentioned a lot in admob sdk Google groups I decided to switch to Microsoft Pubcenter because it came available for Dutch people.</p>
<p>Implementing the control is easy by just <a href="http://www.microsoft.com/download/en/details.aspx?id=8729">installing the SDK</a>, create an account, adding the control to your page and filling in the applicationid and the adunitid. if you still need a guide this one explains all the details:</p>
<p><a title="http://blogs.msdn.com/b/urmila/archive/2011/03/10/displaying-ads-on-windows-phone-7-apps-the-basics.aspx" href="http://blogs.msdn.com/b/urmila/archive/2011/03/10/displaying-ads-on-windows-phone-7-apps-the-basics.aspx">http://blogs.msdn.com/b/urmila/archive/2011/03/10/displaying-ads-on-windows-phone-7-apps-the-basics.aspx</a></p>
<p>So the control is added to the page and you’re ready to go. If you followed all the instructions the ads should show up fine. Not for you?</p>
<p>I had the same problem when I was testing my application. I did most of my testing in the emulator and the ads would show up fine right there. When I started testing on my phone I noticed that only the ad placeholder was shown for really short time and after that the ad was hidden. Trying to find out what the differences could be between my phone and the emulator my first thoughts were the Culture of the phone since my phone is running in Dutch Culture nl-NL and the emulator is running en-US by default. When I switched the culture on the emulator to being Dutch the ads also stop showing there. </p>
<p>So what is the problem and how did I fix it?</p>
<p>The Pubcenter Adcontrol has a nice event called “ErrorOccured” and you can subscribe to this event to see what is happening. (or just attach the debugger and set it to break on exceptions)</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> <span style="color: #0000ff">public</span> MainPage()</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2">   2:</span> {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3">   3:</span>     InitializeComponent();</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4">   4:</span>     adcontrol.ErrorOccurred += <span style="color: #0000ff">new</span> EventHandler&lt;Microsoft.Advertising.AdErrorEventArgs&gt;(adcontrol_ErrorOccurred);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5">   5:</span> }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6">   6:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7">   7:</span> <span style="color: #0000ff">void</span> adcontrol_ErrorOccurred(<span style="color: #0000ff">object</span> sender, Microsoft.Advertising.AdErrorEventArgs e)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8">   8:</span> {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum9">   9:</span> }</pre>
<p><!--CRLF--></div>
</div>
<p>In the adcontrol_ErrorOccurred eventhandler you can log your error the adcontrol is throwing or handle it the way you want to. The error I kept getting when using the Dutch Culture was: </p>
<p><strong><font size="3" face="Courier New">Microsoft.Advertising.Mobile.Shared.AdException &#8211; No ad available.</font></strong></p>
<p>My guess was that this was happening because there aren’t any Dutch ads yet so I tried to change the settings of the adcontrol by changing the CountryOrRegion, Language and even the Latitude and Longitude attributes to somewhere in the United States but this doesn’t help. I made a ticket at the Pubcenter helpdesk and they told me a new algorithm just went live and it can be that there aren’t to many ads yet so it’s possible to get a disappearing ad control once in a while when you’re running less common cultures. Trying to change the country or culture DOES NOT WORK so you’ll just have to wait (It’s not like Admob is a better alternative since that one isn’t working at all)</p>
<p>I would encourage everyone to just leave the ad in and the requests to the Pubcenter servers will show that there is a lot of space for ads to be sold so advertisers will jump in and use this space.</p>
<p>Nokia seems the first to jump in because the last few days I seem to receive Nokia Lumia ads when using a Dutch culture <img src='http://vdcruijsen.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Oh btw this method also works when you’re having other issues with your ad control ofcourse. just check the exception to see what’s going on. The one thing I keep forgetting every time I add the AdControl are the capabilities in the WMAppManifest.xml. when you do this you’ll get another AdException:</p>
<p><font size="3" face="Courier New"><strong>Microsoft.Advertising.Mobile.Shared.AdException &#8211; Required capabilities are missing from manifest (WMAppManifest.xml): ID_CAP_NETWORKING, ID_CAP_PHONEDIALER, ID_CAP_IDENTITY_USER, ID_CAP_MEDIALIB, ID_CAP_WEBBROWSERCOMPONENT.</strong></font></p>
<p>Geert van der Cruijsen</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Microsoft+Pubcenter+not+showing+ads+in+your+windows+phone+7+app%3F&amp;u=http%3A%2F%2Fvdcruijsen.net%2F2011%2F11%2Fmicrosoft-pubcenter-not-showing-ads-in-your-windows-phone-7-app%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Microsoft+Pubcenter+not+showing+ads+in+your+windows+phone+7+app%3F&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2011%2F11%2Fmicrosoft-pubcenter-not-showing-ads-in-your-windows-phone-7-app%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Microsoft+Pubcenter+not+showing+ads+in+your+windows+phone+7+app%3F&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2011%2F11%2Fmicrosoft-pubcenter-not-showing-ads-in-your-windows-phone-7-app%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fvdcruijsen.net%2F2011%2F11%2Fmicrosoft-pubcenter-not-showing-ads-in-your-windows-phone-7-app%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://vdcruijsen.net/2011/11/microsoft-pubcenter-not-showing-ads-in-your-windows-phone-7-app/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>PinPin 1.2 update now available in the WP7 Marketplace</title>
		<link>http://vdcruijsen.net/2011/08/pinpin-1-2-update-now-available-in-the-wp7-marketplace/</link>
		<comments>http://vdcruijsen.net/2011/08/pinpin-1-2-update-now-available-in-the-wp7-marketplace/#comments</comments>
		<pubDate>Fri, 05 Aug 2011 06:27:12 +0000</pubDate>
		<dc:creator>Geert van der Cruijsen</dc:creator>
				<category><![CDATA[Geert's Projects]]></category>
		<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[PinPin]]></category>
		<category><![CDATA[WP7]]></category>

		<guid isPermaLink="false">http://www.vdcruijsen.net/2011/08/pinpin-1-2-update-now-available-in-the-wp7-marketplace/</guid>
		<description><![CDATA[First note I want to make: The “Error retrieving ATM locations” bug is fixed in this release! Here is the story on how it all went down: Since PinPin’s launch last week I’ve been loaded with feedback from people, most &#8230; <a href="http://vdcruijsen.net/2011/08/pinpin-1-2-update-now-available-in-the-wp7-marketplace/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>First note I want to make: The “Error retrieving ATM locations” bug is fixed in this release!</p>
<p>Here is the story on how it all went down:</p>
<p>Since PinPin’s launch last week I’ve been loaded with feedback from people, most of them were positive but there was also a large group of people who weren’t able to get ATM locations. At first I didn’t have any idea how this was possible since I had tested at many locations in the Netherlands and had asked several colleagues to test the app and it worked for everyone.</p>
<p>Luckily&#160; lots of people were able to find the feedback form in my app and when I received a mail from <a href="http://twitter.com/#!/MoaskeFoto/">Marco</a> who had a dev unlocked phone and was receiving the errors I found my chance to find out what was causing the bug. I made a version 1.1 and submitted it to the marketplace (that wasn’t smart because that’s why it took so long to get 1.2 out) but also mailed it to Marco so he could test. 1.1 had the option to save the errors and send a mail with the Error messages and a stacktrace so I could see what was going wrong. </p>
<p>With the error report I received from Marco I could see it was something in the response from the webservice I’m calling to get the ATM data but still couldn’t see what the error was exactly. I again added more logging to the app and asked Marco to test again. This time I could compare my request and response from the server to his and then I found out: The Dutch regional settings were screwing things up. Ofcourse this is a major concern for an app that is only used in the Netherlands <img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://vdcruijsen.net/images/7b8274329805_7294/wlEmoticon-smile.png" /></p>
<p>I fixed the bug but had to wait untill version 1.1 had passed certification before I could submit 1.2 Wednesday night 1.1 was approved and I immediately submitted 1.2. Today I received another mail from Microsoft that 1.2 also passed certification. From now on everyone should be able to use PinPin!</p>
<p>If you find any bug in version 1.2 please let me know and I’ll try to fix it asap again. </p>
<p>It can take a while before you’ll get the 1.2 update notification from your phone but you could also manually uninstall your current PinPin installation and reinstall from the marketplace you’ll download version 1.2.</p>
<p>Big thanks to Marco and everyone else who has send feedback concerning this bug. Hopefully you can enjoy PinPin now and if you do don’t try to rate and review the app, it only takes a few seconds!</p>
<p>&#160;</p>
<table border="0" cellspacing="0" cellpadding="2" width="542">
<tbody>
<tr>
<td valign="top" width="180"><a href="http://vdcruijsen.net/images/7b8274329805_7294/1_thumb.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="1_thumb" border="0" alt="1_thumb" src="http://vdcruijsen.net/images/7b8274329805_7294/1_thumb_thumb.png" width="150" height="244" /></a></td>
<td valign="top" width="180"><a href="http://vdcruijsen.net/images/7b8274329805_7294/2_thumb.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="2_thumb" border="0" alt="2_thumb" src="http://vdcruijsen.net/images/7b8274329805_7294/2_thumb_thumb.png" width="150" height="244" /></a></td>
<td valign="top" width="180"><a href="http://vdcruijsen.net/images/7b8274329805_7294/4_thumb2.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="4_thumb2" border="0" alt="4_thumb2" src="http://vdcruijsen.net/images/7b8274329805_7294/4_thumb2_thumb.png" width="150" height="244" /></a></td>
</tr>
</tbody>
</table>
<p>Oh and if you didn’t have PinPin yet, you can download it here:</p>
<p><a href="http://windowsphone.com/s?appid=0f9ec45e-a5b9-4dbf-b33f-6917a7a44e44"><img style="margin: 4px auto; display: block; float: none" title="Download PinPin for WP7" border="0" alt="Download PinPin for WP7" src="http://vdcruijsen.net/images/Introducing-PinPin-for-Windows-Phone-7_12F99/WP7_App_Download.png" width="152" height="50" /></a></p>
<p>&#160;</p>
<p>Geert van der Cruijsen</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=PinPin+1.2+update+now+available+in+the+WP7+Marketplace&amp;u=http%3A%2F%2Fvdcruijsen.net%2F2011%2F08%2Fpinpin-1-2-update-now-available-in-the-wp7-marketplace%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=PinPin+1.2+update+now+available+in+the+WP7+Marketplace&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2011%2F08%2Fpinpin-1-2-update-now-available-in-the-wp7-marketplace%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=PinPin+1.2+update+now+available+in+the+WP7+Marketplace&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2011%2F08%2Fpinpin-1-2-update-now-available-in-the-wp7-marketplace%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fvdcruijsen.net%2F2011%2F08%2Fpinpin-1-2-update-now-available-in-the-wp7-marketplace%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://vdcruijsen.net/2011/08/pinpin-1-2-update-now-available-in-the-wp7-marketplace/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing: PinPin for Windows Phone 7</title>
		<link>http://vdcruijsen.net/2011/07/introducing-pinpin-for-windows-phone-7/</link>
		<comments>http://vdcruijsen.net/2011/07/introducing-pinpin-for-windows-phone-7/#comments</comments>
		<pubDate>Tue, 26 Jul 2011 14:24:00 +0000</pubDate>
		<dc:creator>Geert van der Cruijsen</dc:creator>
				<category><![CDATA[Geert's Projects]]></category>
		<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[PinPin]]></category>
		<category><![CDATA[WP7]]></category>
		<category><![CDATA[WP7 Mango]]></category>

		<guid isPermaLink="false">http://www.vdcruijsen.net/?p=119</guid>
		<description><![CDATA[I’m proud to announce my 2nd Windows Phone 7 application available in the marketplace. The new app is called PinPin and is an app to locate an ATM near your location. The app is really simple at this first release, &#8230; <a href="http://vdcruijsen.net/2011/07/introducing-pinpin-for-windows-phone-7/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I’m proud to announce my <a href="http://sociallookout.vdcruijsen.net/">2nd</a> Windows Phone 7 application available in the marketplace. The new app is called PinPin and is an app to locate an ATM near your location. The app is really simple at this first release, just open the app and the app will retrieve ATM location information near your GPS location.</p>
<p>At this moment PinPin only works if you are located in the Netherlands because there is no worldwide ATM location data available. I’m still looking for this data so if someone knows where to get this please let me know.</p>
<p><img style="background-image: none; margin: 4px auto; padding-left: 0px; padding-right: 0px; display: block; float: none; padding-top: 0px; border-width: 0px;" title="PinPin" src="http://vdcruijsen.net/images/Introducing-PinPin-for-Windows-Phone-7_12F99/200.png" alt="PinPin Logo" width="200" height="200" border="0" /></p>
<p>Below are some screenshots of the application:</p>
<table width="542" border="0" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td valign="top" width="180"><a href="http://vdcruijsen.net/images/Introducing-PinPin-for-Windows-Phone-7_12F99/1_3.png"><img style="background-image: none; margin: 4px 10px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="1" src="http://vdcruijsen.net/images/Introducing-PinPin-for-Windows-Phone-7_12F99/1_thumb_3.png" alt="1" width="148" height="244" border="0" /></a></td>
<td valign="top" width="180"><a href="http://vdcruijsen.net/images/Introducing-PinPin-for-Windows-Phone-7_12F99/2_3.png"><img style="background-image: none; margin: 4px 10px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="2" src="http://vdcruijsen.net/images/Introducing-PinPin-for-Windows-Phone-7_12F99/2_thumb_3.png" alt="2" width="148" height="244" border="0" /></a></td>
<td valign="top" width="180"><a href="http://vdcruijsen.net/images/Introducing-PinPin-for-Windows-Phone-7_12F99/3_3.png"><img style="background-image: none; margin: 4px 10px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="3" src="http://vdcruijsen.net/images/Introducing-PinPin-for-Windows-Phone-7_12F99/3_thumb_3.png" alt="3" width="148" height="244" border="0" /></a></td>
</tr>
<tr>
<td valign="top" width="180"><a href="http://vdcruijsen.net/images/Introducing-PinPin-for-Windows-Phone-7_12F99/4_4.png"><img style="background-image: none; margin: 4px 10px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="4" src="http://vdcruijsen.net/images/Introducing-PinPin-for-Windows-Phone-7_12F99/4_thumb_4.png" alt="4" width="148" height="244" border="0" /></a></td>
<td valign="top" width="180"><a href="http://vdcruijsen.net/images/Introducing-PinPin-for-Windows-Phone-7_12F99/5.png"><img style="background-image: none; margin: 4px 10px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="5" src="http://vdcruijsen.net/images/Introducing-PinPin-for-Windows-Phone-7_12F99/5_thumb.png" alt="5" width="148" height="244" border="0" /></a></td>
<td valign="top" width="180"><a href="http://vdcruijsen.net/images/Introducing-PinPin-for-Windows-Phone-7_12F99/6.png"><img style="background-image: none; margin: 4px 10px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="6" src="http://vdcruijsen.net/images/Introducing-PinPin-for-Windows-Phone-7_12F99/6_thumb.png" alt="6" width="148" height="244" border="0" /></a></td>
</tr>
<tr>
<td valign="top" width="180"><a href="http://vdcruijsen.net/images/Introducing-PinPin-for-Windows-Phone-7_12F99/7_3.png"><img style="background-image: none; margin: 4px 10px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="7" src="http://vdcruijsen.net/images/Introducing-PinPin-for-Windows-Phone-7_12F99/7_thumb_3.png" alt="7" width="148" height="244" border="0" /></a></td>
<td valign="top" width="180"><a href="http://vdcruijsen.net/images/Introducing-PinPin-for-Windows-Phone-7_12F99/8_4.png"><img style="background-image: none; margin: 4px 10px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="8" src="http://vdcruijsen.net/images/Introducing-PinPin-for-Windows-Phone-7_12F99/8_thumb_4.png" alt="8" width="148" height="244" border="0" /></a></td>
<td valign="top" width="180"></td>
</tr>
</tbody>
</table>
<p>PinPin is available for FREE in the Windows Phone marketplace. download it by clicking the button below:</p>
<p><a href="http://windowsphone.com/s?appid=0f9ec45e-a5b9-4dbf-b33f-6917a7a44e44"><img style="background-image: none; margin: 4px auto; padding-left: 0px; padding-right: 0px; display: block; float: none; padding-top: 0px; border-width: 0px;" title="Download PinPin for WP7" src="http://vdcruijsen.net/images/Introducing-PinPin-for-Windows-Phone-7_12F99/WP7_App_Download.png" alt="Download PinPin for WP7" width="152" height="50" border="0" /></a></p>
<p>Special Thanks to <a href="http://chris-online.nl">Christiaan Veeningen</a> for telling me to build this app <img src='http://vdcruijsen.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>If like or dislike the app please let me know by rating the app or by submitting a review. You can also contact me through twitter <a href="http://twitter.com/geertvdc">@geertvdc</a> or leave a comment here on my blog.</p>
<p>This is currently the first release of PinPin. I have more plans for the app in the future, here is a roadmap of what to come:</p>
<ul>
<li>Add Dutch language</li>
<li>Get Directions (Will have to wait for Mango)</li>
<li>Add more Bank logo’s</li>
<li>Add more countries</li>
<li>Review Comments I get from you!</li>
</ul>
<p>Hopefully you’ll enjoy this new app!</p>
<p>Geert van der Cruijsen</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Introducing%3A+PinPin+for+Windows+Phone+7&amp;u=http%3A%2F%2Fvdcruijsen.net%2F2011%2F07%2Fintroducing-pinpin-for-windows-phone-7%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Introducing%3A+PinPin+for+Windows+Phone+7&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2011%2F07%2Fintroducing-pinpin-for-windows-phone-7%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Introducing%3A+PinPin+for+Windows+Phone+7&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2011%2F07%2Fintroducing-pinpin-for-windows-phone-7%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fvdcruijsen.net%2F2011%2F07%2Fintroducing-pinpin-for-windows-phone-7%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://vdcruijsen.net/2011/07/introducing-pinpin-for-windows-phone-7/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>WP7 App hub error: The [NeutralResourceLanguage] attribute is missing on the entry assembly. (2003)</title>
		<link>http://vdcruijsen.net/2011/07/wp7-app-hub-error-the-neutralresourcelanguage-attribute-is-missing-on-the-entry-assembly-2003/</link>
		<comments>http://vdcruijsen.net/2011/07/wp7-app-hub-error-the-neutralresourcelanguage-attribute-is-missing-on-the-entry-assembly-2003/#comments</comments>
		<pubDate>Tue, 19 Jul 2011 19:03:39 +0000</pubDate>
		<dc:creator>Geert van der Cruijsen</dc:creator>
				<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[App hub]]></category>
		<category><![CDATA[WP7]]></category>

		<guid isPermaLink="false">http://www.vdcruijsen.net/2011/07/wp7-app-hub-error-the-neutralresourcelanguage-attribute-is-missing-on-the-entry-assembly-2003/</guid>
		<description><![CDATA[Today the Microsoft Windows Phone 7 App Hub got a makeover. My new app was ready for deployment yesterday so logging into the new App hub to deploy my app today was the plan. After uploading my .xap file the &#8230; <a href="http://vdcruijsen.net/2011/07/wp7-app-hub-error-the-neutralresourcelanguage-attribute-is-missing-on-the-entry-assembly-2003/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Today the Microsoft Windows Phone 7 App Hub got a makeover. My new app was ready for deployment yesterday so logging into the new App hub to deploy my app today was the plan.</p>
<p>After uploading my .xap file the app hub told me the “NeatralResourceLanguage” attribute was missing with the following error:</p>
<p><span style="font-family: Consolas;">The [NeutralResourceLanguage] attribute is missing on the entry assembly. (2003)</span></p>
<p>Not sure what this error means I started looking in Visual Studio. and found the solution for the problem.</p>
<ul>
<li>In Visual Studio 2010 rightclick your project and choose properties</li>
<li>At the application tab click the “Assembly information…” button</li>
<li>Fill the Neutral Language in the popup</li>
<li>Press ok!</li>
<li>You’re ready to go!</li>
</ul>
<p><img style="background-image: none; margin: 4px 10px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image" src="http://vdcruijsen.net/images/WP7-app-hub-error-The-NeutralResou.-2003_12270/image.png" alt="image" width="315" height="304" border="0" /></p>
<p>It seems that the new App hub Checks up on more things than the old App hub did. The neutral language is probably something a lot of people will forget so hopefully this helps others who are receiving this error.</p>
<p>The Assembly information can also be changed manually the following way:</p>
<ul>
<li>Open the properties directory in your WP7 project</li>
<li>Open the AssemblyInfo.cs file</li>
<li>Add the following line at the end of the file:</li>
</ul>
<div id="codeSnippetWrapper">
<pre id="codeSnippet" style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">[assembly: NeutralResourcesLanguage(<span style="color: #006080;">"en-US"</span>)]</pre>
<p>you’ll also need to add the following line at the top:</p>
</div>
<div id="codeSnippetWrapper">
<pre id="codeSnippet" style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #0000ff;">using</span> System.Resources;</pre>
<p>&nbsp;</p>
<p>Happy developing and deploying!</p>
</div>
<p>Geert van der Cruijsen</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=WP7+App+hub+error%3A+The+%5BNeutralResourceLanguage%5D+attribute+is+missing+on+the+entry+assembly.+%282003%29&amp;u=http%3A%2F%2Fvdcruijsen.net%2F2011%2F07%2Fwp7-app-hub-error-the-neutralresourcelanguage-attribute-is-missing-on-the-entry-assembly-2003%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=WP7+App+hub+error%3A+The+%5BNeutralResourceLanguage%5D+attribute+is+missing+on+the+entry+assembly.+%282003%29&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2011%2F07%2Fwp7-app-hub-error-the-neutralresourcelanguage-attribute-is-missing-on-the-entry-assembly-2003%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=WP7+App+hub+error%3A+The+%5BNeutralResourceLanguage%5D+attribute+is+missing+on+the+entry+assembly.+%282003%29&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2011%2F07%2Fwp7-app-hub-error-the-neutralresourcelanguage-attribute-is-missing-on-the-entry-assembly-2003%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fvdcruijsen.net%2F2011%2F07%2Fwp7-app-hub-error-the-neutralresourcelanguage-attribute-is-missing-on-the-entry-assembly-2003%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://vdcruijsen.net/2011/07/wp7-app-hub-error-the-neutralresourcelanguage-attribute-is-missing-on-the-entry-assembly-2003/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>My Windows Phone 7 Mango Beta review</title>
		<link>http://vdcruijsen.net/2011/07/my-windows-phone-7-mango-beta-review/</link>
		<comments>http://vdcruijsen.net/2011/07/my-windows-phone-7-mango-beta-review/#comments</comments>
		<pubDate>Tue, 05 Jul 2011 19:57:11 +0000</pubDate>
		<dc:creator>Geert van der Cruijsen</dc:creator>
				<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[Mango]]></category>
		<category><![CDATA[WP7]]></category>
		<category><![CDATA[WP7 Mango]]></category>

		<guid isPermaLink="false">http://www.vdcruijsen.net/index.php/2011/07/05/my-windows-phone-7-mango-beta-review/</guid>
		<description><![CDATA[The beta of Windows Phone 7.1 codename “Mango” was released last week and in this post I’ll write down my experiences with Mango that I had using it since the launch of the beta. I’ll try to update this post &#8230; <a href="http://vdcruijsen.net/2011/07/my-windows-phone-7-mango-beta-review/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The beta of Windows Phone 7.1 codename “Mango” was released last week and in this post I’ll write down my experiences with Mango that I had using it since the launch of the beta.</p>
<p>I’ll try to update this post when I bump into stuff I didn’t write about yet.This post isn’t about describing all new stuff since there are already dozens of <a href="http://www.engadget.com/2011/06/27/windows-phone-7-5-mango-in-depth-preview-video/">other great blog posts about</a> that but I’ll try to write my opinions about how these features are working out or what I am still really missing in Mango.</p>
<p><img style="background-image: none; border-right-width: 0px; margin: 4px 10px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="WP7-Mango" border="0" alt="WP7-Mango" src="http://vdcruijsen.net/images/My-Windows-Phone-7-Mango-Beta-review_1219A/WP7-Mango.jpg" width="240" height="181" /></p>
<p>&#160;</p>
<p><strong>Lots of small features that make your life easier:</strong></p>
<p>One of the things I enjoy the most about Mango are the small things that really annoyed me with the 7.0 release of Windows Phone 7, for example the shutdown button that automatically turned of your phone even when the phone is locked. Now in Mango you have to slide down after pressing the power button so no more turning off your phone by accident. Also there is an option to set the pin timeout a bit longer so you don’t have to type in your pin every time you want to use your phone (15 minutes is max when you have policies applied). </p>
<p>One small feature I didn’t read about but seems missing is setting up the mail sync times. On my old phone I used to sync mail automatically with push mail between 7:00 and 23:00 so my phone wouldn’t make so much noise when it’s next to my bed when I’m sleeping. I haven’t found this feature so I think this is a big miss for the Mango release.</p>
<p>&#160;</p>
<p><strong>More Social:</strong></p>
<p>Facebook integration was already great in 7.0 but it just got even better. The threading functionality sounds great but for some reason with US/English and Dutch live accounts something doesn’t seem to work. I really can’t wait for this to start working because seeing this in the movies is so nice!</p>
<p>The “Me” live tile became a lot more useful in Mango because you can get messages in the tile about new updates you have on Facebook. also when clicking on the tile you can use Facebook check in with only a few finger presses. </p>
<p>The use of groups is also added in Mango but I haven’t used this yet. I can keep up with my social updates but maybe this will change when twitter will start working in the retail version of Windows Phone 7.1 (In the Mango Beta twitter integration is not yet available).</p>
<p>Other integration will also be available like LinkedIn but this doesn’t seem to work for me in the Beta either.</p>
<p>&#160;</p>
<p><strong>Dutch Language:</strong></p>
<p>Up until now I only had the English language available which is ok if you only type in English. Since 50% of my communication is in Dutch I really enjoy the added Dutch dictionary added in Mango!</p>
<p>&#160;</p>
<p><strong>Bing!</strong></p>
<p>Before Mango I can’t say I actually used the Bing button other then pressing it by accident. but now 4 new cool features are added that seem to work really good. One of the features that I was really looking forward to is “Bing Vision”. With Bing Vision you can scan barcodes, qr codes, text but also books, cd’s and dvd’s. When you can a book you can automatically open apps like amazon to order this book or get more info about the book. Really great!</p>
<p>&#160;</p>
<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:250485b3-05b2-4c3b-a74b-fe52528289c2" class="wlWriterEditableSmartContent">
<div><object width="448" height="252"><param name="movie" value="http://www.youtube.com/v/Qq0yVxoVY1w?hl=en&amp;hd=1"></param><embed src="http://www.youtube.com/v/Qq0yVxoVY1w?hl=en&amp;hd=1" type="application/x-shockwave-flash" width="448" height="252"></embed></object></div>
</div>
<p>Besides Bing Vision there is also a button to listen to music like Shazam did in 7.0. Now this feature is build in and is working pretty good. There is also a “Nearby” feature added to Bing to get nearby restaurants, things to see, hotspots etc but there is no Dutch content yet so I only get the nearest locations in Germany…. </p>
<p>The last option that is added to Bing is the voice to text search. but I don’t really see the big use of this. when I tested it it made a lot of mistakes and in the same time I could write it.</p>
<p>&#160;</p>
<p><strong>IE9:</strong></p>
<p>What can I say… the old browser in wp7 was a disaster. All other mobile browsers were far superior but now IE9 mobile uses the exact same rendering engine as the desktop version so it is a great improvement. It can render HTML5. has more screen space because the address bar is moved to the bottom (Would hope there would be an option to hide it though to get even more space when reading for example). also when browsing in landscape mode you can now use the address bar which wasn’t possible in 7.0.&#160; You can now also pin websites to your homescreen for fast access to certain websites you use often.</p>
<p>&#160;</p>
<p><strong>7.1 apps:</strong></p>
<p>I have seen a lot of movies and demo’s about cool apps using Mango features but there is no possibility to test those myself except for writing your own apps of course (which I will do!) I do have really high expectations about these apps and all the new features</p>
<p>&#160;</p>
<p><strong>To do:</strong></p>
<p>One major issue a lot of people were missing are tasks but now this is added to your calendar hub and can be synced with exchange.</p>
<p>&#160;</p>
<p><strong>Games hub:</strong></p>
<p>I’ve read a lot about new features in the games hub and the integration with Xbox live but since my Xbox Gamer tag live id is Dutch it’s not possible to use this yet. The list of games is cleaned up though and is looking a lot better than it did in 7.0</p>
<p>&#160;</p>
<p><strong>What is not in but needs to be in?</strong></p>
<p>The one super major thing I really need is Tethering. I can understand not all providers can appreciate this feature but I used it on windows mobile 6.5 and now with the same provider I can’t use it anymore. that’s a bit shame!</p>
<p>the other thing I already mentioned and that is setting up times to sync your stuff and times it shouldn’t but it seems I’m the only one wanting this feature <img src='http://vdcruijsen.net/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p><strong>Loads more is in!</strong></p>
<p>Steve Balmer promised us 500 new features so I only touched on this a little but but I hope you enjoyed reading my first opinions about Mango and the Beta. I see a bright feature for WP7 </p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=My+Windows+Phone+7+Mango+Beta+review&amp;u=http%3A%2F%2Fvdcruijsen.net%2F2011%2F07%2Fmy-windows-phone-7-mango-beta-review%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=My+Windows+Phone+7+Mango+Beta+review&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2011%2F07%2Fmy-windows-phone-7-mango-beta-review%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=My+Windows+Phone+7+Mango+Beta+review&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2011%2F07%2Fmy-windows-phone-7-mango-beta-review%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fvdcruijsen.net%2F2011%2F07%2Fmy-windows-phone-7-mango-beta-review%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://vdcruijsen.net/2011/07/my-windows-phone-7-mango-beta-review/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Creating your own customizable tabs / carousel plugin for jQuery</title>
		<link>http://vdcruijsen.net/2011/03/creating-your-own-customizable-tabs-carousel-plugin-with-jquery/</link>
		<comments>http://vdcruijsen.net/2011/03/creating-your-own-customizable-tabs-carousel-plugin-with-jquery/#comments</comments>
		<pubDate>Wed, 02 Mar 2011 21:23:18 +0000</pubDate>
		<dc:creator>Geert van der Cruijsen</dc:creator>
				<category><![CDATA[JQuery]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://www.vdcruijsen.net/index.php/2011/03/02/creating-your-own-customizable-tabs-carousel-plugin-with-jquery/</guid>
		<description><![CDATA[Yesterday I was browsing the web for a tabs or carousel plugin for jQuery that fitted my needs. I wanted a simple but highly customizable control for displaying tabs which could also automatically page like a carousel. I found a &#8230; <a href="http://vdcruijsen.net/2011/03/creating-your-own-customizable-tabs-carousel-plugin-with-jquery/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Yesterday I was browsing the web for a tabs or carousel plugin for jQuery that fitted my needs. I wanted a simple but highly customizable control for displaying tabs which could also automatically page like a carousel. I found a lot of different plugins for JQuery but none fitted my exact needs. So I created my own in only 17 lines of javascript. this blog post describes how I did it and how you can use it on your website.</p>
<p>&#160;</p>
<p>first of all of course is a demo. You can can check it here: <a title="http://www.vdcruijsen.net/demo/jquerycarousel/carouseldemo.html" href="http://www.vdcruijsen.net/demo/jquerycarousel/carouseldemo.html">http://www.vdcruijsen.net/demo/jquerycarousel/carouseldemo.html</a></p>
<p>so how does this work? We’ll start with the HTML used for the carousel:
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 96.96%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; height: 326px; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #0000ff">&lt;</span><span style="color: #800000">div</span> <span style="color: #ff0000">id</span><span style="color: #0000ff">=&quot;carousel&quot;</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">    <span style="color: #0000ff">&lt;</span><span style="color: #800000">div</span> <span style="color: #ff0000">class</span><span style="color: #0000ff">=&quot;carouselbody&quot;</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">        <span style="color: #0000ff">&lt;</span><span style="color: #800000">ul</span> <span style="color: #ff0000">class</span><span style="color: #0000ff">=&quot;carouselcontainer&quot;</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">            <span style="color: #0000ff">&lt;</span><span style="color: #800000">li</span> <span style="color: #ff0000">class</span><span style="color: #0000ff">=&quot;page&quot;</span><span style="color: #0000ff">&gt;&lt;</span><span style="color: #800000">div</span> <span style="color: #ff0000">style</span><span style="color: #0000ff">=&quot;width:400px; height:300px; background-color:Green&quot;</span><span style="color: #0000ff">&gt;</span>test tab 1<span style="color: #0000ff">&lt;/</span><span style="color: #800000">div</span><span style="color: #0000ff">&gt;&lt;/</span><span style="color: #800000">li</span><span style="color: #0000ff">&gt;</span>                           </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">            <span style="color: #0000ff">&lt;</span><span style="color: #800000">li</span> <span style="color: #ff0000">class</span><span style="color: #0000ff">=&quot;page&quot;</span><span style="color: #0000ff">&gt;&lt;</span><span style="color: #800000">div</span> <span style="color: #ff0000">style</span><span style="color: #0000ff">=&quot;width:400px; height:300px; background-color:Red&quot;</span><span style="color: #0000ff">&gt;</span>test tab 2<span style="color: #0000ff">&lt;/</span><span style="color: #800000">div</span><span style="color: #0000ff">&gt;&lt;/</span><span style="color: #800000">li</span><span style="color: #0000ff">&gt;</span>                           </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">            <span style="color: #0000ff">&lt;</span><span style="color: #800000">li</span> <span style="color: #ff0000">class</span><span style="color: #0000ff">=&quot;page&quot;</span><span style="color: #0000ff">&gt;&lt;</span><span style="color: #800000">div</span> <span style="color: #ff0000">style</span><span style="color: #0000ff">=&quot;width:400px; height:300px; background-color:Orange&quot;</span><span style="color: #0000ff">&gt;</span>test tab 3<span style="color: #0000ff">&lt;/</span><span style="color: #800000">div</span><span style="color: #0000ff">&gt;&lt;/</span><span style="color: #800000">li</span><span style="color: #0000ff">&gt;</span>                           </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">            <span style="color: #0000ff">&lt;</span><span style="color: #800000">li</span> <span style="color: #ff0000">class</span><span style="color: #0000ff">=&quot;page&quot;</span><span style="color: #0000ff">&gt;&lt;</span><span style="color: #800000">div</span> <span style="color: #ff0000">style</span><span style="color: #0000ff">=&quot;width:400px; height:300px; background-color:Blue&quot;</span><span style="color: #0000ff">&gt;</span>test tab 4<span style="color: #0000ff">&lt;/</span><span style="color: #800000">div</span><span style="color: #0000ff">&gt;&lt;/</span><span style="color: #800000">li</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">        <span style="color: #0000ff">&lt;/</span><span style="color: #800000">ul</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">    <span style="color: #0000ff">&lt;/</span><span style="color: #800000">div</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">    <span style="color: #0000ff">&lt;</span><span style="color: #800000">ul</span> <span style="color: #ff0000">class</span><span style="color: #0000ff">=&quot;pager&quot;</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">        <span style="color: #0000ff">&lt;</span><span style="color: #800000">li</span><span style="color: #0000ff">&gt;&lt;</span><span style="color: #800000">a</span> <span style="color: #ff0000">class</span><span style="color: #0000ff">=&quot;pagerpage&quot;</span> <span style="color: #ff0000">href</span><span style="color: #0000ff">=&quot;#&quot;</span><span style="color: #0000ff">&gt;</span><span style="color: #ff0000">&amp;nbsp;</span><span style="color: #0000ff">&lt;/</span><span style="color: #800000">a</span><span style="color: #0000ff">&gt;&lt;/</span><span style="color: #800000">li</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">        <span style="color: #0000ff">&lt;</span><span style="color: #800000">li</span><span style="color: #0000ff">&gt;&lt;</span><span style="color: #800000">a</span> <span style="color: #ff0000">class</span><span style="color: #0000ff">=&quot;pagerpage&quot;</span> <span style="color: #ff0000">href</span><span style="color: #0000ff">=&quot;#&quot;</span><span style="color: #0000ff">&gt;</span><span style="color: #ff0000">&amp;nbsp;</span><span style="color: #0000ff">&lt;/</span><span style="color: #800000">a</span><span style="color: #0000ff">&gt;&lt;/</span><span style="color: #800000">li</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">        <span style="color: #0000ff">&lt;</span><span style="color: #800000">li</span><span style="color: #0000ff">&gt;&lt;</span><span style="color: #800000">a</span> <span style="color: #ff0000">class</span><span style="color: #0000ff">=&quot;pagerpage&quot;</span> <span style="color: #ff0000">href</span><span style="color: #0000ff">=&quot;#&quot;</span><span style="color: #0000ff">&gt;</span><span style="color: #ff0000">&amp;nbsp;</span><span style="color: #0000ff">&lt;/</span><span style="color: #800000">a</span><span style="color: #0000ff">&gt;&lt;/</span><span style="color: #800000">li</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">        <span style="color: #0000ff">&lt;</span><span style="color: #800000">li</span><span style="color: #0000ff">&gt;&lt;</span><span style="color: #800000">a</span> <span style="color: #ff0000">class</span><span style="color: #0000ff">=&quot;pagerpage&quot;</span> <span style="color: #ff0000">href</span><span style="color: #0000ff">=&quot;#&quot;</span><span style="color: #0000ff">&gt;</span><span style="color: #ff0000">&amp;nbsp;</span><span style="color: #0000ff">&lt;/</span><span style="color: #800000">a</span><span style="color: #0000ff">&gt;&lt;/</span><span style="color: #800000">li</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">    <span style="color: #0000ff">&lt;/</span><span style="color: #800000">ul</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"><span style="color: #0000ff">&lt;/</span><span style="color: #800000">div</span><span style="color: #0000ff">&gt;</span></pre>
<p><!--CRLF--></div>
</p></div>
</p>
<p>The HTML is actually pretty easy, The first div is a container with an id called carousel so the script knows what belongs to the carousel and what not. you can set a height and width on this div to size your carousel. The carousel div contains 2 main parts. the carouselbody a container for all the carousel pages and the pager where you can define your pager links. this pager can also be put before the carouselbody if you want the pager or tabs above your pages. </p>
<p>The carouselbody has a unordered list containing all the actual pages. all the list items are shown have a css class called page so the script knows that inside is the content for a page. in the list item I’ve put some div with inline styling to show that you can put whatever you want inside this page list item.</p>
<p>the pager has links which have a pagerpage class. the script will automatically match the first available pagerpage link to the first page etc. </p>
<p>Below is the css I used in the demo. you can customize this to set pictures for the paging mechanism or set heights, colors etc. this current css is just an example. (some display elements are needed though, its best to start of with the supplied css and change it to your likings.)</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">#carousel { <span style="color: #0000ff">height</span>: <span style="color: #006080">400px;</span> <span style="color: #0000ff">overflow</span>:<span style="color: #006080">hidden;</span> }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">#carousel <span style="color: #cc6633">.carouselbody</span> { <span style="color: #0000ff">float</span>: <span style="color: #006080">left;</span> <span style="color: #0000ff">width</span>: <span style="color: #006080">400px;</span> <span style="color: #0000ff">height</span>: <span style="color: #006080">360px;</span> <span style="color: #0000ff">overflow</span>: <span style="color: #006080">hidden;</span> <span style="color: #0000ff">position</span>: <span style="color: #006080">relative;</span> <span style="color: #0000ff">background-color</span>:<span style="color: #006080">#212020;</span>}</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">#carousel <span style="color: #cc6633">.carouselcontainer</span> { <span style="color: #0000ff">list-style</span>: <span style="color: #006080">none;</span> <span style="color: #0000ff">padding</span>: <span style="color: #006080">0px;</span> <span style="color: #0000ff">margin</span>: <span style="color: #006080">0px;</span>  <span style="color: #0000ff">position</span>: <span style="color: #006080">absolute;</span> <span style="color: #0000ff">left</span>: 0; <span style="color: #0000ff">top</span>: 0; }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">#carousel <span style="color: #cc6633">.carouselcontainer</span> <span style="color: #0000ff">li</span>{ <span style="color: #0000ff">float</span>: <span style="color: #006080">left;</span> <span style="color: #0000ff">margin</span>: <span style="color: #006080">0px ;</span> <span style="color: #0000ff">border-width</span>: <span style="color: #006080">0px;</span>}</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">&#160;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">#carousel <span style="color: #cc6633">.pager</span> { <span style="color: #0000ff">overflow</span>:<span style="color: #006080">hidden;</span> <span style="color: #0000ff">list-style</span>: <span style="color: #006080">none;</span> <span style="color: #0000ff">clear</span>: <span style="color: #006080">both;</span> }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">#carousel <span style="color: #cc6633">.pager</span> <span style="color: #0000ff">li</span> { <span style="color: #0000ff">float</span>: <span style="color: #006080">left;</span> }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">&#160;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">#carousel <span style="color: #cc6633">.page</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">{</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">    <span style="color: #0000ff">display</span>:<span style="color: #006080">none;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">}</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">&#160;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">#carousel <span style="color: #cc6633">.currentpage</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">{</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">    <span style="color: #0000ff">display</span>:<span style="color: #006080">block;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">}</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">&#160;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">#carousel <span style="color: #cc6633">.pagerpage</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">{</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">    <span style="color: #0000ff">margin</span>-<span style="color: #0000ff">left</span>:<span style="color: #006080">2px;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">    <span style="color: #0000ff">background-image</span>:url('/Content/images/pager2<span style="color: #cc6633">.png</span>');</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">    <span style="color: #0000ff">width</span>: <span style="color: #006080">20px;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">    <span style="color: #0000ff">height</span>: <span style="color: #006080">20px;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">    <span style="color: #0000ff">display</span>:<span style="color: #006080">block;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">    <span style="color: #0000ff">text-decoration</span>:<span style="color: #006080">none;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">}</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">#carousel <span style="color: #cc6633">.currentpagerpage</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">{</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">    <span style="color: #0000ff">background-image</span>:url('/Content/images/pager<span style="color: #cc6633">.png</span>');</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">    <span style="color: #0000ff">text-decoration</span>:<span style="color: #006080">none;</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">}</pre>
<p><!--CRLF--></div>
</div>
<p>&#160;</p>
<p>So now the HTML and CSS is explained its on to the actual jQuery script which makes all this magic happen. You only need 1 line to change a div to a working carousel if you also include the other script pieces somewhere on the page. the line to add in your script that is executed on document.ready is the following:</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">$(<span style="color: #006080">&quot;#carousel&quot;</span>).carousel();</pre>
<p><!--CRLF--></div>
</div>
<p>&#160;</p>
<p>this method will of course only work if the carousel method is available. This is added through the following code:</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">$.fn.carousel = <span style="color: #0000ff">function</span> (options) {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">    <span style="color: #0000ff">var</span> defaults = {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">        start: 0</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">    };</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">    <span style="color: #0000ff">var</span> options = $.extend(defaults, options);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">&#160;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">    $(<span style="color: #0000ff">this</span>).find(<span style="color: #006080">&quot;.page:eq(&quot;</span> + (options.start) + <span style="color: #006080">&quot;)&quot;</span>).addClass(<span style="color: #006080">&quot;currentpage&quot;</span>);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">    $(<span style="color: #0000ff">this</span>).find(<span style="color: #006080">&quot;.pagerpage:eq(&quot;</span> + (options.start) + <span style="color: #006080">&quot;)&quot;</span>).addClass(<span style="color: #006080">&quot;currentpagerpage&quot;</span>);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">&#160;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">    $(<span style="color: #0000ff">this</span>).find(<span style="color: #006080">&quot;.pagerpage&quot;</span>).bind(<span style="color: #006080">&quot;click&quot;</span>, <span style="color: #0000ff">function</span> () {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">        $(<span style="color: #0000ff">this</span>).parents(<span style="color: #006080">&quot;.pager&quot;</span>).find(<span style="color: #006080">&quot;.currentpagerpage&quot;</span>).removeClass(<span style="color: #006080">&quot;currentpagerpage&quot;</span>);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">        $(<span style="color: #0000ff">this</span>).parents(<span style="color: #006080">&quot;#carousel&quot;</span>).find(<span style="color: #006080">&quot;.currentpage&quot;</span>).removeClass(<span style="color: #006080">&quot;currentpage&quot;</span>);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">        $(<span style="color: #0000ff">this</span>).addClass(<span style="color: #006080">&quot;currentpagerpage&quot;</span>);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">        <span style="color: #0000ff">var</span> index = $(<span style="color: #0000ff">this</span>).parent().index();</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">        $(<span style="color: #0000ff">this</span>).parents(<span style="color: #006080">&quot;#carousel&quot;</span>).find(<span style="color: #006080">&quot;.page:nth-child(&quot;</span> + (index + 1) + <span style="color: #006080">&quot;)&quot;</span>).addClass(<span style="color: #006080">&quot;currentpage&quot;</span>);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">    });</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">};</pre>
<p><!--CRLF--></div>
</div>
<p>&#160;</p>
<p>the $.fn.carousel line makes the carousel method available in the rest of your jQuery code. I’ve added some options as an example to make the carousel start at a different page.</p>
<p>the first thing the script does is searching for the page on which it should start and adds the currentpage css class to this page so the page becomes visible. The script does the same for the active pager item.</p>
<p>after this the script binds click events to the pager links so the pager links can do their work when they are clicked. on each click event the current page is made invisible by removing the currentpage css class and after it puts the current page css class on the newly selected page.. that’s all <img src='http://vdcruijsen.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>&#160;</p>
<p>Hopefully this code is something you can use on your own website or otherwise learn from it or use pieces of it.</p>
<p>&#160;</p>
<p>Geert van der Cruijsen</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Creating+your+own+customizable+tabs+%2F+carousel+plugin+for+jQuery&amp;u=http%3A%2F%2Fvdcruijsen.net%2F2011%2F03%2Fcreating-your-own-customizable-tabs-carousel-plugin-with-jquery%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Creating+your+own+customizable+tabs+%2F+carousel+plugin+for+jQuery&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2011%2F03%2Fcreating-your-own-customizable-tabs-carousel-plugin-with-jquery%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Creating+your+own+customizable+tabs+%2F+carousel+plugin+for+jQuery&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2011%2F03%2Fcreating-your-own-customizable-tabs-carousel-plugin-with-jquery%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fvdcruijsen.net%2F2011%2F03%2Fcreating-your-own-customizable-tabs-carousel-plugin-with-jquery%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://vdcruijsen.net/2011/03/creating-your-own-customizable-tabs-carousel-plugin-with-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Virtual conference MVCConf 2011</title>
		<link>http://vdcruijsen.net/2011/02/virtual-conference-mvcconf-2011/</link>
		<comments>http://vdcruijsen.net/2011/02/virtual-conference-mvcconf-2011/#comments</comments>
		<pubDate>Wed, 09 Feb 2011 18:50:14 +0000</pubDate>
		<dc:creator>Geert van der Cruijsen</dc:creator>
				<category><![CDATA[Asp.net]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[Asp.net MVC]]></category>
		<category><![CDATA[conference]]></category>

		<guid isPermaLink="false">http://www.vdcruijsen.net/index.php/2011/02/09/virtual-conference-mvcconf-2011/</guid>
		<description><![CDATA[Yesterday MVCConf 2011 was held. MVCConf is a virtual conference about ASP.NET MVC and since ASP.NET MVC 3 has shipped a few weeks ago there was a lot to talk about. The conference is organized by the community and there &#8230; <a href="http://vdcruijsen.net/2011/02/virtual-conference-mvcconf-2011/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><html xmlns=""></p>
<p$1$2$3$4$5$6>
<p>Yesterday MVCConf 2011 was held. MVCConf is a virtual conference about ASP.NET MVC and since ASP.NET MVC 3 has shipped a few weeks ago there was a lot to talk about. The conference is organized by the community and there are a lot of speakers from the Community as well as from Microsoft.</p>
<p>Some videos are online already at <a href="http://www.mvcconf.com/live">www.mvcconf.com/live</a> but all videos are coming online later at the <a href="http://www.mvcconf.com">www.mvcconf.com</a> site.</p>
<p>Since I’m an ASP.NET MVC fanatic I’ve used my free evening to watch the sessions and will view more tomorrow.</p>
<p><img title="mvcconf" width="457" style="background-image: none; margin: 4px 10px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" src="http://vdcruijsen.net/images/MVCConf_13A52/mvcconf.png" border="0" alt="mvcconf" height="97" /></p>
<p>Sessions I watched:</p>
<p><strong>Keynote by Scott Guthrie</strong> <a href="http://www.twitter.com/scottgu">@scottgu</a></p>
<p>Scott talked about the history of ASP.NET MVC 3 and the older versions (ofcourse everyone knows he wrote version 1 during a single flight from his home to some conference a few years ago) and held an interactive session where people could ask questions using twitter. He talked about the difference of webforms and mvc ofcourse since this is a question that is always asked when talking about mvc on a high level. He noted again that webforms, webmatrix and MVC will all exist next to each other in the future and serve different purposes. to make this more clear he gave 3 keywords for all methods of building ASP.NET applications</p>
<p>WebMatrix</p>
<ul>
<li>Simple</li>
<li>Light</li>
<li>Fast</li>
</ul>
<p>Web Forms</p>
<ul>
<li>Familiar</li>
<li>Reusable</li>
<li>Productive</li>
</ul>
<p>MVC</p>
<ul>
<li>Powerfull</li>
<li>Extensible</li>
<li>Agile</li>
</ul>
<p>Other things he talked about is the focus of Microsoft on JQuery. Microsoft added JQuery to the MVC 1.0 and in 3.0 they even switched completely to JQuery when you look at all examples etc. Microsoft is also actively helping in creating a new JQuery plugin for the JQuery Datatable. this is something I would really like to see!!</p>
<p>Scott also told us about project Orchard which is a new open source CMS project by Microsoft. this is also looking really promising. Another thing Scott talked about really quick was an Asset management system for CSS and JS functions / snippets. more to come about this in the future. (he wasn’t supposed to say anything about this.)</p>
<p>Finally he talked about large sites running ASP.NET MVC. He couldn’t tell a lot about this since he didn’t know which company liked him saying their technology choices. but some examples he did tell were bing.com and other microsoft sites. other examples people on twitter added are the channel 9 site, stackoverflow.com and cheezburger.com <img src='http://vdcruijsen.net/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p$1$2$3$4$5$6>
<p><strong>Phil Haack on nuget</strong> <a href="http://www.twitter.com/haacked">@haacked</a></p>
<p>Phil talked on Microsoft opensource project nuget by showing how you use it in visual studio using the extension manager and the console. I think most people have already seen and used nuget but this session went deeper. phil showed us how to create packages and how to use advanced functions the console. Something that was new to me he showed us is the local repository you can add in nuget. I’m going to have another look at this later so we can use it within our company.</p>
<p>after this he showed us how nuget is working under the hood. All in all a really nice session for me.</p>
<p$1$2$3$4$5$6>
<p><strong>Brad Wilson on “Advanced MVC 3.0”</strong> <a href="http://www.twitter.com/bradwilson">@bradwilson</a></p>
<p>Brad talked on some advanced topics of MVC 3.0. It’s hard to do a recap on this one since it’s a lot of stuff. some things were really interesting. he started off with statefull filters to show how to use filters per request, per session or per applications. after this he talked about validation with unobstructive Ajax with Jquery. very interesting!!</p>
<p>He also talked about how to use different kinds of objects as classes for your model and about routing constraints.</p>
<p>If you are a more advanced MVC developer this is a session you shouldn’t miss.</p>
<p$1$2$3$4$5$6>
<p><strong>Steve Sanderson on MVC Scaffolding</strong> <a href="http://twitter.com/stevesanderson">@stevesanderson</a></p>
<p>Steve talked about the opensource project MVC Scaffolding. The original idea for this came from the Ruby community where people wanted to generate simple crud forms and the database itself from the model classes. Steve has created a package which you can get with nuget to have this in ASP.NET MVC 3.0.</p>
<p>Phil showed a quick sample of this on his nuget presentation and Steve also showed an example where he automatically generated everything using the repository pattern so you get a nice decoupled scenario without typing any code. after this he showed more complex situations. for more info check this blogpost:</p>
<p><a title="http://blog.stevensanderson.com/2011/01/13/scaffold-your-aspnet-mvc-3-project-with-the-mvcscaffolding-package/" href="http://blog.stevensanderson.com/2011/01/13/scaffold-your-aspnet-mvc-3-project-with-the-mvcscaffolding-package/">http://blog.stevensanderson.com/2011/01/13/scaffold-your-aspnet-mvc-3-project-with-the-mvcscaffolding-package/</a></p>
<p$1$2$3$4$5$6>
<p>Other sessions I haven’t watched yet but will do later are:</p>
<p><strong>BDD in ASP.NET MVC using SpecFlow, WatiN and WatiN Test Helpers </strong>by Brandon Satrom</p>
<p><strong>Quality Driven Web Acceptance Testing </strong>by amir Barylko</p>
<p><strong>WebMatrix</strong> by Rob Conery</p>
<p><strong>Entity Framework &#8220;Code First&#8221;: Domain Driven CRUD</strong> by Chris Zavaleta</p>
<p$1$2$3$4$5$6>
<p>I really enjoyed the sessions. MVCConf and all speakers thanks and hopefully I’ll be able to join MVCConf 2012 again next year.</p>
<p>When all video’s are up I’ll edit the post with the links to the videos</p>
<p$1$2$3$4$5$6>
<p>Geert van der Cruijsen</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Virtual+conference+MVCConf+2011&amp;u=http%3A%2F%2Fvdcruijsen.net%2F2011%2F02%2Fvirtual-conference-mvcconf-2011%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Virtual+conference+MVCConf+2011&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2011%2F02%2Fvirtual-conference-mvcconf-2011%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Virtual+conference+MVCConf+2011&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2011%2F02%2Fvirtual-conference-mvcconf-2011%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fvdcruijsen.net%2F2011%2F02%2Fvirtual-conference-mvcconf-2011%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://vdcruijsen.net/2011/02/virtual-conference-mvcconf-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using the WP7 system color in live tiles and application icon</title>
		<link>http://vdcruijsen.net/2011/01/using-the-wp7-system-color-in-live-tiles-and-application-icon/</link>
		<comments>http://vdcruijsen.net/2011/01/using-the-wp7-system-color-in-live-tiles-and-application-icon/#comments</comments>
		<pubDate>Tue, 11 Jan 2011 19:28:49 +0000</pubDate>
		<dc:creator>Geert van der Cruijsen</dc:creator>
				<category><![CDATA[Geert's Projects]]></category>
		<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[WP7]]></category>

		<guid isPermaLink="false">http://www.vdcruijsen.net/index.php/2011/01/11/using-the-wp7-system-color-in-live-tiles-and-application-icon/</guid>
		<description><![CDATA[I’m currently building my first WP7 application for a contest that is held by Avanade Netherlands for all its employees. Who can create the best app in a small amount of time. My app is almost finished and I was &#8230; <a href="http://vdcruijsen.net/2011/01/using-the-wp7-system-color-in-live-tiles-and-application-icon/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I’m currently building my first WP7 application for a contest that is held by Avanade Netherlands for all its employees. Who can create the best app in a small amount of time.</p>
<p>My app is almost finished and I was trying to set up the live tile and application icon. Of course I wanted to use the system color which the user has selected to display on the background of my live tile. How to do this? here is how, it is actually quite simple.</p>
<p>when you open your solution you’ll automatically get your background.png and applicationicon.png. both icons have a black/greyish background. like shown in the example below.</p>
<p><a href="http://vdcruijsen.net/images/Using-the-WP7-system-color-in-live-tiles_CBAA/livetile1.png"><img style="background-image: none; border-right-width: 0px; margin: 4px 10px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="livetile1" border="0" alt="livetile1" src="http://vdcruijsen.net/images/Using-the-WP7-system-color-in-live-tiles_CBAA/livetile1_thumb.png" width="136" height="244" /></a></p>
<p>to switch the background to use the system color follow the following steps:</p>
<ul>
<li>Open up your background.png in any decent image editing tool like Paint.net. </li>
<li>Use the magic marker to select the background </li>
</ul>
<p><a href="http://vdcruijsen.net/images/Using-the-WP7-system-color-in-live-tiles_CBAA/live-tile-selected.png"><img style="background-image: none; border-right-width: 0px; margin: 4px 10px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="live tile selected" border="0" alt="live tile selected" src="http://vdcruijsen.net/images/Using-the-WP7-system-color-in-live-tiles_CBAA/live-tile-selected_thumb.png" width="244" height="233" /></a></p>
<ul>
<li>press delete so you get a transparent background </li>
</ul>
<p>&#160;</p>
<p><a href="http://vdcruijsen.net/images/Using-the-WP7-system-color-in-live-tiles_CBAA/live-tile-deleted.png"><img style="background-image: none; border-right-width: 0px; margin: 4px 10px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="live tile deleted" border="0" alt="live tile deleted" src="http://vdcruijsen.net/images/Using-the-WP7-system-color-in-live-tiles_CBAA/live-tile-deleted_thumb.png" width="244" height="233" /></a></p>
<ul>
<li>save the icon back to your visual studio solution. </li>
<li>compile </li>
<li>enjoy! </li>
</ul>
<p>&#160;</p>
<p><a href="http://vdcruijsen.net/images/Using-the-WP7-system-color-in-live-tiles_CBAA/livetile2.png"><img style="background-image: none; border-right-width: 0px; margin: 4px 10px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="livetile2" border="0" alt="livetile2" src="http://vdcruijsen.net/images/Using-the-WP7-system-color-in-live-tiles_CBAA/livetile2_thumb.png" width="136" height="244" /></a><a href="http://vdcruijsen.net/images/Using-the-WP7-system-color-in-live-tiles_CBAA/livetile3.png"><img style="background-image: none; border-right-width: 0px; margin: 4px 10px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="livetile3" border="0" alt="livetile3" src="http://vdcruijsen.net/images/Using-the-WP7-system-color-in-live-tiles_CBAA/livetile3_thumb.png" width="136" height="244" /></a></p>
<p>&#160;</p>
<p><u><font color="#ff0000">Ofcourse the next step would be to do the same for your application icon (the icon in the application list). </font></u></p>
<p><u><font color="#ff0000">I tried it and it didn’t work… after some research I found out that this is for Microsoft and official partners only.. Bummer!! </font></u></p>
<p>&#160;</p>
<p>Guess we are going to be stuck by using greyish application icons after all.. hopefully Microsoft will fix this in the future.</p>
<p>&#160;</p>
<p>Hopefully this post was helpful to you. In my opinion there are to few good resources to be found on WP7 development so every small thing helps.</p>
<p>Geert van der Cruijsen</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Using+the+WP7+system+color+in+live+tiles+and+application+icon&amp;u=http%3A%2F%2Fvdcruijsen.net%2F2011%2F01%2Fusing-the-wp7-system-color-in-live-tiles-and-application-icon%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Using+the+WP7+system+color+in+live+tiles+and+application+icon&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2011%2F01%2Fusing-the-wp7-system-color-in-live-tiles-and-application-icon%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Using+the+WP7+system+color+in+live+tiles+and+application+icon&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2011%2F01%2Fusing-the-wp7-system-color-in-live-tiles-and-application-icon%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fvdcruijsen.net%2F2011%2F01%2Fusing-the-wp7-system-color-in-live-tiles-and-application-icon%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://vdcruijsen.net/2011/01/using-the-wp7-system-color-in-live-tiles-and-application-icon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>First impression of the HTC Trophy and Windows Phone 7</title>
		<link>http://vdcruijsen.net/2010/11/first-impression-of-the-htc-trophy-and-windows-phone-7/</link>
		<comments>http://vdcruijsen.net/2010/11/first-impression-of-the-htc-trophy-and-windows-phone-7/#comments</comments>
		<pubDate>Mon, 15 Nov 2010 22:18:57 +0000</pubDate>
		<dc:creator>Geert van der Cruijsen</dc:creator>
				<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[Avanade]]></category>
		<category><![CDATA[HTC]]></category>
		<category><![CDATA[WP7]]></category>

		<guid isPermaLink="false">http://vdcruijsen.net/?p=55</guid>
		<description><![CDATA[A few weeks after the official release of windows phone 7 our entire company (Avanade Netherlands) moved to Windows phone 7. Every Employee (225) received a HTC Trophy today and tonight i&#8217;ve put my new phone to the test. Here &#8230; <a href="http://vdcruijsen.net/2010/11/first-impression-of-the-htc-trophy-and-windows-phone-7/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A few weeks after the official release of windows phone 7 our entire company (Avanade Netherlands) moved to Windows phone 7. Every Employee (225) received a HTC Trophy today and tonight i&#8217;ve put my new phone to the test. Here are my first impressions:</p>
<p><a href="http://vdcruijsen.net/wp-content/uploads/2010/11/image5.jpg"><img src="http://vdcruijsen.net/wp-content/uploads/2010/11/image5-300x168.jpg" alt="" title="HTC Trophy" width="300" height="168" class="alignnone size-medium wp-image-56" /></a></p>
<p>the hardware:</p>
<p>The phone is feeling really robust and the screen is looking really well. the captative screen works very good aswell. all menus and buttons are reacting really fast and Microsoft really did their best in getting the UI right.. And they did! After testing the Camera i have to say that this is probably the worst part of this phone. when it&#8217;s a bit dark the pictures get really bad. i also don&#8217;t like the &#8220;hardware&#8221;/tip buttons under the screen. ofcourse you dont need them that much but when i compare this to my girlfriends HTC Desire i have to say i prefer real hardware buttons.</p>
<p>booting it for the first time:</p>
<p>after booting it you get a small tutorial to set stuff up. i choose to skip the windows live id and to just get started. within 1 minute my phone was ready to go. I&#8217;ve started setting up my exchange mail since all my contacts/mail/agenda stuff is in there. the setup was also done really easy, just add an exchange account, add your username/password and press ok. everything just worked. after this i&#8217;ve added my facebook account. after i did that all contacts were synced and merged perfectly. my exchange contacts have facebook pictures etc. looking pretty slick.</p>
<p>After this i tried setting up my live id.. stubborn as i am i ofcourse added my dutch liveid to see what would happen.. first it would ofcourse sync my mail/contacts etc.. that was the positive part. then i tried to open the marketplace but that wasn&#8217;t working. i tried to deinstall the live id but that isn&#8217;t possible. so a hard reset was a fact <img src='http://vdcruijsen.net/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  (within 5 minutes after i first touched it).</p>
<p>after playing with facebook/mail/apps etc i tried the most important thing a phone has to do: call someone. to make this extra hard i called someone while i was on my way home through my parrot carkit. some windows phone 6.5&#8242;s wouldnt even make this test but sound quality was really good with my new phone. also the ui of the call screen and contact screen  is really well thought off.</p>
<p>next try: setting up a US based live id and adding my dutch live id after. Perfect. i get all the contacts/agenda/mail from my dutch live id and i can get to the marketplace through my US live id.</p>
<p>ofcourse i had to set my facebook/exchange stuff again but that was done in a few minutes.</p>
<p>after playing around with it for a few hours this evening i have a pretty good feeling about this. my conclusions for now:</p>
<p>pro&#8217;s:</p>
<ul>
<li>WP7 is really responsive and intuitive</li>
<li>overall hardware is robust and looking nice</li>
<li>everything just works (except dutch live id&#8217;s )</li>
<li>most important thing calling works really good (nice contact screen, nice call screen)</li>
</ul>
<p>cons:</p>
<ul>
<li>camera is a bit flaky</li>
<li>power charge is on the side of the phone (i am left handed and can&#8217;t even hold it normally when the power cable is in&#8230;.)</li>
<li>Support for dutch marketplace / xbox live missing (will be there in april 2011)</li>
<li>no tethering (will come someday)</li>
</ul>
<p>i&#8217;ll update some more about the new phone after i&#8217;ve played with it a bit more after a few days (battery use for example)</p>
<p>Geert van der Cruijsen</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=First+impression+of+the+HTC+Trophy+and+Windows+Phone+7&amp;u=http%3A%2F%2Fvdcruijsen.net%2F2010%2F11%2Ffirst-impression-of-the-htc-trophy-and-windows-phone-7%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=First+impression+of+the+HTC+Trophy+and+Windows+Phone+7&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2010%2F11%2Ffirst-impression-of-the-htc-trophy-and-windows-phone-7%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=First+impression+of+the+HTC+Trophy+and+Windows+Phone+7&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2010%2F11%2Ffirst-impression-of-the-htc-trophy-and-windows-phone-7%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fvdcruijsen.net%2F2010%2F11%2Ffirst-impression-of-the-htc-trophy-and-windows-phone-7%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://vdcruijsen.net/2010/11/first-impression-of-the-htc-trophy-and-windows-phone-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SharePoint Automatic prefilling of lookup fields in insert forms using JQuery</title>
		<link>http://vdcruijsen.net/2010/08/sharepoint-automatic-prefilling-of-lookup-fields-in-insert-forms-using-jquery/</link>
		<comments>http://vdcruijsen.net/2010/08/sharepoint-automatic-prefilling-of-lookup-fields-in-insert-forms-using-jquery/#comments</comments>
		<pubDate>Mon, 16 Aug 2010 18:37:36 +0000</pubDate>
		<dc:creator>Geert van der Cruijsen</dc:creator>
				<category><![CDATA[JQuery]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">/post/SharePoint-Automatic-prefilling-of-lookup-fields-in-insert-forms-using-JQuery.aspx</guid>
		<description><![CDATA[At my last project I was working on a SharePoint online solution and one of the requirements is to prefill some values at one of the insert forms for a list. Since this is SharePoint online and the only tool &#8230; <a href="http://vdcruijsen.net/2010/08/sharepoint-automatic-prefilling-of-lookup-fields-in-insert-forms-using-jquery/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>At my last project I was working on a SharePoint online solution and one of the requirements is to prefill some values at one of the insert forms for a list. Since this is SharePoint online and the only tool you can use to customize is SharePoint Designer I had to do this with JavaScript.</p>
<p>I’ll explain how to build it by an example. for example you have a list of customers and a list of customer actions. What I wanted to build was a way to make it easier to add a customer action for a specific customer. To do this I added a custom column to the customer list containing a link to the edit form with the customer id as an url variable. Of course the out of the box you can’t create links or any other html with calculated fields so I added more javascript there.</p>
<p>to enable html as output of a calculated field just copy this piece of javascript and put it in a content editor webpart or paste it on your master page.</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #0000ff">var</span> theTDs = document.getElementsByTagName(<span style="color: #006080">&quot;TD&quot;</span>); </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #0000ff">var</span> i=0; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #0000ff">var</span> TDContent = <span style="color: #006080">&quot; &quot;</span>; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #0000ff">while</span> (i &lt; theTDs.length)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">{ </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">  <span style="color: #0000ff">try</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">  { </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">    TDContent = theTDs[i].innerText || theTDs[i].textContent; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">    <span style="color: #0000ff">if</span> ((TDContent.indexOf(<span style="color: #006080">&quot;&lt;DIV&quot;</span>) == 0) &amp;&amp; (TDContent.indexOf(<span style="color: #006080">&quot;&lt;/DIV&gt;&quot;</span>) &gt;= 0))</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">    { </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">      theTDs[i].innerHTML = TDContent; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">    } </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">  } </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">  <span style="color: #0000ff">catch</span>(err){} </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">  i=i+1; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">} </pre>
<p><!--CRLF--></div>
</div>
<p></p>
<p>Thanks Marijn Somers for this piece of code. original source: <a title="http://marijnsomers.blogspot.com/2010/01/write-html-code-in-sharepoint-via.html" href="http://marijnsomers.blogspot.com/2010/01/write-html-code-in-sharepoint-via.html">http://marijnsomers.blogspot.com/2010/01/write-html-code-in-sharepoint-via.html</a></p>
<p>so now my calculated field was a link in html. what did my calculated field look like?</p>
<p>=&quot;&lt;DIV&gt;&lt;a href=&#8217;../../Lists/CustomerActions/NewForm.aspx?Customer=&quot;&amp;[Customer ID]&amp;&quot;’&gt;Add Customer Action&lt;/a&gt;&lt;/DIV&gt;&quot;</p>
<p>First a DIV element since the javascript above only replaces elements starting with a &lt;DIV&gt; to html, then just a plain html link to the NewForm.aspx sending the customer id as an url parameter.</p>
<p>&#160;</p>
<p>So now the changes in the customer list are done and we only need to add some more javascript at the NewForm.aspx or again just at your masterpage to get the parameter from the url and selecting the right lookup field value at the form.</p>
<p>I’ve created the following code&#160; using Jquery:</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #0000ff">var</span> customer = $.getUrlVar(<span style="color: #006080">&quot;Customer&quot;</span>);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">&#160;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #0000ff">if</span>(customer != <span style="color: #006080">&quot;&quot;</span>)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">{</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">  $(<span style="color: #006080">&quot;input[title='Customer']&quot;</span>).val(customer);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">  </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">  $(<span style="color: #006080">&quot;select[title='Customer']&quot;</span>).children(<span style="color: #006080">&quot;option&quot;</span>).each(<span style="color: #0000ff">function</span>() {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">    <span style="color: #0000ff">if</span>($(<span style="color: #0000ff">this</span>).text() == customer)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">    {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">      $(<span style="color: #0000ff">this</span>).attr(<span style="color: #006080">'selected'</span>, <span style="color: #006080">'selected'</span>); </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">    }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">  });</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px">}</pre>
<p><!--CRLF--></div>
</div>
<p></p>
<p>My customer actions list contained a Customer field which is a lookup to the Customer list by Customer ID. The script above gets the Customer ID from the url parameters first and then tries to set the lookup item. SharePoint renders lookup items in 2 different ways. as a select box when there are less then +/- 25 items and as a auto complete textbox when there are more then 25 items in the lookup list. Because of that I firs try to set the textbox to the right value and after that the select. I’m using the title attribute to locate the right input field because it gets the same name as the field from SharePoint by itself.</p>
<p>Now when I open the newform.aspx?customer=1234 my customer lookup field is automatically prefilled with 1234</p>
<p>&#160;</p>
<p>Geert van der Cruijsen</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=SharePoint+Automatic+prefilling+of+lookup+fields+in+insert+forms+using+JQuery&amp;u=http%3A%2F%2Fvdcruijsen.net%2F2010%2F08%2Fsharepoint-automatic-prefilling-of-lookup-fields-in-insert-forms-using-jquery%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=SharePoint+Automatic+prefilling+of+lookup+fields+in+insert+forms+using+JQuery&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2010%2F08%2Fsharepoint-automatic-prefilling-of-lookup-fields-in-insert-forms-using-jquery%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=SharePoint+Automatic+prefilling+of+lookup+fields+in+insert+forms+using+JQuery&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2010%2F08%2Fsharepoint-automatic-prefilling-of-lookup-fields-in-insert-forms-using-jquery%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fvdcruijsen.net%2F2010%2F08%2Fsharepoint-automatic-prefilling-of-lookup-fields-in-insert-forms-using-jquery%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://vdcruijsen.net/2010/08/sharepoint-automatic-prefilling-of-lookup-fields-in-insert-forms-using-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using the SPContext in HttpModules in SharePoint</title>
		<link>http://vdcruijsen.net/2010/05/using-the-spcontext-in-httpmodules-in-sharepoint/</link>
		<comments>http://vdcruijsen.net/2010/05/using-the-spcontext-in-httpmodules-in-sharepoint/#comments</comments>
		<pubDate>Sun, 23 May 2010 17:20:06 +0000</pubDate>
		<dc:creator>Geert van der Cruijsen</dc:creator>
				<category><![CDATA[Asp.net]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">/post/Using-the-SPContext-in-HttpModules-in-SharePoint.aspx</guid>
		<description><![CDATA[When you are building custom HttpModules in SharePoint a common thing to do is to use the SPContext object to get acces to your SPSite, SPWeb, SPList or SPListItem. When doing this you have to be careful because the SPContext &#8230; <a href="http://vdcruijsen.net/2010/05/using-the-spcontext-in-httpmodules-in-sharepoint/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>When you are building custom HttpModules in SharePoint a common thing to do is to use the SPContext object to get acces to your SPSite, SPWeb, SPList or SPListItem. When doing this you have to be careful because the SPContext isn’t available everywhere because HttpModules can run early in the ASP.Net request pipeline so the SPContext object isn&#8217;t available yet.</p>
<p>if you try to acces the SPContext to early in the pipeline you’ll get a <strong>System.InvalidOperationException</strong> error.</p>
<p>The earliest you can use the SPContext is in the “PreRequestHandlerExecute” so don’t use it at the BeginRequest event what most people try to use when they want to add code as early in the pipeline as possible</p>
<p>code:</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; height: 246px; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">class</span> RequestHandlingHttpModule : IHttpModule, IRequiresSessionState</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2">   2:</span> {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3">   3:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4">   4:</span>     <span style="color: #0000ff">public</span> <span style="color: #0000ff">void</span> Dispose() {}</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5">   5:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6">   6:</span>     <span style="color: #0000ff">public</span> <span style="color: #0000ff">void</span> Init(HttpApplication application)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7">   7:</span>     {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8">   8:</span>         application.BeginRequest += application_BeginRequest;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum9">   9:</span>         application.PreRequestHandlerExecute += <span style="color: #0000ff">new</span> EventHandler(application_PreRequestHandlerExecute);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum10">  10:</span>     }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum11">  11:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum12">  12:</span>     <span style="color: #0000ff">void</span> application_PreRequestHandlerExecute(<span style="color: #0000ff">object</span> sender, EventArgs e)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum13">  13:</span>     {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum14">  14:</span>         <span style="color: #0000ff">string</span> webUrl = SPContext.Current.Web.Url;</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum15">  15:</span>     }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum16">  16:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum17">  17:</span>     <span style="color: #0000ff">void</span> application_BeginRequest(<span style="color: #0000ff">object</span> sender, EventArgs e)</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum18">  18:</span>     {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum19">  19:</span>         <span style="color: #008000">// do not use SPContext here it will throw a System.InvalidOperationException </span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum20">  20:</span>         <span style="color: #008000">// this event is fired before PreRequestHandlerExecute so code that doesn't uses SPContext goes here</span></pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum21">  21:</span>     }</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum22">  22:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum23">  23:</span> }</pre>
<p><!--CRLF--></div>
</div>
<p>Geert van der Cruijsen</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Using+the+SPContext+in+HttpModules+in+SharePoint&amp;u=http%3A%2F%2Fvdcruijsen.net%2F2010%2F05%2Fusing-the-spcontext-in-httpmodules-in-sharepoint%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Using+the+SPContext+in+HttpModules+in+SharePoint&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2010%2F05%2Fusing-the-spcontext-in-httpmodules-in-sharepoint%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Using+the+SPContext+in+HttpModules+in+SharePoint&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2010%2F05%2Fusing-the-spcontext-in-httpmodules-in-sharepoint%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fvdcruijsen.net%2F2010%2F05%2Fusing-the-spcontext-in-httpmodules-in-sharepoint%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://vdcruijsen.net/2010/05/using-the-spcontext-in-httpmodules-in-sharepoint/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Combined power of SharePoint and JQuery part 2: Changing the SharePoint webpart edit menu position</title>
		<link>http://vdcruijsen.net/2010/05/combined-power-of-sharepoint-and-jquery-part-2-changing-the-sharepoint-webpart-edit-menu-position/</link>
		<comments>http://vdcruijsen.net/2010/05/combined-power-of-sharepoint-and-jquery-part-2-changing-the-sharepoint-webpart-edit-menu-position/#comments</comments>
		<pubDate>Thu, 20 May 2010 20:55:35 +0000</pubDate>
		<dc:creator>Geert van der Cruijsen</dc:creator>
				<category><![CDATA[Asp.net]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">/post/Combined-power-of-SharePoint-and-JQuery-part-2-Changing-the-SharePoint-webpart-edit-menu-position.aspx</guid>
		<description><![CDATA[Have you ever had the problem using SharePoint 2007 that when you create small webpart zones that the edit button disappeared because the title of the webpart was to long? I ran into this problem at my current project and &#8230; <a href="http://vdcruijsen.net/2010/05/combined-power-of-sharepoint-and-jquery-part-2-changing-the-sharepoint-webpart-edit-menu-position/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Have you ever had the problem using SharePoint 2007 that when you create small webpart zones that the edit button disappeared because the title of the webpart was to long? I ran into this problem at my current project and instead of shortening down the titles i came up with the idea of changing the position of the edit button to be on the left of the title. when the button is on the left and the title is on the right the title will be trimmed automatically since the webpart zones have a fixed length.</p>
<p>In your server side code it’s really hard to change these kinds of things because this is standard SharePoint functionality and you can’t change it server side. So the solution is to fix it using javascript and to make that easier I’m using JQuery.</p>
<p>first I’ll show you the results below and then how I did it using a small JQuery script.</p>
<p>before:</p>
<p><a href="http://vdcruijsen.net/images/CombinedpowerofSharePointandJQuerypart2C_98D7/sharepointjquery1.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="sharepointjquery1" border="0" alt="sharepointjquery1" src="http://vdcruijsen.net/images/CombinedpowerofSharePointandJQuerypart2C_98D7/sharepointjquery1_thumb.png" width="234" height="97" /></a> </p>
<p>after:</p>
<p><a href="http://vdcruijsen.net/images/CombinedpowerofSharePointandJQuerypart2C_98D7/sharepointjquery2.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="sharepointjquery2" border="0" alt="sharepointjquery2" src="http://vdcruijsen.net/images/CombinedpowerofSharePointandJQuerypart2C_98D7/sharepointjquery2_thumb.png" width="234" height="97" /></a> </p>
<p>Below is the JQuery script to change the position of the edit menu to the left. the only thing you have to do is save this code to a js file, include the reference to the js file and a reference to the JQuery library js file on your masterpage and you’re done.</p>
<div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">
<div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> $(document).ready(<span style="color: #0000ff">function</span>() {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2">   2:</span>     SPEditMenuFix();</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3">   3:</span> });</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4">   4:</span>&#160; </pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5">   5:</span> <span style="color: #0000ff">function</span> SPEditMenuFix() {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6">   6:</span>     $(<span style="color: #006080">&quot;.ms-WPHeader&quot;</span>).each(<span style="color: #0000ff">function</span>() {</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7">   7:</span>         <span style="color: #0000ff">var</span> first = $(<span style="color: #0000ff">this</span>).children(<span style="color: #006080">&quot;td:first&quot;</span>).clone(<span style="color: #0000ff">true</span>);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8">   8:</span>         <span style="color: #0000ff">var</span> last = $(<span style="color: #0000ff">this</span>).children(<span style="color: #006080">&quot;td:last&quot;</span>).clone(<span style="color: #0000ff">true</span>);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum9">   9:</span>         $(<span style="color: #0000ff">this</span>).children(<span style="color: #006080">&quot;td:first&quot;</span>).replaceWith(last);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum10">  10:</span>         $(<span style="color: #0000ff">this</span>).children(<span style="color: #006080">&quot;td:last&quot;</span>).replaceWith(first);</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: white; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum11">  11:</span>     });</pre>
<p><!--CRLF--></p>
<pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum12">  12:</span> }</pre>
<p><!--CRLF--></div>
</div>
<p>Enjoy!</p>
<p>Geert van der Cruijsen</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Combined+power+of+SharePoint+and+JQuery+part+2%3A+Changing+the+SharePoint+webpart+edit+menu+position&amp;u=http%3A%2F%2Fvdcruijsen.net%2F2010%2F05%2Fcombined-power-of-sharepoint-and-jquery-part-2-changing-the-sharepoint-webpart-edit-menu-position%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Combined+power+of+SharePoint+and+JQuery+part+2%3A+Changing+the+SharePoint+webpart+edit+menu+position&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2010%2F05%2Fcombined-power-of-sharepoint-and-jquery-part-2-changing-the-sharepoint-webpart-edit-menu-position%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Combined+power+of+SharePoint+and+JQuery+part+2%3A+Changing+the+SharePoint+webpart+edit+menu+position&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2010%2F05%2Fcombined-power-of-sharepoint-and-jquery-part-2-changing-the-sharepoint-webpart-edit-menu-position%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fvdcruijsen.net%2F2010%2F05%2Fcombined-power-of-sharepoint-and-jquery-part-2-changing-the-sharepoint-webpart-edit-menu-position%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://vdcruijsen.net/2010/05/combined-power-of-sharepoint-and-jquery-part-2-changing-the-sharepoint-webpart-edit-menu-position/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updated my weblog to DotNetBlogengine 1.6.1</title>
		<link>http://vdcruijsen.net/2010/05/updated-my-weblog-to-dotnetblogengine-1-6-1/</link>
		<comments>http://vdcruijsen.net/2010/05/updated-my-weblog-to-dotnetblogengine-1-6-1/#comments</comments>
		<pubDate>Wed, 19 May 2010 21:12:00 +0000</pubDate>
		<dc:creator>Geert van der Cruijsen</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">/post/Updated-my-weblog-to-DotNetBlogengine-161.aspx</guid>
		<description><![CDATA[Just before my vacation to Peru i noticed that i received a lot of spam in my comments on my blog. i was running DotNetBlogEngine 1.4.5 and the spamfilter seemed to be broken. I didn&#8217;t have time to fix it &#8230; <a href="http://vdcruijsen.net/2010/05/updated-my-weblog-to-dotnetblogengine-1-6-1/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Just before my vacation to Peru i noticed that i received a lot of spam in my comments on my blog. i was running DotNetBlogEngine 1.4.5 and the spamfilter seemed to be broken. I didn&#8217;t have time to fix it before my vacation so i disabled comments for a while. now that I&#8217;m back I upgraded to 1.6.1 which has build in functionality for Askismet and Recaptcha.</p>
<p>because&nbsp;I had so many spam comments I had to remove all of them so sorry for everyone who posted real comments because they are also gone now.</p>
<p>BlogEngine.Net 1.6.1 (<a href="http://blogengine.codeplex.com/releases/view/39387" target="_blank">download from codeplex</a>) feels like its a lot more mature then the 1.4.5 version I had before. Lets see how well it will go in the future.</p>
<p><a href="http://dotnetblogengine.net/" target="_blank"><img src="http://dotnetblogengine.net/themes/arthemia/images/benlogo80.gif" alt="" /></a></p>
<p>Because of the switch I had to change the theme because the old one didn&#8217;t work that well with this new version so i downloaded a new theme from <a href="http://www.blogenginetheme.com/">http://www.blogenginetheme.com/</a>&nbsp;and changed a bit to my liking. When i have time i&#8217;ll change it a bit more.</p>
<p>If you are still using an old version of BlogEngine.Net I would advise you to upgrade to 1.6.1 because it&#8217;s looking pretty good and upgrading was easy. (costed me 2 hours including deleting of spam <img title="Smile" src="http://vdcruijsen.net/editors/tiny_mce3/plugins/emotions/img/smiley-smile.gif" border="0" alt="Smile" />&nbsp;)</p>
<p>Enjoy my new weblog</p>
<p>Geert van der Cruijsen</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Updated+my+weblog+to+DotNetBlogengine+1.6.1&amp;u=http%3A%2F%2Fvdcruijsen.net%2F2010%2F05%2Fupdated-my-weblog-to-dotnetblogengine-1-6-1%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Updated+my+weblog+to+DotNetBlogengine+1.6.1&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2010%2F05%2Fupdated-my-weblog-to-dotnetblogengine-1-6-1%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Updated+my+weblog+to+DotNetBlogengine+1.6.1&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2010%2F05%2Fupdated-my-weblog-to-dotnetblogengine-1-6-1%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fvdcruijsen.net%2F2010%2F05%2Fupdated-my-weblog-to-dotnetblogengine-1-6-1%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://vdcruijsen.net/2010/05/updated-my-weblog-to-dotnetblogengine-1-6-1/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Going to DevDays 2010</title>
		<link>http://vdcruijsen.net/2010/02/going-to-devdays-2010/</link>
		<comments>http://vdcruijsen.net/2010/02/going-to-devdays-2010/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 01:32:00 +0000</pubDate>
		<dc:creator>Geert van der Cruijsen</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[DevDays]]></category>
		<category><![CDATA[Events]]></category>

		<guid isPermaLink="false">/post/Going-to-DevDays-2010.aspx</guid>
		<description><![CDATA[Wow first 7 months of no blogging then 2&#160;in 1 week I&#8217;ve been looking through al the sessions on the first day of the DevDays 2010 at the world-forum The Hague, The Netherlands and I&#8217;ve picked the ones I&#8217;m going &#8230; <a href="http://vdcruijsen.net/2010/02/going-to-devdays-2010/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Wow first 7 months of no blogging then 2&nbsp;in 1 week <img src='http://vdcruijsen.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>I&rsquo;ve been looking through al the sessions on the first day of the DevDays 2010 at the world-forum The Hague, The Netherlands and I&rsquo;ve picked the ones I&rsquo;m going to.</p>
<p><a href="http://vdcruijsen.net/images/GoingtoDevDays2010_FA69/devdayslogo.png"><img style="display: inline; border-width: 0px" title="devdays-logo" src="/images/GoingtoDevDays2010_FA69/devdayslogo_thumb.png" border="0" alt="devdays-logo" width="240" height="102" /></a>&nbsp;</p>
<p>First off starting with the Keynote of course by Anders Hejlsberg and the keynotes title is: &ldquo;Trends and Future Directions in Programming Languages&rdquo;.</p>
<p>After the keynote at 11:05 I&rsquo;m going to see the session by Scott Hanselman called &ldquo;ASP.NET MVC 2: Basics, Introduction&rdquo;. Hopefully there are some new things for me to see although I know quite a bit about the MVC framework already <img src='http://vdcruijsen.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  If not&hellip; Scott is always a cool guy to listen to so i see no problems.</p>
<p>At 13:30 I&rsquo;ll be going to the session by Alex Thissen called &ldquo;Secure Coding&rdquo;. It never hurts to know something about security <img src='http://vdcruijsen.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The next session at 15:05 is by Anders Hejlsberg again. The session is called &ldquo;C# 4.0 and beyond&rdquo;. I would really like to know what is beyond.</p>
<p>The last session of the DevDays at 16:40 I&rsquo;m going to see is by Scott Hanselman. It&rsquo;s called &ldquo;ASP.NET MVC 2: Ninja Black Belt Tips&rdquo;. Since I&rsquo;m already a ASP.NET MVC ninja i would like to learn from the master how to get my black belt.</p>
<p>In the evening there are a couple of sessions at the &ldquo;Geeknight&rdquo;. The Geeknight sessions are sessions for the real geeks and are about programming for fun, home automation, etc.</p>
<p>Sessions at the Geeknight I&rsquo;m going to are:</p>
<p>Ofcourse starting with the geeknight keynote by Tony Krijnen and Daniel van Soest at 18:30.</p>
<p>after the keynote &ldquo;I&rsquo;m going to learn how to make my blog suck less&rdquo; by Scott Hanselman (wow 3 sessions on 1 day <img src='http://vdcruijsen.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  )</p>
<p>the last session at 21:00 is the hardest choice. i have to choose between &ldquo;If the &lsquo;Free Lunch&rsquo; is Over, Can we Still Afford to Eat? How to Power Boost your Applications &ldquo; or &ldquo;Microcontrollers for .Net programmers&rdquo; or &ldquo;Using .NET to Program your Hobby Web-services&rdquo;. I really don&rsquo;t know what to expect from the first session, my interests aren&rsquo;t with microcontrollers and the last session is about webservices which i do like but it&rsquo;s a level 100 session and I think there isn&rsquo;t going to be that much new stuff to be heard there.</p>
<p>so for now my choice is with &ldquo;If the &lsquo;Free Lunch&rsquo; is Over, Can we Still Afford to Eat? How to Power Boost your Applications &ldquo; by Rutger van Beusekom.</p>
<p>I really can&rsquo;t wait for DevDays 2010 to start.</p>
<p>Maybe I&#8217;ll see you there!</p>
<p>Geert van der Cruijsen</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Going+to+DevDays+2010&amp;u=http%3A%2F%2Fvdcruijsen.net%2F2010%2F02%2Fgoing-to-devdays-2010%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Going+to+DevDays+2010&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2010%2F02%2Fgoing-to-devdays-2010%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Going+to+DevDays+2010&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2010%2F02%2Fgoing-to-devdays-2010%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fvdcruijsen.net%2F2010%2F02%2Fgoing-to-devdays-2010%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://vdcruijsen.net/2010/02/going-to-devdays-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Combined power of SharePoint and JQuery part1: Changing the SharePoint Image Picker</title>
		<link>http://vdcruijsen.net/2010/02/combined-power-of-sharepoint-and-jquery-part1-changing-the-sharepoint-image-picker/</link>
		<comments>http://vdcruijsen.net/2010/02/combined-power-of-sharepoint-and-jquery-part1-changing-the-sharepoint-image-picker/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 10:12:00 +0000</pubDate>
		<dc:creator>Geert van der Cruijsen</dc:creator>
				<category><![CDATA[JQuery]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">/post/Combined-power-of-SharePoint-and-JQuery-part1-Changing-the-SharePoint-Image-Picker.aspx</guid>
		<description><![CDATA[Wow&#8230; long time since i blogged. Thank god I&#8217;m going to the Dutch DevDays to see Scott Hanselman&#8217;s session called &#8220;How to make your blog suck less&#8221; So here is an update of mine about how to use JQuery in &#8230; <a href="http://vdcruijsen.net/2010/02/combined-power-of-sharepoint-and-jquery-part1-changing-the-sharepoint-image-picker/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Wow&hellip; long time since i blogged. Thank god I&#8217;m going to the Dutch <a href="http://www.devdays.nl">DevDays</a> to see <a href="http://www.hanselman.com/blog/">Scott Hanselman&rsquo;s</a> session called &ldquo;How to make your blog suck less&rdquo; <img src='http://vdcruijsen.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>So here is an update of mine about how to use JQuery in SharePoint to do some fancy tricks. I&rsquo;ll post some more of these tricks later on and I&rsquo;ll try to be more active as a blogger again. (In which I&rsquo;ll probably fail)</p>
<p>Have you ever tried to change some of SharePoint&#8217;s default controls like the image picker?</p>
<p>Well I have. My customer wanted a image picker that worked exactly like the normal one except for 1 change. It shouldn&rsquo;t show the selected image as an image but it should only show the URL of the selected image. I tried to change this at server side first by inheriting from the default SharePoint image picker control. This was a rather annoying job as i didn&rsquo;t seem to get the right result this way. you cannot extend the rich image picker from sharepoint but only the default image picker that doesn&rsquo;t have the image library function behind it.</p>
<p>When i was looking at the html that was rendered by SharePoint i thought it would be easier to change the html with jquery as with serverside code and this is the result. just save this source to a .js file and include it into your masterpage or aspx page and all selected images in the image picker will be changed to only show the url of the image.</p>
<div id="codeSnippetWrapper" style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; width: 97.5%; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; cursor: text; border: silver 1px solid; padding: 4px;">
<div id="codeSnippet" style="text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #008000">///&lt;reference path="jquery-1.3.2.min-vsdoc.js" /&gt;</span>
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">&nbsp;
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">$(document).ready(<span style="color: #0000ff">function</span>() {
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">    HideImages();
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">});
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">&nbsp;
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #0000ff">function</span> HideImages() {
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">    $(<span style="color: #006080">"span[id $= '_RichImageField_ImageFieldDisplay']"</span>).each(<span style="color: #0000ff">function</span>() {
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">        <span style="color: #0000ff">var</span> url = $(<span style="color: #0000ff">this</span>).find(<span style="color: #006080">"img"</span>).attr(<span style="color: #006080">"src"</span>);
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">        $(<span style="color: #0000ff">this</span>).find(<span style="color: #006080">"a"</span>).hide();
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">        $(<span style="color: #0000ff">this</span>).append(<span style="color: #006080">"&lt;span class='imgurl'&gt;"</span> + url + <span style="color: #006080">"&lt;/span&gt;"</span>);
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">        $(<span style="color: #0000ff">this</span>).find(<span style="color: #006080">"a"</span>).each(<span style="color: #0000ff">function</span>() {
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">            $(<span style="color: #0000ff">this</span>).find(<span style="color: #006080">"img"</span>).each(<span style="color: #0000ff">function</span>() {
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">                $(<span style="color: #0000ff">this</span>).load(<span style="color: #0000ff">function</span>() {
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">                    $(<span style="color: #0000ff">this</span>).parent().hide();
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">                    <span style="color: #0000ff">var</span> imgurl = $(<span style="color: #0000ff">this</span>).attr(<span style="color: #006080">"src"</span>);
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">                    $(<span style="color: #0000ff">this</span>).parent().parent().find(<span style="color: #006080">".imgurl"</span>).text(imgurl);
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">                });
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">            });
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">        });
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">    });
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">}
</pre>
<p><!--CRLF--></div>
</div>
<p>It&rsquo;s as easy as that.</p>
<p>More JQuery fun to post in the future.</p>
<p>Geert van der Cruijsen</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Combined+power+of+SharePoint+and+JQuery+part1%3A+Changing+the+SharePoint+Image+Picker&amp;u=http%3A%2F%2Fvdcruijsen.net%2F2010%2F02%2Fcombined-power-of-sharepoint-and-jquery-part1-changing-the-sharepoint-image-picker%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Combined+power+of+SharePoint+and+JQuery+part1%3A+Changing+the+SharePoint+Image+Picker&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2010%2F02%2Fcombined-power-of-sharepoint-and-jquery-part1-changing-the-sharepoint-image-picker%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Combined+power+of+SharePoint+and+JQuery+part1%3A+Changing+the+SharePoint+Image+Picker&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2010%2F02%2Fcombined-power-of-sharepoint-and-jquery-part1-changing-the-sharepoint-image-picker%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fvdcruijsen.net%2F2010%2F02%2Fcombined-power-of-sharepoint-and-jquery-part1-changing-the-sharepoint-image-picker%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://vdcruijsen.net/2010/02/combined-power-of-sharepoint-and-jquery-part1-changing-the-sharepoint-image-picker/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating an MVC based website with reusable widgets</title>
		<link>http://vdcruijsen.net/2009/07/creating-an-mvc-based-website-with-reusable-widgets/</link>
		<comments>http://vdcruijsen.net/2009/07/creating-an-mvc-based-website-with-reusable-widgets/#comments</comments>
		<pubDate>Sun, 12 Jul 2009 08:46:00 +0000</pubDate>
		<dc:creator>Geert van der Cruijsen</dc:creator>
				<category><![CDATA[Asp.net]]></category>
		<category><![CDATA[Geert's Projects]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[Asp.net MVC]]></category>

		<guid isPermaLink="false">/post/Creating-an-MVC-based-website-with-reusable-widgets.aspx</guid>
		<description><![CDATA[After the Asp.net MVC Framework was released i was pretty impressed of how it worked but one of my main problems was how to handle the data on the page that is not the main goal of the specific page. &#8230; <a href="http://vdcruijsen.net/2009/07/creating-an-mvc-based-website-with-reusable-widgets/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>After the Asp.net MVC Framework was released i was pretty impressed of how it worked but one of my main problems was how to handle the data on the page that is not the main goal of the specific page.</p>
<p>In ASP.NET MVC every page has its specific controller and views that can handle the data for the page that is requested. for example when you&rsquo;re building a web shop you&rsquo;ll probably have a ProductController that handles everything that has to do with the Products in your shop. But when you are browsing a web shop product page you would also like to see other data that has nothing to do with products, for example your shopping basket, current login state etc. Should you add this logic to the ProductController? imo you shouldn&rsquo;t since the Products controller only responsibility should be the products. So how should we handle this in the MVC framework?</p>
<p>My first idea that came to mind to solve this problem was doing an Ajax request to for example, the shopping basket controller on your view when you would like a shopping basket added to your page. This can be in some situations the best way to do it but in some cases you might not want to use Ajax since then this content can&rsquo;t be indexed by search engines for example.</p>
<p>An example how to use Ajax widgets is found here: <a title="http://www.ajaxprojects.com/ajax/tutorialdetails.php?itemid=310" href="http://www.ajaxprojects.com/ajax/tutorialdetails.php?itemid=310">http://www.ajaxprojects.com/ajax/tutorialdetails.php?itemid=310</a></p>
<p>My main goal was to be able to add widgets to a page without the controller of that page knowing about these widgets. I found some solutions to this called partial requests found here: <a title="http://blog.codeville.net/2008/10/14/partial-requests-in-aspnet-mvc/" href="http://blog.codeville.net/2008/10/14/partial-requests-in-aspnet-mvc/">http://blog.codeville.net/2008/10/14/partial-requests-in-aspnet-mvc/</a></p>
<p>These partial requests weren&rsquo;t my favorites also since i didn&rsquo;t want to put this logic in the view so i developed my own CMS like solution for this problem.</p>
<p>My idea was that a page can have several page zones and page zones contain widgets. widgets and complete page zones should be reusable by other pages so i stored these in my CMS database. how my database is build up you can see in the image below</p>
<p><a href="http://vdcruijsen.net/images/CreatinganMVCbasedwebsitewithreusablewid_EB50/image.png"><img style="display: inline; border: 0px" title="image" src="http://vdcruijsen.net/images/CreatinganMVCbasedwebsitewithreusablewid_EB50/image_thumb.png" border="0" alt="image" width="539" height="289" /></a></p>
<p>A widget should be able to render itself so i made an abstract BaseWidget class that has a Render Method. A widget can also be a call to a different controller so i made a SubController class that inherits from BaseWidget. The SubController Widget has an Controller, Action and ID so it can call the controller it belongs to.</p>
<div id="codeSnippetWrapper" style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; width: 97.5%; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; cursor: text; border: silver 1px solid; padding: 4px;">
<div id="codeSnippet" style="text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">   1:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">abstract</span> <span style="color: #0000ff">class</span> SubControllerWidget : BaseWidget
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">   2:</span> {
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">   3:</span>     <span style="color: #0000ff">public</span> <span style="color: #0000ff">string</span> Controller { get;  set; }
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">   4:</span>     <span style="color: #0000ff">public</span> <span style="color: #0000ff">string</span> Action { get;  set; }
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">   5:</span>     <span style="color: #0000ff">public</span> <span style="color: #0000ff">object</span> ID { get; set; }
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">   6:</span>&nbsp;
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">   7:</span>     <span style="color: #0000ff">public</span> SubControllerWidget(<span style="color: #0000ff">string</span> Controller, <span style="color: #0000ff">string</span> Action) : <span style="color: #0000ff">base</span>()
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">   8:</span>     {
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">   9:</span>         <span style="color: #0000ff">this</span>.Controller = Controller;
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  10:</span>         <span style="color: #0000ff">this</span>.Action = Action;
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  11:</span>         <span style="color: #0000ff">this</span>.ID = <span style="color: #0000ff">null</span>;
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  12:</span>     }
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  13:</span>&nbsp;
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  14:</span>     <span style="color: #0000ff">public</span> SubControllerWidget(<span style="color: #0000ff">string</span> Controller, <span style="color: #0000ff">string</span> Action, <span style="color: #0000ff">object</span> ID)
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  15:</span>         : <span style="color: #0000ff">base</span>()
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  16:</span>     {
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  17:</span>         <span style="color: #0000ff">this</span>.Controller = Controller;
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  18:</span>         <span style="color: #0000ff">this</span>.Action = Action;
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  19:</span>         <span style="color: #0000ff">this</span>.ID = ID;
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  20:</span>     }
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  21:</span>&nbsp;
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  22:</span>     <span style="color: #0000ff">public</span> <span style="color: #0000ff">override</span> <span style="color: #0000ff">void</span> Render(System.Web.Mvc.ViewContext vc)
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  23:</span>     {
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  24:</span>         vc.RouteData.Values[<span style="color: #006080">"controller"</span>] = Controller;
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  25:</span>         vc.RouteData.Values[<span style="color: #006080">"action"</span>] = Action;
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  26:</span>         vc.RouteData.Values[<span style="color: #006080">"id"</span>] = ID;
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  27:</span>         IHttpHandler handler = <span style="color: #0000ff">new</span> MvcHandler(vc.RequestContext);
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  28:</span>         handler.ProcessRequest(System.Web.HttpContext.Current);
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  29:</span>     }
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  30:</span>&nbsp;
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  31:</span>     <span style="color: #0000ff">public</span> <span style="color: #0000ff">abstract</span> <span style="color: #0000ff">void</span> SetSettings(WidgetSettings settings);
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  32:</span> }
</pre>
<p><!--CRLF--></div>
</div>
<p>To build a specific widget just inherit a widget from SubControllerWidget and you are ready to go. Set the Controller, Action and ID to call and that specific controller will be called.</p>
<p>To add these page zones and widgets to the pages dynamically i&rsquo;ve created a CMSController that overrides the OnActionExecuted method so it can insert the page zones and widgets to the model that&rsquo;s been send to the View.</p>
<div id="codeSnippetWrapper" style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; width: 97.5%; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; cursor: text; border: silver 1px solid; padding: 4px;">
<div id="codeSnippet" style="text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">   1:</span> <span style="color: #0000ff">protected</span> <span style="color: #0000ff">override</span> <span style="color: #0000ff">void</span> OnActionExecuted(ActionExecutedContext filterContext)
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">   2:</span> {
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">   3:</span>     <span style="color: #0000ff">if</span> (ViewData.Model == <span style="color: #0000ff">null</span>)
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">   4:</span>     {
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">   5:</span>         ViewData.Model = <span style="color: #0000ff">new</span> CMSViewModel();
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">   6:</span>     }
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">   7:</span>     <span style="color: #0000ff">string</span> controller = filterContext.RequestContext.RouteData.Values[<span style="color: #006080">"controller"</span>] != <span style="color: #0000ff">null</span> ? filterContext.RequestContext.RouteData.Values[<span style="color: #006080">"controller"</span>].ToString() : <span style="color: #006080">""</span>;
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">   8:</span>     <span style="color: #0000ff">string</span> controllerAction = filterContext.RequestContext.RouteData.Values[<span style="color: #006080">"action"</span>] != <span style="color: #0000ff">null</span> ? filterContext.RequestContext.RouteData.Values[<span style="color: #006080">"action"</span>].ToString() : <span style="color: #006080">""</span>;
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">   9:</span>     <span style="color: #0000ff">string</span> controllerActionid = filterContext.RequestContext.RouteData.Values[<span style="color: #006080">"id"</span>] != <span style="color: #0000ff">null</span> ? filterContext.RequestContext.RouteData.Values[<span style="color: #006080">"id"</span>].ToString() : <span style="color: #006080">""</span>;
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  10:</span>     IList&lt;PageZone&gt; zones = _cmsRep.GetPageZonesForPage(controller, controllerAction, controllerActionid);
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  11:</span>&nbsp;
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  12:</span>     CMSViewModel page = (CMSViewModel)ViewData.Model;
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  13:</span>     <span style="color: #0000ff">if</span> (page.PageZones == <span style="color: #0000ff">null</span>)
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  14:</span>     {
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  15:</span>         page.PageZones = zones;
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  16:</span>     }
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  17:</span>     <span style="color: #0000ff">else</span>
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  18:</span>     {
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  19:</span>         <span style="color: #0000ff">foreach</span> (PageZone zone <span style="color: #0000ff">in</span> zones)
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  20:</span>         {
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  21:</span>             page.PageZones.Add(zone);
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  22:</span>         }
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  23:</span>     }
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  24:</span>&nbsp;
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  25:</span>&nbsp;
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  26:</span>     <span style="color: #0000ff">base</span>.OnActionExecuted(filterContext);
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  27:</span> }
</pre>
<p><!--CRLF--></div>
</div>
<p>&nbsp;</p>
<p>So now all widgets beloning to a page will be retrieved from the CMSRepository and are added to the CMSViewModel so now it&rsquo;s the View&rsquo;s turn to render all widgets.</p>
<p>In my master page I&rsquo;ve added the following line that is responsible for rendering all widgets:</p>
<p>&lt;% Html.RenderPageZones(Model); %&gt;</p>
<p>For that to work I&rsquo;ve created a few html extension methods to render the page zones.</p>
<div id="codeSnippetWrapper" style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; width: 97.5%; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; cursor: text; border: silver 1px solid; padding: 4px;">
<div id="codeSnippet" style="text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">   1:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">static</span> <span style="color: #0000ff">class</span> HtmlCMSExtensions
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">   2:</span> {
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">   3:</span>     <span style="color: #0000ff">public</span> <span style="color: #0000ff">static</span> <span style="color: #0000ff">void</span> RenderPageZones(<span style="color: #0000ff">this</span> HtmlHelper html, CMSViewModel page)
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">   4:</span>     {
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">   5:</span>         <span style="color: #0000ff">if</span> (page != <span style="color: #0000ff">null</span> &amp;&amp; page.PageZones != <span style="color: #0000ff">null</span>)
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">   6:</span>         {
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">   7:</span>             <span style="color: #0000ff">foreach</span> (PageZone zone <span style="color: #0000ff">in</span> page.PageZones)
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">   8:</span>             {
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">   9:</span>                 html.RenderPartial(<span style="color: #006080">"PageZone"</span>, zone);
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  10:</span>             }
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  11:</span>         }
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  12:</span>     }
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  13:</span>&nbsp;
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  14:</span>     <span style="color: #0000ff">public</span> <span style="color: #0000ff">static</span> <span style="color: #0000ff">void</span> RenderWidgetsInZone(<span style="color: #0000ff">this</span> HtmlHelper html, PageZone zone)
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  15:</span>     {
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  16:</span>         <span style="color: #0000ff">if</span> (zone != <span style="color: #0000ff">null</span> &amp;&amp; zone.Widgets != <span style="color: #0000ff">null</span>)
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  17:</span>         {
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  18:</span>             <span style="color: #0000ff">foreach</span> (IWidget widget <span style="color: #0000ff">in</span> zone.Widgets)
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  19:</span>             {
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  20:</span>                 widget.Render(html.ViewContext);
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  21:</span>             }
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  22:</span>         }
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  23:</span>     }
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">  24:</span> }
</pre>
<p><!--CRLF--></div>
</div>
<p>In my PageZone view i&rsquo;ve added the other html extension method called RenderWidgetsInZone so all widgets are rendered by itself.</p>
<div id="codeSnippetWrapper" style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; width: 97.5%; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; cursor: text; border: silver 1px solid; padding: 4px;">
<div id="codeSnippet" style="text-align: left; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="background-color: #ffff00">&lt;%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl&lt;VanDerCruijsen.MVC.CMS.Model.PageZone&gt;" %&gt;</span>
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #0000ff">&lt;</span><span style="color: #800000">div</span> <span style="color: #ff0000">id</span><span style="color: #0000ff">="&lt;%= Html.Encode(Model.Name) %&gt;"</span><span style="color: #0000ff">&gt;</span>
</pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;">name:<span style="background-color: #ffff00">&lt;%</span>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">   1:</span> = Html.Encode(Model.Name)
</pre>
<p><!--CRLF--><span style="background-color: #ffff00">%&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="background-color: #ffff00">&lt;%</span>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #606060">   1:</span>  Html.RenderWidgetsInZone(Model);
</pre>
<p><!--CRLF--><span style="background-color: #ffff00">%&gt;</span></pre>
<p><!--CRLF--></p>
<pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"><span style="color: #0000ff">&lt;/</span><span style="color: #800000">div</span><span style="color: #0000ff">&gt;</span>
</pre>
<p><!--CRLF--></div>
</div>
<p>This is the way I use to create widgets on my ASP.NET MVC pages. If you have any recommendations or better ways how to do it please let me know.</p>
<p>When I have the time I&rsquo;m going to build an admin controller to be able to add widgets and pagezones via the webinterface since now the only option is to add them in the database by hand.</p>
<p>My sources aren&rsquo;t really cleaned up so if you want a working source/solution please send me mail or leave a comment.</p>
<p>Geert van der Cruijsen</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Creating+an+MVC+based+website+with+reusable+widgets&amp;u=http%3A%2F%2Fvdcruijsen.net%2F2009%2F07%2Fcreating-an-mvc-based-website-with-reusable-widgets%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Creating+an+MVC+based+website+with+reusable+widgets&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2009%2F07%2Fcreating-an-mvc-based-website-with-reusable-widgets%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Creating+an+MVC+based+website+with+reusable+widgets&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2009%2F07%2Fcreating-an-mvc-based-website-with-reusable-widgets%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fvdcruijsen.net%2F2009%2F07%2Fcreating-an-mvc-based-website-with-reusable-widgets%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://vdcruijsen.net/2009/07/creating-an-mvc-based-website-with-reusable-widgets/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>My article about the ASP.NET MVC Framework published in the Dutch .Net Magazine</title>
		<link>http://vdcruijsen.net/2009/06/my-article-about-the-asp-net-mvc-framework-published-in-the-dutch-net-magazine/</link>
		<comments>http://vdcruijsen.net/2009/06/my-article-about-the-asp-net-mvc-framework-published-in-the-dutch-net-magazine/#comments</comments>
		<pubDate>Fri, 05 Jun 2009 11:47:00 +0000</pubDate>
		<dc:creator>Geert van der Cruijsen</dc:creator>
				<category><![CDATA[Asp.net]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[Asp.net MVC]]></category>

		<guid isPermaLink="false">/post/My-article-about-the-ASPNET-MVC-Framework-published-in-the-Dutch-Net-Magazine.aspx</guid>
		<description><![CDATA[Hello everyone, It&#8217;s been a while since my last post (again ) but I&#8217;ve been quite busy testing out the new ASP.NET MVC Framework. I have to say i really like it. Currently I&#8217;m building my own little CMS framework &#8230; <a href="http://vdcruijsen.net/2009/06/my-article-about-the-asp-net-mvc-framework-published-in-the-dutch-net-magazine/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Hello everyone,</p>
<p>It&rsquo;s been a while since my last post (again <img src='http://vdcruijsen.net/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  ) but I&#8217;ve been quite busy testing out the new ASP.NET MVC Framework. I have to say i really like it. Currently I&#8217;m building my own little CMS framework on top of the MVC framework so it becomes easier to use widgets or other non main data items on your pages. As soon as it&rsquo;s in a show able form I&#8217;ll&nbsp; post it on my blog.</p>
<p>I&rsquo;ve also written an article about the ASP.NET MVC framework for the Dutch .Net Magazine (in Dutch) so if you are a reader of the magazine check out page 22 of the June 2009 release (#25) <img src='http://vdcruijsen.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The Title of my article is: &ldquo;Volledige controle over je webapplicatie met het ASP.NET MVC Framework&rdquo; (&ldquo;Total control over your web app using the ASP.NET MVC Framework&rdquo;)</p>
<p><a href="http://dotnetmagazine.array.nl/site/Hetblad/Nieuwste_nummer"><img src="http://dotnetmagazine.array.nl/site/system/galleries/pics/Covers/Cover-Dotnet0209.jpg" alt="" width="192" height="266" /></a></p>
<p>The article will also come online sometime but the official site (also used to sign up for the free magazine) <a href="http://www.dotnetmag.nl">www.dotnetmag.nl</a> is still showing #23 as the newest one.</p>
<p>When the pdf is put online I&rsquo;ll add the link to this post.</p>
<p>I&rsquo;ve focused on writing about how to build an ASP.NET MVC application using TDD because I think this is one of the major advantages over the &ldquo;old&rdquo; way of building web applications in ASP.NET.</p>
<p>If you have any feedback or comments about the article please let me know!</p>
<p>Geert van der Cruijsen</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=My+article+about+the+ASP.NET+MVC+Framework+published+in+the+Dutch+.Net+Magazine&amp;u=http%3A%2F%2Fvdcruijsen.net%2F2009%2F06%2Fmy-article-about-the-asp-net-mvc-framework-published-in-the-dutch-net-magazine%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=My+article+about+the+ASP.NET+MVC+Framework+published+in+the+Dutch+.Net+Magazine&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2009%2F06%2Fmy-article-about-the-asp-net-mvc-framework-published-in-the-dutch-net-magazine%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=My+article+about+the+ASP.NET+MVC+Framework+published+in+the+Dutch+.Net+Magazine&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2009%2F06%2Fmy-article-about-the-asp-net-mvc-framework-published-in-the-dutch-net-magazine%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fvdcruijsen.net%2F2009%2F06%2Fmy-article-about-the-asp-net-mvc-framework-published-in-the-dutch-net-magazine%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://vdcruijsen.net/2009/06/my-article-about-the-asp-net-mvc-framework-published-in-the-dutch-net-magazine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ASP.NET MVC framework 1.0 released</title>
		<link>http://vdcruijsen.net/2009/03/asp-net-mvc-framework-1-0-released/</link>
		<comments>http://vdcruijsen.net/2009/03/asp-net-mvc-framework-1-0-released/#comments</comments>
		<pubDate>Wed, 18 Mar 2009 14:23:00 +0000</pubDate>
		<dc:creator>Geert van der Cruijsen</dc:creator>
				<category><![CDATA[Asp.net]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[Asp.net MVC]]></category>

		<guid isPermaLink="false">/post/ASPNET-MVC-framework-10-released.aspx</guid>
		<description><![CDATA[After the announcement of silverlight 3.0 i was chatting with a colleague about how cool it would be if asp.net MVC framework would also be released at mix. My colleague started searching and came up with this link: http://www.microsoft.com/downloads/details.aspx?FamilyID=53289097-73ce-43bf-b6a6-35e00103cb4b&#38;displaylang=en Pretty &#8230; <a href="http://vdcruijsen.net/2009/03/asp-net-mvc-framework-1-0-released/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><span style="line-height: 115%; font-family: 'Verdana','sans-serif'; font-size: 8.5pt">After the announcement of silverlight 3.0 i was chatting with a colleague about how cool it would be if asp.net MVC framework would also be released at mix.</span> </p>
<p style="margin: 0cm 0cm 10pt" class="MsoNormal">
<span style="line-height: 115%; font-family: 'Verdana','sans-serif'; font-size: 8.5pt">My colleague started searching and came up with this link:</span>
</p>
<p style="margin: 0cm 0cm 10pt" class="MsoNormal">
<span style="line-height: 115%; font-family: 'Verdana','sans-serif'; font-size: 8.5pt"><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=53289097-73ce-43bf-b6a6-35e00103cb4b&amp;displaylang=en">http://www.microsoft.com/downloads/details.aspx?FamilyID=53289097-73ce-43bf-b6a6-35e00103cb4b&amp;displaylang=en</a></span>
</p>
<p style="margin: 0cm 0cm 10pt" class="MsoNormal">
<span style="line-height: 115%; font-family: 'Verdana','sans-serif'; font-size: 8.5pt">Pretty cool huh? I haven&rsquo;t seen any official press releases from Microsoft but since you can download it it seems that it has been released!</span><span style="line-height: 115%; font-family: 'Verdana','sans-serif'; font-size: 8.5pt">&nbsp;</span>
</p>
<p>
<span style="line-height: 115%; font-family: 'Verdana','sans-serif'; font-size: 8.5pt"></span><span style="line-height: 115%; font-family: 'Verdana','sans-serif'; font-size: 8.5pt">My guess is that it will be announced on MIX today or tomorrow but I couldn&rsquo;t wait to share it with you already </span><span style="line-height: 115%; font-family: Wingdings; font-size: 8.5pt"><span>J</span></span><span style="line-height: 115%; font-family: 'Verdana','sans-serif'; font-size: 8.5pt"></span><span style="line-height: 115%; font-family: 'Verdana','sans-serif'; font-size: 8.5pt">&nbsp;</span>
</p>
<p>
<span style="line-height: 115%; font-family: 'Verdana','sans-serif'; font-size: 8.5pt"></span>
</p>
<p>
<span style="line-height: 115%; font-family: 'Verdana','sans-serif'; font-size: 8.5pt"></span><span style="line-height: 115%; font-family: 'Verdana','sans-serif'; font-size: 8.5pt">Geert van der Cruijsen</span><span><font size="3"><font face="Calibri"> </font></font></span><span><font face="Calibri" size="3">&nbsp;</font></span></p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=ASP.NET+MVC+framework+1.0+released&amp;u=http%3A%2F%2Fvdcruijsen.net%2F2009%2F03%2Fasp-net-mvc-framework-1-0-released%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=ASP.NET+MVC+framework+1.0+released&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2009%2F03%2Fasp-net-mvc-framework-1-0-released%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=ASP.NET+MVC+framework+1.0+released&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2009%2F03%2Fasp-net-mvc-framework-1-0-released%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fvdcruijsen.net%2F2009%2F03%2Fasp-net-mvc-framework-1-0-released%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://vdcruijsen.net/2009/03/asp-net-mvc-framework-1-0-released/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MIX 09 Keynote: Introducing Silverlight 3.0 (Beta available NOW!!!)</title>
		<link>http://vdcruijsen.net/2009/03/mix-09-keynote-introducing-silverlight-3-0-beta-available-now/</link>
		<comments>http://vdcruijsen.net/2009/03/mix-09-keynote-introducing-silverlight-3-0-beta-available-now/#comments</comments>
		<pubDate>Wed, 18 Mar 2009 13:03:00 +0000</pubDate>
		<dc:creator>Geert van der Cruijsen</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[MIX]]></category>

		<guid isPermaLink="false">/post/MIX-09-Keynote-Introducing-Silverlight-30-(Beta-available-NOW!!!).aspx</guid>
		<description><![CDATA[When I came home about an hour ago I turned on my mediacenter pc to listen to some mp3&#39;s when I thought.. Hey wasn&#39;t MIX 09 starting today? Maybe I can check out some video&#39;s already like I could with &#8230; <a href="http://vdcruijsen.net/2009/03/mix-09-keynote-introducing-silverlight-3-0-beta-available-now/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>
When I came home about an hour ago I turned on my mediacenter pc to listen to some mp3&#39;s when I thought.. Hey wasn&#39;t MIX 09 starting today? Maybe I can check out some video&#39;s already like I could with the pdc.
</p>
<p>
When I browsed to <a href="http://live.visitmix.com/">http://live.visitmix.com/</a> the Keynote was played LIVE in silverlight <img src='http://vdcruijsen.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Scott Guthrie was already talking about StackOverflow.com and after that he started talking about Silverlight 3.0
</p>
<p>
<img style="width: 200px; height: 57px" src="http://2009.visitmix.com/MIXtify/Assets/MIX09Logo/MIX09Logo.png" alt="" width="200" height="57" />
</p>
<p>
Silverlight 3.0 is going to bring us some pretty cool stuff like Hardware 3d acceleration and multitouch support. These functions ofcourse are pretty cool but are they really usefull? one of the most important things Scott also announced was SEO optimization for Silverlight 3.0.
</p>
<p>
In Silverlight 3.0 you will be able to store points in your applications from where you can browse from and to by using your forward / back buttons but you&#39;re also able to create a bookmark and ofcourse the most important part is that it can be indexed by search websites so they can link to specific locations in the silverlight 3.0 app.
</p>
<p>
Another cool thing in Silverlight 3.0 is that if you build an application using some external libraries that the libraries can and will be downloaded only when they are used. and when you use the same library in a different silverlight app it will use your already downloaded version instead of pulling it from the server again saving bandwidth.
</p>
<p>
Sketchflow is a new feature build in Blend 3.0 which will enable you to create sketches of your design rapidly by dragging and dropping wiggely controls (pencil drawn looking controls) on a screen. You can also create a flow of the application fluently by creating several screens and connecting them together. After this you can add functionality to some navigation buttons (without writing code) to navigate from 1 screen to another. After this you can change your sketches to real working code and you&rsquo;re done!
</p>
<p>
Multi Tier Data is another new feature which is working like a proxy representation of your data on the server inside your silverlight app. You can databind your controls to the proxy data and if you update the data it will automatically be synced with the server. It&rsquo;s also possible for the server to push changes in the data to the client so you don&rsquo;t have to poll the server anymore.
</p>
<p>
Scott rounded up his presentation telling that the current silverlight 3.0 package is smaller than the current silverlight 2.0 package and the beta 1 is released today! You can download it at:<br />
<a href="http://silverlight.net/getstarted/silverlight3/default.aspx">http://silverlight.net/getstarted/silverlight3/default.aspx</a>
</p>
<p>
Scott didn&rsquo;t say anything about a final release date but he did mention later this year (so probably q4)
</p>
<p>
I really like the changes and can&rsquo;t wait to start playing with SL 3.0
</p>
<p>
Geert van der Cruijsen
</p>
<p>
&nbsp;</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=MIX+09+Keynote%3A+Introducing+Silverlight+3.0+%28Beta+available+NOW%21%21%21%29&amp;u=http%3A%2F%2Fvdcruijsen.net%2F2009%2F03%2Fmix-09-keynote-introducing-silverlight-3-0-beta-available-now%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=MIX+09+Keynote%3A+Introducing+Silverlight+3.0+%28Beta+available+NOW%21%21%21%29&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2009%2F03%2Fmix-09-keynote-introducing-silverlight-3-0-beta-available-now%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=MIX+09+Keynote%3A+Introducing+Silverlight+3.0+%28Beta+available+NOW%21%21%21%29&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2009%2F03%2Fmix-09-keynote-introducing-silverlight-3-0-beta-available-now%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fvdcruijsen.net%2F2009%2F03%2Fmix-09-keynote-introducing-silverlight-3-0-beta-available-now%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://vdcruijsen.net/2009/03/mix-09-keynote-introducing-silverlight-3-0-beta-available-now/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Silverlight Design Pattern: the Model View ViewModel (MVVM)</title>
		<link>http://vdcruijsen.net/2009/03/silverlight-design-pattern-the-model-view-viewmodel-mvvm/</link>
		<comments>http://vdcruijsen.net/2009/03/silverlight-design-pattern-the-model-view-viewmodel-mvvm/#comments</comments>
		<pubDate>Mon, 09 Mar 2009 16:20:00 +0000</pubDate>
		<dc:creator>Geert van der Cruijsen</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[MVVM]]></category>

		<guid isPermaLink="false">/post/Silverlight-Design-Pattern-the-Model-View-ViewModel-(MVVM).aspx</guid>
		<description><![CDATA[Hi There, The Customer where I&#39;m currently working at asked me if i could build him a Silverlight 2 app. I&#39;ve been playing around with Silverilght quite a bit but i haven&#39;t really used any design patterns so i came &#8230; <a href="http://vdcruijsen.net/2009/03/silverlight-design-pattern-the-model-view-viewmodel-mvvm/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>
Hi There,
</p>
<p>
The Customer where I&#39;m currently working at asked me if i could build him a Silverlight 2 app. I&#39;ve been playing around with Silverilght quite a bit but i haven&#39;t really used any design patterns so i came to the idea to search the web if there are any specific Silverlight design patterns.
</p>
<p>
The only really big pattern i found was the MVVM Model View Viewmodel pattern. This isn&#39;t a completly new design pattern (<a href="http://weblogs.asp.net/craigshoemaker/archive/2009/02/26/hands-on-model-view-viewmodel-mvvm-for-silverlight-and-wpf.aspx">Martin fowler calls it the Presentation Model Pattern</a>)
</p>
<p>
If you know the MVC pattern which you probably do know this is somewhat alike. The model is your layer which connects to the data and the view is ofcourse xaml based in silverlight. So what does the ViewModel do? The viemodel is used to build specific models for each view in your silverlight app so you can have full advantage of the strong databinding in Silverlight.
</p>
<p>
There are quite some resources about this pattern which i&#39;ll link down here:
</p>
<ul>
<li>
<div>
	<a href="http://weblogs.asp.net/craigshoemaker/archive/2009/02/26/hands-on-model-view-viewmodel-mvvm-for-silverlight-and-wpf.aspx">MVVM Webcast</a>
	</div>
</li>
<li>
<div>
	<a href="http://blogs.conchango.com/davidwynne/archive/2008/12/15/silverlight-and-the-view-viewmodel-pattern.aspx">http://blogs.conchango.com/davidwynne/archive/2008/12/15/silverlight-and-the-view-viewmodel-pattern.aspx</a>
	</div>
</li>
<li>
<div>
	<a href="http://joshsmithonwpf.wordpress.com/2009/02/25/two-model-view-viewmodel-screencasts/">http://joshsmithonwpf.wordpress.com/2009/02/25/two-model-view-viewmodel-screencasts/</a>
	</div>
</li>
<li>
<div>
	<a href="http://msdn.microsoft.com/en-us/magazine/dd458800.aspx">http://msdn.microsoft.com/en-us/magazine/dd458800.aspx</a>
	</div>
</li>
<li>
<div>
	<a href="http://davidburela.wordpress.com/2008/10/19/silverlight-mvvm-dependency-injection/">http://davidburela.wordpress.com/2008/10/19/silverlight-mvvm-dependency-injection/</a>
	</div>
</li>
<li>
<div>
	<a href="http://jonas.follesoe.no/YouCardRevisitedImplementingTheViewModelPattern.aspx">http://jonas.follesoe.no/YouCardRevisitedImplementingTheViewModelPattern.aspx</a>
	</div>
</li>
</ul>
<p>
I&#39;ll be using this pattern at my current assignment and afterwards i&#39;ll blog about the results <img src='http://vdcruijsen.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />
</p>
<p>
Geert van der Cruijsen</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Silverlight+Design+Pattern%3A+the+Model+View+ViewModel+%28MVVM%29&amp;u=http%3A%2F%2Fvdcruijsen.net%2F2009%2F03%2Fsilverlight-design-pattern-the-model-view-viewmodel-mvvm%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Silverlight+Design+Pattern%3A+the+Model+View+ViewModel+%28MVVM%29&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2009%2F03%2Fsilverlight-design-pattern-the-model-view-viewmodel-mvvm%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Silverlight+Design+Pattern%3A+the+Model+View+ViewModel+%28MVVM%29&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2009%2F03%2Fsilverlight-design-pattern-the-model-view-viewmodel-mvvm%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fvdcruijsen.net%2F2009%2F03%2Fsilverlight-design-pattern-the-model-view-viewmodel-mvvm%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://vdcruijsen.net/2009/03/silverlight-design-pattern-the-model-view-viewmodel-mvvm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Set file level permissions in SharePoint using Workflow Foundation</title>
		<link>http://vdcruijsen.net/2009/02/set-file-level-permissions-in-sharepoint-using-workflow-foundation/</link>
		<comments>http://vdcruijsen.net/2009/02/set-file-level-permissions-in-sharepoint-using-workflow-foundation/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 14:23:00 +0000</pubDate>
		<dc:creator>Geert van der Cruijsen</dc:creator>
				<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">/post/Set-file-level-permissions-in-SharePoint-using-Workflow-Foundation.aspx</guid>
		<description><![CDATA[Hello Everyone,&#160; On my current project we are building a customer facing SharePoint application which has to store files. These files are uploaded with biztalk so we have to set the permissions manually so only the user who the file &#8230; <a href="http://vdcruijsen.net/2009/02/set-file-level-permissions-in-sharepoint-using-workflow-foundation/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>
Hello Everyone,&nbsp;
</p>
<p>
On my current project we are building a customer facing SharePoint application which has to store files. These files are uploaded with biztalk so we have to set the permissions manually so only the user who the file belongs to has rights to open te file.
</p>
<p>
We are storing the username of the owner of the file in the metadata of the sharepoint item and we are going to use this to set the permissions after the file is uploaded to sharepoint by Biztalk.
</p>
<p>
After adding the file we&#39;ve set up a SharePoint Workflow to move the files to a specific location and we&#39;ve come up with the idea to also change the permissions in this workflow. How we did this? here&#39;s the code to change the permissions of a SharePoint SPItem in the workflow:
</p>
<p>
<!-- code formatted by http://manoli.net/csharpformat/ --><!-- code formatted by http://manoli.net/csharpformat/ -->
</p>
<div class="csharpcode" width="200">
<pre class="alt">
<font size="2"><span class="lnum">   1:  </span>workflowProperties.Item.BreakRoleInheritance(<span class="kwrd">false</span>);</font>
</pre>
<pre>
<font size="2"><span class="lnum">   2:  </span>&nbsp;</font>
</pre>
<pre class="alt">
<font size="2"><span class="lnum">   3:  </span>workflowProperties.Item.File.MoveTo(currentFolder + <span class="str">&quot;/&quot;</span> + workflowProperties.Item.File.Name);</font>
</pre>
<pre>
<font size="2"><span class="lnum">   4:  </span>&nbsp;</font>
</pre>
<pre class="alt">
<font size="2"><span class="lnum">   5:  </span>SPRoleDefinitionCollection rolecollection = web.RoleDefinitions;</font>
</pre>
<pre>
<font size="2"><span class="lnum">   6:  </span>SPRoleAssignmentCollection roleAssignments = workflowProperties.Item.RoleAssignments;</font>
</pre>
<pre class="alt">
<font size="2"><span class="lnum">   7:  </span>&nbsp;</font>
</pre>
<pre>
<font size="2"><span class="lnum">   8:  </span>SPUser user = web.EnsureUser(<span class="str">&quot;aspnetsqlmembershipprovider:&quot;</span>+workflowProperties.Item.Properties[<span class="str">&quot;Username&quot;</span>].ToString());</font>
</pre>
<pre class="alt">
<font size="2"><span class="lnum">   9:  </span>SPRoleAssignment roleAssignment = <span class="kwrd">new</span> SPRoleAssignment(user <span class="kwrd">as</span> SPPrincipal);</font>
</pre>
<pre>
<font size="2"><span class="lnum">  10:  </span>SPRoleDefinitionBindingCollection roleDefBindings = roleAssignment.RoleDefinitionBindings;</font>
</pre>
<pre class="alt">
<font size="2"><span class="lnum">  11:  </span>roleDefBindings.Add(rolecollection.GetByType(SPRoleType.Reader));</font>
</pre>
<pre>
<font size="2"><span class="lnum">  12:  </span>roleAssignments.Add(roleAssignment);</font>
</pre>
</div>
<p>
&nbsp;
</p>
<p>
We are using an aspnetsqlmembershipprovider to store the external users so thats why we add this to the sharepoint username.
</p>
<p>
Geert van der Cruijsen</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Set+file+level+permissions+in+SharePoint+using+Workflow+Foundation&amp;u=http%3A%2F%2Fvdcruijsen.net%2F2009%2F02%2Fset-file-level-permissions-in-sharepoint-using-workflow-foundation%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Set+file+level+permissions+in+SharePoint+using+Workflow+Foundation&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2009%2F02%2Fset-file-level-permissions-in-sharepoint-using-workflow-foundation%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Set+file+level+permissions+in+SharePoint+using+Workflow+Foundation&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2009%2F02%2Fset-file-level-permissions-in-sharepoint-using-workflow-foundation%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fvdcruijsen.net%2F2009%2F02%2Fset-file-level-permissions-in-sharepoint-using-workflow-foundation%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://vdcruijsen.net/2009/02/set-file-level-permissions-in-sharepoint-using-workflow-foundation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moved to new Hosting: Digitalibiz.com</title>
		<link>http://vdcruijsen.net/2009/02/moved-to-new-hosting-digitalibiz-com/</link>
		<comments>http://vdcruijsen.net/2009/02/moved-to-new-hosting-digitalibiz-com/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 14:11:00 +0000</pubDate>
		<dc:creator>Geert van der Cruijsen</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">/post/Moved-to-new-Hosting-Digitalibizcom.aspx</guid>
		<description><![CDATA[Hi All, Long time since i&#8217;ve written my last post&#8230; well here&#8217;s my excuse: Ofcourse december is filled with the holidays etc but i also went on vacation back to Thailand again in January for 3 weeks. I had a &#8230; <a href="http://vdcruijsen.net/2009/02/moved-to-new-hosting-digitalibiz-com/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Hi All,</p>
<p>Long time since i&#8217;ve written my last post&#8230; well here&#8217;s my excuse: Ofcourse december is filled with the holidays etc but i also went on vacation back to Thailand again in January for 3 weeks. I had a great time there but nothing techie to write about around there <img src='http://vdcruijsen.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>After i came back i wanted to switch hosting providers because my old one (<a href="http://www.sohosted.com">www.sohosted.com</a>) didn&#8217;t support mssql and for some things I&#8217;m working on i want to do with mssql and Linq. I&#8217;ve been experimenting with the asp.net mvc framework again and i have to say i really like it. (I hope i have time to write more on that subject soon on this blog)</p>
<p>My new hosting provider is Digitalibiz (<a href="http://www.digitalibiz.com">www.digitalibiz.com</a>) and the main reason i went to them is because 1 they are cheap and 2 they have mssql support and 3 they allow multiple domains on 1 account.</p>
<p><img src="/image.axd?picture=2009%2f2%2fsitemove2.jpg" alt="" width="300" height="200" /></p>
<p>When you are reading this message the dns is finally changed to my new hosting so i can get rid of the old one. Tnx people at Sohosted for the good hosting i had there for multiple years but it was time to move on. I hope Digitalibiz will be as good as they were.</p>
<p>Geert van der Cruijsen</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Moved+to+new+Hosting%3A+Digitalibiz.com&amp;u=http%3A%2F%2Fvdcruijsen.net%2F2009%2F02%2Fmoved-to-new-hosting-digitalibiz-com%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Moved+to+new+Hosting%3A+Digitalibiz.com&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2009%2F02%2Fmoved-to-new-hosting-digitalibiz-com%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Moved+to+new+Hosting%3A+Digitalibiz.com&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2009%2F02%2Fmoved-to-new-hosting-digitalibiz-com%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fvdcruijsen.net%2F2009%2F02%2Fmoved-to-new-hosting-digitalibiz-com%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://vdcruijsen.net/2009/02/moved-to-new-hosting-digitalibiz-com/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Silverlight 2 and Flash 10 put to the test</title>
		<link>http://vdcruijsen.net/2008/11/silverlight-2-and-flash-10-put-to-the-test/</link>
		<comments>http://vdcruijsen.net/2008/11/silverlight-2-and-flash-10-put-to-the-test/#comments</comments>
		<pubDate>Sun, 02 Nov 2008 12:03:00 +0000</pubDate>
		<dc:creator>Geert van der Cruijsen</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">/post/Silverlight-2-and-Flash-10-put-to-the-test.aspx</guid>
		<description><![CDATA[Today a colleague of mine send me a link of a very cool site: http://www.shinedraw.com/ The guy who build the site is a webdeveloper with 6 years experience in building flash apps and 1 year of Silverlight experience. On his &#8230; <a href="http://vdcruijsen.net/2008/11/silverlight-2-and-flash-10-put-to-the-test/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>
Today a colleague of mine send me a link of a very cool site: <a href="http://www.shinedraw.com/">http://www.shinedraw.com/</a>
</p>
<p>
The guy who build the site is a webdeveloper with 6 years experience in building flash apps and 1 year of Silverlight experience. On his blog are a lot of apps build both in Flash and Silverlight. Some examples are: loading a big external image into the silverlight / flash app and a fps stress test.
</p>
<p>
<a href="http://www.shinedraw.com/data-handling/flash-vs-silverlight-loading-external-image/">http://www.shinedraw.com/data-handling/flash-vs-silverlight-loading-external-image/</a>
</p>
<p>
<a href="http://www.shinedraw.com/mathematics/flash-vs-silverlight-fps-meter-stress-test/">http://www.shinedraw.com/mathematics/flash-vs-silverlight-fps-meter-stress-test/</a>
</p>
<p>
It&#39;s very cool to see that the output of both platforms is almost equal, though in most test Silverlight is performing a bit better then Flash 10.
</p>
<p>
Also if you look at the code that is used in both examples you have to say that programming in Silverlight is a more pleasant experience.
</p>
<p>
Both platforms have strengths and weaknesses. Microsoft has visual studio which is far out the best IDE out there. Adobe on the other had has the best tools for designers.
</p>
<p>
The battle for best rich internet platform&nbsp;rages on!
</p>
<p>
&nbsp;
</p>
<p>
Geert van der Cruijsen</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Silverlight+2+and+Flash+10+put+to+the+test&amp;u=http%3A%2F%2Fvdcruijsen.net%2F2008%2F11%2Fsilverlight-2-and-flash-10-put-to-the-test%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Silverlight+2+and+Flash+10+put+to+the+test&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2008%2F11%2Fsilverlight-2-and-flash-10-put-to-the-test%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Silverlight+2+and+Flash+10+put+to+the+test&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2008%2F11%2Fsilverlight-2-and-flash-10-put-to-the-test%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fvdcruijsen.net%2F2008%2F11%2Fsilverlight-2-and-flash-10-put-to-the-test%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://vdcruijsen.net/2008/11/silverlight-2-and-flash-10-put-to-the-test/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Silverlight 2 Control Toolkit ready for download</title>
		<link>http://vdcruijsen.net/2008/10/silverlight-2-control-toolkit-ready-for-download/</link>
		<comments>http://vdcruijsen.net/2008/10/silverlight-2-control-toolkit-ready-for-download/#comments</comments>
		<pubDate>Wed, 29 Oct 2008 20:02:00 +0000</pubDate>
		<dc:creator>Geert van der Cruijsen</dc:creator>
				<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">/post/Silverlight-2-Control-Toolkit-ready-for-download.aspx</guid>
		<description><![CDATA[Yesterday Microsoft released the first version of the Silverlight Extended controls suite on Codeplex. This control suite contains a number of special controls that are now available for the public to download and use in their own projects. an example &#8230; <a href="http://vdcruijsen.net/2008/10/silverlight-2-control-toolkit-ready-for-download/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Yesterday Microsoft released the first version of the Silverlight Extended controls suite on <a href="http://www.codeplex.com/Silverlight">Codeplex</a>.</p>
<p>This control suite contains a number of special controls that are now available for the public to download and use in their own projects.</p>
<p>an example of what kind of controls are included in the toolkit:</p>
<ul>
<li>
<div class="MsoNormal"><span>TreeView</span></div>
</li>
<li>
<div class="MsoNormal"><span>Charts</span></div>
</li>
<li>
<div class="MsoNormal"><span>Expander</span></div>
</li>
<li>
<div class="MsoNormal"><span>AutoComplete</span></div>
</li>
<li>
<div class="MsoNormal"><span>NumericUpDown</span></div>
</li>
</ul>
<p class="MsoNormal">On the codeplex site there are online demos of all controls which are included in the toolkit and the controls are also documented in the wiki on the page.</p>
<p class="MsoNormal">&nbsp;Example of how the Treeview looks and how you use it:</p>
<p><img style="width: 550px;" src="/image.axd?picture=2008%2f10%2fTreeView.gif" alt="" width="550" height="137" /></p>
<p>&nbsp;</p>
<p>Example of the AutoCompleteBox and how to use it in your&nbsp;xaml code:&nbsp;</p>
<p><img style="width: 550px;" src="/image.axd?picture=2008%2f10%2fAutoCompleteBox.gif" alt="" width="550" height="79" /></p>
<p>&nbsp;</p>
<p>You can check out the online demos at codeplex: <a href="http://silverlight.net/samples/sl2/toolkitcontrolsamples/run/default.html">Controls demo</a>&nbsp;and the <a href="http://silverlight.net/samples/sl2/toolkitchartsamples/run/default.html">Charting Demo</a></p>
<p>I really think Microsoft did a great job at offering these controls to the community and it will make developing in silverlight easier for everyone.</p>
<p>I liked the Charting part the most and i really look forward in using that in my projects in the future. Just look at how nice these controls look and how easy you can fit them into your project:</p>
<p><span><img style="width: 550px;" src="/image.axd?picture=2008%2f10%2fPieSeries.gif" alt="" width="550" height="171" /></span></p>
<p><img style="width: 550px;" src="/image.axd?picture=2008%2f10%2fLineSeries.gif" alt="" width="550" height="162" /></p>
<p>Geert van der Cruijsen</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Silverlight+2+Control+Toolkit+ready+for+download&amp;u=http%3A%2F%2Fvdcruijsen.net%2F2008%2F10%2Fsilverlight-2-control-toolkit-ready-for-download%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Silverlight+2+Control+Toolkit+ready+for+download&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2008%2F10%2Fsilverlight-2-control-toolkit-ready-for-download%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Silverlight+2+Control+Toolkit+ready+for+download&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2008%2F10%2Fsilverlight-2-control-toolkit-ready-for-download%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fvdcruijsen.net%2F2008%2F10%2Fsilverlight-2-control-toolkit-ready-for-download%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://vdcruijsen.net/2008/10/silverlight-2-control-toolkit-ready-for-download/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Silverlight 2 Release Candidate Available</title>
		<link>http://vdcruijsen.net/2008/09/silverlight-2-release-candidate-available/</link>
		<comments>http://vdcruijsen.net/2008/09/silverlight-2-release-candidate-available/#comments</comments>
		<pubDate>Sat, 27 Sep 2008 09:41:00 +0000</pubDate>
		<dc:creator>Geert van der Cruijsen</dc:creator>
				<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">/post/Silverlight-2-Release-Candidate-Available.aspx</guid>
		<description><![CDATA[Last night Microsoft released the first release candidate&#160;for Silverlight 2.0. &#160; There are a few new controls added in this release: the Combobox, passwordbox and the progressbar. you can download the new silverlight release candidate at: http://silverlight.net/GetStarted/sl2rc0.aspx on Scott Guthries &#8230; <a href="http://vdcruijsen.net/2008/09/silverlight-2-release-candidate-available/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>
Last night Microsoft released the first release candidate&nbsp;for Silverlight 2.0.
</p>
<p>
&nbsp;<img src="/image.axd?picture=silverlight2.jpg" alt="" width="150" height="167" />
</p>
<p>
There are a few new controls added in this release: the Combobox, passwordbox and the progressbar.
</p>
<p>
you can download the new silverlight release candidate at: <a href="http://silverlight.net/GetStarted/sl2rc0.aspx">http://silverlight.net/GetStarted/sl2rc0.aspx</a>
</p>
<p>
on <a href="http://weblogs.asp.net/scottgu/archive/2008/09/25/silverlight-2-release-candidate-now-available.aspx" target="_blank">Scott Guthries weblog</a>&nbsp;there is a nice explanation on how these new controls work.
</p>
<p>
<img style="width: 333px; height: 178px" src="/image.axd?picture=2008%2f9%2fstep1.png" alt="New Silverlight controls" title="New Silverlight controls" width="333" height="178" />
</p>
<p>
<font size="1">the new silverlight Controls (Combobox, passwordbox and the progressbar)</font>
</p>
<p>
&nbsp;
</p>
<p>
note that only the developer tools and runtime are released and not regular silverlight runtime. This is done so developers have time to upgrade their applications before silverlight 2.0 RC1 is actually released to the public.
</p>
<p>
Happy coding!
</p>
<p>
Geert van der Cruijsen</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Silverlight+2+Release+Candidate+Available&amp;u=http%3A%2F%2Fvdcruijsen.net%2F2008%2F09%2Fsilverlight-2-release-candidate-available%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Silverlight+2+Release+Candidate+Available&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2008%2F09%2Fsilverlight-2-release-candidate-available%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Silverlight+2+Release+Candidate+Available&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2008%2F09%2Fsilverlight-2-release-candidate-available%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fvdcruijsen.net%2F2008%2F09%2Fsilverlight-2-release-candidate-available%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://vdcruijsen.net/2008/09/silverlight-2-release-candidate-available/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add documents from a Base64Binary xml element to SharePoint with Biztalk 2006</title>
		<link>http://vdcruijsen.net/2008/08/add-documents-from-a-base64binary-xml-element-to-sharepoint-with-biztalk-2006/</link>
		<comments>http://vdcruijsen.net/2008/08/add-documents-from-a-base64binary-xml-element-to-sharepoint-with-biztalk-2006/#comments</comments>
		<pubDate>Thu, 07 Aug 2008 20:03:00 +0000</pubDate>
		<dc:creator>Geert van der Cruijsen</dc:creator>
				<category><![CDATA[Biztalk]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">/post/Add-documents-from-a-Base64Binary-xml-element-to-SharePoint-with-Biztalk-2006.aspx</guid>
		<description><![CDATA[On my current project we wanted to add documents which come in as attachment through a webservice to a sharepoint document library to store them. We used Biztalk 2006 to receive the file, get the different files from the xml &#8230; <a href="http://vdcruijsen.net/2008/08/add-documents-from-a-base64binary-xml-element-to-sharepoint-with-biztalk-2006/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>
On my current project we wanted to add documents which come in as attachment through a webservice to a sharepoint document library to store them.
</p>
<p>
We used Biztalk 2006 to receive the file, get the different files from the xml and then send them to SharePoint. In this blogpost I&rsquo;ll explain how to do this with a small POC I made.
</p>
<p>
<img src="/image.axd?picture=2008%2f8%2forchestration.jpg" alt="" width="532" height="487" />
</p>
<p>
First off we started with a receive port which is able to receive the xml message (the binary port on the picture) we receive this message into a BinaryMessage message which is linked to the following schema
</p>
<p>
<img style="width: 530px" src="/image.axd?picture=2008%2f8%2fxsd.jpg" alt="" width="530" height="284" />
</p>
<p>
An example message is looking like this: (where the &lt;document&gt; should have the attachments as a base64binary string.
</p>
<p>
<img src="/image.axd?picture=2008%2f8%2fxml.jpg" alt="" width="407" height="85" />
</p>
<p>
<a href="http://vdcruijsen.net/image.axd?picture=WindowsLiveWriter/AdddocumentsfromaBase64Binaryxmlelementt_1363D/clip_image002_2.jpg"></a>
</p>
<p>
After receiving the message we want to loop through all the messages in the document so I created a foreach to read all the document elements from the xml.
</p>
<p>
The code to build the loop is the following:
</p>
<p>
<strong>InitializeLoop</strong> :
</p>
<h1><font face="courier new,courier" size="1">iteration = 1;</font></h1>
<h1><font face="courier new,courier" size="1">documentCount = xpath(BinaryFile,&quot;count(/*[local-name()=&#39;BinaryFileToSharePointTest&#39; and namespace-uri()=&#39;&#39;]/*[local-name()=&#39;Document&#39; and namespace-uri()=&#39;&#39;])&quot;);</font></h1>
<p>
first I set the iteration variable to 1 and I set the documentCount to the amount of document elements that are in the incoming xml file.
</p>
<p>
<strong>Message assignment</strong>
</p>
<p>
<font face="courier new,courier" size="1">BinaryFileWithMetadata = BinaryFile; </font>
</p>
<p>
<font face="courier new,courier" size="1">binaryMessageCreator = new BinaryToSharePoint.Helper.BinaryMessageCreator(); </font>
</p>
<p>
<font face="courier new,courier" size="1">selectXpath = &quot;string(/*[local-name()=&#39;BinaryFileToSharePointTest&#39; and namespace-uri()=&#39;&#39;]/*[local-name()=&#39;Document&#39; and namespace-uri()=&#39;&#39;][&quot;+ System.Convert.ToString(iteration)+&quot;]/text())&quot;; </font>
</p>
<p>
<font face="courier new,courier" size="1">base64String = xpath(BinaryFile,selectXpath); </font>
</p>
<p>
<font face="courier new,courier" size="1">binaryMessageCreator.CreateBinaryMessage(BinaryFileWithMetadata,base64String); </font>
</p>
<p>
<font face="courier new,courier" size="1">configProperties = new VdCruijsenNet.Utilities.Sharepoint.ConfigPropertiesXML(); </font>
</p>
<p>
<font face="courier new,courier" size="1">configProperties.AddProperty(&quot;Title&quot;,&quot;test&quot;); </font>
</p>
<p>
<font face="courier new,courier" size="1">BinaryFileWithMetadata(WSS.ConfigPropertiesXml) = configProperties.ToString(); </font>
</p>
<p>
<font face="courier new,courier" size="1">BinaryFileWithMetadata(WSS.Filename) = &quot;bestandsnaamTest &quot;+System.Convert.ToString(iteration)+&quot;.pdf&quot;; </font>
</p>
<p>
In the message assignment we first Create the new outgoing message for each of the documents in the incoming xml file. Then we select the base64binary string with an xpath expression and send it to the binaryMessageCreator.
</p>
<p>
The binaryMessageCreator creates a new System.Xml.Document (which isn&rsquo;t a xml file but biztalk doesn&rsquo;t know that <img src='http://vdcruijsen.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  from the base64binary string. For the source of the BinaryStreamFactory see below:
</p>
<p>
<img src="/image.axd?picture=2008%2f8%2fbinaryStreamFactory.jpg" alt="" width="528" height="282" />
</p>
<p>
<img src="/image.axd?picture=2008%2f8%2fbinarymessagecreator.jpg" alt="" width="528" height="89" />
</p>
<p>
<a href="http://vdcruijsen.net/image.axd?picture=WindowsLiveWriter/AdddocumentsfromaBase64Binaryxmlelementt_1363D/clip_image003_2.jpg"></a>
</p>
<p>
<a href="http://vdcruijsen.net/image.axd?picture=WindowsLiveWriter/AdddocumentsfromaBase64Binaryxmlelementt_1363D/clip_image005_2.jpg"></a>
</p>
<p>
After creating the new Message of the type System.Xml.Document, which is actually a byte[] containing the file we add a filename and some metadata which can be stored in SharePoint we send the message with the send shape to sharepoint.
</p>
<p>
The SendPort is a &ldquo;Windows SharePoint service&rdquo; sendport which can automatically add the file to a sharepoint document library.
</p>
<p>
&nbsp;
</p>
<p>
<strong>Sendport</strong>
</p>
<p><img src="/image.axd?picture=2008%2f8%2fsndport.jpg" alt="" width="525" height="421" /> </p>
<p>
<strong>Receiveport</strong>
</p>
<p>
<strong><a href="http://vdcruijsen.net/image.axd?picture=WindowsLiveWriter/AdddocumentsfromaBase64Binaryxmlelementt_1363D/clip_image009_2.jpg"></a></strong>
</p>
<p>
<img src="/image.axd?picture=2008%2f8%2frcvport.jpg" alt="" width="516" height="414" />
</p>
<p>
As you can see it&rsquo;s pretty easy to get the binary files from an xml file in Biztalk after you know how you can do it.
</p>
<p>
Happy Coding
</p>
<p>
Geert van der Cruijsen</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Add+documents+from+a+Base64Binary+xml+element+to+SharePoint+with+Biztalk+2006&amp;u=http%3A%2F%2Fvdcruijsen.net%2F2008%2F08%2Fadd-documents-from-a-base64binary-xml-element-to-sharepoint-with-biztalk-2006%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Add+documents+from+a+Base64Binary+xml+element+to+SharePoint+with+Biztalk+2006&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2008%2F08%2Fadd-documents-from-a-base64binary-xml-element-to-sharepoint-with-biztalk-2006%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Add+documents+from+a+Base64Binary+xml+element+to+SharePoint+with+Biztalk+2006&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2008%2F08%2Fadd-documents-from-a-base64binary-xml-element-to-sharepoint-with-biztalk-2006%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fvdcruijsen.net%2F2008%2F08%2Fadd-documents-from-a-base64binary-xml-element-to-sharepoint-with-biztalk-2006%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://vdcruijsen.net/2008/08/add-documents-from-a-base64binary-xml-element-to-sharepoint-with-biztalk-2006/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgraded my weblog to Blogengine.net 1.4.5</title>
		<link>http://vdcruijsen.net/2008/08/upgraded-my-weblog-to-blogengine-net-1-4-5/</link>
		<comments>http://vdcruijsen.net/2008/08/upgraded-my-weblog-to-blogengine-net-1-4-5/#comments</comments>
		<pubDate>Wed, 06 Aug 2008 23:00:00 +0000</pubDate>
		<dc:creator>Geert van der Cruijsen</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">/post/Upgraded-my-weblog-to-Blogenginenet-145.aspx</guid>
		<description><![CDATA[4 days ago Blogengine.net 1.4.5 was released. A good time for me to upgrade to the newest version since i wanted to split my weblog up to a part to store my messages about my private life and my posts &#8230; <a href="http://vdcruijsen.net/2008/08/upgraded-my-weblog-to-blogengine-net-1-4-5/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>4 days ago <a href="http://www.codeplex.com/blogengine/Release/ProjectReleases.aspx?ReleaseId=14988">Blogengine.net 1.4.5 was released</a>. A good time for me to upgrade to the newest version since i wanted to split my weblog up to a part to store my messages about my private life and my posts about software development.</p>
<p>Upgrading to 1.4.5 was pretty easy except 1 error i ran into. I&#8217;m using blogengine.net together with mysql since my provider doesn&#8217;t have mssql and I didn&#8217;t really like the xml based blogging. After setting everything up i kept on running into System.Threading.SemaphoreFullExceptions. After <a href="http://www.codeplex.com/blogengine/Thread/View.aspx?ThreadId=32885">posting this on the Blogengine.net codeplex </a>site some people mentioned this was a bug in the mysql.data.dll version 5.1.6 and if you upgrade to 5.2.2 everything should work fine again. So i did and you can see the results now.</p>
<p><img src="/image.axd?picture=2008%2f8%2fbenlogo80.gif" alt="" width="266" height="80" /></p>
<p>I&#8217;ve also upgraded the layout of my weblog and added a <a href="http://life.vdcruijsen.net/">http://life.vdcruijsen.net</a> section to store my weblog about my life when I&#8217;m not developing software but am going out on vacation, trips or have something else to blog about.</p>
<p>Tnx to the Blogengine.net team for this great piece of software!</p>
<p>Geert van der Cruijsen</p>
<p>&nbsp;</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Upgraded+my+weblog+to+Blogengine.net+1.4.5&amp;u=http%3A%2F%2Fvdcruijsen.net%2F2008%2F08%2Fupgraded-my-weblog-to-blogengine-net-1-4-5%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Upgraded+my+weblog+to+Blogengine.net+1.4.5&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2008%2F08%2Fupgraded-my-weblog-to-blogengine-net-1-4-5%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Upgraded+my+weblog+to+Blogengine.net+1.4.5&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2008%2F08%2Fupgraded-my-weblog-to-blogengine-net-1-4-5%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fvdcruijsen.net%2F2008%2F08%2Fupgraded-my-weblog-to-blogengine-net-1-4-5%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://vdcruijsen.net/2008/08/upgraded-my-weblog-to-blogengine-net-1-4-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Comparison of Microsoft Silverlight 2 and Adobe Flex by an Adobe Evangelist</title>
		<link>http://vdcruijsen.net/2008/07/comparison-of-microsoft-silverlight-2-and-adobe-flex-by-an-adobe-evangelist/</link>
		<comments>http://vdcruijsen.net/2008/07/comparison-of-microsoft-silverlight-2-and-adobe-flex-by-an-adobe-evangelist/#comments</comments>
		<pubDate>Fri, 25 Jul 2008 22:07:00 +0000</pubDate>
		<dc:creator>Geert van der Cruijsen</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">/post/Comparison-of-Microsoft-Silverlight-2-and-Adobe-Flex-by-an-Adobe-Evangelist.aspx</guid>
		<description><![CDATA[I&#39;ve found a nice read on a comparison between Microsoft&#39;s Silverlight and Adobe Flex by an Adobe Evangelist who took a 3 day Silverlight 2 training. The weblog post starts of with summarizing the good and bad things of Silverlight &#8230; <a href="http://vdcruijsen.net/2008/07/comparison-of-microsoft-silverlight-2-and-adobe-flex-by-an-adobe-evangelist/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>
I&#39;ve found a nice <a href="http://www.webkitchen.be/2008/07/17/silverlight-the-good-the-bad-and-the-ugly/" target="_blank"><font color="#669966">read</font></a> on a comparison between Microsoft&#39;s Silverlight and Adobe Flex by an Adobe Evangelist who took a 3 day Silverlight 2 training.
</p>
<p>
The weblog post starts of with summarizing the good and bad things of Silverlight but it&#39;s also nice to read the comments where a big discussion starts between Microsoft employees, Adobe employees and other developers/designers that have to choose between these 2 technologies.
</p>
<p>
Things he likes about Silverlight:
</p>
<li>&ldquo;The first thing I really like is the concept of threading. Being able to spawn off complex tasks without choking the main thread is pretty cool. You could, for example, show a really smooth animation when you are loading a bunch of data in a separate thread.&rdquo; </li>
<li>&ldquo;A Silverlight application can directly communicate with the HTML document it is hosted on by simply setting a parameter.&rdquo; </li>
<li>&ldquo;Being able to code in either C# or VB.NET is also a great feature. Especially since these two languages are pretty familiar to people developing for the Windows platform. I&rsquo;m not one of them, but I found that C# is similar to ActionScript. Next to those languages you also have XAML, which does more or less the same things as MXML.&rdquo;</li>
<p>
&nbsp;
</p>
<p>
after that he tells us the things he doesn&#39;t like about Silverlight:
</p>
<li>Code in XAML and C# is really verbose.&rdquo; </li>
<li>&ldquo;Styling controls is an absolute nightmare! I honestly think that this is going to be Silverlight&rsquo;s Achilles&rsquo; heel!&rdquo; </li>
<li>&ldquo;Another thing that I really couldn&rsquo;t grasp is the lack of HTML tag support in text fields.&rdquo; </li>
<li>&ldquo;I know the Expression tools are still in beta, but it has to be said that all the tools (including Visual Studio, which is no longer in beta) felt extremely buggy and incomplete.&rdquo; </li>
<li>&ldquo;Over these three days, I got a strong feeling that Silverlight was created by people who don&rsquo;t know anything about designers.&rdquo;</li>
<p>
&nbsp;
</p>
<p>
In my opinion Silverlight and Adobe Air/Flex can both be big and good in their own things and eventually they will start growing towards each other as .Net and Java are also doing. Adobe has its huge designers userbase while Microsoft has a very big developers userbase. I think Adobe will stay the best thing to use for really nice fancy looking webtools while Silverlight will focus itself on the real rich internet Applications instead of websites which will stay the big focus of Adobe.
</p>
<p>
I do agree with him that styling can be pretty hard for designers which aren&#39;t used to set all those properties and maybe Silverlight is a bit TOO extensible for them. As an example he shows how to change the rotation of an object in Silverlight and Flex:
</p>
<table border="1" cellspacing="0" cellpadding="0" width="400">
<tbody>
<tr>
<td width="200" valign="top"><strong>Microsoft Silverlight</strong></td>
<td width="200" valign="top"><strong>Adobe Flex</strong></td>
</tr>
<tr>
<td width="200" valign="top">
<p>
			&lt;Button&gt;<br />
			&lt;Button.RenderTransform&gt;<br />
			&lt;RotateTransform Angle=&quot;45&quot;/&gt;<br />
			&lt;/Button.RenderTransform&gt;<br />
			&lt;/Button&gt;
			</p>
</td>
<td width="200" valign="top">&lt;Button rotation=&quot;45&quot;/&gt;</td>
</tr>
</tbody>
</table>
<p>
I can see a designer will like the simple rotation property but Microsoft gives us (developers) the option to do all kinds of transformation on the object which is more extensible then the way it&#39;s done in Flex.
</p>
<p>
About the point where he is complaining about how buggy everything is, I think this changed in a good way from Silverlight 2 Beta 1 to Beta 2 and I&#39;m sure that everything will be really stable at the final release. (of course Visual studio isn&#39;t in beta&#8230; but the Silverlight developer tools are so that&#39;s why Visual studio isn&#39;t always that stable while building Silverlight applications at the moment)
</p>
<p>
I do think Microsoft will have a hard time to get designers to change to Silverlight from their loved environment which they already know but only time will tell.
</p>
<p>
<a href="http://www.webkitchen.be/2008/07/17/silverlight-the-good-the-bad-and-the-ugly/" title="http://www.webkitchen.be/2008/07/17/silverlight-the-good-the-bad-and-the-ugly/"><font color="#669966">http://www.webkitchen.be/2008/07/17/silverlight-the-good-the-bad-and-the-ugly/</font></a>
</p>
<p>
Geert van der Cruijsen</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Comparison+of+Microsoft+Silverlight+2+and+Adobe+Flex+by+an+Adobe+Evangelist&amp;u=http%3A%2F%2Fvdcruijsen.net%2F2008%2F07%2Fcomparison-of-microsoft-silverlight-2-and-adobe-flex-by-an-adobe-evangelist%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Comparison+of+Microsoft+Silverlight+2+and+Adobe+Flex+by+an+Adobe+Evangelist&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2008%2F07%2Fcomparison-of-microsoft-silverlight-2-and-adobe-flex-by-an-adobe-evangelist%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Comparison+of+Microsoft+Silverlight+2+and+Adobe+Flex+by+an+Adobe+Evangelist&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2008%2F07%2Fcomparison-of-microsoft-silverlight-2-and-adobe-flex-by-an-adobe-evangelist%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fvdcruijsen.net%2F2008%2F07%2Fcomparison-of-microsoft-silverlight-2-and-adobe-flex-by-an-adobe-evangelist%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://vdcruijsen.net/2008/07/comparison-of-microsoft-silverlight-2-and-adobe-flex-by-an-adobe-evangelist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Last.Fm Radio Stream Player Gadget 0.5 Released!</title>
		<link>http://vdcruijsen.net/2008/07/last-fm-radio-stream-player-gadget-0-5-released/</link>
		<comments>http://vdcruijsen.net/2008/07/last-fm-radio-stream-player-gadget-0-5-released/#comments</comments>
		<pubDate>Fri, 25 Jul 2008 20:36:00 +0000</pubDate>
		<dc:creator>Geert van der Cruijsen</dc:creator>
				<category><![CDATA[Cool Stuff]]></category>
		<category><![CDATA[Geert's Projects]]></category>
		<category><![CDATA[Last.FM]]></category>
		<category><![CDATA[Windows Gadget]]></category>

		<guid isPermaLink="false">/post/LastFm-Radio-Stream-Player-Gadget-05-Released!.aspx</guid>
		<description><![CDATA[Update 08-06-2010: the last.fm gadget does not work anymore. Last.fm changed their client server protocols and therefore the gadget is not working anymore. I&#8217;m not using Last.fm anymore so i&#8217;m not planning on updating the gadget in the future &#160; &#8230; <a href="http://vdcruijsen.net/2008/07/last-fm-radio-stream-player-gadget-0-5-released/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong></strong></p>
<p><strong><span style="text-decoration: underline;"><span style="font-size: medium;"><span style="font-size: small;">Update 08-06-2010: the last.fm gadget does not work anymore. Last.fm changed their client server protocols and therefore the gadget is not working anymore. I&#8217;m not using Last.fm anymore so i&#8217;m not planning on updating the gadget in the future</span></span></span></strong></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Last week my mailbox was flooded by mails of people who were telling me my Windows Vista Sidebar gadget to play Last.fm radio was broken.</p>
<p>I tested it myself and concluded that this was indeed the case. Last.fm changed their website last week and my guess is that they also changed their streaming service.</p>
<p>After a full night of debugging I found out what was the problem and I fixed it in a new version <a href="http://vdcruijsen.net/page/Windows-Vista-sidebar-gadget---Lastfm-Stream-player.aspx">which can be now downloaded from the download area.</a></p>
<p>If you are interested in what was changed read on. The change was fairly simple, the protocol uses 2 handshakes to connect to the service. The first handshake is to connect to the scrobbling service. The second handshake is used to connect to the streaming service. Before last week requesting the mp3 stream was done by sending the sessionid of the first handshake. Now&#8230; it seems you have to send the sessionid you get with the second handshake. It took some time to figure this out but now everything seems to work fine again.</p>
<p>Protocol example:</p>
<p><strong>Handshake 1 request: </strong></p>
<p>http://ws.audioscrobbler.com/radio/handshake.php?version=1.4.2.58376&amp;platform=win32&amp;platformversion=Windows%20Vista&amp;username=geertvdcruijsen&amp;passwordmd5=<br />4d9309866b98863c3c3336e50392831b&amp;language=en&amp;player=winamp</p>
<p><strong>Handshake 1 response from last.fm: </strong></p>
<p>session=bbe5e763d1e1deb988595cecf1c21e9d stream_url=http://87.117.229.85:80/last.mp3?Session=bbe5e763d1e1deb988595cecf1c21e9d subscriber=0 framehack=0base_url=ws.audioscrobbler.com base_path=/radio info_message= fingerprint_upload_url=http://ws.audioscrobbler.com/fingerprint/upload.php permit_bootstrap=0</p>
<p><strong>Handshake 2 request: </strong></p>
<p>http://post.audioscrobbler.com/?hs=true&amp;p=1.2&amp;c=tst&amp;v=1.3.1.1&amp;u=geertvdcruijsen<br />&amp;t=1217017120&amp;a=2a060e72c7aae132e8fad06b741be806</p>
<p><strong>Handshake 2 response from last.fm: </strong></p>
<p>OK 7e5b82460d2a45e382b81c437ae6a87a http://post.audioscrobbler.com:80/np_1.2 http://87.117.229.205:80/protocol_1.2</p>
<p><strong>Tune to the right radio channel:</strong></p>
<p>http://ws.audioscrobbler.com/radio/adjust.php?session=bbe5e763d1e1deb988595cecf1c21e9d&amp;url=lastfm://artist/muse</p>
<p><strong>Response to channel change request from last.fm: </strong></p>
<p>response=OK url=lastfm://artist/muse stationname= Muse&rsquo;s Similar Artists discovery=true</p>
<p><strong>Request metadata of stream:</strong></p>
<p>http://ws.audioscrobbler.com/radio/xspf.php?sk=bbe5e763d1e1deb988595cecf1c21e9d<br />&amp;discovery=0&amp;desktop=1.3.1.1&amp;time=1217017120321</p>
<p>I was happy to receive the mails of complaints because this is proof people are actually using my gadget <img src='http://vdcruijsen.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Hopefully all problems are fixed now so happy listening!</p>
<p>Geert van der Cruijsen</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Last.Fm+Radio+Stream+Player+Gadget+0.5+Released%21&amp;u=http%3A%2F%2Fvdcruijsen.net%2F2008%2F07%2Flast-fm-radio-stream-player-gadget-0-5-released%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Last.Fm+Radio+Stream+Player+Gadget+0.5+Released%21&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2008%2F07%2Flast-fm-radio-stream-player-gadget-0-5-released%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Last.Fm+Radio+Stream+Player+Gadget+0.5+Released%21&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2008%2F07%2Flast-fm-radio-stream-player-gadget-0-5-released%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fvdcruijsen.net%2F2008%2F07%2Flast-fm-radio-stream-player-gadget-0-5-released%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://vdcruijsen.net/2008/07/last-fm-radio-stream-player-gadget-0-5-released/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>MOSS workflow wont start because ‘The requested workflow task content type was not found on the SPWeb’</title>
		<link>http://vdcruijsen.net/2008/07/moss-workflow-wont-start-because-the-requested-workflow-task-content-type-was-not-found-on-the-spweb/</link>
		<comments>http://vdcruijsen.net/2008/07/moss-workflow-wont-start-because-the-requested-workflow-task-content-type-was-not-found-on-the-spweb/#comments</comments>
		<pubDate>Wed, 02 Jul 2008 20:02:00 +0000</pubDate>
		<dc:creator>Geert van der Cruijsen</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[WF]]></category>
		<category><![CDATA[Workflow]]></category>

		<guid isPermaLink="false">/post/MOSS-workflow-wont-start-because-The-requested-workflow-task-content-type-was-not-found-on-the-SPWeb.aspx</guid>
		<description><![CDATA[The last 2 days my MOSS environment was driving me crazy because an already existing workflow didn&#39;t want to start in a new document library in a new subsite. I made this workflow in Visual Studio 2005 and deployed it &#8230; <a href="http://vdcruijsen.net/2008/07/moss-workflow-wont-start-because-the-requested-workflow-task-content-type-was-not-found-on-the-spweb/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>
The last 2 days my MOSS environment was driving me crazy because an already existing workflow didn&#39;t want to start in a new document library in a new subsite. I made this workflow in Visual Studio 2005 and deployed it as a feature to my SharePoint Site. I connected the workflow to a content type and told it to run on new items of this type or whenever an item changes. This workflow worked fine for 2 months in this particular document library.
</p>
<p>
After 2 months my client asked for a new subsite with a new document library where this workflow should also run. I installed this workflow here and expected everything would go as planned. When I tried to test the workflow I didn&#39;t see anything happen so I tried creating new items, changing them, even manually starting the workflow. Nothing happened. The metadata field which contains the workflow status was staying empty. When checking the log files I didn&#39;t see anything either.
</p>
<p>
I tried to reinstall the workflow. Deleted and recreated the site nothing seemed to help. During all this the workflow still worked fine in the other subsite and document library. When I recreated the workflow and checked the logfile again I finally found an error. (it seems Sharepoint only logs this error the first time you start the workflow and after that it doesn&#39;t do anything)
</p>
<p>
The error message in the logfile was the following:
</p>
<p>
Workflow Infrastructure&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 72fv <strong>Unexpected </strong>AutoStart Workflow: System.ArgumentException: <strong>De aangevraagde werkstroomtaakinhoudstype is niet gevonden op SPWeb.</strong>&nbsp;&nbsp;&nbsp;&nbsp; at Microsoft.SharePoint.SPList.PrepForWorkflowTemplate(SPWorkflowTemplate wt)&nbsp;&nbsp;&nbsp;&nbsp; at Microsoft.SharePoint.Workflow.SPWorkflowManager.StartWorkflowElev(SPListItem item, SPFile file, SPWorkflowAssociation association, SPWorkflowEvent startEvent, Boolean bAutoStart, Boolean bCreateOnly)&nbsp;&nbsp;&nbsp;&nbsp; at Microsoft.SharePoint.Workflow.SPWorkflowAutostartEventReceiver.AutoStartWorkflow(SPItemEventProperties properties, Boolean bCreate, Boolean bChange, AssocType atyp)
</p>
<p>
this Dutch error (I really hate Dutch errors. you can&#39;t look them up on Google/MSDN:( )translated in English is &#39;The requested workflow task content type was not found on the SPWeb&#39;. I found the exact translation because I was lucky and when I had the English error this gave me new hope to find a weblog with the answer (since weblogs seem the primary documentation for SharePoint 2007 <img src='http://vdcruijsen.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  )
</p>
<p>
I searched for the error and everything I could find was reinstalling the OffWFCommon feature. I tried this with the following commands but nothing changed. I also tried to uninstall and reinstall but this didn&#39;t help either
</p>
<p>
stsadm -o installfeature -filename OffWFCommon\feature.xml <br />
stsadm -o activatefeature -filename OffWFCommon\feature.xml -url <a href="http://localhost/">http://localhost/</a>
</p>
<p>
<a href="http://weblog.vb-tech.com/nick/archive/2007/03/05/2241.aspx#2301" target="_blank">This weblog</a> told me the exact thing that was going on. the TaskListContentType wasn&#39;t installed on my tasks documentlibrary when I checked it by enabling content types chaning in the advanced settings of the tasks list. The ID of this content type is 0x01080100C9C9515DE4E24001905074F980F93160 which is the same as the OffWFCommon feature so it definitely had something to do with it. When I checked the content types of my task doclib that was working I noticed it had 2 content types attached. 1 called &quot;<strong>Task</strong>&quot; and 1 called &quot;<strong>Workflow task content type</strong>&quot; my Tasks library that wasn&#39;t working had a content type called &quot;<strong>Tasks</strong>&quot;. I couldn&#39;t find any way how to add these content types because these are system content types and thus hidden.
</p>
<p>
<strong>Solution/Workaround:</strong>
</p>
<p>
Since I already wasted 1 and a half day on this problem my next try was to save the Tasks documentlibrary of the workflow that was working as a template. After that I deleted the workflow in the new document library and also deleted the Tasks list there. I added a new Tasks list by using the template I made and installed the workflow again for this documentlibrary. I tested it and guess what.. everything seemed to work fine. The solution isn&#39;t that pretty but I was glad it finally worked!
</p>
<p>
Hopefully someone with the same problem reads this before they waste to much time on this really awful problem. Also if you know&nbsp; a better solution please let me know because I would really like to know how to really solve this problem.
</p>
<p>
Geert van der Cruijsen</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=MOSS+workflow+wont+start+because+%E2%80%98The+requested+workflow+task+content+type+was+not+found+on+the+SPWeb%E2%80%99&amp;u=http%3A%2F%2Fvdcruijsen.net%2F2008%2F07%2Fmoss-workflow-wont-start-because-the-requested-workflow-task-content-type-was-not-found-on-the-spweb%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=MOSS+workflow+wont+start+because+%E2%80%98The+requested+workflow+task+content+type+was+not+found+on+the+SPWeb%E2%80%99&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2008%2F07%2Fmoss-workflow-wont-start-because-the-requested-workflow-task-content-type-was-not-found-on-the-spweb%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=MOSS+workflow+wont+start+because+%E2%80%98The+requested+workflow+task+content+type+was+not+found+on+the+SPWeb%E2%80%99&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2008%2F07%2Fmoss-workflow-wont-start-because-the-requested-workflow-task-content-type-was-not-found-on-the-spweb%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fvdcruijsen.net%2F2008%2F07%2Fmoss-workflow-wont-start-because-the-requested-workflow-task-content-type-was-not-found-on-the-spweb%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://vdcruijsen.net/2008/07/moss-workflow-wont-start-because-the-requested-workflow-task-content-type-was-not-found-on-the-spweb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DevDays 2008 Amsterdam</title>
		<link>http://vdcruijsen.net/2008/05/devdays-2008-amsterdam/</link>
		<comments>http://vdcruijsen.net/2008/05/devdays-2008-amsterdam/#comments</comments>
		<pubDate>Thu, 22 May 2008 19:22:00 +0000</pubDate>
		<dc:creator>Geert van der Cruijsen</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[DevDays]]></category>
		<category><![CDATA[Events]]></category>

		<guid isPermaLink="false">/post/DevDays-2008-Amsterdam.aspx</guid>
		<description><![CDATA[I just came home from Amsterdam after a long day of listening to presentations on the DevDays 2008 in Amsterdam. It was a long day since I live &#8220;below the rivers&#8221; as people in Holland like to call it and &#8230; <a href="http://vdcruijsen.net/2008/05/devdays-2008-amsterdam/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I just came home from Amsterdam after a long day of listening to presentations on the <a href="http://www.devdays.nl" target="_blank">DevDays 2008 in Amsterdam</a>. It was a long day since I live &#8220;below the rivers&#8221; as people in Holland like to call it and its a pretty long drive to Amsterdam so I had to get up early.</p>
<p>&nbsp;<img src="/image.axd?picture=devdays.png" alt="" width="203" height="113" /></p>
<p>I stepped into my car at 6:00 in the morning to be in Amsterdam at 9:00. In the Netherlands traffic is such a joke that it isn&#8217;t possible for me to be in Amsterdam at 9:00 because when i leave at 6:00 i&#8217;m there at 8:00 and when i go a bit later i&#8217;m already late for the first session because of all the traffic jams. So around 8 o&#8217;clock I entered the Rai and helped a bit at the <a href="http://www.avanade.com/nl" target="_blank">Avanade</a> stand to help kill the time before the first session.</p>
<p>At 9:00 the keynote started and <a href="http://www.rollthunder.com/" target="_blank">David Platt</a> told us <strong>Why software sucks</strong>. To wrap his story up he told us that developers write software that doesn&#8217;t function well because it doesn&#8217;t do it&#8217;s job like it is supposed to. We build to many &#8220;cool&#8221; features that nobody uses etc. His principle of software development is: <strong>KNOW THY USER FOR HE IS NOT THEE</strong>. All in all it was a interesting presentation about something everybody already knows or should know but still a lots of developers keep doing a bad job at it. If you want to know more about this subject check out David&#8217;s website or read his book called &#8220;Why Software Sucks&#8221;</p>
<p>The Second session I visited was an &#8220;<strong>Introduction to Silverlight 2</strong>&#8221; by <a href="http://www.danielmoth.com/Blog/" target="_blank">Daniel Moth</a>. He gave us a good overview of what silverlight 2 is going to do at release and what it can already do know. Since I already played around with the silverlight 2 beta I already knew some stuff he told and showed us in the demo&#8217;s but it was nice to see all aspects of what silverlight 2 is capable off. The demo&#8217;s he showed us were a Hello World example, a XAML introduction, The bridge between html/javascript and Silverlight 2, Networking capabilities in Silverlight and at the end he showed us how to acces the local file system. On Daniel&#8217;s blog is a nice summary of his presentation at DevDays so if you are interested in what Silverlight 2 can do check it out at <a title="http://www.danielmoth.com/Blog/2008/05/my-silverlight-session.html" href="http://www.danielmoth.com/Blog/2008/05/my-silverlight-session.html">http://www.danielmoth.com/Blog/2008/05/my-silverlight-session.html</a></p>
<p>After enjoying a nice lunch in the sun I visited a presentation about &#8220;<strong>Building Rich Internet Applications for WSS 3.0 and MOSS 2007</strong>&#8220;. This presentation was done by <a href="http://blog.u2u.info/DottextWeb/patrick/" target="_blank">Patrick Tisseghem</a>. Patrick is a SharePoint MVP and showed us to possibilities of using Silverlight in SharePoint. Before I went to the presentation I thought that this could be very useful because in my daily work I have to code against/in SharePoint quite a bit. The Silverlight support Patrick showed us didn&#8217;t came as anything new to me since Daniel Moth already showed us in his presentation that in Silverlight 2.0 you can acces webservices via the client side code. Patrick showed us how to use the standard webservices that SharePoint exposes and explained to us that we can build our own services to communicate with SharePoint. Since on my projects I already build several webservices on SharePoint this didn&#8217;t feel like anything new to me and it was mostly more of an introduction to Silverlight 2.0 that that it had something to do with SharePoint. Patrick also showed us what it takes to use Silverlight in SharePoint&nbsp; but the steps you should take were a bit to specific in my opinion and you&#8217;ll have to look them up anyway as soon as you want to try it out yourself <img src='http://vdcruijsen.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The next session was by <a href="http://blogs.thinktecture.com/ingo/" target="_blank">Ingo Rammer</a> and was about &#8220;<strong>Combining WCF and WF in the 3.5 framework to build durable services</strong>&#8220;. I really liked this presentation since I work with WCF quite a lot on my projects and it was nice to see how to build workflow services using WF and WCF. Ingo showed us that in the 3.0 framework it wasn&#8217;t possible to build durable services and if you use duplex services things can go wrong when one of your services restart for some reason. He build a durable service that was serialized when the service shuts down and when it starts again it can be deserialized again so the service that is sending a response wont get any errors because the service has restarted.</p>
<p>The last session of the day was by <a href="http://blog.u2u.info/DottextWeb/peter/" target="_blank">Peter Himschoot</a> and was about how to use REST and JSON in WCF. Peter showed us that it is really easy to use REST instead of soap to communicate to WCF services but I still don&#8217;t think that I&#8217;m going to use this very often since REST is specially build to be reached by everyone and most services I build require security and that something that&#8217;s lacking in REST. Rest isn&#8217;t supposed to be used for those services and Peter had a nice line for this: <strong>REST = REACH</strong>. meaning that if you have to communicate with software that&#8217;s build using older languages you probably use REST because most languages support the HTTP protocol.</p>
<p>All in all it was a nice day and I enjoyed myself and learned lots of new stuff. People who are going again tomorrow enjoy! I won&#8217;t be going tomorrow since I have to work on my project half a day before I go away for the weekend to Terschelling with my colleagues of <a href="http://www.avanade.com/nl" target="_blank">Avanade Netherlands</a> to have fun and drink some beers.</p>
<p>Geert van der Cruijsen</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=DevDays+2008+Amsterdam&amp;u=http%3A%2F%2Fvdcruijsen.net%2F2008%2F05%2Fdevdays-2008-amsterdam%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=DevDays+2008+Amsterdam&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2008%2F05%2Fdevdays-2008-amsterdam%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=DevDays+2008+Amsterdam&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2008%2F05%2Fdevdays-2008-amsterdam%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fvdcruijsen.net%2F2008%2F05%2Fdevdays-2008-amsterdam%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://vdcruijsen.net/2008/05/devdays-2008-amsterdam/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Display Picture Metadata in your Silverlight 2.0 Deepzoom Application</title>
		<link>http://vdcruijsen.net/2008/04/display-picture-metadata-in-your-silverlight-2-0-deepzoom-application/</link>
		<comments>http://vdcruijsen.net/2008/04/display-picture-metadata-in-your-silverlight-2-0-deepzoom-application/#comments</comments>
		<pubDate>Wed, 30 Apr 2008 15:11:00 +0000</pubDate>
		<dc:creator>Geert van der Cruijsen</dc:creator>
				<category><![CDATA[Cool Stuff]]></category>
		<category><![CDATA[Geert's Projects]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Deepzoom]]></category>

		<guid isPermaLink="false">/post/Display-Picture-Metadata-in-your-Silverlight-20-Deepzoom-Application.aspx</guid>
		<description><![CDATA[As i promised 2 days ago here&#8217;s my post about how to display metadata of sub images in your Silverlight Deepzoom Application. I already typed this post yesterday but because of a stupid mistake i lost my post and now &#8230; <a href="http://vdcruijsen.net/2008/04/display-picture-metadata-in-your-silverlight-2-0-deepzoom-application/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>As i promised 2 days ago here&#8217;s my post about how to display metadata of sub images in your Silverlight Deepzoom Application. I already typed this post yesterday but because of a stupid mistake i lost my post and now I have to type it again <img src='http://vdcruijsen.net/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  (but I think I&#8217;ll make it a bit shorter)</p>
<p>To start building your Silverlight 2.0 deepzoom application download Deepzoom Composer from Microsoft <a href="http://download.microsoft.com/download/b/3/5/b352676b-9ea1-4ac8-904f-8d14aa60df84/DeepZoomComposer.msi">here</a>. This tool works quite easy. just add some images in the &#8220;import&#8221; mode then drag them on your screen in the &#8220;compose&#8221; mode and then export your deepzoom Project.</p>
<p>If you want to be able to identify the different sub images in your Multiscaleimage object check the &#8220;Create Collection&#8221; checkbox.</p>
<p><a href="http://vdcruijsen.net/file.axd?file=WindowsLiveWriter/DisplayPictureMetad.0DeepzoomApplication_EB5B/deepzoomComposerCollection_2.png"><img style="border: 0px" src="/file.axd?file=WindowsLiveWriter/DisplayPictureMetad.0DeepzoomApplication_EB5B/deepzoomComposerCollection_thumb.png" border="0" alt="deepzoomComposerCollection" width="360" height="186" /></a></p>
<p>After exporting this will be the result:</p>
<p><a href="http://vdcruijsen.net/file.axd?file=WindowsLiveWriter/DisplayPictureMetad.0DeepzoomApplication_EB5B/deepzoomexport_2.png"><img style="border: 0px" src="/file.axd?file=WindowsLiveWriter/DisplayPictureMetad.0DeepzoomApplication_EB5B/deepzoomexport_thumb.png" border="0" alt="deepzoomexport" width="244" height="108" /></a></p>
<p>Now to load up this collection of pictures into your own project take a look at <a href="http://www.soulsolutions.com.au/Blog/tabid/73/EntryID/410/Default.aspx" target="_blank">this</a> weblog, there is a really good explanation on which steps to take and after you did all those steps i&#8217;ll explain how to show metada of the different subimages in the deepzoom application.</p>
<p>So if you are at this point you should have your own working deepzoom application and you want to add picture metadata to your project. If not go back to <a href="http://www.soulsolutions.com.au/Blog/tabid/73/EntryID/410/Default.aspx" target="_blank">this</a> weblog or try <a href="http://projectsilverlight.blogspot.com/" target="_blank">one</a> of <a href="http://blogs.msdn.com/jaimer/archive/2008/03/31/a-deepzoom-primer-explained-and-coded.aspx" target="_blank">these</a>.</p>
<p>The only way of identifying the different sub images in the big multiscaleimage is by the Z-Order of the different images. So how do you know which image has what Z-Order you ask? thats where the generated SparseImageSceneGraph.xml comes in which was generated by the Deepzoom Composer.</p>
<p><span style="font-size: 8pt; color: blue">&lt;</span><span style="font-size: 8pt; color: #a31515">SceneNode</span><span style="font-size: 8pt; color: blue">&gt;&nbsp;</span></p>
<p><span style="font-size: 8pt; color: blue"><span>&nbsp; </span>&lt;</span><span style="font-size: 8pt; color: #a31515">FileName</span><span style="font-size: 8pt; color: blue">&gt;</span><span style="font-size: 8pt"> P1000558.JPG<span style="color: blue">&lt;/</span><span style="color: #a31515">FileName</span><span style="color: blue">&gt;&nbsp;</span></span></p>
<p><span style="font-size: 8pt; color: blue"><span>&nbsp; </span>&lt;</span><span style="font-size: 8pt; color: #a31515">x</span><span style="font-size: 8pt; color: blue">&gt;</span><span style="font-size: 8pt">0,235460826165879<span style="color: blue">&lt;/</span><span style="color: #a31515">x</span><span style="color: blue">&gt;</span></span><span style="font-size: 8pt"><span style="color: blue"></p>
<p><span style="font-size: 8pt; color: blue">&nbsp; &lt;</span><span style="font-size: 8pt; color: #a31515">y</span><span style="font-size: 8pt; color: blue">&gt;</span><span style="font-size: 8pt">0,00108692916410255<span style="color: blue">&lt;/</span><span style="color: #a31515">y</span><span style="color: blue">&gt;&nbsp;</span></span></p>
<p></span></span><span style="font-size: 8pt; color: blue"><span>&nbsp; </span>&lt;</span><span style="font-size: 8pt; color: #a31515">Width</span><span style="font-size: 8pt; color: blue">&gt;</span><span style="font-size: 8pt">0,218281177677285<span style="color: blue">&lt;/</span><span style="color: #a31515">Width</span><span style="color: blue">&gt; </span></span><span style="font-size: 8pt"><span style="color: blue"></p>
<p><span style="font-size: 8pt; color: blue"><span>&nbsp; </span>&lt;</span><span style="font-size: 8pt; color: #a31515">Height</span><span style="font-size: 8pt; color: blue">&gt;</span><span style="font-size: 8pt">0,144923888547009<span style="color: blue">&lt;/</span><span style="color: #a31515">Height</span><span style="color: blue">&gt;&nbsp;</span></span></p>
<p></span></span><strong><span style="font-size: 8pt; color: blue"><span>&nbsp; </span>&lt;</span></strong><strong><span style="font-size: 8pt; color: #a31515">ZOrder</span></strong><strong><span style="font-size: 8pt; color: blue">&gt;</span></strong><strong><span style="font-size: 8pt">2<span style="color: blue">&lt;/</span><span style="color: #a31515">ZOrder</span><span style="color: blue">&gt; </span></span></strong><strong></strong><strong><span style="font-size: 8pt"><span style="color: blue"></p>
<p><strong><span style="font-size: 8pt; color: blue"><span>&nbsp; </span>&lt;</span></strong><strong><span style="font-size: 8pt; color: #a31515">Description</span></strong><strong><span style="font-size: 8pt; color: blue">&gt;</span></strong><strong><span style="font-size: 8pt">Uitzicht van hotelkamer<span style="color: blue">&lt;/</span><span style="color: #a31515">Description</span><span style="color: blue">&gt; </span></span></strong></p>
<p></span></span></strong><strong></strong><span style="font-size: 8pt; color: blue; line-height: 115%">&lt;/</span><span style="font-size: 8pt; color: #a31515; line-height: 115%">SceneNode</span><span style="font-size: 8pt; color: blue; line-height: 115%">&gt;</span><span style="font-size: 8pt; line-height: 115%"> </span><span style="font-size: 8pt; line-height: 115%"></p>
<p>&nbsp;</p>
<p></span></p>
<p>As you can see i added my own Description element to every SceneNode in the generated xml so we can use it in our project. We&#8217;ll use this xml file to query the ZOrder of the subimage and get the description as a result with the use of Linq.</p>
<p>To do this we&#8217;ll first have to open the xml file in our code behind page from the page.xaml.cs.</p>
<p><span style="font-size: 8pt">deepZoomObject.Loaded += <span style="color: blue">delegate</span>(<span style="color: blue">object</span> sender, <span style="color: #2b91af">RoutedEventArgs</span> e) </span></p>
<p><span style="font-size: 8pt">{ </span><span style="font-size: 8pt"></p>
<p><span style="font-size: 8pt"><span>&nbsp;&nbsp;&nbsp; </span>_xmlImageMetadata = <span style="color: #2b91af">XDocument</span>.Load(<span style="color: #a31515">&#8220;SparseImageSceneGraph.xml&#8221;</span>); </span></p>
<p></span><span style="font-size: 8pt; line-height: 115%">};</span><span style="font-size: 8pt; line-height: 115%"> </span><span style="font-size: 8pt; line-height: 115%"></p>
<p>&nbsp;</p>
<p></span></p>
<p>After that we&#8217;ll add code to display the metadata when the mouse moves over a sub image in the multiscaleimage.</p>
<p><span style="font-size: 8pt">deepZoomObject.MouseMove += <span style="color: blue">delegate</span>(<span style="color: blue">object</span> sender, <span style="color: #2b91af">MouseEventArgs</span> e) </span></p>
<p><span style="font-size: 8pt">{ </span><span style="font-size: 8pt"></p>
<p><span style="font-size: 8pt"><span>&nbsp;&nbsp;&nbsp; </span><span style="color: blue">if</span> (mouseButtonPressed)&nbsp;</span></p>
<p></span><span style="font-size: 8pt"><span>&nbsp;&nbsp;&nbsp; </span>{ </span><span style="font-size: 8pt"></p>
<p><span style="font-size: 8pt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>mouseIsDragging = <span style="color: blue">true</span>;&nbsp;</span></p>
<p></span><span style="font-size: 8pt"><span>&nbsp;&nbsp;&nbsp; </span>} </span><span style="font-size: 8pt"></p>
<p><span style="font-size: 8pt"><span>&nbsp;&nbsp;&nbsp; </span><span style="color: blue">else&nbsp;</span></span></p>
<p></span><span style="font-size: 8pt"><span>&nbsp;&nbsp;&nbsp; </span>{ </span><span style="font-size: 8pt"></p>
<p><span style="font-size: 8pt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>ImageName.Text = GetMetadata(e.GetPosition(deepZoomObject));&nbsp;</span></p>
<p></span><span style="font-size: 8pt"><span>&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: 8pt">} </span><span style="font-size: 8pt"></p>
<p><span style="font-size: 8pt"><span>&nbsp;&nbsp;&nbsp; </span>lastMousePos = e.GetPosition(deepZoomObject); </span></p>
<p></span><span style="font-size: 8pt; line-height: 115%">};</span><span style="font-size: 8pt; line-height: 115%"> </span><span style="font-size: 8pt; line-height: 115%"></p>
<p>&nbsp;</p>
<p></span></p>
<p>Then we add the function GetMetadata which queries the xml file and gets the description from it.</p>
<p><span style="font-size: 8pt; color: blue">private</span><span style="font-size: 8pt"> <span style="color: blue">string</span> GetMetadata(<span style="color: #2b91af">Point</span> point) </span></p>
<p><span style="font-size: 8pt">{ </span><span style="font-size: 8pt"></p>
<p><span style="font-size: 8pt"><span>&nbsp;&nbsp;&nbsp; </span><span style="color: #2b91af">Point</span> p = deepZoomObject.ElementToLogicalPoint(point);&nbsp;</span></p>
<p></span><span style="font-size: 8pt"><span>&nbsp;&nbsp;&nbsp; </span><span style="color: blue">int</span> subImageIndex = SubImageHitTest(p); </span><span style="font-size: 8pt"></p>
<p><span style="font-size: 8pt"><span>&nbsp;&nbsp;&nbsp; </span><span style="color: blue">if</span> (subImageIndex &gt;= 0)&nbsp;</span></p>
<p></span><span style="font-size: 8pt"><span>&nbsp;&nbsp;&nbsp; </span>{ </span><span style="font-size: 8pt"></p>
<p><span style="font-size: 8pt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: blue">var</span> q = <span style="color: blue">from</span> c <span style="color: blue">in</span> _xmlImageMetadata.Elements(<span style="color: #a31515">&#8220;SceneGraph&#8221;</span>).Elements(<span style="color: #a31515">&#8220;SceneNode&#8221;</span>)&nbsp;</span></p>
<p></span><span style="font-size: 8pt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: blue">where</span> ((<span style="color: blue">string</span>)c.Element(<span style="color: #a31515">&#8220;ZOrder&#8221;</span>)) == (subImageIndex + 1).ToString() </span><span style="font-size: 8pt"></p>
<p><span style="font-size: 8pt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: blue">select</span> (<span style="color: blue">string</span>)c.Element(<span style="color: #a31515">&#8220;Description&#8221;</span>);&nbsp;</span></p>
<p></span><span style="font-size: 8pt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: blue">if</span> (q != <span style="color: blue">null</span>) </span><span style="font-size: 8pt"></p>
<p><span style="font-size: 8pt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>{&nbsp;</span></p>
<p></span><span style="font-size: 8pt"><span>&nbsp;&nbsp;&nbsp;&nbsp;</span><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: blue">return</span> q.Single(); </span><span style="font-size: 8pt"></p>
<p><span style="font-size: 8pt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: 8pt">}&nbsp;</span></p>
<p></span><span style="font-size: 8pt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: blue">else </span></span><span style="font-size: 8pt"><span style="color: blue"></p>
<p><span style="font-size: 8pt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: blue">return</span> <span style="color: #a31515">&#8220;&#8221;</span>;&nbsp;</span></p>
<p></span></span><span style="font-size: 8pt"><span>&nbsp;&nbsp;&nbsp; </span>} </span><span style="font-size: 8pt"></p>
<p><span style="font-size: 8pt"><span>&nbsp;&nbsp;&nbsp; </span><span style="color: blue">else&nbsp;</span></span></p>
<p></span></p>
<p><span style="font-size: 8pt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: blue">return</span> <span style="color: #a31515">&#8220;&#8221;</span>; </span></p>
<p><span style="font-size: 8pt; line-height: 115%">}</span><span style="font-size: 8pt; line-height: 115%"> </span><span style="font-size: 8pt; line-height: 115%"></p>
<p>&nbsp;</p>
<p></span></p>
<p>This function uses the function SubImageHitTest which I copied from <a href="http://projectsilverlight.blogspot.com/" target="_blank">this</a> weblog:</p>
<p><span style="font-size: 8pt; color: blue">int</span><span style="font-size: 8pt"> SubImageHitTest(<span style="color: #2b91af">Point</span> p) </span></p>
<p><span style="font-size: 8pt">{ </span><span style="font-size: 8pt"></p>
<p><span style="font-size: 8pt"><span>&nbsp;&nbsp;&nbsp; </span><span style="color: blue">for</span> (<span style="color: blue">int</span> i = 0; i &lt; deepZoomObject.SubImages.Count; i++)&nbsp;</span></p>
<p></span><span style="font-size: 8pt"><span>&nbsp;&nbsp;&nbsp; </span>{ </span><span style="font-size: 8pt"></p>
<p><span style="font-size: 8pt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: #2b91af">Rect</span> subImageRect = GetSubImageRect(i);&nbsp;</span></p>
<p></span><span style="font-size: 8pt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: blue">if</span> (subImageRect.Contains(p))<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size: 8pt"></p>
<p><span style="font-size: 8pt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: blue">return</span> i;&nbsp;</span></p>
<p></span></p>
<p><span style="font-size: 8pt"><span>&nbsp;&nbsp;&nbsp; </span>} <span style="color: blue">return</span> -1; </span></p>
<p><span style="font-size: 8pt">} </span><span style="font-size: 8pt"></p>
<p>&nbsp;</p>
<p></span><span style="font-size: 8pt"></p>
<p><span style="font-size: 8pt; color: #2b91af">Rect</span><span style="font-size: 8pt"> GetSubImageRect(<span style="color: blue">int</span> indexSubImage) </span></p>
<p></span><span style="font-size: 8pt">{ </span><span style="font-size: 8pt"></p>
<p><span style="font-size: 8pt"><span>&nbsp;&nbsp;&nbsp; </span><span style="color: blue">if</span> (indexSubImage &lt; 0 || indexSubImage &gt;= deepZoomObject.SubImages.Count)<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></span></p>
<p></span></p>
<p><span style="font-size: 8pt"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="color: blue">return</span> <span style="color: #2b91af">Rect</span>.Empty; </span></p>
<p><span style="font-size: 8pt"></p>
<p><span style="font-size: 8pt"><span>&nbsp;&nbsp;&nbsp; </span><span style="color: #2b91af">MultiScaleSubImage</span> subImage = deepZoomObject.SubImages[indexSubImage];&nbsp;</span></p>
<p></span><span style="font-size: 8pt"><span>&nbsp;&nbsp;&nbsp; </span><span style="color: blue">double</span> scaleBy = 1 / subImage.ViewportWidth; </span><span style="font-size: 8pt"></p>
<p><span style="font-size: 8pt"><span>&nbsp;&nbsp;&nbsp; </span><span style="color: blue">return</span> <span style="color: blue">new</span> <span style="color: #2b91af">Rect</span>(-subImage.ViewportOrigin.X * scaleBy, -subImage.ViewportOrigin.Y * scaleBy, 1 * scaleBy, (1 / subImage.AspectRatio) * scaleBy); </span></p>
<p></span><span style="font-size: 8pt; line-height: 115%">}</span><span style="font-size: 8pt; line-height: 115%"> </span><span style="font-size: 8pt; line-height: 115%"></p>
<p>&nbsp;</p>
<p></span></p>
<p>if you build and start your application now you should be able to see your added metadata when you mouseover a sub image in the MultiscaleImage.</p>
<p>My working example can be found here: <a href="http://vdcruijsen.net/projects/SilverlightDeepzoom/test.html"><strong>http://www.vdcruijsen.net/projects/SilverlightDeepzoom/test.html</strong></a></p>
<p>sourcecode can be downloaded here:</p>
<p>(you&#8217;ll have to add your own deepzoom object since i removed that from the zip file)</p>
<p>&nbsp;</p>
<p>Happy Coding!</p>
<p>&nbsp;</p>
<p>Geert van der Cruijsen</p>
<p><a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fvdcruijsen.net%2fpost%2f2008%2f04%2fDisplay-Picture-Metadata-in-your-Silverlight-20-Deepzoom-Application.aspx"><img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fvdcruijsen.net%2fpost%2f2008%2f04%2fDisplay-Picture-Metadata-in-your-Silverlight-20-Deepzoom-Application.aspx" border="0" alt="kick it on DotNetKicks.com" width="82" height="18" /></a></p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Display+Picture+Metadata+in+your+Silverlight+2.0+Deepzoom+Application&amp;u=http%3A%2F%2Fvdcruijsen.net%2F2008%2F04%2Fdisplay-picture-metadata-in-your-silverlight-2-0-deepzoom-application%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Display+Picture+Metadata+in+your+Silverlight+2.0+Deepzoom+Application&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2008%2F04%2Fdisplay-picture-metadata-in-your-silverlight-2-0-deepzoom-application%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Display+Picture+Metadata+in+your+Silverlight+2.0+Deepzoom+Application&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2008%2F04%2Fdisplay-picture-metadata-in-your-silverlight-2-0-deepzoom-application%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fvdcruijsen.net%2F2008%2F04%2Fdisplay-picture-metadata-in-your-silverlight-2-0-deepzoom-application%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://vdcruijsen.net/2008/04/display-picture-metadata-in-your-silverlight-2-0-deepzoom-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Build your own Silverlight 2.0 Deepzoom application and host it with “Silverlight Streaming”</title>
		<link>http://vdcruijsen.net/2008/04/build-your-own-silverlight-2-0-deepzoom-application-and-host-it-with-silverlight-streaming/</link>
		<comments>http://vdcruijsen.net/2008/04/build-your-own-silverlight-2-0-deepzoom-application-and-host-it-with-silverlight-streaming/#comments</comments>
		<pubDate>Mon, 28 Apr 2008 20:40:00 +0000</pubDate>
		<dc:creator>Geert van der Cruijsen</dc:creator>
				<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Deepzoom]]></category>

		<guid isPermaLink="false">/post/Build-your-own-Silverlight-20-Deepzoom-application-and-host-it-with-Silverlight-Streaming.aspx</guid>
		<description><![CDATA[A few weeks back on MIX&#39;08 Microsoft showed us a stunning demo including new technologies like Seadragon and Silverlight 2.0. This demo showed us the collection of memorabilia at Hardrock Cafe. The demo can be found at http://memorabilia.hardrock.com/ This demo &#8230; <a href="http://vdcruijsen.net/2008/04/build-your-own-silverlight-2-0-deepzoom-application-and-host-it-with-silverlight-streaming/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>
A few weeks back on MIX&#39;08 Microsoft showed us a stunning demo including new technologies like Seadragon and Silverlight 2.0.
</p>
<p>
This demo showed us the collection of memorabilia at Hardrock Cafe. The demo can be found at <a href="http://memorabilia.hardrock.com/">http://memorabilia.hardrock.com/</a>
</p>
<p>
This demo really got my attention and after some searching on the internet i found out i wasn&#39;t the only one. There are hundreds of blogposts by people showing how you can build this for yourself and guess what: <strong>it&#39;s really easy!</strong>
</p>
<p>
<img src="/image.axd?picture=SilverHeartDragon.jpg" alt="" width="300" height="89" />
</p>
<p>
I&#39;ve spend some days in the weekend and this evening building my own version of a Silverlight Deepzoom Application. Most of my code is &quot;borrowed&quot; or copied from other blog posts which i&#39;ll list at the bottom of this post. My goal was to also be able to show metadata at the pictures and after some research it wasn&#39;t to hard to do this either. Since i didn&#39;t find any other blog posts who explained how to show metadata with your pictures i&#39;ll make a seperate blogpost about this tomorrow.
</p>
<p>
<strong>I&#39;ve put some of my last vacation photo&#39;s online in my own deepzoom test application at: </strong><a href="http://vdcruijsen.net/projects/SilverlightDeepzoom/test.html"><strong>http://www.vdcruijsen.net/projects/SilverlightDeepzoom/test.html</strong></a><strong>&nbsp;(source also linked on that page)</strong>
</p>
<p>
Download Source:&nbsp;
</p>
<p>
<iframe src="http://cid-ef12210979e9f6b0.skydrive.live.com/embedrow.aspx/Projects/VdCruijsen.SLDeepZoom.zip" frameborder="0" style="margin: 3px; width: 240px; height: 26px; background-color: #ffffff; border: #dde5e9 1px solid; padding: 0px"></iframe>
</p>
<p>
As i said before i won&#39;t go explaining the code in this post because i&#39;m gonna do that tomorrow in a separate post where i&#39;ll explain how to add metadata to your deepzoom application. if you want more information about Silverlight and Deepzoom check out the following links:
</p>
<p>
how it works: <a href="http://blogs.msdn.com/jaimer/archive/2008/03/31/a-deepzoom-primer-explained-and-coded.aspx">http://blogs.msdn.com/jaimer/archive/2008/03/31/a-deepzoom-primer-explained-and-coded.aspx</a>
</p>
<p>
lots of how-to&#39;s: <a href="http://projectsilverlight.blogspot.com/">http://projectsilverlight.blogspot.com/</a>
</p>
<p>
more info on silverlight 2.0 <a href="http://weblogs.asp.net/scottgu/archive/2008/02/22/first-look-at-silverlight-2.aspx">http://weblogs.asp.net/scottgu/archive/2008/02/22/first-look-at-silverlight-2.aspx</a>
</p>
<p>
Another cool thing i found out is that Microsoft is offering is a hosted environment for your silverlight applications. You can get up to 10GB of free space at <strong>Silverlight Streaming</strong>: <a href="http://silverlight.live.com/">http://silverlight.live.com/</a>
</p>
<p>
You can upload your Silverlight manifest files + other resource files like video&#39;s to Silverlight Streaming and you can link your silverlight object on your own page. The silverlight object in my own example is also hosted at Silverlight Streaming.
</p>
<p>
If you have any questions or recommendations about this subject please dont hesitate to send me a mail about it.
</p>
<p>
Geert van der Cruijsen
</p>
<p>
<a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fwww.vdcruijsen.net%2fpost%2f2008%2f04%2fBuild-your-own-Silverlight-Deepzoom-application-and-host-it-with-Silverlight-Streaming.aspx"><img src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fwww.vdcruijsen.net%2fpost%2f2008%2f04%2fBuild-your-own-Silverlight-Deepzoom-application-and-host-it-with-Silverlight-Streaming.aspx" border="0" alt="kick it on DotNetKicks.com" width="82" height="18" /></a>
</p>
<p>
&nbsp;</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Build+your+own+Silverlight+2.0+Deepzoom+application+and+host+it+with+%E2%80%9CSilverlight+Streaming%E2%80%9D&amp;u=http%3A%2F%2Fvdcruijsen.net%2F2008%2F04%2Fbuild-your-own-silverlight-2-0-deepzoom-application-and-host-it-with-silverlight-streaming%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Build+your+own+Silverlight+2.0+Deepzoom+application+and+host+it+with+%E2%80%9CSilverlight+Streaming%E2%80%9D&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2008%2F04%2Fbuild-your-own-silverlight-2-0-deepzoom-application-and-host-it-with-silverlight-streaming%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Build+your+own+Silverlight+2.0+Deepzoom+application+and+host+it+with+%E2%80%9CSilverlight+Streaming%E2%80%9D&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2008%2F04%2Fbuild-your-own-silverlight-2-0-deepzoom-application-and-host-it-with-silverlight-streaming%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fvdcruijsen.net%2F2008%2F04%2Fbuild-your-own-silverlight-2-0-deepzoom-application-and-host-it-with-silverlight-streaming%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://vdcruijsen.net/2008/04/build-your-own-silverlight-2-0-deepzoom-application-and-host-it-with-silverlight-streaming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SharePoint Workflow running in a different context as the host sharepoint site</title>
		<link>http://vdcruijsen.net/2008/04/sharepoint-workflow-running-in-a-different-context-as-the-host-sharepoint-site/</link>
		<comments>http://vdcruijsen.net/2008/04/sharepoint-workflow-running-in-a-different-context-as-the-host-sharepoint-site/#comments</comments>
		<pubDate>Mon, 21 Apr 2008 20:30:00 +0000</pubDate>
		<dc:creator>Geert van der Cruijsen</dc:creator>
				<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[SharePoint Workflow]]></category>
		<category><![CDATA[WF]]></category>

		<guid isPermaLink="false">/post/SharePoint-Workflow-running-in-a-different-context-as-the-host-sharepoint-site.aspx</guid>
		<description><![CDATA[On my current project I ran into a problem with a custom SharePoint workflow because the workflow sometimes failed to run and sometimes it worked like a charm. When I cancelled a workflow which gave an error and restarted it &#8230; <a href="http://vdcruijsen.net/2008/04/sharepoint-workflow-running-in-a-different-context-as-the-host-sharepoint-site/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>
On my current project I ran into a problem with a custom SharePoint workflow because the workflow sometimes failed to run and sometimes it worked like a charm. When I cancelled a workflow which gave an error and restarted it by hand it finished without any problems.
</p>
<p>
When I looked in the SharePoint logfiles what was causing my workflows to crash it showed that the workflow couldn&rsquo;t find values for some settings in the web.config. I couldn&rsquo;t think off any reason why the workflow couldn&rsquo;t read these settings about 50% of the times a workflow was started.
</p>
<p>
The workflow I created is automatically started after the change of an item in a specific document library. After some testing I found out that all workflows that I started by changing the item with the sharepoint webinterface worked fine but the items that were changed by an external source (a custom webservice I created but also the biztalk SharePoint Adapter webservice) crashed with the error that they couldn&rsquo;t read the web.config.
</p>
<p>
The webservices that are causing the workflow to crash are in a different sharepoint webapplication and thus use a different web.config. When I added my settings in the web.config of this webapplication the workflows stopped crashing.
</p>
<p>
So it seems that the WF workflows are running in the process which changed the item in the sharepoint list which caused the workflow to start instead of the standard w3p process of SharePoint which I thought always was the case.
</p>
<p>
Happy coding!</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=SharePoint+Workflow+running+in+a+different+context+as+the+host+sharepoint+site&amp;u=http%3A%2F%2Fvdcruijsen.net%2F2008%2F04%2Fsharepoint-workflow-running-in-a-different-context-as-the-host-sharepoint-site%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=SharePoint+Workflow+running+in+a+different+context+as+the+host+sharepoint+site&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2008%2F04%2Fsharepoint-workflow-running-in-a-different-context-as-the-host-sharepoint-site%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=SharePoint+Workflow+running+in+a+different+context+as+the+host+sharepoint+site&amp;url=http%3A%2F%2Fvdcruijsen.net%2F2008%2F04%2Fsharepoint-workflow-running-in-a-different-context-as-the-host-sharepoint-site%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fvdcruijsen.net%2F2008%2F04%2Fsharepoint-workflow-running-in-a-different-context-as-the-host-sharepoint-site%2F" ><img class="lightsocial_img" src="http://vdcruijsen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://vdcruijsen.net/2008/04/sharepoint-workflow-running-in-a-different-context-as-the-host-sharepoint-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

