<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Learn. Teach. Share.</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/johnalioto/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/johnalioto/feed.xml</link>
    <description>John P Alioto&amp;#039;s blog.</description>
    <lastBuildDate>Tue, 16 Apr 2019 05:13:48 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Customize a Windows Phone 7 Live Tile</title>
      <link>https://docs.microsoft.com/archive/blogs/johnalioto/customize-a-windows-phone-7-live-tile</link>
      <pubDate>Tue, 30 Aug 2011 14:17:00 GMT</pubDate>
      <dc:creator><![CDATA[jpalioto]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/johnalioto/2011/08/30/customize-a-windows-phone-7-live-tile/</guid>
      <description><![CDATA[Windows Phone 7 &ldquo;Mango&rdquo; adds a lot of great new features to Live Tiles.&nbsp; An app can...]]></description>
      <content:encoded><![CDATA[<p>Windows Phone 7 &ldquo;Mango&rdquo; adds a lot of great new features to <a href="http://msdn.microsoft.com/en-us/library/hh202948(VS.92).aspx">Live Tiles</a>.&nbsp; An app can now create Secondary Tiles that are controlled programmatically and deep link directly into the app.&nbsp; One feature that I could not find, however, is the ability to control the appearance of text on a tile.&nbsp; This seems to be particularly important given that the background of the tile can now be updated to display additional information.&nbsp; It is possible, however, to generate a tile on the fly and display it, thus giving greater control of the appearance of the tile.</p>
<p>The general process we will follow:</p>
<p>1. Create a <a href="http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.writeablebitmap(VS.95).aspx">WriteableBitmap</a> <br />2. Grab images from our app Content (optional) <br />3. Create and format some UI Elements to add to our Bitmap <br />4. Build our Bitmap how we like it <br />5. Save our Bitmap to our Phone <br />6. Create our Secondary Tile and display our Bitmap on the front or back of the Tile. <br /> <br />As the basis of my app, I&rsquo;ve created a solution with a content item I want to display on my Tile &hellip;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/37/35/metablogapi/0882.image_0E182F57.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-37-35-metablogapi/0882.image_5F00_0E182F57.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="Solution Explorer" border="0" alt="Sample Solution" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/37/35/metablogapi/2626.image_thumb_068CBFEA.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-37-35-metablogapi/2626.image_5F00_thumb_5F00_068CBFEA.png" width="384" height="390" /></a></p>
<p>I create a <a href="http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.writeablebitmap.aspx">WriteableBitmap</a> of the correct dimensions and a <a href="http://msdn.microsoft.com/en-us/library/system.windows.uielement(VS.95).aspx">UI Element</a> to host the Bitmap &hellip;</p>
<pre class="csharpcode">var bmp = <span class="kwrd">new</span> WriteableBitmap(173, 173);

var logo = <span class="kwrd">new</span> BitmapImage(<span class="kwrd">new</span> Uri(<span class="str">"/Content/dpe_green.png"</span>, UriKind.Relative));
var img = <span class="kwrd">new</span> Image { Source = logo };

<span class="rem">// Force the bitmapimage to load it's properties so the transform will work</span>
 logo.CreateOptions = BitmapCreateOptions.None;</pre>
<p><a href="http://msdn.microsoft.com/en-us/library/hh202948(VS.92).aspx">The size of a Live Tile is 173 x 173.</a>&nbsp; A digression here.&nbsp; The little trick I pulled with <a href="http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.bitmapimage.createoptions(VS.95).aspx">logo.CreateOptions</a>.&nbsp; Normally, the image will not be loaded until it is displayed.&nbsp; It&rsquo;s a Silverlight thang.&nbsp; But, I want to load the image immediately so that I can understand its size and use that information in my render transform.&nbsp; Setting the property to <a href="http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.bitmapcreateoptions(VS.95).aspx">BitmapCreateOptions.None</a>forces the image to load immediately and thus the PixelHeight and PixelWidth properties become available.&nbsp; Note, this has performance implications especially if you are loading lots of images.&nbsp;<em>[This is apparently no guarantee that the image will be loaded.&nbsp; Will update.&nbsp; In the meantime, see comments. &ndash; JPA]</em></p>
<p>Next, we create the UI Elements that we want to push into our WriteableBitmap using the <a href="http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.writeablebitmap.render(VS.95).aspx">Render method</a>.&nbsp; We will need to format our Tile to our liking.&nbsp; We will also need to add our image to our bitmap and position it properly.&nbsp; In order to do that, we will need to use <a href="http://msdn.microsoft.com/en-us/library/system.windows.media.transform(VS.95).aspx">Transforms</a>.&nbsp; I&rsquo;m lazy and uncreative, so I will use a <a href="http://msdn.microsoft.com/en-us/library/system.windows.media.translatetransform(VS.95).aspx">TranslateTransform</a>, but the idea is the same even if you use a <a href="http://msdn.microsoft.com/en-us/library/system.windows.media.matrixtransform(VS.95).aspx">MatrixTransform</a>.</p>
<pre class="csharpcode">var bl = <span class="kwrd">new</span> TextBlock();
bl.Foreground = <span class="kwrd">new</span> SolidColorBrush(Colors.White);
bl.FontSize = 24.0;
bl.Text = <span class="str">"Hello Tile!"</span>;

bmp.Render(bl, <span class="kwrd">null</span>);

var tt = <span class="kwrd">new</span> TranslateTransform();
tt.X = 173 - logo.PixelWidth;
tt.Y = 173 - logo.PixelHeight;
          
bmp.Render(img, tt);
            
bmp.Invalidate();</pre>
<p>The fist thing I do is create a <a href="http://msdn.microsoft.com/en-us/library/system.windows.controls.textblock(VS.95).aspx">TextBlock</a>.&nbsp; This will allow me to style my text in any way I want.&nbsp; It gives me more flexibiltiy than setting the Tile&rsquo;s <a href="http://msdn.microsoft.com/en-us/library/microsoft.phone.shell.standardtiledata.backcontent(VS.92).aspx">BackContent</a>.&nbsp; We set a few properties to get the text to look the way we want it and push it into the bitmap by calling Render.&nbsp; Next we setup the transform.&nbsp; This is where we needed to know the size of the image we loaded.&nbsp; We push that into the bitmap calling Render and passing our transform.&nbsp; We then signal the Bitmap that it needs to redraw itself.&nbsp; (When all else fails, Invalidate the Bitmap <img style="border-style: none;" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/37/35/metablogapi/5353.wlEmoticon-smile_66058037.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-37-35-metablogapi/5353.wlEmoticon_2D00_smile_5F00_66058037.png" />).</p>
<p>Next is a little bit of complexity with IsolatedStorage.&nbsp; In addition to providing local storage for our application, on the Phone, IsolatedStorage <a href="http://msdn.microsoft.com/en-us/library/ff402541(VS.92).aspx">has some shared areas</a>.&nbsp; Specifically, the Shared/ShellContent section.&nbsp; We need to store our Bitmap in this area in order to be used by a Tile.</p>
<pre class="csharpcode"><span class="kwrd">using</span> (var store = IsolatedStorageFile.GetUserStoreForApplication())
{
    var filename = <span class="str">"/Shared/ShellContent/testtile.jpg"</span>;
    <span class="kwrd">using</span> (var st = <span class="kwrd">new</span> IsolatedStorageFileStream(filename, FileMode.Create, FileAccess.Write, store))
    {
        bmp.SaveJpeg(st, 173, 173, 0, 100);
    }
}</pre>
<p>It&rsquo;s not hard to do that .. we just do the standard IsolatedStorage process and use our <a href="http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.extensions_methods(VS.92).aspx">Media Extension Methods</a> to save off our JPEG.&nbsp; If you run this, you can now see, using the <a href="http://msdn.microsoft.com/en-us/library/hh286408(VS.92).aspx">IsolatedStorage Explorer Tool</a> that our JPEG is in the correct place to be used by our Live Tile.&nbsp; <strong>NB: A Live Tile cannot access an application&rsquo;s IsolatedStorage!</strong></p>
<p>Last but not least, we build our Tile &hellip;</p>
<pre class="csharpcode">var tile = <span class="kwrd">new</span> StandardTileData();

tile.BackgroundImage = <span class="kwrd">new</span> Uri(<span class="str">"isostore:/Shared/ShellContent/testtile.jpg"</span>, <br />                                                              UriKind.Absolute);
tile.BackTitle = <span class="str">"Back"</span>;

ShellTile.Create(<span class="kwrd">new</span> Uri(<span class="str">"/MainPage.xaml?DefaultTitle=FromSecondaryTile"</span>, <br />                                                            UriKind.Relative), tile ); </pre>
<p>You will note that we need to use the isostore <a href="http://msdn.microsoft.com/en-us/library/system.uri.scheme(VS.95).aspx">URI scheme</a> to access the data in the shared locations.&nbsp; The URI in this case that the Tile is created with is the location within your app that will be launched when the Tile is clicked by the user.&nbsp; You will note that you can pass parameters if desired.</p>
<p>That&rsquo;s it &hellip; sorry about the goofyness of my Tile &hellip;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/37/35/metablogapi/1057.image_0CD39678.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-37-35-metablogapi/1057.image_5F00_0CD39678.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="My Goofy Tile" border="0" alt="My Goofy Tile" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/37/35/metablogapi/0572.image_thumb_45120D90.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-37-35-metablogapi/0572.image_5F00_thumb_5F00_45120D90.png" width="268" height="484" /></a></p>
<p>A little bit of complexity, but the trade-off is a lot of control over how your Live Tiles look.</p>]]></content:encoded>
    </item>
    <item>
      <title>Hello Windows Phone OS (codenamed “Mango”)</title>
      <link>https://docs.microsoft.com/archive/blogs/johnalioto/hello-windows-phone-os-codenamed-mango</link>
      <pubDate>Wed, 13 Apr 2011 10:08:00 GMT</pubDate>
      <dc:creator><![CDATA[jpalioto]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/johnalioto/2011/04/13/hello-windows-phone-os-codenamed-mango/</guid>
      <description><![CDATA[Perhaps you&rsquo;ve heard already about Windows Phone OS (codenamed &ldquo;Mango&rdquo;)?&nbsp;...]]></description>
      <content:encoded><![CDATA[<p class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt"><span style="font-family: Calibri; color: #000000;"><span style="font-size: 11pt;">Perhaps </span></span><span style="font-size: 11pt;"><a href="http://live.visitmix.com/" style="cursor: auto"><span style="font-family: Calibri; color: #0000ff;"><span style="text-decoration: underline;">you&rsquo;ve heard already</span></span></a></span><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"> about Windows Phone OS (codenamed &ldquo;Mango&rdquo;)?<span style="mso-spacerun: yes">&nbsp; </span>Here is a list of some of my favorite great new features of the update.<br /></span></span></p>
<p class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"></span></span></p>
<p class="MsoListParagraphCxSpFirst" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1"><span style="color: #000000;"><span style="font-family: ; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"><span style="mso-list: ignore"><span style="font-family: Symbol;"><span style="font-size: 11pt;">&middot;</span></span><span style="line-height: normal; font-family: "><span style="font-family: Times New Roman;"><span style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></span></span><span style="font-family: Calibri;"><span style="font-size: 11pt;">Windows Phone OS (codenamed &ldquo;Mango&rdquo;) <span style="mso-spacerun: yes">&nbsp;</span>is a free update for all Windows Phone 7 devices</span></span></span></p>
<p class="MsoListParagraphCxSpMiddle" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1"><span style="color: #000000;"><span style="font-family: ; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"><span style="mso-list: ignore"><span style="font-family: Symbol;"><span style="font-size: 11pt;">&middot;</span></span><span style="line-height: normal; font-family: "><span style="font-family: Times New Roman;"><span style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></span></span><span style="font-family: Calibri;"><span style="font-size: 11pt;">It will have the IE9 browser to support HTML5 websites</span></span></span></p>
<p class="MsoListParagraphCxSpMiddle" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1"><span style="color: #000000;"><span style="font-family: ; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"><span style="mso-list: ignore"><span style="font-family: Symbol;"><span style="font-size: 11pt;">&middot;</span></span><span style="line-height: normal; font-family: "><span style="font-family: Times New Roman;"><span style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></span></span><span style="font-family: Calibri;"><span style="font-size: 11pt;">3<sup>rd</sup> party applications will now be able to take advantage of Multi-Tasking</span></span></span></p>
<p class="MsoListParagraphCxSpMiddle" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1"><span style="color: #000000;"><span style="font-family: ; mso-fareast-font-family: 'Courier New'"><span style="mso-list: ignore"><span style="font-family: Courier New;"><span style="font-size: 11pt;">o</span></span><span style="line-height: normal; font-family: "><span style="font-family: Times New Roman;"><span style="font-size: 7pt;">&nbsp;&nbsp; </span></span></span></span></span><span style="font-family: Calibri;"><span style="font-size: 11pt;">Fast application resume: Subject to memory pressure, applications may not be tombstoned when deactivated and will stay in memory.<span style="mso-spacerun: yes">&nbsp; </span>This will allow the application to come back to the foreground much more quickly than before (no need to load state from durable storage)</span></span></span></p>
<p class="MsoListParagraphCxSpMiddle" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1"><span style="color: #000000;"><span style="font-family: ; mso-fareast-font-family: 'Courier New'"><span style="mso-list: ignore"><span style="font-family: Courier New;"><span style="font-size: 11pt;">o</span></span><span style="line-height: normal; font-family: "><span style="font-family: Times New Roman;"><span style="font-size: 7pt;">&nbsp;&nbsp; </span></span></span></span></span><span style="font-family: Calibri;"><span style="font-size: 11pt;">Background Audio: A system service that will allow applications to queue up audio to be played in the background.</span></span></span></p>
<p class="MsoListParagraphCxSpMiddle" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1"><span style="color: #000000;"><span style="font-family: ; mso-fareast-font-family: 'Courier New'"><span style="mso-list: ignore"><span style="font-family: Courier New;"><span style="font-size: 11pt;">o</span></span><span style="line-height: normal; font-family: "><span style="font-family: Times New Roman;"><span style="font-size: 7pt;">&nbsp;&nbsp; </span></span></span></span></span><span style="font-family: Calibri;"><span style="font-size: 11pt;">Notifications: Applications will be able to queue up </span></span></span></p>
<p class="MsoListParagraphCxSpMiddle" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 0pt 1.5in; mso-add-space: auto; mso-list: l0 level3 lfo1"><span style="color: #000000;"><span style="font-family: ; mso-fareast-font-family: wingdings; mso-bidi-font-family: wingdings"><span style="mso-list: ignore"><span style="font-family: Wingdings;"><span style="font-size: 11pt;">&sect;</span></span><span style="line-height: normal; font-family: "><span style="font-family: Times New Roman;"><span style="font-size: 7pt;">&nbsp; </span></span></span></span></span><span style="font-family: Calibri;"><span style="font-size: 11pt;">Alarms; and,</span></span></span></p>
<p class="MsoListParagraphCxSpMiddle" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 0pt 1.5in; mso-add-space: auto; mso-list: l0 level3 lfo1"><span style="color: #000000;"><span style="font-family: ; mso-fareast-font-family: wingdings; mso-bidi-font-family: wingdings"><span style="mso-list: ignore"><span style="font-family: Wingdings;"><span style="font-size: 11pt;">&sect;</span></span><span style="line-height: normal; font-family: "><span style="font-family: Times New Roman;"><span style="font-size: 7pt;">&nbsp; </span></span></span></span></span><span style="font-family: Calibri;"><span style="font-size: 11pt;">Reminders</span></span></span></p>
<p class="MsoListParagraphCxSpMiddle" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1"><span style="color: #000000;"><span style="font-family: ; mso-fareast-font-family: 'Courier New'"><span style="mso-list: ignore"><span style="font-family: Courier New;"><span style="font-size: 11pt;">o</span></span><span style="line-height: normal; font-family: "><span style="font-family: Times New Roman;"><span style="font-size: 7pt;">&nbsp;&nbsp; </span></span></span></span></span><span style="font-family: Calibri;"><span style="font-size: 11pt;">Background Transfer: Applications will be able to upload or download data in the background and receive transfer status to notify the user.</span></span></span></p>
<p class="MsoListParagraphCxSpMiddle" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1"><span style="color: #000000;"><span style="font-family: ; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"><span style="mso-list: ignore"><span style="font-family: Symbol;"><span style="font-size: 11pt;">&middot;</span></span><span style="line-height: normal; font-family: "><span style="font-family: Times New Roman;"><span style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></span></span><span style="font-family: Calibri;"><span style="font-size: 11pt;">Silverlight 4 is the runtime for Mango!</span></span></span></p>
<p class="MsoListParagraphCxSpMiddle" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1"><span style="color: #000000;"><span style="font-family: ; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"><span style="mso-list: ignore"><span style="font-family: Symbol;"><span style="font-size: 11pt;">&middot;</span></span><span style="line-height: normal; font-family: "><span style="font-family: Times New Roman;"><span style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></span></span><span style="font-family: Calibri;"><span style="font-size: 11pt;">XNA Silverlight Integration: Hybrid projects will afford 3D rendering for Silverlight developers and Silverlight controls for XNA developers.</span></span></span></p>
<p class="MsoListParagraphCxSpMiddle" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1"><span style="color: #000000;"><span style="font-family: ; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"><span style="mso-list: ignore"><span style="font-family: Symbol;"><span style="font-size: 11pt;">&middot;</span></span><span style="line-height: normal; font-family: "><span style="font-family: Times New Roman;"><span style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></span></span><span style="font-family: Calibri;"><span style="font-size: 11pt;">SQL CE is on the device and available for 3<sup>rd</sup> party applications!<span style="mso-spacerun: yes">&nbsp; </span>The LINQ programming model can be used.</span></span></span></p>
<p class="MsoListParagraphCxSpMiddle" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1"><span style="color: #000000;"><span style="font-family: ; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"><span style="mso-list: ignore"><span style="font-family: Symbol;"><span style="font-size: 11pt;">&middot;</span></span><span style="line-height: normal; font-family: "><span style="font-family: Times New Roman;"><span style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></span></span><span style="font-family: Calibri;"><span style="font-size: 11pt;">Sockets are available for phone to phone communication and P2P scenarios</span></span></span></p>
<p class="MsoListParagraphCxSpMiddle" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1"><span style="color: #000000;"><span style="font-family: ; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"><span style="mso-list: ignore"><span style="font-family: Symbol;"><span style="font-size: 11pt;">&middot;</span></span><span style="line-height: normal; font-family: "><span style="font-family: Times New Roman;"><span style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></span></span><span style="font-family: Calibri;"><span style="font-size: 11pt;">Camera</span></span></span></p>
<p class="MsoListParagraphCxSpMiddle" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1"><span style="color: #000000;"><span style="font-family: ; mso-fareast-font-family: 'Courier New'"><span style="mso-list: ignore"><span style="font-family: Courier New;"><span style="font-size: 11pt;">o</span></span><span style="line-height: normal; font-family: "><span style="font-family: Times New Roman;"><span style="font-size: 7pt;">&nbsp;&nbsp; </span></span></span></span></span><span style="font-family: Calibri;"><span style="font-size: 11pt;">Access to Full Camera Pipeline for augmented reality scenarios</span></span></span></p>
<p class="MsoListParagraphCxSpMiddle" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1"><span style="color: #000000;"><span style="font-family: ; mso-fareast-font-family: 'Courier New'"><span style="mso-list: ignore"><span style="font-family: Courier New;"><span style="font-size: 11pt;">o</span></span><span style="line-height: normal; font-family: "><span style="font-family: Times New Roman;"><span style="font-size: 7pt;">&nbsp;&nbsp; </span></span></span></span></span><span style="font-family: Calibri;"><span style="font-size: 11pt;">Independent control over flash for non-gimped flashlight apps!</span></span></span></p>
<p class="MsoListParagraphCxSpMiddle" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1"><span style="color: #000000;"><span style="font-family: ; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"><span style="mso-list: ignore"><span style="font-family: Symbol;"><span style="font-size: 11pt;">&middot;</span></span><span style="line-height: normal; font-family: "><span style="font-family: Times New Roman;"><span style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></span></span><span style="font-family: Calibri;"><span style="font-size: 11pt;">Sensors (APIs to detect presence of and use)</span></span></span></p>
<p class="MsoListParagraphCxSpMiddle" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1"><span style="color: #000000;"><span style="font-family: ; mso-fareast-font-family: 'Courier New'"><span style="mso-list: ignore"><span style="font-family: Courier New;"><span style="font-size: 11pt;">o</span></span><span style="line-height: normal; font-family: "><span style="font-family: Times New Roman;"><span style="font-size: 7pt;">&nbsp;&nbsp; </span></span></span></span></span><span style="font-family: Calibri;"><span style="font-size: 11pt;">Compass</span></span></span></p>
<p class="MsoListParagraphCxSpMiddle" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1"><span style="color: #000000;"><span style="font-family: ; mso-fareast-font-family: 'Courier New'"><span style="mso-list: ignore"><span style="font-family: Courier New;"><span style="font-size: 11pt;">o</span></span><span style="line-height: normal; font-family: "><span style="font-family: Times New Roman;"><span style="font-size: 7pt;">&nbsp;&nbsp; </span></span></span></span></span><span style="font-family: Calibri;"><span style="font-size: 11pt;">Gyro </span></span></span></p>
<p class="MsoListParagraphCxSpMiddle" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1"><span style="color: #000000;"><span style="font-family: ; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"><span style="mso-list: ignore"><span style="font-family: Symbol;"><span style="font-size: 11pt;">&middot;</span></span><span style="line-height: normal; font-family: "><span style="font-family: Times New Roman;"><span style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></span></span><span style="font-family: Calibri;"><span style="font-size: 11pt;">Spatial Framework will do some of the math for you! (Unless you love DiffEqs like me </span></span><span style="font-size: 11pt;"><span style="font-family: ; mso-ascii-font-family: calibri; mso-ascii-theme-font: minor-latin; mso-hansi-font-family: calibri; mso-hansi-theme-font: minor-latin; mso-char-type: symbol; mso-symbol-font-family: wingdings"><span style="mso-char-type: symbol; mso-symbol-font-family: wingdings"><span style="font-family: Wingdings;">J</span></span></span></span><span style="font-family: Calibri;"><span style="font-size: 11pt;">)</span></span></span></p>
<p class="MsoListParagraphCxSpMiddle" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1"><span style="color: #000000;"><span style="font-family: ; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"><span style="mso-list: ignore"><span style="font-family: Symbol;"><span style="font-size: 11pt;">&middot;</span></span><span style="line-height: normal; font-family: "><span style="font-family: Times New Roman;"><span style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></span></span><span style="font-family: Calibri;"><span style="font-size: 11pt;">Phone Data</span></span></span></p>
<p class="MsoListParagraphCxSpMiddle" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1"><span style="color: #000000;"><span style="font-family: ; mso-fareast-font-family: 'Courier New'"><span style="mso-list: ignore"><span style="font-family: Courier New;"><span style="font-size: 11pt;">o</span></span><span style="line-height: normal; font-family: "><span style="font-family: Times New Roman;"><span style="font-size: 7pt;">&nbsp;&nbsp; </span></span></span></span></span><span style="font-family: Calibri;"><span style="font-size: 11pt;">Contacts</span></span></span></p>
<p class="MsoListParagraphCxSpMiddle" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1"><span style="color: #000000;"><span style="font-family: ; mso-fareast-font-family: 'Courier New'"><span style="mso-list: ignore"><span style="font-family: Courier New;"><span style="font-size: 11pt;">o</span></span><span style="line-height: normal; font-family: "><span style="font-family: Times New Roman;"><span style="font-size: 7pt;">&nbsp;&nbsp; </span></span></span></span></span><span style="font-family: Calibri;"><span style="font-size: 11pt;">Calendar</span></span></span></p>
<p class="MsoListParagraphCxSpMiddle" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1"><span style="color: #000000;"><span style="font-family: ; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"><span style="mso-list: ignore"><span style="font-family: Symbol;"><span style="font-size: 11pt;">&middot;</span></span><span style="line-height: normal; font-family: "><span style="font-family: Times New Roman;"><span style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></span></span><span style="font-family: Calibri;"><span style="font-size: 11pt;">Launchers &amp; Choosers</span></span></span></p>
<p class="MsoListParagraphCxSpMiddle" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1"><span style="color: #000000;"><span style="font-family: ; mso-fareast-font-family: 'Courier New'"><span style="mso-list: ignore"><span style="font-family: Courier New;"><span style="font-size: 11pt;">o</span></span><span style="line-height: normal; font-family: "><span style="font-family: Times New Roman;"><span style="font-size: 7pt;">&nbsp;&nbsp; </span></span></span></span></span><span style="font-family: Calibri;"><span style="font-size: 11pt;">Bing Maps</span></span></span></p>
<p class="MsoListParagraphCxSpMiddle" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1"><span style="color: #000000;"><span style="font-family: ; mso-fareast-font-family: 'Courier New'"><span style="mso-list: ignore"><span style="font-family: Courier New;"><span style="font-size: 11pt;">o</span></span><span style="line-height: normal; font-family: "><span style="font-family: Times New Roman;"><span style="font-size: 7pt;">&nbsp;&nbsp; </span></span></span></span></span><span style="font-family: Calibri;"><span style="font-size: 11pt;">Email</span></span></span></p>
<p class="MsoListParagraphCxSpMiddle" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1"><span style="color: #000000;"><span style="font-family: ; mso-fareast-font-family: 'Courier New'"><span style="mso-list: ignore"><span style="font-family: Courier New;"><span style="font-size: 11pt;">o</span></span><span style="line-height: normal; font-family: "><span style="font-family: Times New Roman;"><span style="font-size: 7pt;">&nbsp;&nbsp; </span></span></span></span></span><span style="font-family: Calibri;"><span style="font-size: 11pt;">Phone Number </span></span></span></p>
<p class="MsoListParagraphCxSpMiddle" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1"><span style="color: #000000;"><span style="font-family: ; mso-fareast-font-family: 'Courier New'"><span style="mso-list: ignore"><span style="font-family: Courier New;"><span style="font-size: 11pt;">o</span></span><span style="line-height: normal; font-family: "><span style="font-family: Times New Roman;"><span style="font-size: 7pt;">&nbsp;&nbsp; </span></span></span></span></span><span style="font-family: Calibri;"><span style="font-size: 11pt;">Address Chooser</span></span></span></p>
<p class="MsoListParagraphCxSpMiddle" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1"><span style="color: #000000;"><span style="font-family: ; mso-fareast-font-family: 'Courier New'"><span style="mso-list: ignore"><span style="font-family: Courier New;"><span style="font-size: 11pt;">o</span></span><span style="line-height: normal; font-family: "><span style="font-family: Times New Roman;"><span style="font-size: 7pt;">&nbsp;&nbsp; </span></span></span></span></span><span style="font-family: Calibri;"><span style="font-size: 11pt;">Save Calendar</span></span></span></p>
<p class="MsoListParagraphCxSpMiddle" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1"><span style="color: #000000;"><span style="font-family: ; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"><span style="mso-list: ignore"><span style="font-family: Symbol;"><span style="font-size: 11pt;">&middot;</span></span><span style="line-height: normal; font-family: "><span style="font-family: Times New Roman;"><span style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></span></span><span style="font-family: Calibri;"><span style="font-size: 11pt;">Tiles</span></span></span></p>
<p class="MsoListParagraphCxSpMiddle" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1"><span style="color: #000000;"><span style="font-family: ; mso-fareast-font-family: 'Courier New'"><span style="mso-list: ignore"><span style="font-family: Courier New;"><span style="font-size: 11pt;">o</span></span><span style="line-height: normal; font-family: "><span style="font-family: Times New Roman;"><span style="font-size: 7pt;">&nbsp;&nbsp; </span></span></span></span></span><span style="font-family: Calibri;"><span style="font-size: 11pt;">Update back of tile</span></span></span></p>
<p class="MsoListParagraphCxSpMiddle" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 0pt 1in; mso-add-space: auto; mso-list: l0 level2 lfo1"><span style="color: #000000;"><span style="font-family: ; mso-fareast-font-family: 'Courier New'"><span style="mso-list: ignore"><span style="font-family: Courier New;"><span style="font-size: 11pt;">o</span></span><span style="line-height: normal; font-family: "><span style="font-family: Times New Roman;"><span style="font-size: 7pt;">&nbsp;&nbsp; </span></span></span></span></span><span style="font-family: Calibri;"><span style="font-size: 11pt;">Multiple Tiles</span></span></span></p>
<p class="MsoListParagraphCxSpMiddle" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1"><span style="color: #000000;"><span style="font-family: ; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"><span style="mso-list: ignore"><span style="font-family: Symbol;"><span style="font-size: 11pt;">&middot;</span></span><span style="line-height: normal; font-family: "><span style="font-family: Times New Roman;"><span style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></span></span><span style="font-family: Calibri;"><span style="font-size: 11pt;">DP/Crypto API will be available to securely store keys!</span></span></span></p>
<p class="MsoListParagraphCxSpMiddle" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1"><span style="color: #000000;"><span style="font-family: ; mso-fareast-font-family: symbol; mso-bidi-font-family: symbol"><span style="mso-list: ignore"><span style="font-family: Symbol;"><span style="font-size: 11pt;">&middot;</span></span><span style="line-height: normal; font-family: "><span style="font-family: Times New Roman;"><span style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span></span></span><span style="font-family: Calibri;"><span style="font-size: 11pt;">Performance improvements that will benefit existing applications!</span></span></span></p>
<p class="MsoListParagraphCxSpMiddle" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1"><span style="color: #000000;"><span style="font-family: Calibri;"><span style="font-size: 11pt;"></span></span></span></p>
<p class="MsoListParagraphCxSpMiddle" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1"><span style="color: #000000;"><span style="font-family: Calibri;"><span style="font-size: 11pt;"><br />There are updated tools features as well.&nbsp; We will be seeing a profiler, an enhanced emulator (including being able to simulate sensors and multi-touch) and more.&nbsp; Look for the tools to be available in May!&nbsp; Watch this space as there will be much more to come on Mango.&nbsp; I&rsquo;ll be going into scenarios, new developer tools, APIs and showing some code.</span></span></span></p>
<p class="MsoListParagraph" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 10pt 0.5in; mso-list: l0 level1 lfo1"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"></span></span></p>]]></content:encoded>
    </item>
    <item>
      <title>Windows 7 slate PCs Part 3</title>
      <link>https://docs.microsoft.com/archive/blogs/johnalioto/windows-7-slate-pcs-part-3</link>
      <pubDate>Tue, 22 Mar 2011 09:40:29 GMT</pubDate>
      <dc:creator><![CDATA[jpalioto]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/johnalioto/2011/03/22/windows-7-slate-pcs-part-3/</guid>
      <description><![CDATA[Last time I gave some specific guidance on&#160; Dynamic objects, OAuth and HttpWebRequest versus...]]></description>
      <content:encoded><![CDATA[<p><a href="http://blogs.msdn.com/b/johnalioto/archive/2011/03/18/10143196.aspx">Last time</a> I gave some specific guidance on&#160; Dynamic objects, OAuth and HttpWebRequest versus WebClient.&#160; This time, I’ve got a hodge podge of different topics for you!</p>  <p><strong>NB: Code presented here is of example quality only. Please don’t cut and paste this code into your solution. Proper error handling, logging and graceful failures are not included.</strong></p>  <p><u>Remote Debugging (Dev)</u></p>  <p>You may want to have a remote debugging session with a slate. Since most slates have Windows 7 Home Premium installed, Visual Studio might tell you that it is “not supported on this version of Windows”. To get around this, execute <a href="http://msdn.microsoft.com/en-us/library/bt727f1t.aspx">msvsmon</a> using the /noauth and /anyuser flags. Warning: Do this behind a firewall only! “/noauth” means no authentication!</p>  <p><u>Registry Access (Design, Dev)</u></p>  <p>You can read and write the registry from a SLOOB, but not all hives are available.&#160; If you need to persist or read information out of the registry, the <a href="http://msdn.microsoft.com/en-us/library/aew9yb99(VS.85).aspx">WshShell object</a> hanging off the Windows Script Host (<a href="http://msdn.microsoft.com/en-us/library/at5ydy31(VS.85).aspx">WScript</a>) be used to accomplish this task.&#160; Remember, COM Interop requires elevated trust.&#160; Here is a code example …</p>  <p>&#160;</p>  <div id="codeSnippetWrapper">   <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier 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"><span style="color: #0000ff">using</span> (dynamic WShell = AutomationFactory.CreateObject(<span style="color: #006080">&quot;WScript.Shell&quot;</span>))<br />{<br />    WShell.RegWrite(<span style="color: #006080">@&quot;HKCU\Software\Foo\Bar&quot;</span>, Guid.NewGuid().ToString());<br />    var reg = WShell.RegRead(<span style="color: #006080">@&quot;HKCU\Software\Foo\Bar&quot;</span>);<br />    MessageBox.Show(<span style="color: #006080">&quot;The GUID you wrote is: &quot;</span> + reg);<br />}</pre>

  <br /></div>

<p><u>Unique Device ID &amp; Hiding the Keys (Design)</u></p>

<p>There is no Unique Device ID for a Windows 7 slate PC.&#160; This is a <a href="http://stackoverflow.com/questions/3474940/unique-computer-id-c">well</a> <a href="http://stackoverflow.com/questions/1101772/win32-processoris-processorid-unique-for-all-computers">known</a>&#160;<a href="http://stackoverflow.com/questions/1308956/get-unique-system-identifiers-in-c">issue</a>.&#160; Every time Intel tries to solve the problem, they get such bad press that they have to do <a href="http://blogs.intel.com/technology/2011/01/intel_insider_-_what_is_it_no.php">ridiculous tap dances</a> or they back off completely.&#160; It’s best to try and avoid this issue completely.&#160; If the need is to roll your own Digital Rights Management, don’t!&#160; Use an existing DRM technology like <a href="http://www.microsoft.com/playready/default.mspx">PlayReady</a>.&#160; If it does not need to survive an OS re-install, you can use the above approach to write a GUID into the Registry and be done with it.</p>

<p>If you must have a Unique Device ID and you cannot design around it, you can consider using several elements of the hardware through COM Interop using <a href="http://msdn.microsoft.com/en-us/library/aa394582(VS.85).aspx">WMI.</a> This is quasi-unique at best and might change over time if hardware is replaced. I advise against it, but here is some code for the truly desperate:</p>

<p>&#160;</p>

<div id="codeSnippetWrapper">
  <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier 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"><span style="color: #0000ff">using</span> (dynamic loc = AutomationFactory.CreateObject(<span style="color: #006080">&quot;WbemScripting.SWbemLocator&quot;</span>))<br />{<br />    loc.Security_.ImpersonationLevel = 3;<br />    loc.Security_.AuthenticationLevel = 4;<br />    dynamic IService = loc.ConnectServer(<span style="color: #006080">&quot;.&quot;</span>, <span style="color: #006080">@&quot;root\cimv2&quot;</span>);<br /><br />    dynamic query = IService.ExecQuery(<span style="color: #006080">&quot;select * from Win32_Processor&quot;</span>);<br />    var procid = query.ItemIndex(0).ProcessorId[0];<br /><br />    query = IService.ExecQuery(<span style="color: #006080">&quot;select * from Win32_BaseBoard&quot;</span>);<br />    var serial = query.ItemIndex(0).SerialNumber[0];<br />}</pre>

  <br /></div>



<p><b>Gotcha:</b> Some manufacturers will not put Serial Numbers or ID on their devices, so make sure you take a good cross section of different hardware elements in order to put together your unique representation (i.e. combine IDs and Serial Numbers from 4 or 5 different pieces of hardware and expect some to be null).</p>

<p>There is no access to the DPAPI from a SLOOB. There is no way to completely protect a key without asking either the user or a web service for a secret.&#160;&#160; This will change in <a href="http://www.microsoft.com/silverlight/future/">Silverlight 5</a> as P/Invoke will be available to access the DPAPI.</p>

<p><b>Gotcha</b>: If you store an authentication token and a key on the Windows 7 slate PC, there is the potential for the user to be impersonated if the PC is compromised. The implications of potential user impersonation should be thought through before an authentication token is stored locally.</p>

<p>That it for the series.&#160; I hope you enjoyed it!&#160; The Windows 7 slate PCs are cool devices and fun to design and develop for.&#160; If you have one, check out the <a href="http://www.flickr.com/windows7">Flickr app</a>!</p>]]></content:encoded>
    </item>
    <item>
      <title>Windows 7 slate PCs Part 2</title>
      <link>https://docs.microsoft.com/archive/blogs/johnalioto/windows-7-slate-pcs-part-2</link>
      <pubDate>Fri, 18 Mar 2011 10:42:18 GMT</pubDate>
      <dc:creator><![CDATA[jpalioto]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/johnalioto/2011/03/18/windows-7-slate-pcs-part-2/</guid>
      <description><![CDATA[Last time, I gave some motivation and context for this series and discussed a couple of...]]></description>
      <content:encoded><![CDATA[<p><a href="http://blogs.msdn.com/b/johnalioto/archive/2011/03/16/10142164.aspx" target="_blank">Last time</a>, I gave some motivation and context for this series and discussed a couple of topics.&#160; This time, we will look at identifying the user (Authentication) using&#160; OAuth and calling web services using <a href="http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.aspx" target="_blank">HttpWebRequest</a>.</p>  <p><strong>NB: Code presented here is of example quality only. Please don’t cut and paste this code into your solution. Proper error handling, logging and graceful failures are not included.</strong></p>  <p><u>Note on Dynamic</u></p>  <p>Many of the examples I will show use the <a href="http://msdn.microsoft.com/en-us/library/dd264736.aspx" target="_blank">dynamic keyword</a>.&#160; You can use the dynamic keyword in a SLOOB. In order to do this, reference the Microsoft.CSharp assembly. This is very helpful for COM Interop.</p>  <p><u>OAuth</u></p>  <p>If you’re not familiar with <a href="http://oauth.net/" target="_blank">OAuth</a>, it is a secure, open protocol to perform Authentication (user identification).&#160; Popular services like <a href="http://developers.facebook.com/docs/authentication/" target="_blank">Facebook</a> and <a href="http://dev.twitter.com/pages/oauth_faq" target="_blank">Twitter</a> use OAuth to authenticate users.&#160; If you’re planning on using one of these services in your application (and let’s face it, you should be), you will need to use OAuth.</p>  <p>There are two methodologies for doing OAuth from a SLOOB.&#160; Both involve the server-side.&#160; Cross-domain calls from a SLOOB are verboten.&#160; You have to use the server-side.&#160; Methodology #1 is a web services approach.&#160; Your client calls back to a service you provide.&#160; The OAuth process looks like this:</p>  <p>1. The SLOOB sends a request to the OAuth provider (Twitter, Facebook, whatever).&#160; The response is an auth token that is used to generate a URL.    <br />2. The client displays the contents of the URL to the user wherein the user is prompted to provide credentials.     <br />3. The OAuth provider gives the user a code.    <br />4. The user provides the code to the SLOOB.    <br />5. The SLOOB calls the OAuth provider informing it that it needs an access token and provides the auth token from step #1.&#160; The SLOOB passes the     <br />&#160;&#160;&#160; auth token and the code from step #3 to the OAuth Provider.     <br />6. The OAuth provider returns an access token used to access the service.</p>  <p>In order to accomplish this process, you need to sign your application with the OAuth provider (<a href="https://twitter.com/oauth_clients" target="_blank">here’s Twitter’s page for example</a>).&#160; You will get an app id that you need to provide to the OAuth provider during your request back and forth.</p>  <p>There is some good <a href="http://archive.msdn.microsoft.com/fshipsaassource" target="_blank">source code</a> you can check out for OAuth on the <a href="http://www.fabrikamshipping.com/" target="_blank">Fabrikam Shipping SaaS demo</a>.</p>  <p>There is another approach you can take that is a little easier.&#160; This approach involves an embedded web browser control is hosted by the SLOOB is used to display an authentication web page. (Bringing up a separate browser for this purpose is less effective and a worse experience for your user). If the user provides correct credentials, she will be redirected to a page provided by the SLOOB to the OAuth provider – a successful login page. The login success page is created, hosted and maintained by you, the SLOOB publisher. This will be a simple page that will use ECMAScript to notify the SLOOB of the auth token granted by the service. For example, assuming the token (or the secret needed to get the token) is in the URL, success.htm might 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">   <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier 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">&lt;html&gt;<br />  &lt;head&gt;<br />    &lt;title&gt;OAuth Login Callback&lt;/title&gt;<br />    &lt;script type=<span style="color: #006080">&quot;text/javascript&quot;</span>&gt;<br />      window.external.notify(window.location.href);<br />    &lt;/script&gt;<br />  &lt;/head&gt;<br />  &lt;body /&gt;<br />&lt;/html&gt;</pre>

  <br /></div>

<p><b>Gotcha</b>: This page must originate from the same domain as the SLOOB (also called the “site of origin”). If the user installed the application from the foo.org domain (or provided the foo.org with the /origin switch for a command line install), the page with the ECMAScript must be hosted on the foo.org domain. If it is not, a cross-site scripting exception will be thrown by Silverlight.&#160; This page should be accessed using transport level security (SSL). </p>

<p><b>Gotcha</b>: If the SLOOB that wants to do OAuth is installed from the command line, the /origin switch must be used to indicate a site of origin. </p>

<p>Once this page is visited, a <a href="http://msdn.microsoft.com/en-us/library/system.windows.controls.webbrowser.scriptnotify(VS.95).aspx" target="_blank">ScriptNotify</a> event will be raised and can be caught by the SLOOB.&#160; The SLOOB can extract the access token from the arguments passed to ScriptNotify.&#160; Check out <a href="http://www.youpvp.com/blog/post/Implementing-Facebook-authentication-in-a-Silverlight-out-of-browser-application.aspx" target="_blank">this article</a> describing that process and a good description of some pitfalls.</p>

<p><u>HttpWebRequest v.s. WebClient (Dev)</u> 

  <br />

  <br />When accessing RESTful back-end services from a SLOOB, there are a couple of choices you can make as to how you will code the access.&#160; You can use the <a href="http://msdn.microsoft.com/en-us/library/system.net.webclient(VS.95).aspx">WebClient class</a> or you can use the <a href="http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest(VS.95).aspx">HttpWebRequest</a>.&#160; In general, the WebClient is easier to code against and offers more built-in functionality than the HttpWebRequest.&#160; But, there is one very significant difference that often goes overlooked.</p>

<p><strong>The </strong><a href="http://msdn.microsoft.com/en-us/library/system.net.webclient(VS.95).aspx"><strong>WebClient class</strong></a><strong> returns its data on the UI thread whereas </strong><a href="http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest(VS.95).aspx"><strong>HttpWebRequest</strong></a><strong> does not!</strong></p>

<p>You will get better UI performance for multiple or long downloads if you use HttpWebRequest. </p>

<p><b>Gotcha</b>: (code from a sample SLOOB showing the requirement for marshaling)</p>

<div id="codeSnippetWrapper">
  <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier 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"><span style="color: #0000ff">private</span> <span style="color: #0000ff">void</span> button1_Click(<span style="color: #0000ff">object</span> sender, RoutedEventArgs e)<br />{<br />    var cli = <span style="color: #0000ff">new</span> WebClient();<br />    cli.DownloadStringCompleted += (s,dceh) =&gt; { UpdateUI(); };<br />    cli.DownloadStringAsync(<span style="color: #0000ff">new</span> Uri(<span style="color: #006080">@&quot;http://www.bing.com/&quot;</span>, UriKind.Absolute));<br />}<br /> <br /><span style="color: #0000ff">private</span> <span style="color: #0000ff">void</span> button2_Click(<span style="color: #0000ff">object</span> sender, RoutedEventArgs e)<br />{<br />    var cli = HttpWebRequest.Create(<span style="color: #0000ff">new</span> Uri(<span style="color: #006080">@&quot;http://www.bing.com/&quot;</span>, UriKind.Absolute)) <span style="color: #0000ff">as</span> HttpWebRequest;<br />    cli.BeginGetResponse( ia =&gt; UpdateUI(), <span style="color: #0000ff">null</span>);<br />}<br /> <br /><span style="color: #0000ff">private</span> <span style="color: #0000ff">void</span> UpdateUI()<br />{<br />    <span style="color: #0000ff">if</span> (textBlock1.CheckAccess())<br />    {<br />        textBlock1.Text = <span style="color: #006080">&quot;no marshal&quot;</span>;<br />    }<br />    <span style="color: #0000ff">else</span><br />    {<br />        <span style="color: #0000ff">this</span>.Dispatcher.BeginInvoke(() =&gt; { textBlock1.Text = <span style="color: #006080">&quot;marshal&quot;</span>; });<br />    }<br />}</pre>

  <br /></div>

<p>If you’re wondering why WebClient is blocking your UI, the answer is that it’s designed to do that to spare you the “trouble” of cross thread marshaling.&#160; On the flip side …</p>

<p><b>Gotcha:</b> It is more difficult to give determinant upload progress to your user when using the HttpWebRequest class.&#160; These events are built into the WebClient, but not into the HttpWebRequest.</p>

<p>Next time, we will look at some more esoteric (but no less important) topics and we will do some WMI! <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="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/37/35/metablogapi/0564.wlEmoticon-smile_46BBDB10.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-37-35-metablogapi/0564.wlEmoticon_2D00_smile_5F00_46BBDB10.png" /></p>]]></content:encoded>
    </item>
    <item>
      <title>Windows 7 slate PCs Part 1</title>
      <link>https://docs.microsoft.com/archive/blogs/johnalioto/windows-7-slate-pcs-part-1</link>
      <pubDate>Wed, 16 Mar 2011 10:16:52 GMT</pubDate>
      <dc:creator><![CDATA[jpalioto]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/johnalioto/2011/03/16/windows-7-slate-pcs-part-1/</guid>
      <description><![CDATA[I’ve been working on these things quite a bit …  &#160;  We call them “slates” … specifically...]]></description>
      <content:encoded><![CDATA[<p>I’ve been working on these things quite a bit …</p>  <p><a href="http://promos.asus.com/US/ASUS_EeeSlate/index.htm"><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="Asus EP121" border="0" alt="Asus EP121" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/37/35/metablogapi/5417.image_7869709E.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-37-35-metablogapi/5417.image_5F00_7869709E.png" width="131" height="118" /></a>&#160;<a href="http://www.dell.com/us/p/inspiron-duo/pd"><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="Dell Inspiron Duo" border="0" alt="Dell Inspiron Duo" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/37/35/metablogapi/1205.image_2C3166F0.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-37-35-metablogapi/1205.image_5F00_2C3166F0.png" width="145" height="101" /></a></p>  <p>We call them “slates” … specifically Windows 7 slate form factor PCs.&#160; They are pretty cool devices.&#160; I’ve worked on <a href="http://www.flickr.com/windows7">some projects</a> and there are others on <a href="http://www.microsoft.com/windows/product-scout/">Product Scout</a>.&#160; I’ve learned some tips and tricks architecting and developing for these devices, so I thought I’d share them here.&#160; This is not intended to be an exhaustive guide of how to design and build these applications. Instead, the intent is to give a set of considerations, hints and in some cases best practices that might not be immediately obvious, but should be planned for early in the design or development cycle of the project.&#160; (As you know, I’m not a designer, so I will not discuss anything regarding how your app. looks or how it functions from a UI perspective.&#160; That’s all up to you.)</p>  <p><strong>NB: Code presented here is of example quality only. Please don’t cut and paste this code into your solution. Proper error handling, logging and graceful failures are not included.</strong></p>  <p>Now for a definition …&#160; I write “slate”, I mean a touch enabled tablet or slate form factor Windows 7 PC like the <a href="http://promos.asus.com/US/ASUS_EeeSlate/index.htm">Asus EP121</a> or the <a href="http://www.dell.com/us/p/inspiron-duo/pd">Del Inspiron Duo</a>. In general, these devices are installed with Windows 7 Home Premium – I will assume that unless otherwise noted. I will also assume you are building a Silverlight 4 <a href="http://msdn.microsoft.com/en-us/library/dd550721(VS.95).aspx">out of the browser</a>, trusted application (SLOOB). </p>  <p>(Interjection here:&#160; I thought we would never get a better sounding acronym that <a href="http://msdn.microsoft.com/en-us/library/yf1d93sz(VS.71).aspx">GAC</a> (“gack!”) which is not to be confused with <a href="http://memory-alpha.org/wiki/Gagh">Gach</a>.&#160; But we did!&#160; Sloob takes the cake!)</p>  <p>If you have another scenario such as WPF or HTML5, the design notes may come in handy, the development notes less so. I am not trying to re-write articles from MSDN or provide in-depth detail on subjects. I will link relevant articles when more detail is required. I will call out “Gotchas” throughout.&#160; Gotchas can have an impact early in the project design, can easily be missed and may result in a great deal of rework.</p>  <p>I will cover the following topics in varying detail and in multiple parts.&#160; I will call out when a topic covers design as an alert.</p>  <p>Gestures and Multi-Touch (Design)    <br />Signing Your XAP (Design)     <br />OAuth (Design, Dev)     <br />Dynamic (Dev)     <br />HttpWebReqeust v.s. WebClient (Dev)     <br />Remote Debugging (Dev)     <br />Registry Access (Design, Dev)     <br />Unique Device ID &amp; Hiding Keys (Design)     <br /></p>  <p><u>Trust Me!</u></p>  <p>Silverlight applications generally run in a sandbox for security purposes (in or out of the browser). But sometimes, applications need access to more of the capabilities offered by the client.&#160; Silverlight 4 allows out of the browser applications to be configured the application to run in <a href="http://msdn.microsoft.com/en-us/library/ee721083(VS.95).aspx">elevated trust</a>. (Even more goodness is coming in <a href="http://www.microsoft.com/silverlight/future/">Silverlight 5</a>!) In general the projects I have done have made heavy use of <a href="http://msdn.microsoft.com/en-us/library/ee721083(VS.95).aspx#native_integration">native integration</a>.&#160; Running in elevated trust gets you pretty close to the power of the client, but access is not compete.&#160; If you need more access to the client that a SLOOB offers, you have to look toward WPF or Silverlight 5.</p>  <p><u>Gestures and Multi-Touch (Design)</u></p>  <p>There is a difference between multi-touch and gestures. This will affect your design and development. Multi-touch is the ability for touch sensitive hardware to treat multiple, concurrent touches as a single unit (sometimes called a “frame”). A gesture is a series of touches and drags that are combined together into a logical action. Common gestures are Rotate, Zoom, Pan, Flick, Two Finger Tap, Press and Tap, Press and Hold.</p>  <p><a href="http://msdn.microsoft.com/en-us/library/dd894494(VS.95).aspx">More about multi-touch and Silverlight</a>     <br /><a href="http://gallery.expression.microsoft.com/MultiTouch/">Multi-Touch Silverlight Demo</a>     <br /><a href="http://multitouch.codeplex.com/">Multi-Touch Samples</a></p>  <p>You must understand this difference!&#160; Multi-touch is supported natively in Silverlight 4, but gestures are not!&#160; If you want gestures, you have two choices: (1) you can create your own gesture library; or (2) you can use <a href="http://code.msdn.microsoft.com/nesl/Release/ProjectReleases.aspx?ReleaseId=5368">Native Extensions for Silverlight v2</a> (NESL).</p>  <p>(I have tried other gesture libraries, but did not have good success with them.&#160; If you are saying “hey what about _____”, put a comment on why you think _____ is a good gesture library for a SLOOB). </p>  <p>NESL exposes Windows 7 functionality via COM Automation. As such, only SL4 out of browser, elevated trust applications need apply. In addition to gestures, NESL exposes Sensors, Portable Devices, Speech, Taskbar and more. NESL must be deployed with your application. There is a deployment and installation discussion in the <a href="http://code.msdn.microsoft.com/nesl/Release/ProjectReleases.aspx?ReleaseId=5239">Dev Guide</a>.</p>  <p><b>Gotcha: </b>Installing COM components requires administrator level privileges. When the installer for NESL is run from your SL application, the user will be prompted by UAC to elevate their privileges. If the user is unable (not an admin) or unwilling (clicks cancel) to do so, the NESL install will fail. It is a design question whether or not you will allow the application to continue with reduced functionality after a NESL install failure.</p>  <p><b>Gotcha</b>: Silverlight in full-screen mode <a href="http://msdn.microsoft.com/en-us/library/cc189023(VS.95).aspx">does not support Multi-Touch</a>. If you require multi-touch or gestures, you cannot use full-screen mode. Your design should be specific about the Windows 7 taskbar in this case. There is no way to hide it, cover it or manipulate it. The user can have their taskbar on the bottom, top, left or right. It can be between 0 and 12 units high. Do not try and battle Windows 7 and your users’ preferences, you will lose.</p>  <p>If you chose to create your own gesture library, <a href="http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&amp;FamilyID=4b281bde-9b01-4890-b3d4-b3b45ca2c2e4">Microsoft Surface Manipulations and Inertia Sample for Microsoft Silverlight</a> is a good place to start. Make sure your project schedule has plenty of time for development and testing in this case. It will also be necessary to have a large sample of various devices as the digitizers on these devices tend to behave differently.</p>  <p>You will also need to understand how Windows 7 treats High DPI devices.&#160; To wit, the user can change the number of Dots Per Inch (DPI) shown on their screen. This is handled in the Display Control Panel. The goal is to have the user display their native resolution while still being able to make elements on the screen larger. A SLOOB can determine the user’s DPI setting by using the <a href="http://msdn.microsoft.com/en-us/library/system.windows.interop.content.zoomfactor(VS.95).aspx">ZoomFactor</a> property on the Content object.&#160; The user can also set a custom DPI size or choose to “Use Windows XP style DPI scaling”. SLOOBs are not marked as High DPI aware and I know of no way to do this. That means that if the chooses not to use Windows XP style DPI scaling, she will turn on <a href="http://www.mathies.com/weblog/?p=908">full DPI scaling for your application</a>.&#160; This needs to be dealt with in your UI design or your app will not look good and your gestures will not function properly.&#160; This tends to be a huge can of worms, so I recommend against writing your own gesture library at this time.</p>  <p><u>Signing Your XAP (Design)</u></p>  <p>The unit of deployment of a SLOOB is a <a href="http://msdn.microsoft.com/en-us/library/ff921170(PandP.20).aspx">XAP</a>. XAPs can be <a href="http://download.microsoft.com/download/C/D/5/CD5AAAE3-21F7-47A8-B7D5-39E36BAF9AC8/Silverlight_Deployment_Guide.docx">deployed via a web site or via command line</a> (docx link). When a user installs a SLOOB from a web site, she will be prompted with a Security Warning indicating that your application can potentially access their personal data and damage their computer. This is a typical Authenticode warning. If the XAP is signed with a certificate that can be verified by a Certificate Authority, the warning will indicate the name of the publisher. If the certificate cannot be verified, the user will be told that the publisher of the application is unverified.</p>  <p>A XAP can be self-signed (signed with a made up certificate) for development purposes, but should always be signed by a valid, verifiable, code-signing certificate for deployment. Code-signing certificates can be acquired through a certificate provider like VeriSign, Thwate, GoDaddy and others.</p>  <p><b>Gotcha:</b> A code-signing certificate is not the same as an SSL certificate. It can take time to acquire a code-signing certificate. If you do not have a code-signing certificate, the process of acquiring one should start at the beginning of the project as it is not a completely automated (there is human interaction in the process to verify your identity).</p>  <p><b>Gotcha:</b> In order to be automatically updated, an elevated trust SLOOB must be installed with a signed XAP. (Put another way, if you plan to use <a href="http://msdn.microsoft.com/en-us/library/system.windows.application.checkanddownloadupdateasync(VS.95).aspx">CheckAndDownloadUpdateAsync</a> from an elevated trust SLOOB, the XAP must be signed).</p>  <p><b>Gotcha</b>: If you deploy a self-signed XAP into production, be sure to understand the legal, corporate compliance, brand management and public relations impacts to that decision.</p>  <p><a href="http://johnpapa.net/silverlight/digitally-signing-a-xap-silverlight/">Good article on XAP signing.</a></p>  <p>Next time we will talk about OAuth and HttpWebRequest.</p>]]></content:encoded>
    </item>
    <item>
      <title>Access to Windows Phone 7 Camera Roll from a Silverlight App …</title>
      <link>https://docs.microsoft.com/archive/blogs/johnalioto/access-to-windows-phone-7-camera-roll-from-a-silverlight-app</link>
      <pubDate>Fri, 28 Jan 2011 13:56:09 GMT</pubDate>
      <dc:creator><![CDATA[jpalioto]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/johnalioto/2011/01/28/access-to-windows-phone-7-camera-roll-from-a-silverlight-app/</guid>
      <description><![CDATA[Or “Why is my RootPictureAlbum null?”  Download the code for this example.  In order to get...]]></description>
      <content:encoded><![CDATA[<p>Or “Why is my RootPictureAlbum null?”</p>  <p><a href="http://cid-f9be77032bf61bbf.office.live.com/self.aspx/.Public/Source/MediaLibs.zip" target="_blank">Download the code for this example</a>.</p>  <p>In order to get programmatic access to the available media libraries on Windows Phone 7, you need to use some XNA libraries even in a Silverlight application.&#160; I will give an example of how to use legal APIs from XNA.&#160; I will also utilize the <a href="http://msdn.microsoft.com/en-us/library/gg180729(VS.92).aspx" target="_blank">WP Connect tool</a> that was part of the <a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=49b9d0c5-6597-4313-912a-f0cca9c7d277" target="_blank">October 2010 Update</a> to the <a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=04704acf-a63a-4f97-952c-8b51b34b00ce&amp;displaylang=en" target="_blank">Developer Tools</a> to test my application on a WP7 device.</p>  <p>The fist thing to do is <a href="https://channel9.msdn.com/Learn/Courses/WP7TrainingKit/WP7Silverlight" target="_blank">create a blank Windows Phone 7 application</a>. Add a reference to the Microsoft.Xna.Framework assembly to that application.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/37/35/metablogapi/2337.image_4FE22002.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-37-35-metablogapi/2337.image_5F00_4FE22002.png"><img style="background-image: none; border-right-width: 0px; margin: ; 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="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/37/35/metablogapi/6560.image_thumb_1586AA21.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-37-35-metablogapi/6560.image_5F00_thumb_5F00_1586AA21.png" width="593" height="343" /></a></p>  <p>This is not a a violation of the <a href="http://go.microsoft.com/?linkid=9730558" target="_blank">Certification Requirements</a>.&#160; As of this writing, section 4.2.5 of the Certification Requirements forbids calling APIs in Microsoft.Xna.Framework.Game or Microsoft.Xna.Framework.Graphics.&#160; We will be using <a href="http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.media.aspx" target="_blank">Microsoft.Xna.Framework.Media</a> only.</p>  <p>I’ve just created a toy example to do this, but it is sufficient for our purposes here.&#160; I should note that this application <strong>will not</strong> work in the Emulator.&#160; You have to have a device to run it.&#160; Here’s what it looks like …</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/37/35/metablogapi/1185.image_68FD7A3A.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-37-35-metablogapi/1185.image_5F00_68FD7A3A.png"><img style="background-image: none; border-right-width: 0px; margin: ; 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="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/37/35/metablogapi/1273.image_thumb_6C9B9517.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-37-35-metablogapi/1273.image_5F00_thumb_5F00_6C9B9517.png" width="209" height="345" /></a></p>  <p>The relevant XAML to create such a beautiful test app is …</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">&lt;Grid x:Name=<span style="color: #006080">&quot;LayoutRoot&quot;</span> Background=<span style="color: #006080">&quot;Transparent&quot;</span>&gt;</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">    &lt;Grid.RowDefinitions&gt;</pre>
<!--CRLF-->

    <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">        &lt;RowDefinition Height=<span style="color: #006080">&quot;Auto&quot;</span>/&gt;</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">        &lt;RowDefinition Height=<span style="color: #006080">&quot;*&quot;</span>/&gt;</pre>
<!--CRLF-->

    <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">    &lt;/Grid.RowDefinitions&gt;</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier 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>
<!--CRLF-->

    <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">    &lt;!--TitlePanel contains the name of the application and page title--&gt;</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">    &lt;StackPanel x:Name=<span style="color: #006080">&quot;TitlePanel&quot;</span> Grid.Row=<span style="color: #006080">&quot;0&quot;</span> Margin=<span style="color: #006080">&quot;12,17,0,28&quot;</span>&gt;</pre>
<!--CRLF-->

    <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">        &lt;TextBlock x:Name=<span style="color: #006080">&quot;ApplicationTitle&quot;</span> Text=<span style="color: #006080">&quot;Media Libraries Sample&quot;</span> Style=<span style="color: #006080">&quot;{StaticResource PhoneTextNormalStyle}&quot;</span>/&gt;</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">        &lt;Button Height=<span style="color: #006080">&quot;100&quot;</span> Content=<span style="color: #006080">&quot;Go&quot;</span> Click=<span style="color: #006080">&quot;Button_Click&quot;</span> /&gt;</pre>
<!--CRLF-->

    <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">    &lt;/StackPanel&gt;</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier 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>
<!--CRLF-->

    <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">    &lt;!--ContentPanel - place additional content here--&gt;</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">    &lt;Grid x:Name=<span style="color: #006080">&quot;ContentPanel&quot;</span> Grid.Row=<span style="color: #006080">&quot;1&quot;</span> Margin=<span style="color: #006080">&quot;12,0,12,0&quot;</span>&gt;</pre>
<!--CRLF-->

    <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>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">        &lt;ListBox x:Name=<span style="color: #006080">&quot;MainListBox&quot;</span> ItemsSource=<span style="color: #006080">&quot;{Binding Pics, Mode=OneWay}&quot;</span>&gt;</pre>
<!--CRLF-->

    <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">            &lt;ListBox.ItemTemplate&gt;</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">                &lt;DataTemplate&gt;</pre>
<!--CRLF-->

    <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">                    &lt;StackPanel Orientation=<span style="color: #006080">&quot;Horizontal&quot;</span> Height=<span style="color: #006080">&quot;132&quot;</span>&gt;</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">                        &lt;Image Source=<span style="color: #006080">&quot;{Binding ImageUrl}&quot;</span> VerticalAlignment=<span style="color: #006080">&quot;Top&quot;</span> Margin=<span style="color: #006080">&quot;0,10,8,0&quot;</span>/&gt;</pre>
<!--CRLF-->

    <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">                        &lt;TextBlock Text=<span style="color: #006080">&quot;{Binding ShortName}&quot;</span> Foreground=<span style="color: #006080">&quot;#FFC8AB14&quot;</span> FontSize=<span style="color: #006080">&quot;28&quot;</span> /&gt;</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">                    &lt;/StackPanel&gt;</pre>
<!--CRLF-->

    <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">                &lt;/DataTemplate&gt;</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">            &lt;/ListBox.ItemTemplate&gt;</pre>
<!--CRLF-->

    <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">        &lt;/ListBox&gt;</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">    &lt;/Grid&gt;</pre>
<!--CRLF-->

    <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">&lt;/Grid&gt;</pre>
<!--CRLF--></div>
</div>

<p>In our MainPage.xaml.cs, we will add a using statement for Microsoft.Xna.Framework.Media as well as System.Windows.Media.Imaging as we will be using the <a href="http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.bitmapimage.aspx" target="_blank">BitmapImage class</a>.</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: 63px; 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">using</span> Microsoft.Xna.Framework.Media;</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, 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">using</span> System.Windows.Media.Imaging;</pre>
<!--CRLF--></div>
</div>

<p>I also have an irrelevant helper class (aka ViewModel ZING!) …</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: 120px; 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">public</span> <span style="color: #0000ff">class</span> PicSample</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier 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>
<!--CRLF-->

    <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">public</span> BitmapImage ImageUrl { get; set; }</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, 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">public</span> <span style="color: #0000ff">string</span> ShortName { get; set; }</pre>
<!--CRLF-->

    <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>
<!--CRLF--></div>
</div>
Where the rubber hits the road, we will be making use of the following classes: <a href="http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.media.medialibrary.aspx" target="_blank">MediaLibrary</a>, <a href="http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.media.picturealbum.aspx" target="_blank">PictureAlbum</a>, <a href="http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.media.picturealbumcollection.aspx" target="_blank">PictureAlbumCollection</a> and some magic, non-localized string constants (more on that later). 

<p>Add some quick set-up stuff to our MainPage class for DataBinding and all that good stuff …</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: 231px; 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">public</span> MainPage()</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier 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>
<!--CRLF-->

    <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">    InitializeComponent();</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier 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>
<!--CRLF-->

    <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>.DataContext = <span style="color: #0000ff">this</span>;</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier 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>
<!--CRLF-->

    <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>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, 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">public</span> IEnumerable&lt;PicSample&gt; Pics</pre>
<!--CRLF-->

    <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>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">    get { <span style="color: #0000ff">return</span> _pics; }</pre>
<!--CRLF-->

    <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>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier 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>
<!--CRLF-->

    <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">private</span> ObservableCollection&lt;PicSample&gt; _pics = <span style="color: #0000ff">new</span> ObservableCollection&lt;PicSample&gt;();</pre>
<!--CRLF--></div>
</div>

<p>I’ve <a href="http://blogs.msdn.com/b/johnalioto/archive/2010/09/22/10066508.aspx" target="_blank">written about Data Binding in the past</a>, so I won’t repeat that here.&#160; The magic happens in our button handler …</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: #0000ff">private</span> <span style="color: #0000ff">void</span> Button_Click(<span style="color: #0000ff">object</span> sender, RoutedEventArgs e)</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier 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>
<!--CRLF-->

    <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: #008000">// Work around for known bug in the media framework.  Hits the static constructors</span></pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">    <span style="color: #008000">// so the user does not need to go to the picture hub first.</span></pre>
<!--CRLF-->

    <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">    MediaPlayer.Queue.ToString();</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier 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>
<!--CRLF-->

    <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">    MediaLibrary ml = <span style="color: #0000ff">null</span>;</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">    PictureAlbum cameraRoll = <span style="color: #0000ff">null</span>;</pre>
<!--CRLF-->

    <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">    PictureAlbum savedPics = <span style="color: #0000ff">null</span>;</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier 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>
<!--CRLF-->

    <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">foreach</span> (MediaSource source <span style="color: #0000ff">in</span> MediaSource.GetAvailableMediaSources())</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier 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>
<!--CRLF-->

    <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">if</span> (source.MediaSourceType == MediaSourceType.LocalDevice)</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier 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>
<!--CRLF-->

    <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">            ml = <span style="color: #0000ff">new</span> MediaLibrary(source);</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">            PictureAlbumCollection allAlbums = ml.RootPictureAlbum.Albums;</pre>
<!--CRLF-->

    <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>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, 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">foreach</span> (PictureAlbum album <span style="color: #0000ff">in</span> allAlbums)</pre>
<!--CRLF-->

    <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>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, 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">if</span> (album.Name == <span style="color: #006080">&quot;Camera Roll&quot;</span>)</pre>
<!--CRLF-->

    <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>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">                    cameraRoll = album;</pre>
<!--CRLF-->

    <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>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier 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>
<!--CRLF-->

    <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">if</span> (album.Name == <span style="color: #006080">&quot;Saved Pictures&quot;</span>)</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier 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>
<!--CRLF-->

    <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">                    savedPics = album;</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier 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>
<!--CRLF-->

    <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>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier 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>
<!--CRLF-->

    <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>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier 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>
<!--CRLF-->

    <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">foreach</span> (Picture p <span style="color: #0000ff">in</span> cameraRoll.Pictures.Take(3))</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier 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>
<!--CRLF-->

    <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">        BitmapImage b = <span style="color: #0000ff">new</span> BitmapImage();</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">        b.SetSource(p.GetThumbnail());</pre>
<!--CRLF-->

    <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">        _pics.Add(<span style="color: #0000ff">new</span> PicSample() { ImageUrl = b, ShortName = p.Name });</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier 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>
<!--CRLF-->

    <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>
<!--CRLF--></div>
</div>

<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/37/35/metablogapi/2350.inigo_3A37C198.jpg" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-37-35-metablogapi/2350.inigo_5F00_3A37C198.jpg"><img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="inigo" border="0" alt="inigo" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/37/35/metablogapi/6866.inigo_thumb_479DD49E.jpg" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-37-35-metablogapi/6866.inigo_5F00_thumb_5F00_479DD49E.jpg" width="240" height="208" /></a></p>

<p>“Let me 'splain.&#160; [<i>pause</i>]&#160;&#160; No, there is too much. Let me sum up.”</p>

<p>You may have noticed this rather dubious line of code …</p>

<pre>MediaPlayer.Queue.ToString();<br /></pre>

<p>This is a work-around for a known issue related to static constructors.&#160; Things can work just fine without this code <strong>if</strong> the user happens to go to the Picture Hub first.&#160;&#160; That will initialize the class and allow the <a href="http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.media.medialibrary.rootpicturealbum.aspx" target="_blank">RootPictureAlbum</a> property on the MediaLibrary to be not null.&#160; Of course, you cannot depend on what the user is going to do or not going to do.&#160; So, I’ve added a no-op that has the side-effect of ensuring that all the objects I’m about to use are all setup and initialized nicely.&#160; Side-effects FTW!</p>

<p>But there is more magic yet to come!&#160; You may have noticed a bit of smell here …</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: 101px; 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">if</span> (album.Name == <span style="color: #006080">&quot;Camera Roll&quot;</span>)</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier 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>
<!--CRLF-->

    <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">    cameraRoll = album;</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier 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>
<!--CRLF--></div>
</div>

<p>Hard coded strings! Hard coded strings! Alert! Alert!</p>

<p><strong>DISCLAIMER: </strong>I am told that these strings are not localized and as such will remain the same regardless of the language and culture of the phone device.&#160; I’ve not verified that, so do your culture testing!</p>

<p>In order to test this application, you cannot use the Zune client.&#160; You have to plug your device in, let Zune come up, detect your device and then quit Zune and <a href="http://msdn.microsoft.com/en-us/library/gg180729(VS.92).aspx" target="_blank">use WP Connect</a>.&#160; The media libraries will be null if you have Zune attached.</p>

<p>If all is well, when you run this application on a device, you should see the “top” three pictures from your camera roll.&#160; A little magic, a little faith and boom, pictures!</p>]]></content:encoded>
    </item>
    <item>
      <title>Outlook 2010 Plain Text Folder …</title>
      <link>https://docs.microsoft.com/archive/blogs/johnalioto/outlook-2010-plain-text-folder</link>
      <pubDate>Sun, 02 Jan 2011 18:50:59 GMT</pubDate>
      <dc:creator><![CDATA[jpalioto]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/johnalioto/2011/01/02/outlook-2010-plain-text-folder/</guid>
      <description><![CDATA[Download Source  A customer asked me recently “I would like to see a plain text version of selected...]]></description>
      <content:encoded><![CDATA[<p><a href="http://cid-f9be77032bf61bbf.office.live.com/self.aspx/.Public/Source/PlanTextFolder.zip" target="_blank">Download Source</a></p>  <p>A customer asked me recently “I would like to see a plain text version of selected emails without sending them to the junk folder.”&#160; I looked for a rule, but I couldn’t find one.&#160; I looked for a setting, I couldn’t find one.&#160; The only other way I could think of doing it is with an Outlook Add-in. </p>  <p>By the way, if you have a better way of doing this, please let me know!&#160; Other than that, here’s the Add-in.&#160; (If you seek more information about building Add-ins with Visual Studio 2010, check out the <a href="http://msdn.microsoft.com/en-us/vsto/default" target="_blank">VSTO Developer Center</a>.)</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: #0000ff">private</span> <span style="color: #0000ff">void</span> ThisAddIn_Startup(<span style="color: #0000ff">object</span> sender, System.EventArgs e)</pre>
<!--crlf-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier 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>
<!--crlf-->

    <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">    Outlook.MAPIFolder inbox = Application.Session.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox);</pre>
<!--crlf-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">    Outlook.MAPIFolder sandbox = <span style="color: #0000ff">null</span>;</pre>
<!--crlf-->

    <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>
<!--crlf-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, 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">try</span></pre>
<!--crlf-->

    <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>
<!--crlf-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">        sandbox = GetSandbox(inbox, <span style="color: #006080">&quot;Sandbox&quot;</span>);</pre>
<!--crlf-->

    <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>
<!--crlf-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, 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">catch</span> (Exception)</pre>
<!--crlf-->

    <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>
<!--crlf-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">        inbox = <span style="color: #0000ff">null</span>;</pre>
<!--crlf-->

    <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">return</span>;</pre>
<!--crlf-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier 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>
<!--crlf-->

    <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>
<!--crlf-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, 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">if</span> (sandbox == <span style="color: #0000ff">null</span>)</pre>
<!--crlf-->

    <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>
<!--crlf-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, 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">return</span>;</pre>
<!--crlf-->

    <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>
<!--crlf-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier 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>
<!--crlf-->

    <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">    sandbox.Items.ItemAdd += <span style="color: #0000ff">new</span> Outlook.ItemsEvents_ItemAddEventHandler(SandboxFolderItemAdded);</pre>
<!--crlf-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier 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>
<!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></div>
</div>

<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: #0000ff">private</span> Outlook.MAPIFolder GetSandbox( Outlook.MAPIFolder rootFolder, <span style="color: #0000ff">string</span> sandboxName )</pre>
<!--crlf-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier 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>
<!--crlf-->

    <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">    Outlook.MAPIFolder retVal = <span style="color: #0000ff">null</span>;</pre>
<!--crlf-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier 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>
<!--crlf-->

    <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>
<!--crlf-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, 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">if</span> (String.IsNullOrEmpty(sandboxName) || rootFolder == <span style="color: #0000ff">null</span>)</pre>
<!--crlf-->

    <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>
<!--crlf-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, 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">return</span> retVal;</pre>
<!--crlf-->

    <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>
<!--crlf-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier 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>
<!--crlf-->

    <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">foreach</span> (Outlook.MAPIFolder folder <span style="color: #0000ff">in</span> rootFolder.Folders)</pre>
<!--crlf-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier 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>
<!--crlf-->

    <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">if</span> (folder.Name.Equals(sandboxName, StringComparison.CurrentCultureIgnoreCase))</pre>
<!--crlf-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier 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>
<!--crlf-->

    <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">            retVal = folder;</pre>
<!--crlf-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, 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">break</span>;</pre>
<!--crlf-->

    <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>
<!--crlf-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier 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>
<!--crlf-->

    <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>
<!--crlf-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, 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">return</span> retVal;</pre>
<!--crlf-->

    <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>
<!--crlf-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier 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>
<!--crlf-->

    <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">private</span> <span style="color: #0000ff">void</span> SandboxFolderItemAdded(<span style="color: #0000ff">object</span> addedItem)</pre>
<!--crlf-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier 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>
<!--crlf-->

    <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">    Outlook.MailItem mi = addedItem <span style="color: #0000ff">as</span> Outlook.MailItem;</pre>
<!--crlf-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier 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>
<!--crlf-->

    <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">if</span> (mi == <span style="color: #0000ff">null</span>)</pre>
<!--crlf-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier 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>
<!--crlf-->

    <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">return</span>;</pre>
<!--crlf-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier 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>
<!--crlf-->

    <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>
<!--crlf-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">    mi.BodyFormat = Microsoft.Office.Interop.Outlook.OlBodyFormat.olFormatPlain;</pre>
<!--crlf-->

    <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">    mi.Save();</pre>
<!--crlf-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier 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>
<!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></div>
</div>

<p>The Add-in will start at the Inbox and look for a folder beneath the Inbox called “Sandbox”.&#160; This behavior is easy enough to change in the ThisAddIn_Startup&#160; method.&#160; (In case, for example, you want to traverse a deeper tree inbox-&gt;something-&gt;something-&gt;Sandbox.)&#160; It will then hook the ItemAdd method and use it to coerce the type of any messages added to the folder into Plain Text.&#160; If you just want to use the solution for yourself, you can build and deploy it from VS.&#160; If you want to deploy it more widely, here’s a <a href="http://msdn.microsoft.com/en-us/library/bb386179.aspx" target="_blank">good article</a> on how that can be accomplished. </p>

<p>A few words of warning.&#160; First there are a lot of <a href="http://blogs.msdn.com/b/ericlippert/archive/2008/09/10/vexing-exceptions.aspx" target="_blank">vexing exceptions</a> when dealing with Office Add-ins.&#160; (I guess it just the nature of the Interop).&#160; For example, if you index into a Folders collection with a key that is not present, you get an exception instead of just a null value.&#160; Also, unhandled exceptions in Add-ins can stop Outlook dead in its tracks without so much as a warning to the user that something has gone wrong.&#160; Dealing with unhandled exceptions in Office Add-ins is beyond the scope of my patience for work-arounds.&#160; <a href="http://social.msdn.microsoft.com/Forums/en/vsto/thread/b1a6c58f-beca-4e16-853b-27234c8b80bf" target="_blank">More information on that subject if you dare</a>.</p>

<p>By the way, this is exactly how I build my Add-in that coerces all my response to HTML regardless of what format the original email was sent in.&#160; That’s right – to heck with the sender, I want my signatures to work.&#160; (Also, I figure if your client does not handle HTML at this point, you deserve the shame and ridicule.) You can imagine hooking the inbox.Items.ItemAdd event with this 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"><span style="color: #0000ff">private</span> <span style="color: #0000ff">void</span> InboxFolderItemAdded( <span style="color: #0000ff">object</span> addedItem )</pre>
<!--crlf-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier 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>
<!--crlf-->

    <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">  Outlook.MailItem mi = addedItem <span style="color: #0000ff">as</span> Outlook.MailItem;</pre>
<!--crlf-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier 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>
<!--crlf-->

    <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">if</span>( mi == <span style="color: #0000ff">null</span> )</pre>
<!--crlf-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier 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>
<!--crlf-->

    <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">return</span>;</pre>
<!--crlf-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier 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>
<!--crlf-->

    <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>
<!--crlf-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, 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">if</span>( mi.BodyFormat != Microsoft.Office.Interop.Outlook.OlBodyFormat.olFormatHTML )</pre>
<!--crlf-->

    <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>
<!--crlf-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px">    mi.BodyFormat = Microsoft.Office.Interop.Outlook.OlBodyFormat.olFormatHTML;</pre>
<!--crlf-->

    <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">    mi.Save();</pre>
<!--crlf-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier 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>
<!--crlf-->

    <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>
<!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></!--crlf--></div>
</div>

<p>And you would have all your emails in HTML format.</p>]]></content:encoded>
    </item>
    <item>
      <title>Coping with “It’s all been done” syndrome …</title>
      <link>https://docs.microsoft.com/archive/blogs/johnalioto/coping-with-its-all-been-done-syndrome</link>
      <pubDate>Thu, 30 Dec 2010 22:28:00 GMT</pubDate>
      <dc:creator><![CDATA[jpalioto]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/johnalioto/2010/12/30/coping-with-its-all-been-done-syndrome/</guid>
      <description><![CDATA[Sometimes I get down on myself.&nbsp; You see, dear reader, I&rsquo;ve been trying to think up a...]]></description>
      <content:encoded><![CDATA[<p>Sometimes I get down on myself.&nbsp; You see, dear reader, I&rsquo;ve been trying to think up a good application to write for WP7.&nbsp; I&rsquo;ve thought of a few good apps, a couple of mine are actually up in the marketplace and earning money.&nbsp; But, then I say to myself, &ldquo;It&rsquo;s all been done before!&nbsp; Every possible fart-flashlight-tip-calculator application that can be made has been made.&rdquo;&nbsp; And that gets me down.&nbsp; But, I have a way around that and I&rsquo;m going to share it with you.&nbsp; And then, I&rsquo;m gonna circle back around through the .com boom and land on why I love cloud computing.&nbsp; And that get&rsquo;s me up again.</p>
<p>Think I can&rsquo;t?&nbsp; Let&rsquo;s see!</p>
<p>When I&rsquo;m down and I think to myself &ldquo;you&rsquo;re a guy who builds other people&rsquo;s ideas, you don&rsquo;t come up with ideas yourself,&rdquo; I don&rsquo;t think of this guy &hellip;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/37/35/metablogapi/2211.bill_gates_6EF5569D.jpg" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-37-35-metablogapi/2211.bill_5F00_gates_5F00_6EF5569D.jpg"><img height="189" width="189" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/37/35/metablogapi/6318.bill_gates_thumb_09C17CAA.jpg" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-37-35-metablogapi/6318.bill_5F00_gates_5F00_thumb_5F00_09C17CAA.jpg" alt="bill_gates" border="0" title="bill_gates" style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" /></a></p>
<p>&hellip; and I don&rsquo;t think of this guy &hellip;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/37/35/metablogapi/2605.steve-jobs_7463C741.jpg" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-37-35-metablogapi/2605.steve_2D00_jobs_5F00_7463C741.jpg"><img height="244" width="195" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/37/35/metablogapi/5430.steve-jobs_thumb_68CE0A02.jpg" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-37-35-metablogapi/5430.steve_2D00_jobs_5F00_thumb_5F00_68CE0A02.jpg" alt="steve-jobs" border="0" title="steve-jobs" style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" /></a></p>
<p>I respect both of them and marvel at their accomplishments. Both Gates and Jobs have the characteristic that I am looking for.&nbsp; But no!&nbsp; I think of this guy &hellip;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/37/35/metablogapi/0564.james_dyson_335547DD.jpg" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-37-35-metablogapi/0564.james_5F00_dyson_5F00_335547DD.jpg"><img height="175" width="244" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/37/35/metablogapi/8156.james_dyson_thumb_40BB5AE3.jpg" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-37-35-metablogapi/8156.james_5F00_dyson_5F00_thumb_5F00_40BB5AE3.jpg" alt="james_dyson" border="0" title="james_dyson" style="background-image: none; border-bottom: 0px; border-left: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" /></a></p>
<p>Looks familiar, no? Oh you know this guy &ndash; it&rsquo;s <a target="_blank" href="http://en.wikipedia.org/wiki/James_Dyson">James Dyson</a>.&nbsp; I don&rsquo;t know him personally &ndash; he might be a complete ***.&nbsp; But, I love this guy! Can you imagine sitting down one day and saying &ldquo;f*ck it! I&rsquo;m gonna re-invent the vacuum cleaner&rdquo;?&nbsp; Can you imagine the ridicule this guy has taken in his life?&nbsp; Everybody this guy knows has probably called him nuts at one time or another.&nbsp; His own mother probably told him he was nuts while vacuuming her floor with a Hoover.&nbsp; We&rsquo;re not talking about a bacteria that eats CO2 and poops out oil &hellip; no!&nbsp; We&rsquo;re taking about vacuum cleaners.&nbsp; Hoover has been around since 1908 and Oreck has been selling vacuums by mail since 1963 &ndash; how much innovation could be left in this area? <a target="_blank" href="http://www.google.com/patents?tbs=bks%3A1&amp;tbo=1&amp;q=%22james+dyson%22&amp;btnG=Search+Patents">A lot apparently</a>.</p>
<p>What&rsquo;s the characteristic here?&nbsp; What&rsquo;s the driving force?&nbsp; Disruptiveness!&nbsp; Plain and simple disruptiveness! All three of these guys see a situation and say &ldquo;I can do better!&rdquo;&nbsp; I don&rsquo;t need to regale you with the accomplishments of the first two, but can you imagine just for a minute saying to yourself (and being perfectly serious), &ldquo;I am going to re-invent the way music is listened to and sold.&rdquo;&nbsp; And this is why I love cloud computing &ndash; it&rsquo;s disruptive!</p>
<p>Do you know why the .COM boom happened?&nbsp; I&rsquo;ll tell you why.&nbsp; One simple rule: People will believe any lie that they want to be true or that they are afraid is true.&nbsp; Every single brick and mortar giant in 1999 was deathly afraid that there were two guys in a garage somewhere with a better business model to sell widgets than they had.&nbsp; Every CEO believed it &ndash; every one.&nbsp; Every venture capitalist believed it &ndash; every one.&nbsp; And they spent.&nbsp; When Ask Jeeves went public in 1999, I browsed to the site and asked it a simple question &ldquo;How can a company with no revenue be worth $1.5 billion?&rdquo;&nbsp; It didn&rsquo;t know.&nbsp; Maybe if it had been able to give me a good answer, I would have bough the stock!&nbsp; (As it turns out, it was valued at $1.85 when sold in 2005).</p>
<p>What does that have to do with cloud computing?&nbsp; Here&rsquo;s what: right now, every company that has been saying to itself &ldquo;it would take a huge investment to get the type of computing power necessary to match our business model&rdquo; now has something to fear.&nbsp; The power of the enterprise is being brought to the garage.&nbsp; All you need is a good idea.&nbsp; Notice I didn&rsquo;t say an original idea.&nbsp; I just said a good idea.&nbsp; Even if it&rsquo;s been done before again and again and again, it can be done better.&nbsp; Is it a lie?&nbsp; I don&rsquo;t think so.&nbsp; But, in the end, does it really matter?&nbsp; Soon enough, everyone is going to believe it, either because they want it to be true or because they are scared it&rsquo;s true.</p>
<p>So if your sitting there and thinking that there&rsquo;s no opportunity left, no innovation to be had, think of James Dyson.&nbsp; Look at everything in your office or on your physical desktop or your PC desktop.&nbsp; Look at every application on your phone and every web site you browse to. Look at every business model you can think of and think to yourself this one simple thing: It can be done better.&nbsp; Be like James Dyson and say &ldquo;f*ck it! I&rsquo;m gonna do it better!&rdquo;</p>]]></content:encoded>
    </item>
    <item>
      <title>Cloud Economics … You’re Fired!</title>
      <link>https://docs.microsoft.com/archive/blogs/johnalioto/cloud-economics-youre-fired</link>
      <pubDate>Wed, 08 Dec 2010 16:28:34 GMT</pubDate>
      <dc:creator><![CDATA[jpalioto]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/johnalioto/2010/12/08/cloud-economics-youre-fired/</guid>
      <description><![CDATA[We just published a great paper on the Economics of the Cloud.&#160; It does a very thorough...]]></description>
      <content:encoded><![CDATA[<p>We just published a great paper on the <a href="http://blogs.msdn.com/b/plankytronixx/archive/2010/12/07/the-business-justification-for-your-move-to-windows-azure-the-economics-of-the-cloud.aspx" target="_blank">Economics of the Cloud</a>.&#160; It does a very thorough analysis of current IT practices and gives some concrete ways that the Cloud (both <a href="http://blogs.msdn.com/b/johnalioto/archive/2010/08/16/10050822.aspx" target="_blank">Public and Private</a>) can lead to IT cost savings.&#160; Unfortunately, it also white washes one of the most important economic factors of the Cloud, namely:</p>  <p><strong>Your company does not need you anymore!</strong></p>  <p>Fortunately for you, dear reader, I am not saddled by the need to coddle you.&#160; If you’re toiling away as some type of server administrator for some type of company right now, you need to wake up and wake up fast.&#160; In a few years, your job will be gone!&#160; It’s like Dean Pritchard when he tells the students they are expelled … </p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/37/35/metablogapi/3568.pritchard_03410EE4.jpg" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-37-35-metablogapi/3568.pritchard_5F00_03410EE4.jpg"><img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="pritchard" border="0" alt="pritchard" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/37/35/metablogapi/4645.pritchard_thumb_4BAB4DF5.jpg" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-37-35-metablogapi/4645.pritchard_5F00_thumb_5F00_4BAB4DF5.jpg" width="212" height="320" /></a></p>  <p>Let it sink in.&#160; Good.</p>  <p>So now that you’ve faced the inevitable, let’s dive in a little deeper.&#160; According to the Economics of the Cloud Paper …</p>  <p><em>“Infrastructure labor costs. While cloud computing significantly lowers labor costs at any scale by automating many repetitive management tasks, larger facilities are able to lower them further than smaller ones. While a single system administrator can service approximately 140 servers in a traditional enterprise,8 in a cloud data center the same administrator can service thousands of servers. This allows IT employees to focus on higher value-add activities like building new capabilities and working through the long queue of user requests every IT department contends with.”&#160; The Economics of the Cloud, Microsoft, November 2010, page 4.</em></p>  <p>They are to have us believe that overnight, your email administrator is going to start “focusing on higher value-add activities”.&#160; Like what?&#160; You think you can just grab Mort the long time server administrator and send him out into the world to gathering requirements from users for additional IT projects?&#160; Wake up and smell Mort’s cube – it aint gonna happen.</p>  <p>This is not easy for me either.&#160; I have to sit in rooms full of Morts during the Cloud Briefings that I give to customers and basically give them this bad news, namely Microsoft/Amazon/Google do server administration better than they do.&#160;&#160; To some it comes as a shock.&#160; Microsoft??&#160; Better server administration then me, Mort the long time blah blah blah administrator??&#160; No way!&#160; Hey, Mort: Yes way.&#160; And, we don’t just do kinda better, we do way better.</p>  <p>And therein lies the&#160; economic justification that I think that Economics of the Cloud soft pedaled. Take a look at <a href="http://stackoverflow.com/" target="_blank">StackOverflow</a> for example. <a href="http://blog.stackoverflow.com/2010/01/stack-overflow-network-configuration/" target="_blank">Here is how they are built</a>.&#160; <a href="http://www.quantcast.com/stackoverflow.com" target="_blank">Here’s their traffic</a>.&#160; And here’s how <a href="https://twitter.com/#!/spolsky/statuses/27244766467" target="_blank">Spolsky sums it up</a>.&#160; So let’s start with StackOverflow as our baseline and&#160; do what all good engineers do … double it!&#160; 5 servers becomes 10.&#160; Let’s say each server has 8 cores.&#160; We’re talking 80 cores to run the whole thing.&#160; Let’s do what all good engineers do … double it again!&#160; That’s 160 cores.&#160; And, what does 160 cores per month cost on Azure you ask?</p>  <p>Let’s see … <a href="http://msdn.microsoft.com/en-us/library/ee814754.aspx" target="_blank">Extra Large Instance is 8 Cores</a> and <a href="http://www.microsoft.com/windowsazure/offers/popup/popup.aspx?lang=en&amp;locale=en-US&amp;offer=MS-AZR-0003P" target="_blank">Guy Off the Street price</a> for an Extra Large instance is $0.96/hour.&#160; Not all months are the same length, so let’s say there are 750 hours per month.&#160; That’s 20 extra large instances running for 750 hours … $14,400/month on compute to get 4x the current capability of StackOverflow.&#160; And we can add in a couple of 50gb databases and 100’s of TB of storage and plenty of transactions, but you get the idea.</p>  <p>Wow!&#160; That’s expensive!&#160; (That’s what Mort says in the meeting when he’s sitting next to his boss and his boss’ boss).&#160; Not so fast Mort!</p>  <p>What is that in Mort units? Let’s see.&#160; Mort costs us ~<a href="http://swz.salary.com/salarywizard/layoutscripts/swzl_salaryresults.asp?hdJobCode=IT10000135&amp;hdJobTitle=Systems+Administrator&amp;hdJobCategory=IT03&amp;hdNarrowDesc=IT+%2D%2D+All&amp;hdZipCode=94111&amp;hdStateMetro=156&amp;geometrocode=156&amp;hdGeoLocation=San+Francisco%2C+CA+94111&amp;hdKeyword=system+administrator&amp;op=salswz_psr&amp;joblevelcode=2&amp;pagefrom=selectjob&amp;hdLocationOption=0&amp;hdSearchByOption=0&amp;countertype=0&amp;jobcounter=1" target="_blank">$75,000</a> per year in salary, plus some amount in benefits, overhead, management, equipment …&#160; according to some guy at MIT who definitely looks like he knows what he’s talking about, it’s like <a href="http://web.mit.edu/e-club/hadzima/how-much-does-an-employee-cost.html" target="_blank">2.7 time base salary</a> for Mort per year in total costs.&#160; Let’s say Mort costs us $200,000 per year or $16,000 per month.</p>  <p>Uh oh.&#160; But, that means that 1 Mort costs us more than enough compute power to have 4x the capacity of a <a href="http://www.alexa.com/siteinfo/stackoverflow.com#" target="_blank">top 250 internet site</a>?&#160; That’s very bad news for Mort.</p>  <p>What should Mort do?&#160; It’s easy.&#160; Mort should start getting retrained now.&#160; And, what should Mort get retrained as?&#160; A developer?&#160; Absolutely not.&#160; Development is commoditized as a skill and is going no where but down …</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/37/35/metablogapi/4744.code_4_food_12283DFE.jpg" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-37-35-metablogapi/4744.code_5F00_4_5F00_food_5F00_12283DFE.jpg"><img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="code_4_food" border="0" alt="code_4_food" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/37/35/metablogapi/0451.code_4_food_thumb_465C6744.jpg" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-37-35-metablogapi/0451.code_5F00_4_5F00_food_5F00_thumb_5F00_465C6744.jpg" width="244" height="163" /></a></p>  <p>The answer, dear reader, is Software Architect of course!&#160; Take a look at what <a href="http://money.cnn.com/magazines/moneymag/bestjobs/2010/full_list/index.html" target="_blank">CNN Money</a> thinks …</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/37/35/metablogapi/4657.best_jobs_77E7D4D9.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-37-35-metablogapi/4657.best_5F00_jobs_5F00_77E7D4D9.png"><img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="best_jobs" border="0" alt="best_jobs" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/37/35/metablogapi/6724.best_jobs_thumb_755EA31B.png" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-37-35-metablogapi/6724.best_5F00_jobs_5F00_thumb_5F00_755EA31B.png" width="912" height="761" /></a></p>  <p>Software Architect is #1 in terms of growth potential over the next 10 years -- more than double the growth of guys who drill holes in rotten teeth and fill them up again for a living! Why?&#160; I will have to go into the full “why” in another post, but let me ask you this … with India, Europe, Russia and even China coming online with development capability, who is going to design all those systems?&#160; Who is going to design all these Cloud systems?&#160;&#160; Software Architects that’s who!</p>  <p>So, Mort, buddy!&#160; The die is cast.&#160;&#160; Make it happen.&#160; By my clock, you’ve got less than 5 years to complete obsolescence.</p>]]></content:encoded>
    </item>
    <item>
      <title>Post Architect's Master Class initial thoughts …</title>
      <link>https://docs.microsoft.com/archive/blogs/johnalioto/post-architects-master-class-initial-thoughts</link>
      <pubDate>Tue, 23 Nov 2010 11:19:00 GMT</pubDate>
      <dc:creator><![CDATA[jpalioto]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/johnalioto/2010/11/23/post-architects-master-class-initial-thoughts/</guid>
      <description><![CDATA[I must tell you, I hate training.&#160; I hate it! I hate it! I hate it! This is me in a training...]]></description>
      <content:encoded><![CDATA[<p>   <br />I must tell you, I hate training.&#160; I hate it! I hate it! I hate it! This is me in a training class …</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/37/35/metablogapi/1030.sad_bee_7F79CF85.jpg" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-37-35-metablogapi/1030.sad_5F00_bee_5F00_7F79CF85.jpg"><img style="background-image: none; border-right-width: 0px; margin: ; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="sad_bee" border="0" alt="sad_bee" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/37/35/metablogapi/2821.sad_bee_thumb_3673ADBF.jpg" original-url="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-01-37-35-metablogapi/2821.sad_5F00_bee_5F00_thumb_5F00_3673ADBF.jpg" width="376" height="376" /></a></p>  <p>Just a sad sack. Why? Because most training sucks, that’s why!&#160; I always feel like give an equivalent amount of undisturbed time, I could learn more on my own.&#160; In one hour’s time, I can watch key sections of about 10 videos at 1.5x speed in a Silverlight player and get more out of that hour than an entire day of watching someone slog through a deck targeted at the least common denominator.&#160; So, most of the time, I avoid training.</p>  <p>There are exceptions, however.&#160; I remember fondly the Guerilla .NET course I took in LA shortly after the .NET 1.0 release taught by Mike Woodring and Keith Brown.&#160; And last week, I had the privilege of attending <a href="http://idesign.net/" target="_blank">IDesign</a>’s <a href="http://idesign.net/idesign/DesktopDefault.aspx?tabindex=0&amp;tabid=23" target="_blank">Architect's Master Class</a> taught by <a href="http://idesign.net/idesign/DesktopDefault.aspx?tabindex=3&amp;tabid=5" target="_blank">Juval Lowy</a>.&#160; I must tell you, that even for a bitter, jaded, cynical old architect, it was a wonderful experience.&#160; I’ve let the material and my thoughts marinade for a bit and I’m now ready to give my initial thoughts.</p>  <p>First off, if you don’t know who Juval is, you need to stop reading my tripe and head immediately over to <a href="http://idesign.net/idesign/DesktopDefault.aspx?tabindex=-1&amp;tabid=9" target="_blank">his site</a> and just start reading.&#160; Just pick a random point and start reading.&#160; Or better yet, grab one of <a href="http://www.amazon.com/Programming-WCF-Services-Mastering-AppFabric/dp/0596805489/ref=sr_1_1?ie=UTF8&amp;qid=1290473641&amp;sr=8-1" target="_blank">his books</a>.&#160; I’ll wait.&#160;&#160;&#160; After a few articles, you will get the idea.&#160; And, you will think you understand what I’m talking about.&#160; But, you don’t understand.&#160; I’ve been reading Juval in MSDN and in books for years and I thought I understood too.&#160; I had no idea.</p>  <p>For five days straight, you get an uninterrupted stream of thoughts on design, technology, life, WCF, Microsoft any 5 or 10 minutes of which could be blown out into another hour of discussion, questions and learning.&#160; It’s truly an amazing thing to witness and be a part of.&#160; It’s like when Tron, Ram and Flynn drink from the energy river … <em>“You always forget how good fresh energy feels, till you get to a pure source”</em>.&#160; And, Juval does not dumb it down.&#160; Thank goodness.&#160; His class is designed from top to bottom for the elite.&#160; He has a marvelous disdain for the least common denominator.&#160; He purposefully wants to show his students what the next level looks like and he does a sublime job of it.</p>  <p>I do myself credit here, so please forgive the conceit, but it was nice to find a kindred spirit in Juval.&#160; I have long since realized that the industry does not appreciate what architects do.&#160; And, I have long since realized that we work in a field replete with charlatans and snake oil salesmen.&#160; Juval described it in terms of people in the middle ages dealing with the Plague.&#160; Some people realized, he reasoned, that in order to survive, they would need to create a bubble of sanity and hygiene around themselves.&#160; That’s exactly what I did with the company that I founded before I came to Microsoft.&#160; I got sick and tired of dealing with “the mob” and wanted to do things my way – and that’s exactly what I did for three years.&#160; Over and over again, Juval would bring up points that I believed in, but describe them in a new and interesting.&#160; It was wonderful to hear a different perspective on beliefs I have long held on the industry, architects, projects, methodologies, management, and life.</p>  <p>After the class, I had the opportunity to ask Juval some questions one-on-one.&#160; Instead of the usual 100 different questions/points of contention I would have had if this was normal training, the only question I had on my mind was to ask myself “Now that you know, what are you going to do about it?”&#160; That’s the question I am still asking myself.&#160; I think this is the highest complement I can give to the Architect’s Master Class.&#160; The information was so complete and so well delivered that by the end of the week, the ball was in my court.</p>  <p>The bottom line is that if you have the opportunity to take the Architect’s Master Class or you have the opportunity to send one of your architects, do yourself and your organization a favor and sign up now.</p>]]></content:encoded>
    </item>
  </channel>
</rss>