<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0">  <channel>    <item>      <title>Using async and await in Silverlight 5 and .NET 4 in Visual Studio 11 with the async targeting pack</title>      <author>Pete Brown	</author>      <link>http://10rem.net/blog/2012/05/22/using-async-and-await-in-silverlight-5-and-net-4-in-visual-studio-11-with-the-async-targeting-pack</link>      <pubDate>Tue, 22 May 2012 21:13:39 GMT</pubDate>      <guid>http://10rem.net/blog/2012/05/22/using-async-and-await-in-silverlight-5-and-net-4-in-visual-studio-11-with-the-async-targeting-pack</guid>      <description>&lt;p&gt;Last September, I &lt;ahref="http://10rem.net/blog/2011/09/04/simplifying-async-networking-with-tasks-in-silverlight-5" target="_blank"&gt;introduced the idea of Tasks in Silverlight&lt;/a&gt;.One of the things I really like about .NET 4.5, and the C# compilerthat comes with it, is the ability to simplify asynchronous code byusing the async modifier and await operator. Just yesterday, I &lt;ahref="http://10rem.net/blog/2012/05/21/under-the-covers-of-the-async-modifier-and-await-operator-in-net-45-and-c-metro-style-applications" target="_blank"&gt;posted a bit on how these two keywords are used bythe compiler to take care of all the heavy lifting of asynchronouscode&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;The key thing to note here is that &lt;strong&gt;the work is done bythe compiler, not the runtime&lt;/strong&gt;. That means that if you canuse the latest C# compiler, you can take advantage of this newfeature. A grasp of the async pattern and these two keywords willalso help prepare you for Windows Metro development. &lt;strong&gt;Notethat Silverlight doesn't have the same "asynchronous everywhere"set of APIs that you'll find in WinRT or .NET 4.5 so async andawait won't be quite as useful here as they are there, but there'ssome help for that too (read on).&lt;/strong&gt; You can still createyour own async methods, however, which is especially useful if youplan to share code with a WinRT XAML application.&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;I'll focus on Silverlight 5 here, but understand that this workswith .NET 4 in VS11 as well. Note also that I'm using Visual Studio11 beta for this post, so final details may change when VS11 isreleased. Also, Visual Studio 11 and the compiler which supportsasync/await requires Windows 7 or Windows 8. This will not work onWindows XP or a Commodore 128.&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;In Visual Studio, create a new Silverlight application.&lt;/p&gt;&lt;p&gt;&lt;ahref="http://10rem.net/media/85153/Windows-Live-Writer_Using-async-and-await-in-Silverlig.NET-4_C022_image_4.png" target="_blank"&gt;&lt;img src="http://10rem.net/media/85158/Windows-Live-Writer_Using-async-and-await-in-Silverlig.NET-4_C022_image_thumb_1.png" width="650" height="329" alt="image" border="0" style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Choose all the normal options in the project creation dialog(yes, create a new site, no on RIA)&lt;/p&gt;&lt;p&gt;For the MainPage.xaml, add a single button and wire up an eventhandler.&lt;/p&gt;&lt;pre class="brush: xml;"&gt;&amp;lt;UserControl x:Class="SilverlightAsyncDemo.MainPage"&lt;br /&gt;    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"&lt;br /&gt;    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"&lt;br /&gt;    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"&lt;br /&gt;    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"&lt;br /&gt;    mc:Ignorable="d"&lt;br /&gt;    d:DesignHeight="300" d:DesignWidth="400"&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;Grid x:Name="LayoutRoot" Background="White"&amp;gt;&lt;br /&gt;        &amp;lt;Button x:Name="TestAsync"&lt;br /&gt;                Content="Press Me!"&lt;br /&gt;                FontSize="25"&lt;br /&gt;                Width="200"&lt;br /&gt;                Height="75"&lt;br /&gt;                Click="TestAsync_Click" /&amp;gt;&lt;br /&gt;    &amp;lt;/Grid&amp;gt;&lt;br /&gt;&amp;lt;/UserControl&amp;gt;&lt;/pre&gt;&lt;p&gt;The next step is to add the &lt;ahref="http://www.microsoft.com/en-us/download/details.aspx?id=29576" target="_blank"&gt;Async Targeting Pack&lt;/a&gt;. I'll use NuGet to grabit.&lt;/p&gt;&lt;p&gt;&lt;img src="http://10rem.net/media/85163/Windows-Live-Writer_Using-async-and-await-in-Silverlig.NET-4_C022_image_7.png" width="446" height="390" alt="image" border="0" style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px"/&gt;&lt;/p&gt;&lt;p&gt;Pick your favorite way to use NuGet. Some prefer the console.I'm going to use the project's context menu and select "ManageNuGet Packages". From there, I'll search forAsyncTargetingPack.&lt;/p&gt;&lt;p&gt;&lt;ahref="http://10rem.net/media/85168/Windows-Live-Writer_Using-async-and-await-in-Silverlig.NET-4_C022_image_9.png" target="_blank"&gt;&lt;img src="http://10rem.net/media/85173/Windows-Live-Writer_Using-async-and-await-in-Silverlig.NET-4_C022_image_thumb_3.png" width="650" height="337" alt="image" border="0" style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Once you see it, click "Install", accept the terms (maybe evenread them first), then close the NuGet package manager. You'llnotice that the Silverlight project now includes a reference to theMicrosoft.CompilerServices.AsyncTargetingPack Silverlight 5library.&lt;/p&gt;&lt;h3&gt;A simple example using await&lt;/h3&gt;&lt;p&gt;If you have a call which uses the async callback pattern, suchas with a WebClient in Silverlight, using await is pretty easy, dueto the built-in extension methods:&lt;/p&gt;&lt;pre class="brush: csharp;"&gt;private async void TestAsync_Click(object sender, RoutedEventArgs e)&lt;br /&gt;{&lt;br /&gt;    var uri = new Uri("http://localhost:10697/SilverlightAsyncDemoTestPage.html");&lt;br /&gt;       &lt;br /&gt;    var client = new WebClient();&lt;br /&gt;&lt;br /&gt;    var results = await client.DownloadStringTaskAsync(uri);&lt;br /&gt;&lt;br /&gt;    Debug.WriteLine(results);&lt;br /&gt;}&lt;/pre&gt;&lt;p&gt;Note that the event handler must be marked as async in order touse the await keyword.&lt;/p&gt;&lt;p&gt;These extension methods, DownloadStringTaskAsync in thisexample, are included in the AsyncCompatLibExtensions installedwith the async targeting pack.&lt;/p&gt;&lt;p&gt;&lt;ahref="http://10rem.net/media/85178/Windows-Live-Writer_Using-async-and-await-in-Silverlig.NET-4_C022_image_17.png" target="_blank"&gt;&lt;img src="http://10rem.net/media/85183/Windows-Live-Writer_Using-async-and-await-in-Silverlig.NET-4_C022_image_thumb_7.png" width="650" height="524" alt="image" border="0" style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;The extension methods mimic many of the same async functionsalready available in .NET 4.5. That's great for compatibility andto help reduce how many different approaches you need to learn.&lt;/p&gt;&lt;h3&gt;Give me something to wait on&lt;/h3&gt;&lt;p&gt;"Hey teacher! I've got my pencil! Now give me something to writeon." - Pre-geriatric David Lee Roth&lt;/p&gt;&lt;p&gt;Let's do something a little more typical. In this case, I'mgoing to create a web service that we'll use asynchronously.&lt;/p&gt;&lt;p&gt;In the web project, create a "Services" folder and in that,create a new Silverlight-Enabled Web Service namedCustomerService.&lt;/p&gt;&lt;pre class="brush: csharp;"&gt;using System;&lt;br /&gt;using System.Collections.Generic;&lt;br /&gt;using System.Linq;&lt;br /&gt;using System.Runtime.Serialization;&lt;br /&gt;using System.ServiceModel;&lt;br /&gt;using System.ServiceModel.Activation;&lt;br /&gt;&lt;br /&gt;namespace SilverlightAsyncDemo.Web.Services&lt;br /&gt;{&lt;br /&gt;    [ServiceContract(Namespace = "uri:demo.silverlight.async")]&lt;br /&gt;    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]&lt;br /&gt;    public class CustomerService&lt;br /&gt;    {&lt;br /&gt;        [OperationContract]&lt;br /&gt;        public List&amp;lt;Customer&amp;gt; GetCustomers()&lt;br /&gt;        {&lt;br /&gt;            string[] firstNames = new string [] {"Pete", "Joe", "Ima", "John", "Jim", "Scott", "George", "Frank", "Al", "Jeremy", "Jason", "Alex", "Bob", "Bill", "William", "Severus", "Johnny", "Albus", "Han", "Harry", "Chris", "Christine", "Kristen", "Amy", "Leia", "Erin", "Heather", "Melissa", "Abby", "Ben", "Alice", "Morgan", "Chip"};&lt;br /&gt;            string[] lastNames = new string [] {"Brown", "Jones", "Braxton", "Huxley", "Solo", "Organa", "Vader", "Skywalker", "Potter", "Dumbledore", "Snape", "Avatar", "Cranks", "Bravo", "Grime", "Gee", "A.", "B.", "C.", "D.", "E.", "Z.", "X.", "Walker", "Franklin", "Moore", "Less"};&lt;br /&gt;&lt;br /&gt;            Random rnd = new Random();&lt;br /&gt;            const int CustomerCount = 200;&lt;br /&gt;&lt;br /&gt;            var customers = new List&amp;lt;Customer&amp;gt;();&lt;br /&gt;&lt;br /&gt;            // generate a bunch of dummy customer data&lt;br /&gt;            for (int i = 0; i &amp;lt; CustomerCount; i ++)&lt;br /&gt;            {&lt;br /&gt;                int firstIndex = rnd.Next(0, firstNames.Length-1);&lt;br /&gt;                int lastIndex = rnd.Next(0, lastNames.Length-1);&lt;br /&gt;&lt;br /&gt;                customers.Add(&lt;br /&gt;                    new Customer()&lt;br /&gt;                        {&lt;br /&gt;                            FirstName = firstNames[firstIndex],&lt;br /&gt;                            LastName = lastNames[lastIndex]&lt;br /&gt;                        });&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            return customers;&lt;br /&gt;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public class Customer&lt;br /&gt;    {&lt;br /&gt;        public string LastName { get; set; }&lt;br /&gt;        public string FirstName { get; set; }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;Build the solution, and then add a service reference from theSilverlight client. When creating the service reference, name thenamespace "Services". But before you leave this dialog, we have oneVERY important thing to check. Click the "Advanced" button&lt;/p&gt;&lt;p&gt;&lt;ahref="http://10rem.net/media/85188/Windows-Live-Writer_Using-async-and-await-in-Silverlig.NET-4_C022_image_11.png" target="_blank"&gt;&lt;img src="http://10rem.net/media/85193/Windows-Live-Writer_Using-async-and-await-in-Silverlig.NET-4_C022_image_thumb_4.png" width="450" height="464" alt="image" border="0" style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Foiled! We can't generate task-based service references. Why?Well, Silverlight didn't have the necessary support until the asynctargeting pack. So, we'll have to do this manually. If you wereusing .NET 4, you could simply generate Task-based operations andbe done with it.&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;If we were using RESTful calls, the "add service reference"stuff doesn't come into play at all - it's all justPOST/GET/DELETE/PUT/PATCH with a URL. SOAP, which is what manyfolks use behind the firewall, is more difficult to work with, sothe service reference helps. I'm a big fan of the ASP.NET Web APIand RESTful services. You should check them out.&lt;/p&gt;&lt;/blockquote&gt;&lt;h3&gt;Creating an async-friendly wrapper for the servicereference&lt;/h3&gt;&lt;p&gt;Making your service method awaitable certainly makes it easierto consume by other developers, and easier to work into your ownapplication workflow (especially if you have service calls thatrely on the results of other service calls). The code to make itawaitable is not very complicated at all. However, I like to putthis type of code into a separate service proxy or client class inthe Silverlight project.&lt;/p&gt;&lt;p&gt;I created a new project folder named "Services" in theSilverlight project. In that, I added a new class named"CustomerServiceProxy". The code for the proxy is as follows:&lt;/p&gt;&lt;pre class="brush: csharp;"&gt;using System.Collections.ObjectModel;&lt;br /&gt;using System.Threading.Tasks;&lt;br /&gt;&lt;br /&gt;namespace SilverlightAsyncDemo.Services&lt;br /&gt;{&lt;br /&gt;    public class CustomerServiceProxy&lt;br /&gt;    {&lt;br /&gt;        public static Task&amp;lt;ObservableCollection&amp;lt;Customer&amp;gt;&amp;gt; GetCustomers()&lt;br /&gt;        {&lt;br /&gt;            var tcs = new TaskCompletionSource&amp;lt;ObservableCollection&amp;lt;Customer&amp;gt;&amp;gt;();&lt;br /&gt;&lt;br /&gt;            var client = new CustomerServiceClient();&lt;br /&gt;&lt;br /&gt;            client.GetCustomersCompleted += (s,e) =&amp;gt;&lt;br /&gt;                {&lt;br /&gt;                    if (e.Error != null)&lt;br /&gt;                        tcs.TrySetException(e.Error);&lt;br /&gt;                    else if (e.Cancelled)&lt;br /&gt;                        tcs.TrySetCanceled();&lt;br /&gt;                    else&lt;br /&gt;                        tcs.TrySetResult(e.Result);&lt;br /&gt;                };&lt;br /&gt;&lt;br /&gt;            client.GetCustomersAsync();&lt;br /&gt;&lt;br /&gt;            return tcs.Task;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;p&gt;The code for this was adapted from the Task-based AsynchronousPattern whitepaper listed under "Additional Information" below. Thetask is set up to return an ObservableCollection of Customers,which is (by default) what the service reference code generationcreated for me in the CustomerServiceClient class. (I also love howwe managed to get both spellings of Canceled into the same methodO_o.)&lt;/p&gt;&lt;p&gt;Once you have the proxy created, it may be used from theViewModel, or any other code. Here it is in the button-click codeon MainPage. As before, the event handler has been marked with theasync modifier in order to support using the await operator.&lt;/p&gt;&lt;pre class="brush: csharp;"&gt;private async void TestAsync_Click(object sender, RoutedEventArgs e)&lt;br /&gt;{&lt;br /&gt;    var customers = await CustomerServiceProxy.GetCustomers();&lt;br /&gt;&lt;br /&gt;    foreach (Customer c in customers)&lt;br /&gt;    {&lt;br /&gt;        Debug.WriteLine(c.FirstName + " " + c.LastName);&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;p&gt;This can serve as a good starting point for your own code. Notonly will it make your async code easier to work with when usingVisual Studio 11, but it &lt;strong&gt;will also help you bridge towardsand share code with .NET 4.5 WPF, and to Metro style XAMLapplications.&lt;/strong&gt;&lt;/p&gt;&lt;h3&gt;Additional Information&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;&lt;ahref="http://www.microsoft.com/en-us/download/details.aspx?id=19957"&gt;Download: Task-based Asynchronous Pattern&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;ahref="http://10rem.net/blog/2011/09/04/simplifying-async-networking-with-tasks-in-silverlight-5"&gt;Simplifying Async Networking with Tasks in Silverlight 5&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;ahref="http://10rem.net/blog/2012/05/21/under-the-covers-of-the-async-modifier-and-await-operator-in-net-45-and-c-metro-style-applications"&gt;Under the covers of the async modifier and await operator in .NET4.5 and C# Metro style applications&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/j5enxX1Qm7XOxG6Kvfwpoq2-pj4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/j5enxX1Qm7XOxG6Kvfwpoq2-pj4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/j5enxX1Qm7XOxG6Kvfwpoq2-pj4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/j5enxX1Qm7XOxG6Kvfwpoq2-pj4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/PeteBrown-Silverlight/~4/0VIFcIGRC_8" height="1" width="1"/&gt;</description>    </item>    <item>      <title>Yet Another Podcast #65–Windows 8 with Michael Crump</title>      <link>http://feedproxy.google.com/~r/JesseLiberty-SilverlightGeek/~3/eU6FEYjoC3Q/</link>      <comments>http://jesseliberty.com/2012/05/22/yet-another-podcast-65windows-8-with-michael-crump/#comments</comments>      <pubDate>Tue, 22 May 2012 21:03:21 +0000</pubDate>      <creator xmlns="http://purl.org/dc/elements/1.1/">Jesse Liberty</creator>      <category><![CDATA[Essentials]]></category>      <category><![CDATA[Podcast]]></category>      <category><![CDATA[Silverlight 5]]></category>      <category><![CDATA[Windows 8]]></category>      <category><![CDATA[YapCast]]></category>      <guid isPermaLink="false">http://jesseliberty.com/?p=5273</guid>      <encoded xmlns="http://purl.org/rss/1.0/modules/content/"><![CDATA[Talking with Michael Crump about The Ten Things Silverlight Programmers Should Know About Windows 8 – based on a number of presentations Michael has been giving lately on Win8. Michael’s Blog Michael’s Telerik Blog Michael on Twitter Listen &#124; Yet &#8230; Continue reading &#8594;<br/><br/>For the complete article and hyperlinks, please visit my blog at http://JesseLiberty.com<div class="feedflare"><a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=eU6FEYjoC3Q:tV5awBnRPeg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=eU6FEYjoC3Q:tV5awBnRPeg:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=eU6FEYjoC3Q:tV5awBnRPeg:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?i=eU6FEYjoC3Q:tV5awBnRPeg:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=eU6FEYjoC3Q:tV5awBnRPeg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?i=eU6FEYjoC3Q:tV5awBnRPeg:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=eU6FEYjoC3Q:tV5awBnRPeg:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?i=eU6FEYjoC3Q:tV5awBnRPeg:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=eU6FEYjoC3Q:tV5awBnRPeg:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?d=qj6IDK7rITs" border="0"></img></a></div><img src="http://feeds.feedburner.com/~r/JesseLiberty-SilverlightGeek/~4/eU6FEYjoC3Q" height="1" width="1"/>]]></encoded>      <commentRss xmlns="http://wellformedweb.org/CommentAPI/">http://jesseliberty.com/2012/05/22/yet-another-podcast-65windows-8-with-michael-crump/feed/</commentRss>      <comments xmlns="http://purl.org/rss/1.0/modules/slash/">0</comments>      <enclosure url="http://jesseliberty.com/wp-content/media/Show65.mp3" length="25865989" type="audio/mpeg" />      <origLink xmlns="http://rssnamespace.org/feedburner/ext/1.0">http://jesseliberty.com/2012/05/22/yet-another-podcast-65windows-8-with-michael-crump/</origLink>    </item>    <item>      <title>My new role at Microsoft</title>      <author>Pete Brown	</author>      <link>http://10rem.net/blog/2012/05/22/my-new-role-at-microsoft</link>      <pubDate>Tue, 22 May 2012 18:27:40 GMT</pubDate>      <guid>http://10rem.net/blog/2012/05/22/my-new-role-at-microsoft</guid>      <description>&lt;p&gt;This past Monday (May 14th), I officially started a new role atMicrosoft. I like to be as transparent as possible, so I thoughtI'd share with you all the details of this role as well as where Iwas before I moved to it.&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;TL;DR:&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;XAML. Windows. Developers. 'nuf said.&lt;/p&gt;&lt;/blockquote&gt;&lt;h3&gt;A little (optional) history&lt;/h3&gt;&lt;p&gt;I've been working for Microsoft for a bit over two and a halfyears now. In that time, I've learned that the old cliché about theonly constant being change is more true for Microsoft than justabout any other place I've seen. Mixing up teams, offices etc. fromtime to time helps make the orgs more efficient, and injects newideas into groups.&lt;/p&gt;&lt;p&gt;When I was hired by Scott Hanselman in fall 2009, my primaryfocus was to create a lot of content for &lt;ahref="http://windowsclient.net/"target="_blank"&gt;WindowsClient.net&lt;/a&gt; and &lt;ahref="http://silverlight.net/" target="_blank"&gt;Silverlight.net&lt;/a&gt;,as well as my blog. In addition to Scott, the team I joinedincluded Tim Heuer, Rey Bango, Joe Stagner, Jesse Liberty and JonGalloway. A few months later, Tim Heuer fulfilled a personal dreamand moved to the one of the product teams. Ten months after Ijoined, Scott moved to the Web team, and Rey Bango moved to anotherorg to focus on some initiatives that he had been leading. Some ofthis was due to the reorg that created the brand new organization(with all brand new leadership) my team was moved to.&lt;/p&gt;&lt;p&gt;The people I worked with and for in that org were awesome. I'veenjoyed that role, and particularly enjoyed working closely withpatterns &amp;amp; practices, MSDN, and more.&lt;/p&gt;&lt;p&gt;When Scott moved to the web team, I was given the lead of theCommunity Team which by then included me, Jesse Liberty, JonGalloway, and Joe Stagner. We accomplished some really greatthings, but at the same time, found ourselves focusing on tasks andpriorities which didn't quite fit the emerging mission, or in somecases the capabilities, of our new org. Joe and Jesse moved on fortheir own reasons, and are both now doing awesome stuff. Jon and Istayed in the org, but a team of two is hard to keep effective andimpactful, despite excellent management support and an org full ofpassionate and interesting people.&lt;/p&gt;&lt;p&gt;Jon and I agreed that he should &lt;ahref="http://weblogs.asp.net/jgalloway/archive/2012/04/18/i-ve-joined-the-windows-azure-technical-evangelist-team.aspx"&gt;pursue his interests and move to the Azure/Web evangelism team&lt;/a&gt;,a move that really fit what he wanted to do, and does best.&lt;strong&gt;Jon is an awesome guy, and I really enjoyed having him workfor me.&lt;/strong&gt; We continue to work together of course; the onlybig change for us with his move is that I no longer need to approvehis expense reports (yay!). I was certainly able to stay where Iwas, but once I was sure Jon was well-settled, and I no longer hadany direct reports, I was free to pursue something I was trulyexcited about.&lt;/p&gt;&lt;p&gt;&lt;img src="http://10rem.net/media/85121/Windows-Live-Writer_2f4c22815519_14B7E_image_19.png" width="650" height="198" alt="image" border="0" style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px"/&gt;&lt;/p&gt;&lt;h3&gt;My interests and passions&lt;/h3&gt;&lt;p&gt;I love working with XAML. Most of you have probably figured thatout. It's not my only interest by far, but it is a strong one. Mytechnical passions, in no particular order are:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Client application development, primarily on Windows (I don'town a Mac, and it's been around 12 years since I last ran a Linuxbox)&lt;/li&gt;&lt;li&gt;Open source hardware (and general maker / electronics / CNC /3d Printing and more)&lt;/li&gt;&lt;li&gt;Open source software&lt;/li&gt;&lt;li&gt;User experience and (to my limited ability) graphicsdesign&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;I especially enjoy writing and speaking about C# + XAML,although I'm starting to dabble in C++ + XAML (say that out loud)as well. I've always liked working with Silverlight and WPF, andthe communities of people building awesome stuff using them.Lately, I've been working a lot more with Windows 8 as well. I'mreally excited about what I see coming for Windows, and for Windows8 devices like tablets/slates. &lt;strong&gt;In fact, some time ago, Icommitted to creating a Windows 8 XAML book with Manning (the firstMEAP chapters will be out very soon - promise!).&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;I enjoy building applications and gadgets. I also lovespeaking to&lt;/strong&gt; &lt;strong&gt;developers, and wanted to speak moreat larger events.&lt;/strong&gt; I like helping to represent the productteams at Microsoft, as I've done for Silverlight and WPF. I wantedto join an org where I can work with the technologies I love, thecommunities I know and respect, and one which would allow me tocontinue the personal policies of &lt;strong&gt;honesty, openness,transparency, clarity, and authenticity&lt;/strong&gt; that were soimportant when working in Hanselman's (and later my) team.&lt;img src="http://10rem.net/media/85126/Windows-Live-Writer_2f4c22815519_14B7E_image_13.png" width="650" height="165" alt="image" border="0" style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px"/&gt;&lt;/p&gt;&lt;h3&gt;The new role&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;To that end, I've taken a very cool role working for &lt;ahref="https://twitter.com/gisardo" target="_blank"&gt;GiorgioSardo&lt;/a&gt; as a corporate Technical Evangelist on the WindowsPlatform Evangelism team, focusing on XAML&lt;/strong&gt;. (This is thecurrent incarnation of the team John Papa was on and that BrianKeller, Jaime Rodriguez, and Giorgio Sardo, among others, arecurrently on.) I will continue to be a remote employee, working outof my house near Annapolis, MD (between Baltimore, Washington andthe Chesapeake Bay). I will also continue working with theSilverlight and WPF community, but will add to that a much largerfocus on Windows 8 XAML going forward, and possibly some phone worktoo. &lt;strong&gt;Metro style apps have huge potential both short termand long term in all areas of client development from consumers toline of business. I want to be a part of their success, part ofyour success.&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Among the many things I'm going to try to accomplish are to helpfind ways, &lt;strong&gt;for those who want to, to make it easier fortoday's XAML developers to prepare for and migrate apps to WinRTXAML if appropriate for their application&lt;/strong&gt;. &lt;em&gt;No forcing.You use the technology that best meets your business andapplication goals and requirements&lt;/em&gt;. I'll continue to do thisin a wide-reaching way through events, articles, toolkits, samples,books, twitter, blogs and much more, and also add to that workingmuch more closely with people in the field, folks in the community,and with some individual customers.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;During my interviews, I made it very clear that I am ahorrible sales person.&lt;/strong&gt; Gladly, that's not this role. Somecommunity folks I speak with consider evangelism synonymous withsales, but like so many roles at Microsoft, the role is really whatyou make of it as an individual. The team I'm part of is full ofhigh-integrity individuals who all believe in the same things I do.During the day of interviews, the ideas I proposed, ideas that Ibelieve many of you will find match with or support your own goals,were received with enthusiasm and excitement.&lt;/p&gt;&lt;p&gt;I'm really happy to continue with XAML, and to continue workingwith the community, now with more Metro. My first task? Helping tobuild a cool and relevant keynote demo. EXACTLY the type of thingI've wanted to do for a long time :)&lt;/p&gt;&lt;p&gt;In addition to that, last week I had VSLive NYC where I hadthree sessions covering &lt;strong&gt;Silverlight, WPF, and Windows8&lt;/strong&gt;, a Saturday code camp session in Philly on&lt;strong&gt;Windows 8 XAML&lt;/strong&gt;, and coming up in June, a &lt;ahref="http://northamerica.msteched.com/topic/details/2012/DEV335"&gt;TechEd session on WPF 4.5&lt;/a&gt;. Oh, and in August I'll be speaking at &lt;ahref="http://www.thatconference.com/"&gt;thatConference&lt;/a&gt; on&lt;strong&gt;Windows 8 for Silverlight and WPF devs&lt;/strong&gt;, and alsoon &lt;strong&gt;open source hardware&lt;/strong&gt;, and again at VSLive on&lt;strong&gt;WPF and Windows 8 XAML&lt;/strong&gt;. You can see that I havequite a mix there, with good representation from all the clientmembers of the XAML family.&lt;/p&gt;&lt;p&gt;And, of course, I will &lt;strong&gt;continue with my NETMF and gadgetwork&lt;/strong&gt;. That's always been as much a personal passion asanything. I often find a way to work it in with my primary focus,and will be doing that here for sure.&lt;/p&gt;&lt;p&gt;&lt;img src="http://10rem.net/media/85131/Windows-Live-Writer_2f4c22815519_14B7E_image_10.png" width="650" height="136" alt="image" border="0" style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px"/&gt;&lt;/p&gt;&lt;h3&gt;FAQ (or at least the Qs I think will be F)&lt;/h3&gt;&lt;p&gt;Forgive me if any of these are pretentious. I've jut made a bestguess as to the questions you may have.&lt;/p&gt;&lt;h4&gt;Q: Are you abandoning Silverlight / WPF?&lt;/h4&gt;&lt;p&gt;A: Nope. Those technologies are just as important now as ever.Silverlight 5 was an exciting and huge release. WPF 4.5 is anequally interesting release. I &lt;strong&gt;will focus more on XAML ingeneral and Windows 8 in particular&lt;/strong&gt;, but I'm keeping myfingers in all the pots. &lt;strong&gt;My Silverlight 5 book should beback from the printers any day now&lt;/strong&gt;, so you can enjoy all1000 printed pages (and 200-300 downloadable pages) as well. I alsohave Silverlight and WPF sessions at upcoming conferences, and aslong as folks keep showing up to learn, and I have something new toteach, I'll keep teaching.&lt;/p&gt;&lt;h4&gt;Q: Are you going to focus exclusively on Windows 8 XAML&lt;/h4&gt;&lt;p&gt;A: Not exclusively, but I will certainly focus more time andenergy in that area. It's new. It's exciting, and I think&lt;strong&gt;it's going to be a big deal for every developer&lt;/strong&gt;.See my list of events above for the current mix of sessions I'mdoing, for example.&lt;/p&gt;&lt;h4&gt;Q: What about your NETMF/Gadgeteer Stuff?&lt;/h4&gt;&lt;p&gt;A: I'll still work on that, as I really enjoy it. It was alwaysa hobby and will continue to be one. Also, I'm always looking forways to sneak it into other technology demos. :)&lt;/p&gt;&lt;h4&gt;Q: What happened to your Silverlight 5 book?&lt;/h4&gt;&lt;p&gt;A: I wrote WAY too much, so it took forever to edit and print.It's out any day now. The delay is completely my fault.&lt;/p&gt;&lt;h4&gt;Q: What is your next book?&lt;/h4&gt;&lt;p&gt;A: Windows 8 XAML, of course. I've had this one in progress forquite some time, but the burden of editing 1300 pages of my SL5book caused a bit of a delay :). Expect to see the MEAP soon,hopefully in time for our June Windows release. The next book willbe, by Manning's insistence,&amp;nbsp;much shorter but equally asuseful :)&lt;/p&gt;&lt;h4&gt;Q: Are you moving to Redmond?&lt;/h4&gt;&lt;p&gt;A: Nope. I am very proud to be the first remote worker in thisteam at Microsoft. Working remotely sometimes limits the things youcan do at Microsoft, but I'm really glad this org not only lookedpast that, but embraced it as a strength. &lt;strong&gt;Besides, workingon the east coast lets me be a nightowl at home, but still appearto be a morning person to those in Redmond&lt;/strong&gt; ;)&lt;/p&gt;&lt;h4&gt;Q: Why Windows 8 XAML as a primary focus?&lt;/h4&gt;&lt;p&gt;A: I'm a super ADD person, just ask my wife. (Squirrel!!) I neednew and exciting things to keep me going. They also need to be newthings that &lt;strong&gt;I'm genuinely excited about&lt;/strong&gt;, and whichI think will be a &lt;strong&gt;benefit to the community ofdevelopers&lt;/strong&gt;. Metro and WinRT + XAML + .NET 4.5 definitelyfits that criteria. &lt;strong&gt;I'm even excited about the HTML/JS sideof Windows 8 Metro, but I have close to zero skills therecurrently.&lt;/strong&gt;&lt;/p&gt;&lt;h4&gt;Q: Why the corporate/platform evangelism team?&lt;/h4&gt;&lt;p&gt;A: This is the team that builds the customer connections,creates the keynote demos, generally has earliest and best accessto cool stuff, and has a &lt;strong&gt;bunch of very cool people Irespect&lt;/strong&gt;. It also helps that they wanted me to join :)&lt;/p&gt;&lt;h4&gt;Q: Will you continue to help run the Silverlight and WPF/ClientApp Dev MVP programs&lt;/h4&gt;&lt;p&gt;A: Yes, in the same capacity as today.&lt;/p&gt;&lt;h4&gt;Q: Metro all the things?&lt;/h4&gt;&lt;p&gt;YES :)&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.quickmeme.com/meme/35ogr3/"target="_blank"&gt;&lt;img src="http://10rem.net/media/85136/Windows-Live-Writer_2f4c22815519_14B7E_image_3.png" width="322" height="239" alt="image" border="0" style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;(&lt;a href="http://www.flickr.com/photos/57933043@N00/6833646427/"target="_blank"&gt;Robot minifig photo source&lt;/a&gt;.)&lt;/p&gt;&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/9gBDJWMpOFMq2ueVTdfFtSxccGs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/9gBDJWMpOFMq2ueVTdfFtSxccGs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/9gBDJWMpOFMq2ueVTdfFtSxccGs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/9gBDJWMpOFMq2ueVTdfFtSxccGs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/PeteBrown-Silverlight/~4/VFxiT0-YoGE" height="1" width="1"/&gt;</description>    </item>    <item>      <title>The correct AdventureWorks database to use for Silverlight 5 in Action (and Silverlight 4 in Action) book examples</title>      <author>Pete Brown	</author>      <link>http://10rem.net/blog/2012/05/21/the-correct-adventureworks-database-to-use-for-silverlight-5-in-action-and-silverlight-4-in-action-book-examples</link>      <pubDate>Tue, 22 May 2012 01:33:45 GMT</pubDate>      <guid>http://10rem.net/blog/2012/05/21/the-correct-adventureworks-database-to-use-for-silverlight-5-in-action-and-silverlight-4-in-action-book-examples</guid>      <description>&lt;p&gt;A reader tipped me off that the AdventureWorks schema haschanged since I (and my tech reviewers) last downloaded a copy.Some of the schema changes make the database unworkable with thein-book examples for Silverlight 4 in Action and &lt;ahref="http://manning.com/pbrown2/" target="_blank"&gt;Silverlight 5 inAction&lt;/a&gt;. In particular, the Person table is no longer there inrecent versions.&lt;/p&gt;&lt;p&gt;A version of the database that is compatible with the examplesin my Silverlight book can be found on this page:&lt;/p&gt;&lt;p&gt;&lt;atitle="http://msftdbprodsamples.codeplex.com/releases/view/4004"href="http://msftdbprodsamples.codeplex.com/releases/view/4004"&gt;http://msftdbprodsamples.codeplex.com/releases/view/4004&lt;/a&gt;&lt;/p&gt;&lt;p&gt;The top download, AdventureWorksDB.msi is what you want. It'sdated May 7, 2007. It's maked as SQL Server 2005, but it works withmore recent version. A later version of the database may work(pretty sure the one I used was dated 2009 or 2010), but this oneis the only currently available compatible version we can find.&lt;/p&gt;&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Q7C6-rm65rseft9godPYU8CLY2c/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Q7C6-rm65rseft9godPYU8CLY2c/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Q7C6-rm65rseft9godPYU8CLY2c/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Q7C6-rm65rseft9godPYU8CLY2c/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/PeteBrown-Silverlight/~4/5BWt1QZtifU" height="1" width="1"/&gt;</description>    </item>    <item>      <title>Windows 8 Metro: Something about application life-cycle</title>      <description>&lt;table width="20"&gt;    &lt;tbody&gt;        &lt;tr&gt;            &lt;td&gt;            &lt;div class="fb-like" data-show-faces="true" data-send="false" data-href="http://www.silverlightshow.net/items/Windows-8-Metro-Something-about-application-life-cycle.aspx" data-font="segoe ui" data-layout="button_count"&gt;&lt;/div&gt;            &lt;/td&gt;            &lt;td&gt;&lt;a href="https://twitter.com/share" class="twitter-share-button" data-via="silverlightshow" data-counturl="http://www.silverlightshow.net/items/Windows-8-Metro-Something-about-application-life-cycle.aspx" data-count="horizontal" data-text="Reading @aboschin's article '#Windows8 Metro: Something about app life-cycle' #win8 #win8dev" data-url="ttp://slshow.net/JwhQiE"&gt;Tweet&lt;/a&gt;&lt;/td&gt;            &lt;td&gt;&lt;g:plusone size="medium" href="http://www.silverlightshow.net/items/Windows-8-Metro-Something-about-application-life-cycle.aspx"&gt;&lt;/g:plusone&gt;            &lt;/td&gt;            &lt;td&gt;            &lt;/td&gt;        &lt;/tr&gt;    &lt;/tbody&gt;&lt;/table&gt;&lt;p style="text-align: justify;"&gt;Also if currently you are probably running Windows 8 on a virtual machine or luckily on a computer, there is not any doubt that this new operating system and especially the metro-style interface is dedicated to touch enabled devices like tablets. The plans of Microsoft infact include the new WOA keywork where the acronym stands for Windows On ARM that is the aim of making available this interface on a wide set of mobile devices that currently embrace this successful processor architecture. &lt;/p&gt;&lt;p style="text-align: justify;"&gt;Running on a tablet does not only imply a different input interface like the touch screen, but also it requires a careful use of system resources that are not always large on this kind of device. This is the reason why metro-style applications have an application lifecycle that is mostly similar to the Windows Phone than of classical desktop apps.&lt;/p&gt;&lt;div style="border: 1px solid #dddddd; padding-bottom: 5px; background-color: #f3f3f3; margin-top: 5px; padding-left: 10px; width: 200px; float: right; margin-left: 10px; margin-right: 5px; padding-top: 5px;"&gt;&lt;h3&gt;Don't miss...&lt;/h3&gt;&lt;ul style="list-style-type: circle; margin: 0px; padding-left: 20px; font-size: 12px;"&gt;    &lt;li style="padding-bottom: 5px;"&gt;&lt;a href="http://www.silverlightshow.net/news/Webinar-Live-Tiles-and-Notifications-in-Windows-8.aspx"&gt;Free webinar on May 22: Live Tiles and Notifications in Windows 8&lt;/a&gt; &lt;/li&gt;    &lt;li style="padding-bottom: 5px;"&gt;&lt;a href="http://www.silverlightshow.net/items/Windows-8-and-the-future-of-XAML-Part-1-An-overview-of-the-Windows-8-platform.aspx"&gt;The article series: Windows 8 and the future of XAML&lt;/a&gt; &lt;/li&gt;    &lt;li style="padding-bottom: 5px;"&gt;&lt;a href="http://www.silverlightshow.net/ebooks/wp7.aspx"&gt;Ebook by A. Boschin: Introduction to Windows Phone 7&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style="padding-bottom: 5px; text-align: center;"&gt;&lt;a href="http://www.silverlightshow.net/ebooks/wp7.aspx" target="_self"&gt;&lt;img style="width: 70px; height: 99px;" alt="Ebook: Introduction to Windows Phone 7" src="http://www.silverlightshow.net/Storage/Ebooks/wp7_ebook_thumb.png" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="http://www.silverlightshow.net/ebooks.aspx"&gt;All SilverlightShow Ebooks&lt;/a&gt;&amp;nbsp;&lt;img alt="" src="http://www.silverlightshow.net/Storage/arrow-content.jpg" /&gt;&lt;/p&gt;&lt;/div&gt;&lt;h4 style="text-align: justify;"&gt;It is matter of life or suspension&lt;/h4&gt;&lt;p style="text-align: justify;"&gt;As a user, when you start a desktop application, you are exactly aware of the boundaries of its life. You click the icon and the application starts, then you use it and finally you hit the close button and the application closes. There are nothing behind this common process but you, as the final user, are responsible to decide how many applications runs at the same time so the management of system resources is completely up to you. Also if the previous sentence oversimplifies the matter, since behind the scenes the operating system manages system resources in an optimal way, if you continue to open a number of apps, at a given point you reach the maximum of resources available and you get an error.&lt;/p&gt;&lt;p style="text-align: justify;"&gt;From the metro point of view, this scenario completely changes. The only thing you are exactly aware is the time when you start your application the very first time after you switched on your device, and from this point the lifetime of the application is completely up to the operating system. You can still choose to close a metro-style app but this is not exactly required nor favored. In metro guidelines is strongly stated that your application must not have a "close button" or such a way to close the application, under the penalty of failure of the certification for the marketplace. If the user choose to close the app he has to use a combination of ALT+F4 or the close gesture (swipe the screen from the top to the bottom). The most common way to go away from the current app is by pressing the start button that brings you to the start screen but this not really close the app. &lt;/p&gt;&lt;p style="text-align: justify;"&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/AndreaBoschin/__image_2.png"&gt;&lt;img style="background-image: none; border-width: 0px; margin: 0px 15px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; float: left; border-style: solid;" title="image" alt="image" src="http://www.silverlightshow.net/Storage/Users/AndreaBoschin/___image_thumb.png" width="396" height="229" /&gt;&lt;/a&gt;The rule is really simple: you can always have only one application running. You can hit the maximum of two apps running at the same time, only in a few cases, when one is snapped and the other runs as filled. In all the other states Windows only allows a single application to run, so probably this is the most common scenario. What it happens behind the scenes is that when you start an application it get its own space in terms of system resources and becomes the current running application, but when you hit start and move to another one, the application you are leaving is "suspended". This means the OS saves the current execution state and prevent the processor from continue to execute it; in this state the application resides in memory and continue to allocate the space assigned to it but it does not currently run.&lt;/p&gt;&lt;p style="text-align: justify;"&gt;To become aware of this process you can do a simple exercise using the Task Manager. First of all go to desktop and open the new Task Manager. Then activate the "Show suspended status" item in the View menu. &lt;a href="http://www.silverlightshow.net/Storage/Users/AndreaBoschin/_image_4.png"&gt;&lt;img style="background-image: none; border-width: 0px; margin: 13px 0px 0px 21px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; float: right; border-style: solid;" title="image" alt="image" src="http://www.silverlightshow.net/Storage/Users/AndreaBoschin/_image_thumb_1.png" width="435" height="153" /&gt;&lt;/a&gt;This let you see when an application enters the suspended state. Now return to the start screen and activate some applications. Finally you have to return to desktop by pressing the WindowsKey+D and watch at the task manager. The situation you will see is almost similar to the one in the figure on the side where you have a number of apps in suspended state and a single that results to be running. But waiting 10 seconds also last application enters the suspended state. Windows works in a smart way. When the user leave an application it waits a few before to switch it to suspended because there is a chance the user returns to the application immediately. After 10 seconds passed, the operating system move the app to the suspended state but does not remove it from the memory. This enable the user to switch rapidly from an app to another since Windows only need to activate and deactivate the app without loading it from the disk. &lt;/p&gt;&lt;p style="text-align: justify;"&gt;This works fine until the systems has lot of resources. But obviously if you continue to run new apps, you reach a moment when the system needs to free some space to ensure a good feedback to the user. In this case Windows can decide to terminate some of the applications that are currently suspended. After the app has been terminated all the resources are freed and Windows can only starts it again from scratch.&lt;/p&gt;&lt;h4 style="text-align: justify;"&gt;The developer point of view&lt;/h4&gt;&lt;p style="text-align: justify;"&gt;Since the process I described above may seems completely automatic, there are some points that a developer must know to improve the feedback of the application.&amp;nbsp; After you created your application, it works also if you do anything about the lifetime management. The problem is that, especially in the case of termination, you have to take a decision about the experience you want for your user. If you do not handle this situation what the user will see it that randomly the application suddenly is reset and he loses the work he is doing. Windows is really careful in handling termination of the apps but when it finally goes on this way only the intervention of your code can save a situation that differently is like a complete shutdown. &lt;/p&gt;&lt;p style="text-align: justify;"&gt;To handle termination you have to act subtly. When Windows decide for the termination, it immediately releases all the resources without waiting nor notifying the application. As a developer the termination is completely transparent and when it happens it is too late to do anything. Differently you may assume that the termination happens only when the application has been suspended so the best it to act during suspension to save the state of the work as if the application is being terminated. &lt;/p&gt;&lt;p style="text-align: justify;"&gt;Starting to speak about code, the Application type is all what you need to handle this situation. As you know the App class defined in App.xaml.cs directly inherits from Application. So in this class you can attach some events to detect state changes:&lt;/p&gt;&lt;p style="text-align: justify;"&gt;&lt;strong&gt;OnLaunched&lt;/strong&gt;: it is called every time the application is activated. This event, only available as override, happens when the application start from scratch on the first run or after being terminated. Remember that from the point of view of the operating system both these scenario are identical. The difference comes from the value of PreviousExecutionState you get in the arguments. This may be "NotRunning" or "Terminated".&lt;/p&gt;&lt;p style="text-align: justify;"&gt;&lt;strong&gt;Suspending&lt;/strong&gt;: This event may be subscribed to get notified about the suspension of the application. You have to be aware that, when this even has been called you only have a few seconds to act to preserve the current state of the application. If you take long than 5 seconds Windows will assume that the application has crashed so terminate it. &lt;/p&gt;&lt;p style="text-align: justify;"&gt;&lt;strong&gt;Resuming&lt;/strong&gt;: The resuming event is raised only when the application is reactivated after being suspended. Pay attention that resuming does not happen if the application is terminated.&lt;/p&gt;&lt;p style="text-align: justify;"&gt;&lt;strong&gt;OnActivated&lt;/strong&gt;: This event is raised when the application is not activated normally. Since the normal activation raises OnLaunched, in other cases (a search, share, etc...) this event is called and you can user the ActivationKind enumeration to understand the reason. Also be aware of a number of methods that are specific to a single activation reason: OnSearchActivated, OnShareTargetActivatedm etc...&lt;/p&gt;&lt;p style="text-align: justify;"&gt;Reading carefully the events meaning, it becomes clear that there is two points where you have to handle the suspension. The first is the Suspending event. In this event you have to save the current state (loaded documents, fields, position of elements and so on...) to a persistent storage. The ApplicationData store is perfect for this purpose:&lt;/p&gt;&lt;div style="border: 1px solid silver; padding: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; width: 97.5%; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; cursor: text; text-align: left;" id="codeSnippetWrapper"&gt;&lt;div style="border-style: none; padding: 0px; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; text-align: left;" id="codeSnippet"&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; App()&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum3" style="color: #606060;"&gt;   3:&lt;/span&gt;     InitializeComponent();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum4" style="color: #606060;"&gt;   4:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.Suspending += &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; SuspendingEventHandler(OnSuspending);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum5" style="color: #606060;"&gt;   5:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum6" style="color: #606060;"&gt;   6:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum7" style="color: #606060;"&gt;   7:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;protected&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; OnSuspending(&lt;span style="color: #0000ff;"&gt;object&lt;/span&gt; sender, SuspendingEventArgs args)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum8" style="color: #606060;"&gt;   8:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum9" style="color: #606060;"&gt;   9:&lt;/span&gt;     SuspendingDeferral deferral = &lt;span style="color: #0000ff;"&gt;null&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum10" style="color: #606060;"&gt;  10:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum11" style="color: #606060;"&gt;  11:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;try&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum12" style="color: #606060;"&gt;  12:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum13" style="color: #606060;"&gt;  13:&lt;/span&gt;         deferral = args.SuspendingOperation.GetDeferral();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum14" style="color: #606060;"&gt;  14:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum15" style="color: #606060;"&gt;  15:&lt;/span&gt;         &lt;span style="color: #008000;"&gt;// save here the application state&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum16" style="color: #606060;"&gt;  16:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum17" style="color: #606060;"&gt;  17:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;finally&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum18" style="color: #606060;"&gt;  18:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum19" style="color: #606060;"&gt;  19:&lt;/span&gt;         deferral.Complete();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum20" style="color: #606060;"&gt;  20:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum21" style="color: #606060;"&gt;  21:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="text-align: justify;"&gt;Thanks to the SuspendingDeferral instance, returned by the call to SuspendingOperation.GetDeferral, you can inform the runtime that the application is saving its data. Then the call to the Completed method confirm that the application is ready to be suspended. The use of the deferral does not give you additional time. The limit of 5 seconds is still valid.&lt;/p&gt;&lt;p style="text-align: justify;"&gt;When the application is resumed without being terminated you have nothing to do. In this case the situation is completely handled by Windows. So you have only the responsibility of handle the OnLaunched event an check if the app has been restored by a terminations instead fo begin started from scratch:&lt;/p&gt;&lt;div style="border: 1px solid silver; padding: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; width: 97.5%; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; cursor: text; text-align: left;" id="codeSnippetWrapper"&gt;&lt;div style="border-style: none; padding: 0px; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; text-align: left;" id="codeSnippet"&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;protected&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;override&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; OnLaunched(LaunchActivatedEventArgs args)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum3" style="color: #606060;"&gt;   3:&lt;/span&gt;     var rootFrame = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; Frame();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum4" style="color: #606060;"&gt;   4:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.EnsureInitialized(rootFrame, args);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum5" style="color: #606060;"&gt;   5:&lt;/span&gt;     rootFrame.Navigate(&lt;span style="color: #0000ff;"&gt;typeof&lt;/span&gt;(MainPageView));&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum6" style="color: #606060;"&gt;   6:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum7" style="color: #606060;"&gt;   7:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum8" style="color: #606060;"&gt;   8:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; EnsureInitialized(Frame rootFrame, IActivatedEventArgs args)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum9" style="color: #606060;"&gt;   9:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum10" style="color: #606060;"&gt;  10:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (args.PreviousExecutionState == ApplicationExecutionState.Terminated)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum11" style="color: #606060;"&gt;  11:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum12" style="color: #606060;"&gt;  12:&lt;/span&gt;         &lt;span style="color: #008000;"&gt;// restore the state here&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum13" style="color: #606060;"&gt;  13:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum14" style="color: #606060;"&gt;  14:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum15" style="color: #606060;"&gt;  15:&lt;/span&gt;     Window.Current.Content = rootFrame;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum16" style="color: #606060;"&gt;  16:&lt;/span&gt;     Window.Current.Activate();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum17" style="color: #606060;"&gt;  17:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="text-align: justify;"&gt;Thanks to the IActivatedEventArgs interface the EnsureInitialized method can be used also in case of different activations. As an example, if th app is started by a Search request, you need to threat the application state like in the case it starts normally. You can write the following code:&lt;/p&gt;&lt;div style="border: 1px solid silver; padding: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; width: 97.5%; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; cursor: text; text-align: left;" id="codeSnippetWrapper"&gt;&lt;div style="border-style: none; padding: 0px; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; text-align: left;" id="codeSnippet"&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;protected&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;override&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; OnSearchActivated(SearchActivatedEventArgs args)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum3" style="color: #606060;"&gt;   3:&lt;/span&gt;     var rootFrame = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; Frame();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum4" style="color: #606060;"&gt;   4:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.EnsureInitialized(rootFrame, args);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum5" style="color: #606060;"&gt;   5:&lt;/span&gt;     rootFrame.Navigate(&lt;span style="color: #0000ff;"&gt;typeof&lt;/span&gt;(SearchGridPageView), args.QueryText);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum6" style="color: #606060;"&gt;   6:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="text-align: justify;"&gt;Now the point is: how can I persist the state? The right place is the application data store. This store is mostly known as IsolatedStorage in Silverlight and Windows Phone. For metro-style apps this storage has a number of additional features but for now it suffice you know that it can receive your files as a normal filesystem restricted to your app only. For this purpose the best is searching the SDK examples. In most of the XAML examples there is a SuspensionManager class that already implements all you need to save the application state. The important part using this class is to ensure the data you need do store is serializable using the DataContractSerializer. This means to decorate the classes with DataContractAttribute and DataMemberAttribute. &lt;/p&gt;&lt;div style="border: 1px solid silver; padding: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; width: 97.5%; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; cursor: text; text-align: left;" id="codeSnippetWrapper"&gt;&lt;div style="border-style: none; padding: 0px; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; text-align: left;" id="codeSnippet"&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt; [DataContract]&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt;   2:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;class&lt;/span&gt; ApplicationState&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum3" style="color: #606060;"&gt;   3:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum4" style="color: #606060;"&gt;   4:&lt;/span&gt;     [DataMember]&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum5" style="color: #606060;"&gt;   5:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;int&lt;/span&gt; Number { get; set; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum6" style="color: #606060;"&gt;   6:&lt;/span&gt;     [DataMember]&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum7" style="color: #606060;"&gt;   7:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;string&lt;/span&gt; Name { get; set; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum8" style="color: #606060;"&gt;   8:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;Then you have to add the types to the KnownTypes collection:&lt;/p&gt;&lt;div style="border: 1px solid silver; padding: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; width: 97.5%; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; cursor: text; text-align: left;" id="codeSnippetWrapper"&gt;&lt;div style="border-style: none; padding: 0px; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; text-align: left;" id="codeSnippet"&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; App()&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum3" style="color: #606060;"&gt;   3:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.InitializeComponent();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum4" style="color: #606060;"&gt;   4:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.Suspending += OnSuspending;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum5" style="color: #606060;"&gt;   5:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum6" style="color: #606060;"&gt;   6:&lt;/span&gt;     SuspensionManager.KnownTypes.Add(&lt;span style="color: #0000ff;"&gt;typeof&lt;/span&gt;(ApplicationState));&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum7" style="color: #606060;"&gt;   7:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;At this point you have to manage to save the state to the SuspensionManager and reload these information when it is required. It is important you avoid to restore the state if you are in the case of a fresh start because the guidelines express indicate it as a worst practice. Instead you have to handle the start from a termination:&lt;/p&gt;&lt;div style="border: 1px solid silver; padding: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; width: 97.5%; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; cursor: text; text-align: left;" id="codeSnippetWrapper"&gt;&lt;div style="border-style: none; padding: 0px; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; text-align: left;" id="codeSnippet"&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; BlankPage_Loaded(&lt;span style="color: #0000ff;"&gt;object&lt;/span&gt; sender, RoutedEventArgs e)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum3" style="color: #606060;"&gt;   3:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (SuspensionManager.SessionState.ContainsKey(&lt;span style="color: #006080;"&gt;"State"&lt;/span&gt;))&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum4" style="color: #606060;"&gt;   4:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum5" style="color: #606060;"&gt;   5:&lt;/span&gt;         ApplicationState state = SuspensionManager.SessionState[&lt;span style="color: #006080;"&gt;"State"&lt;/span&gt;] &lt;span style="color: #0000ff;"&gt;as&lt;/span&gt; ApplicationState;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum6" style="color: #606060;"&gt;   6:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum7" style="color: #606060;"&gt;   7:&lt;/span&gt;         &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (state != &lt;span style="color: #0000ff;"&gt;null&lt;/span&gt;)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum8" style="color: #606060;"&gt;   8:&lt;/span&gt;         {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum9" style="color: #606060;"&gt;   9:&lt;/span&gt;             &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.theName.Text = state.Name;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum10" style="color: #606060;"&gt;  10:&lt;/span&gt;             &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.theNumber.Text = state.Number.ToString();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum11" style="color: #606060;"&gt;  11:&lt;/span&gt;         }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum12" style="color: #606060;"&gt;  12:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum13" style="color: #606060;"&gt;  13:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum14" style="color: #606060;"&gt;  14:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum15" style="color: #606060;"&gt;  15:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; OkButton_Click(&lt;span style="color: #0000ff;"&gt;object&lt;/span&gt; sender, RoutedEventArgs e)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum16" style="color: #606060;"&gt;  16:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum17" style="color: #606060;"&gt;  17:&lt;/span&gt;     SuspensionManager.SessionState[&lt;span style="color: #006080;"&gt;"State"&lt;/span&gt;] = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; ApplicationState&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum18" style="color: #606060;"&gt;  18:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum19" style="color: #606060;"&gt;  19:&lt;/span&gt;         Name = &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.theName.Text,&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum20" style="color: #606060;"&gt;  20:&lt;/span&gt;         Number = &lt;span style="color: #0000ff;"&gt;int&lt;/span&gt;.Parse(&lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.theNumber.Text)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum21" style="color: #606060;"&gt;  21:&lt;/span&gt;     };&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="border-style: none; text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible;"&gt;&lt;span id="lnum22" style="color: #606060;"&gt;  22:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;Finally you have to add the SaveAsync and LoadAsync method calls to the Suspending and OnLaunched events. This methods use the DataContractSerializer to serialize and deserialize the SuspensionManager content and use the Aplication data store to persist it as a file.&lt;/p&gt;&lt;h4 style="text-align: justify;"&gt;Debugging suspension&lt;/h4&gt;&lt;p style="text-align: justify;"&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/AndreaBoschin/__image_6.png"&gt;&lt;img style="margin: 9px 14px 2px 0px; display: inline; float: left;" title="image" alt="image" src="http://www.silverlightshow.net/Storage/Users/AndreaBoschin/_image_thumb_2.png" width="113" height="38" /&gt;&lt;/a&gt;If you try to observe the lifecycle of an application that is running in debug mode, you will understand that under these conditions there is something different. When an application is debugged it is never suspended, so it is hard to debug the suspension and resume phases. For this purpose in Visual Studio 11 there is a small toolbar useful for this purpose. These buttons can simulate suspension and termination of the application and in this case your breakpoins are honored.&lt;/p&gt;&lt;p style="text-align: justify;"&gt;The suspension and resume in Windows 8 is important to give a better experience to the user, thaks to the optimization of the system resources. In the next article in the series I will write about another arpect that has the same direction: the asyncronicity and how to deal with it.&lt;/p&gt;</description>      <link>http://www.silverlightshow.net/items/Windows-8-Metro-Something-about-application-life-cycle.aspx</link>      <author>editorial@silverlightshow.net (Andrea Boschin  )</author>      <comments>http://www.silverlightshow.net/items/Windows-8-Metro-Something-about-application-life-cycle.aspx#comments</comments>      <guid isPermaLink="true">http://www.silverlightshow.net/items/Windows-8-Metro-Something-about-application-life-cycle.aspx</guid>      <pubDate>Mon, 21 May 2012 01:46:38 GMT</pubDate>    </item>    <item>      <title>Using SQLite in a Metro style app</title>      <category>PDC</category>      <category>developer</category>      <category>expression</category>      <category>open source</category>      <category>silverlight</category>      <category>tech stuff</category>      <category>windows</category>      <category>xaml</category>      <link>http://feeds.timheuer.com/~r/timheuer/~3/Wjmq-id8Flk/using-sqlite-in-metro-style-app.aspx</link>      <description>&lt;p&gt;At the “Developing Windows 8 Metro style apps with C++” event that happened on 18-May-2012, we saw and heard some very interesting things.  If you were watching live then hopefully you didn’t see how I tried to work through my presentation while my disk was suspiciously guzzling every last byte until it eventually ran out of space!  But I digress…&lt;/p&gt;&lt;p&gt;During the &lt;a href="http://channel9.msdn.com/Events/Windows-Camp/Developing-Windows-8-Metro-style-apps-in-Cpp/Cpp-for-the-Windows-Runtime"&gt;keynote presentation by &lt;strong&gt;Herb Sutter&lt;/strong&gt;&lt;/a&gt;, we brought up several customers that are well-known in the native code world to talk about their experiences with Metro style apps and C++/Cx.  In particular hopefully this one caught your eye:&lt;/p&gt;&lt;p&gt;&lt;img width="640" height="399" title="SQLite case study slide" style="margin-right: auto; margin-left: auto; float: none; display: block;" alt="SQLite case study slide" src="http://storage2.timheuer.com/sqlitedemo.PNG" /&gt;&lt;/p&gt;&lt;p&gt;That’s right, the team for &lt;strong&gt;&lt;a href="http://www.sqlite.org/"&gt;SQLite&lt;/a&gt;&lt;/strong&gt; was there to discuss how they were able to take their existing Win32 codebase and ensure that it worked well on Windows 8 as well as for Metro style apps.&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;SQLite is a in-process library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. The code for SQLite is in the public domain and is thus free for use for any purpose, commercial or private. SQLite is currently found in more applications than we can count, including several high-profile projects.&lt;/p&gt;&lt;p /&gt;&lt;p&gt;SQLite is an embedded SQL database engine. Unlike most other SQL databases, SQLite does not have a separate server process. SQLite reads and writes directly to ordinary disk files. A complete SQL database with multiple tables, indices, triggers, and views, is contained in a single disk file. The database file format is cross-platform - you can freely copy a database between 32-bit and 64-bit systems or between big-endian and little-endian architectures. These features make SQLite a popular choice as an Application File Format. Think of SQLite not as a replacement for Oracle but as a replacement for fopen().– Source: &lt;a title="http://www.sqlite.org/about.html" href="http://www.sqlite.org/about.html"&gt;http://www.sqlite.org/about.html&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.sqlite.org/crew.html"&gt;Dr. Richard Hipp&lt;/a&gt;&lt;/strong&gt;, the founder of SQLite, was on hand to announce the availability of the experimental branch they’ve been working on as well as that when the Release Preview of Windows 8 is made public that he will merge this code to the main trunk for SQLite, making it supported by them.  This is a really great thing for developers as SQLite has been a proven embedded database for numerous platforms and many, many customers.  The team prides themselves on testing and has millions of test cases that are validated each release.&lt;/p&gt;&lt;p&gt;As a Windows (and perhaps more specifically .NET) developer, you may not have had to build any lib from Open Source before of this type (i.e., native code) and since a binary is not being provided yet until Release Preview for Windows 8, I thought I’d share my tips on building the experimental bits, adding them to your projects and then using them with a client library.&lt;/p&gt;&lt;h2&gt;Building SQLite from source&lt;/h2&gt;&lt;p&gt;If you are looking for the sqlite3.dll with this WinRT support anywhere on the sqlite.org site, you won’t find it.  You will have to build the source yourself.  I highly recommend you get the code from the source rather than from any third party site.  Microsoft has worked with the team at SQLite to ensure compatibility and store certification.  For most .NET developers who have never grabbed native code source from an Open Source project and had to build it before, the maze of knowing what you should do can be confusing.  I’ve put together a cheat sheet on building SQLite from source for a Windows (and .NET developer) and put it on my SkyDrive: &lt;a href="http://sdrv.ms/Kz8XKV"&gt;&lt;strong&gt;Building SQLite from source&lt;/strong&gt;&lt;/a&gt;.  The OneNote I have has the details you need for the tools that will be required.  &lt;/p&gt;&lt;p&gt;&lt;iframe width="98" height="120" src="https://skydrive.live.com/embed?cid=A737583042956228&amp;amp;resid=A737583042956228%211940&amp;amp;authkey=APxp6l-7lsdLBsY" frameborder="0" scrolling="no"&gt;&lt;/iframe&gt;&lt;/p&gt;&lt;p&gt;In a nutshell you’ll need:&lt;/p&gt;&lt;ul&gt;    &lt;li&gt;Visual Studio (easiest way to get the C++ compiler) &lt;/li&gt;    &lt;li&gt;ActiveTcl &lt;/li&gt;    &lt;li&gt;Update for gawk.exe &lt;/li&gt;    &lt;li&gt;Fossil (the source control system used by SQLite) &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Once you have these, you are ready to build SQLite.  Again, I’ll defer to my instructions on the details of setup.  Once your setup is complete, from a developer command prompt you’d run:&lt;/p&gt;&lt;div id="codeSnippetWrapper" style="margin: 20px 0px 10px; padding: 4px; border: 1px solid silver; width: 97.5%; text-align: left; line-height: 12pt; overflow: auto; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; cursor: text; direction: ltr; max-height: 200px; background-color: rgb(244, 244, 244);"&gt;&lt;div id="codeSnippet" style="padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum1" style="color: rgb(96, 96, 96);"&gt;   1:&lt;/span&gt; nmake -f Makefile.msc sqlite3.dll FOR_WINRT=1&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;The result of this will give you basically 4 files that are of likely most importance to you: sqlite3.c, sqlite3.h, sqlite3.dll, sqlite3.pdb.&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;NOTE: The resulting pdb/dll that is built will be architecture specific.  If you used an x86 command prompt then that is what you have.  Be aware of this (as noted later in this post).&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;At a minimum you’ll want sqlite3.dll if you are a .NET developer, but as a native code developer you will likely be more interested in the others as well.  After this step, you now have a Windows Store compliant version of SQLite to include in your applications.&lt;/p&gt;&lt;h2&gt;Runtime versus client access&lt;/h2&gt;&lt;p&gt;Now at this point is where I’ve seen some confusion.  Folks are asking &lt;em&gt;How do I include this, don’t I need a WinMD file to reference?&lt;/em&gt;  Let me diverge a bit and explain a few things.&lt;/p&gt;&lt;p&gt;The result of compiling the binary above produces primarily one thing…which I will call the “Engine” in this post.  This is the SQLite runtime and logic required to create/interact with SQLite database files.  This is NOT, however, an access library, which I will call the “Client” in this post.  If you are a managed code or JavaScript developer, at this point, all you have is the Engine, the database runtime.  You have no Client to access it.&lt;/p&gt;&lt;p&gt;Now, if you are a C++ developer you are probably okay at this point and don’t care much about what I have to say.  You have the header and are likely saying &lt;em&gt;I’ve got the header, get out of my way.&lt;/em&gt;  And that is okay.  For C++ developers I think you’ll likely be accessing the database more directly through the SQLite APIs provided in the header.&lt;/p&gt;&lt;p&gt;I call out this distinction because this step provides you with the database engine you need to create a database and have it be store-compliant.  So if you are a JavaScript or .NET developer, what are you to do?  Stay tuned…let’s first get the Engine included in our app package.&lt;/p&gt;&lt;h2&gt;Including SQLite in your app package&lt;/h2&gt;&lt;p&gt;As I noted above, as a native code developer, having the header, lib and c file you may be okay and don’t care to read this.  I  &lt;strong&gt;personally&lt;/strong&gt; think, however that I’d always just want the binary from my vendor rather than always include source in my files.  That said, the SQLite build process does product the amalgamation (sqlite3.c) you can just include in your native code app.&lt;/p&gt;&lt;p&gt;If you choose to go the binary file route (sqlite3.dll) then you need to simply follow a few principles to ensure that it is included in your package when you build your app/package.  These principles are simple:&lt;/p&gt;&lt;ul&gt;    &lt;li&gt;include the architecture-specific binary &lt;/li&gt;    &lt;li&gt;ensure the sqlite3.dll is marked as Content in your project &lt;/li&gt;    &lt;li&gt;ensure you note that you now have a native code dependency (not needed if you are already a C++ Metro style app) &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;These two items will ensure that when you build (even for debug via F5) or when you package for the store, that the Engine is included in your package.  Marking as content is simply ensuring that after you add the file to your project, ensure the file properties note that it is content.  In .NET apps this is making the &lt;em&gt;Build Action&lt;/em&gt; property Content.  In JavaScript applications ensure the &lt;em&gt;Package Action&lt;/em&gt; is marked Content.&lt;/p&gt;&lt;p&gt;Declaring the native code dependency means you simply add a reference to the Microsoft C++ Runtime Library via the &lt;em&gt;Add Reference&lt;/em&gt; mechanisms in .NET and JavaScript applications.  By doing this (and again, this is a requirement of including SQLite in your app) you now cannot be architecture-neutral. This means no more AnyCPU for .NET.  When producing a package you’ll have to produce architecture-specific packages before uploading to the store.  Not to worry though as Visual Studio makes this incredibly easy.  The one thing you’ll have to remember though is that you’ll have to change the sqlite3.dll before building the packages as the DLL is architecture-specific itself.&lt;/p&gt;&lt;p&gt;Now this all should be easier right?  Wouldn’t it be nice if you could just &lt;em&gt;Add Reference&lt;/em&gt; to the Engine?  I personally think so.  I’ll be working with the SQLite team to see if they will adopt this method to make it as easy as this:&lt;/p&gt;&lt;p&gt;&lt;img title="SQLite Extension SDK" style="margin-right: auto; margin-left: auto; float: none; display: block;" alt="SQLite Extension SDK" src="http://storage2.timheuer.com/sqlitesdk.PNG" /&gt;&lt;/p&gt;&lt;p&gt;In doing so, you as a developer would just add a reference to the Engine and then during build time Visual Studio (well MSBuild actually) will do all the right things in picking up the architecture-specific binary for your app.  No fiddling on your part.  This method also makes it easier for C++ developers as well as a props file would automatically be merged to include the .lib for linking and the header file for development.  This method uses the &lt;a href="http://go.microsoft.com/fwlink/?LinkID=235409"&gt;Visual Studio Extension SDK&lt;/a&gt; mechanism that was introduced in Visual Studio 11.&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;NOTE: Again note that as a managed (.NET) app I’d also have to ensure that my package includes the Microsoft C++ Runtime package in order for this to work and pass store certification.&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;Native code developers may scoff at this approach, but I could get started in 2 steps: Add Reference, #include.  No tweaking of my project files at all because the Extension SDK mechanism in VS does all this for me behind the scenes.&lt;/p&gt;&lt;p&gt;So why don’t I just give you the VSIX to install and accomplish the above?  Well simply, because SQLite is not my product and we’ve had a good relationship with their team and I want to make sure they understand the benefits of this method before jumping right in.  I hope that they will like it as I think it makes it *really* simple for developers.&lt;/p&gt;&lt;h2&gt;Accessing the Engine from your app&lt;/h2&gt;&lt;p&gt;Great, you’ve compiled the bits, you’ve understood how to ensure sqlite3.dll gets packaged in your application…now &lt;strong&gt;how do you use it!!!&lt;/strong&gt;  Here’s the assessment of where we are at for Metro style apps as of the writing of this post.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;C++ app developers&lt;/strong&gt;: I think most C++ developers will get the header file (sqlite3.h) and be okay on their own with SQLite.  At this stage for them there doesn’t appear to be a real huge benefit of a WinRT wrapper to use the Engine.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;.NET developers&lt;/strong&gt;: I’ve messed around with a few libraries and believe the &lt;strong&gt;&lt;a href="https://github.com/praeclarum/sqlite-net"&gt;sqlite-net&lt;/a&gt;&lt;/strong&gt; project to be the most favorable for what I believe most use cases will be for SQLite and Metro style apps.  This is a .NET-only library (not WinRT) but is basically a “LINQ to SQLite” approach.  The Mono team uses this one as well.  The necessary .NET 4.5 Core changes are already included in the project on github.  So you just need to get the SQLite.cs file and include it in your project.  Using this library allows you to write code like this:&lt;/p&gt;&lt;div id="codeSnippetWrapper" style="margin: 20px 0px 10px; padding: 4px; border: 1px solid silver; width: 97.5%; text-align: left; line-height: 12pt; overflow: auto; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; cursor: text; direction: ltr; max-height: 200px; background-color: rgb(244, 244, 244);"&gt;&lt;div id="codeSnippet" style="padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum1" style="color: rgb(96, 96, 96);"&gt;   1:&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;sealed&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;partial&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;class&lt;/span&gt; BlankPage : Page&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum2" style="color: rgb(96, 96, 96);"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum3" style="color: rgb(96, 96, 96);"&gt;   3:&lt;/span&gt;     &lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; BlankPage()&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum4" style="color: rgb(96, 96, 96);"&gt;   4:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum5" style="color: rgb(96, 96, 96);"&gt;   5:&lt;/span&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;this&lt;/span&gt;.InitializeComponent();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum6" style="color: rgb(96, 96, 96);"&gt;   6:&lt;/span&gt;  &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum7" style="color: rgb(96, 96, 96);"&gt;   7:&lt;/span&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt; dbRootPath = Windows.Storage.ApplicationData.Current.LocalFolder.Path;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum8" style="color: rgb(96, 96, 96);"&gt;   8:&lt;/span&gt;         &lt;span style="color: rgb(0, 0, 255);"&gt;using&lt;/span&gt; (SQLiteConnection db = &lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt; SQLiteConnection(Path.Combine(dbRootPath, &lt;span style="color: rgb(0, 96, 128);"&gt;"mypeople.sqlite"&lt;/span&gt;)))&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum9" style="color: rgb(96, 96, 96);"&gt;   9:&lt;/span&gt;         {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum10" style="color: rgb(96, 96, 96);"&gt;  10:&lt;/span&gt;             db.CreateTable&amp;lt;Person&amp;gt;();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum11" style="color: rgb(96, 96, 96);"&gt;  11:&lt;/span&gt;  &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum12" style="color: rgb(96, 96, 96);"&gt;  12:&lt;/span&gt;             db.RunInTransaction(() =&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum13" style="color: rgb(96, 96, 96);"&gt;  13:&lt;/span&gt;                 {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum14" style="color: rgb(96, 96, 96);"&gt;  14:&lt;/span&gt;                     &lt;span style="color: rgb(0, 0, 255);"&gt;for&lt;/span&gt; (&lt;span style="color: rgb(0, 0, 255);"&gt;int&lt;/span&gt; i = 0; i &amp;lt; 10; i++)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum15" style="color: rgb(96, 96, 96);"&gt;  15:&lt;/span&gt;                     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum16" style="color: rgb(96, 96, 96);"&gt;  16:&lt;/span&gt;                         db.Insert(&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt; Person() { FullName = &lt;span style="color: rgb(0, 96, 128);"&gt;"Person "&lt;/span&gt; + i.ToString() });&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum17" style="color: rgb(96, 96, 96);"&gt;  17:&lt;/span&gt;                     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum18" style="color: rgb(96, 96, 96);"&gt;  18:&lt;/span&gt;                 });&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum19" style="color: rgb(96, 96, 96);"&gt;  19:&lt;/span&gt;         }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum20" style="color: rgb(96, 96, 96);"&gt;  20:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum21" style="color: rgb(96, 96, 96);"&gt;  21:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum22" style="color: rgb(96, 96, 96);"&gt;  22:&lt;/span&gt;  &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum23" style="color: rgb(96, 96, 96);"&gt;  23:&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;class&lt;/span&gt; Person&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum24" style="color: rgb(96, 96, 96);"&gt;  24:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum25" style="color: rgb(96, 96, 96);"&gt;  25:&lt;/span&gt;     [AutoIncrement, PrimaryKey]&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum26" style="color: rgb(96, 96, 96);"&gt;  26:&lt;/span&gt;     &lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;int&lt;/span&gt; ID { get; set; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum27" style="color: rgb(96, 96, 96);"&gt;  27:&lt;/span&gt;     &lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt; FullName { get; set; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum28" style="color: rgb(96, 96, 96);"&gt;  28:&lt;/span&gt;     &lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;string&lt;/span&gt; EmailAddress { get; set; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum29" style="color: rgb(96, 96, 96);"&gt;  29:&lt;/span&gt;     &lt;span style="color: rgb(0, 0, 255);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;double&lt;/span&gt; Salary { get; set; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="margin: 0em; padding: 0px; width: 100%; text-align: left; color: black; line-height: 12pt; overflow: visible; font-family: &amp;quot;Courier New&amp;quot;, courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"&gt;&lt;span id="lnum30" style="color: rgb(96, 96, 96);"&gt;  30:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;This is clearly just a sample, but demonstrates the simplicity of the library.  &lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;NOTE: In the snippet above you do want to make sure you are creating your database in a path that is accessible from the AppContainer.  The best place is in the app’s ApplicationData location.  When specifying a path to SQLite in Open() for creation, give an explicit path always to ensure you aren’t relying on a temp file creation.&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;Some may ask about System.Data.Sqlite and this cannot be used because of the dependency of ADO.NET which is not a part of the .NET Framework Core profile.&lt;/p&gt;&lt;p&gt;Now this leads us to JavaScript developers.  Currently, there is not easy way for you to access this.  The Developer and Platform Evangelism team are working on some samples that are not quite complete yet.  JavaScript developers will need a WinRT library in order to access/create/query the Engine.  There are some out there (I haven’t played around with any of these) that would be good to see if they meet your needs.  Here are some pointers:&lt;/p&gt;&lt;ul&gt;    &lt;li&gt;&lt;a href="http://sqlwinrt.codeplex.com/"&gt;sqlite-winrt&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="https://github.com/doo/SQLite3-WinRT"&gt;SQLite3-WinRT&lt;/a&gt; &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;At the C++ event we talked with the SQLite team about a WinRT client library and will continue to talk with them to see if this is something of interest.  SQLite has a great history of working with the community and have a desire to continue this.  In the meantime, there are options for you to get started.  Also note, that since these are WinRT libraries they could also be used from C++ and .NET in Metro style apps.  At this point though it is my personal opinion that existing .NET libraries for .NET offer more value (i.e. LINQ) than how these WinRT ones exist.&lt;/p&gt;&lt;h2&gt;  &lt;/h2&gt;&lt;h2&gt;Summary&lt;/h2&gt;&lt;p&gt;This was a great announcement that the SQLite team made for Metro style app developers.  WinRT provides some existing local storage mechanisms which you should explore as well, however none that have structured storage with a query processor on top of it.  I’m really glad that the SQLite team was able to make a few diff’s to their code to accommodate a few store compliance areas and continue to offer their great product to this new class of applications.  It is very simple to get started by ensuring you have the &lt;strong&gt;Engine&lt;/strong&gt; and picking your &lt;strong&gt;Client&lt;/strong&gt; of your choice and write your app using SQLite for some local/structured storage!&lt;/p&gt;&lt;p&gt;Hope this helps and stay tuned for the release preview of Windows 8!&lt;/p&gt;&lt;div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:3dd6e7c7-b152-4afc-9882-88c5586ed006" style="margin: 0px; padding: 0px; float: none; display: inline;"&gt;&lt;span class="tags"&gt;tags: &lt;a rel="tag" href="http://timheuer.com/blog/tags/metro/default.aspx"&gt;metro&lt;/a&gt;, &lt;a rel="tag" href="http://timheuer.com/blog/tags/sqlite/default.aspx"&gt;sqlite&lt;/a&gt;, &lt;a rel="tag" href="http://timheuer.com/blog/tags/sql/default.aspx"&gt;sql&lt;/a&gt;, &lt;a rel="tag" href="http://timheuer.com/blog/tags/sqlce/default.aspx"&gt;sqlce&lt;/a&gt;, &lt;a rel="tag" href="http://timheuer.com/blog/tags/winrt/default.aspx"&gt;winrt&lt;/a&gt;, &lt;a rel="tag" href="http://timheuer.com/blog/tags/xaml/default.aspx"&gt;xaml&lt;/a&gt;, &lt;a rel="tag" href="http://timheuer.com/blog/tags/windows/default.aspx"&gt;windows&lt;/a&gt;, &lt;a rel="tag" href="http://timheuer.com/blog/tags/windows+8/default.aspx"&gt;windows 8&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="wlWriterHeaderFooter" style="margin: 0px; padding: 0px;"&gt;&lt;hr /&gt;&lt;div class="cc-license"&gt;This work is licensed under a &lt;a href="http://creativecommons.org/licenses/by/3.0/"&gt;Creative Commons Attribution By license.&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;img src="http://timheuer.com/blog/aggbug/14837.aspx" width="1" height="1" /&gt;&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/5gWdhLEnZNcyjvQmMT4BXU0vijs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5gWdhLEnZNcyjvQmMT4BXU0vijs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/5gWdhLEnZNcyjvQmMT4BXU0vijs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/5gWdhLEnZNcyjvQmMT4BXU0vijs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/timheuer/~4/Wjmq-id8Flk" height="1" width="1"/&gt;</description>      <creator xmlns="http://purl.org/dc/elements/1.1/">Tim Heuer</creator>      <guid isPermaLink="false">http://timheuer.com/blog/archive/2012/05/20/using-sqlite-in-metro-style-app.aspx</guid>      <pubDate>Sun, 20 May 2012 23:10:51 GMT</pubDate>      <comments>http://timheuer.com/blog/archive/2012/05/20/using-sqlite-in-metro-style-app.aspx#feedback</comments>      <commentRss xmlns="http://wellformedweb.org/CommentAPI/">http://timheuer.com/blog/comments/commentRss/14837.aspx</commentRss>      <ping xmlns="http://madskills.com/public/xml/rss/module/trackback/">http://timheuer.com/blog/services/trackbacks/14837.aspx</ping>      <origLink xmlns="http://rssnamespace.org/feedburner/ext/1.0">http://timheuer.com/blog/archive/2012/05/20/using-sqlite-in-metro-style-app.aspx</origLink>    </item>    <item>      <link>http://feedproxy.google.com/~r/MarkMonster_Silverlight/~3/7Zu_LZ-xBSs/mimic-the-game-hub-application-bar-with-a-behavior-on-the-bindableapplicationbar</link>      <author xmlns="http://www.w3.org/2005/Atom">        <name>Mark Monster</name>      </author>      <category>.NET</category>      <category>Patterns</category>      <category>Silverlight</category>      <category>Technology</category>      <category>WP7</category>      <category>WPDev</category>      <title>Mimic the Game Hub Application Bar with a Behavior on the BindableApplicationBar</title>      <description>&lt;p&gt;A couple of days ago &lt;a href="http://dotnetapp.com/blog/2012/05/16/how-to-mimic-the-application-bar-of-the-game-hub-and-to-avoid-the-splash-screen-bug/"&gt;Sébastien Lachance wrote an excellent article about mimicking the application bar of the game hub&lt;/a&gt;. Really interesting for one of my applications which makes use of a minimal applicationbar that’s also transparant. However quite often the texts of the menu are difficult to read when they don’t have a solid backgroud. That’s exactly what is solved in the game hub: a transparant applicationbar, but when expanded to view the menu it has a solid background. And Sébastien also found a solution how to fix this in our own applications.&lt;/p&gt;  &lt;p&gt;However Sébastien is using the ApplicationBar, I’m using the wrapper around the ApplicationBar, called &lt;a href="http://phone7.codeplex.com/"&gt;BindableApplicationBar that’s part of the Phone7.Fx project&lt;/a&gt;. So how to solve this? &lt;/p&gt;  &lt;p&gt;The ApplicationBar and BindableApplicationBar both implement the &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.phone.shell.iapplicationbar_events(v=vs.92)"&gt;IApplicationBar interface which prescribes the StateChanged event&lt;/a&gt; that is used by Sébastien in his solution. So it looks like we can use the same event, let’s look a little bit closer…&lt;/p&gt;  &lt;p&gt;Seems that the code inside the BindableApplicationBar never fires the StateChanged event, so let’s fix this with a little bit of code in the BindableApplicationBar. Please be aware that you need to use the source version of the BindableApplicationBar to be able to fix this. So let’s subscribe the underlying ApplicationBar first, we do this in t he constructor of the BindableApplicationBar by adding one line.&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:BF48545B-72FC-48CD-B241-BB2967E2EF01:a2ebc6ef-c3dd-4dac-8830-2401aaad3531" class="wlWriterEditableSmartContent"&gt;&lt;pre class="brush:csharp; gutter:true; first-line: 1; tab-size: 4; toolbar: false; collapse: false; highlight: [4]"&gt;public BindableApplicationBar(){    _applicationBar = new Microsoft.Phone.Shell.ApplicationBar();    _applicationBar.StateChanged += HandleStateChanged;    Loaded += BindableApplicationBarLoaded;}&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now we still need to implement the HandleStateChanged method, which is a pretty straight forward implementation you’ve probably seen thousands of times.&lt;/p&gt;&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:BF48545B-72FC-48CD-B241-BB2967E2EF01:8b9b5ecd-aa1e-4f56-b790-2d1238e81285" class="wlWriterEditableSmartContent"&gt;&lt;pre class="brush:csharp; gutter:true; first-line: 1; tab-size: 4; toolbar: false; collapse: false; "&gt;private void HandleStateChanged(object sender, ApplicationBarStateChangedEventArgs e){    if (StateChanged != null)    {        StateChanged(this, e);    }}&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;So we now have a BindableApplicationBar that has all the features we need to mimic the ApplicationBar of the game hub. The rest of the implementation could be similar to Sébastien’s code. However I thought this is a typical thing that you can easily implement and reuse in a Behavior. I’m not writing behaviors daily, so I thought giving a look at the blog of the &lt;a href="http://dotnetbyexample.blogspot.com"&gt;Behavior Master himself, Joost van Schaik&lt;/a&gt;. About a year ago he wrote a &lt;a href="http://dotnetbyexample.blogspot.com/2011/04/safe-event-detachment-pattern-for.html"&gt;pattern for safe event detachment in behaviors&lt;/a&gt;. &lt;/p&gt;&lt;p&gt;So I started with this pattern as a basis. However my eagerness to make this Behavior perfect by immediately using this pattern caused me a lot of trouble. The pattern also tries to safely remove the events when the AssociatedObject aka Control is unloaded. The control I use is of a special type, the BindableApplicationBar, which immediately calls the unloaded event, don’t know why, but it took me almost an hour to find this out. In the end I did a step back and removed the Safe Pattern, and came to the following behavior. The essence is in the highlighted line where I set the BarOpacity property.&lt;/p&gt;&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:BF48545B-72FC-48CD-B241-BB2967E2EF01:db00120f-d973-4743-9c5b-c210632de968" class="wlWriterEditableSmartContent"&gt;&lt;pre class="brush:csharp; gutter:true; first-line: 1; tab-size: 4; toolbar: false; collapse: false; highlight: [15]"&gt;public class TransparantToFillApplicationBarBehavior : Behavior&amp;lt;BindableApplicationBar&amp;gt;{    private double? _originalBarOpacity;    protected override void OnAttached()    {        base.OnAttached();        AssociatedObject.StateChanged += StateChanged;    }    private void StateChanged(object sender, ApplicationBarStateChangedEventArgs e)    {        if (!_originalBarOpacity.HasValue)            _originalBarOpacity = AssociatedObject.BarOpacity;        AssociatedObject.BarOpacity = e.IsMenuVisible ? 1 : _originalBarOpacity.Value;    }    protected override void OnDetaching()    {        AssociatedObject.StateChanged -= StateChanged;        base.OnDetaching();    }}&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And now you want to use it in your BindableApplicationBar, of course.&lt;/p&gt;&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:BF48545B-72FC-48CD-B241-BB2967E2EF01:2812948f-dc6a-43b4-890d-33873fbc75d1" class="wlWriterEditableSmartContent"&gt;&lt;pre class="brush:xml; gutter:true; first-line: 1; tab-size: 4; toolbar: false; collapse: false; highlight: [4,5,6]"&gt;&amp;lt;ApplicationBar:BindableApplicationBar Mode=&amp;quot;Minimized&amp;quot;                                        BarOpacity=&amp;quot;0.6&amp;quot;                                        IsVisible=&amp;quot;{Binding LoggedIn}&amp;quot; BackgroundColor=&amp;quot;{StaticResource PhoneBackgroundColor}&amp;quot;&amp;gt;    &amp;lt;i:Interaction.Behaviors&amp;gt;        &amp;lt;ApplicationBar:TransparantToFillApplicationBarBehavior /&amp;gt;    &amp;lt;/i:Interaction.Behaviors&amp;gt;    &amp;lt;ApplicationBar:BindableApplicationBarMenuItem Text=&amp;quot;about+settings&amp;quot;                                                    Command=&amp;quot;{Binding AboutCommand}&amp;quot; /&amp;gt;&amp;lt;/ApplicationBar:BindableApplicationBar&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And the end result is like this. Transparent when the menu is collapsed.&lt;/p&gt;&lt;p&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Transparant" border="0" alt="Transparant" src="http://mark.mymonster.nl/Uploads/2012/05/transparant-3.png" width="484" height="804" /&gt;&lt;/p&gt;&lt;p&gt;And non-transparent when the menu is visible.&lt;/p&gt;&lt;p&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Fill" border="0" alt="Fill" src="http://mark.mymonster.nl/Uploads/2012/05/fill-3.png" width="484" height="804" /&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/MarkMonster_Silverlight/~4/7Zu_LZ-xBSs" height="1" width="1"/&gt;</description>      <pubDate>Sun, 20 May 2012 14:40:29 +0200</pubDate>      <updated xmlns="http://www.w3.org/2005/Atom">2012-05-20T14:40:29+02:00</updated>      <origLink xmlns="http://rssnamespace.org/feedburner/ext/1.0">http://mark.mymonster.nl/2012/05/20/mimic-the-game-hub-application-bar-with-a-behavior-on-the-bindableapplicationbar</origLink>    </item>    <item>      <link>http://feedproxy.google.com/~r/MarkMonster_Silverlight/~3/FtNtIrq6pfU/google-analytics-on-your-windows-phone-app-in-1-minute</link>      <author xmlns="http://www.w3.org/2005/Atom">        <name>Mark Monster</name>      </author>      <category>.NET</category>      <category>IoC</category>      <category>Silverlight</category>      <category>Technology</category>      <category>WP7</category>      <category>WPDev</category>      <title>Google Analytics on your Windows Phone App in 1 minute</title>      <description>&lt;p&gt;Yes 1 minute. So let’s start immediately. &lt;/p&gt;  &lt;p&gt;1 - Open the NuGet Package Manager Console and type:&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:BF48545B-72FC-48CD-B241-BB2967E2EF01:2715a60c-5796-41b1-bfbc-ff0a9fa5bea4" class="wlWriterEditableSmartContent"&gt;&lt;pre class="brush:text; gutter:false; first-line: 1; tab-size: 4; toolbar: false; collapse: false; "&gt;Install-Package MSAF.GoogleAnalytics&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;2 - Next, register a new application / web property inside Google Analytics.&lt;/p&gt;&lt;p&gt;&lt;a href="http://mark.mymonster.nl/Uploads/2012/05/image-2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://mark.mymonster.nl/Uploads/2012/05/image-thumb.png" width="244" height="186" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Then copy the Property ID that starts with UA-.&lt;/p&gt;&lt;p&gt;3 - Past that Property ID inside the App.xaml at this place.&lt;/p&gt;&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:BF48545B-72FC-48CD-B241-BB2967E2EF01:e4c87d78-11f3-4467-b9a7-c610408509df" class="wlWriterEditableSmartContent"&gt;&lt;pre class="brush:xml; gutter:true; first-line: 1; tab-size: 4; toolbar: false; collapse: false; "&gt;&amp;lt;analytics:GoogleAnalyticsService WebPropertyId=&amp;quot;UA-12345-6&amp;quot; /&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;That’s it. Yes, totally. And? Did you do it under the minute?&lt;/p&gt;&lt;h3&gt;Background information&lt;/h3&gt;&lt;p&gt;I’ve been in contact with &lt;a href="http://twitter.com/#!/synergist"&gt;Michael Scherotter&lt;/a&gt; for some time about NuGet and &lt;a href="http://msaf.codeplex.com/"&gt;MSAF&lt;/a&gt;, thanks for the support Michael. Basically the MSAF project is really powerful and can be applied to your Windows Phone project quite easily when you know how to do this. I’ve written about it a couple of times. However when we upgraded to Mango all dlls were upgraded except the Google.WebAnalytics dll. The mismatch in versions was causing a lot of problems because some libraries were asking for a 7.0 version of System.Windows.Interactivity and some were asking for the 7.1 version. I fixed that for the NuGet release, everything is 7.1 based. &lt;/p&gt;&lt;h3&gt;Advanced tracking&lt;/h3&gt;&lt;p&gt;I also added the code to track a little bit of basic information. You can find that in the GoogleAnalyticsService class in the Analytics folder after applying the NuGet package. There is support for up to 5 Custom Variables. Yes I removed the AppId/ProductId that’s included by default leaving only 4 Custom Variables. You can still add the AppId Custom Variable by your own choice, but I removed it because I have one Google Analytics Web Property per App, so it was useless.&lt;/p&gt;&lt;p&gt;When you want to track your analytics from for example your ViewModel you do something like this.&lt;/p&gt;&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:BF48545B-72FC-48CD-B241-BB2967E2EF01:75da5eda-9e4b-4849-9fac-c1609430b7e6" class="wlWriterEditableSmartContent"&gt;&lt;pre class="brush:csharp; gutter:false; first-line: 1; tab-size: 4; toolbar: false; collapse: false; "&gt;IAnalyticsTracker tracker = new AnalyticsTracker();tracker.Track(&amp;quot;EventCategory&amp;quot;,&amp;quot;EventName&amp;quot;,&amp;quot;EventValue optional&amp;quot;);&lt;/pre&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MarkMonster_Silverlight/~4/FtNtIrq6pfU" height="1" width="1"/&gt;</description>      <pubDate>Wed, 16 May 2012 22:33:49 +0200</pubDate>      <updated xmlns="http://www.w3.org/2005/Atom">2012-05-16T22:35:09+02:00</updated>      <origLink xmlns="http://rssnamespace.org/feedburner/ext/1.0">http://mark.mymonster.nl/2012/05/16/google-analytics-on-your-windows-phone-app-in-1-minute</origLink>    </item>    <item>      <title>Creating the SilverlightShow Windows Phone App: part 4</title>      <description>&lt;table width="20"&gt;    &lt;tbody&gt;        &lt;tr&gt;            &lt;td&gt;            &lt;div class="fb-like" data-show-faces="true" data-send="false" data-href="http://www.silverlightshow.net/items/Creating-the-SilverlightShow-Windows-Phone-App-part-4.aspx" data-font="segoe ui" data-layout="button_count"&gt;&lt;/div&gt;            &lt;/td&gt;            &lt;td&gt;&lt;a href="https://twitter.com/share" class="twitter-share-button" data-via="silverlightshow" data-counturl="http://www.silverlightshow.net/items/Creating-the-SilverlightShow-Windows-Phone-App-part-4.aspx" data-count="horizontal" data-text="Reading @Mister_Goodcat's article: Creating the SilverlightShow #WindowsPhone App: part 4 #wpdev" data-url="http://slshow.net/L0CR5J"&gt;Tweet&lt;/a&gt;&lt;/td&gt;            &lt;td&gt;&lt;g:plusone size="medium" href="http://www.silverlightshow.net/items/Creating-the-SilverlightShow-Windows-Phone-App-part-4.aspx"&gt;&lt;/g:plusone&gt;            &lt;/td&gt;            &lt;td&gt;            &lt;/td&gt;        &lt;/tr&gt;    &lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;When you create an app like the SilverlightShow app, that accesses remote data frequently, thinking about a suitable strategy for local storage and caching is vital to provide a great user experience. In the previous parts of this series, we have already seen how &lt;a href="http://www.silverlightshow.net/items/Creating-the-SilverlightShow-Windows-Phone-App-part-2.aspx"&gt;several optimizations are used&lt;/a&gt; to improve the networking performance of the app. Overall, the costs to pull data from the portal could be reduced to far less than 1/10th of the original traffic by applying some relatively simple changes. However, this is only half the story. What we also wanted to achieve is that content that has been retrieved once should not be fetched again &amp;ndash; we needed a solution for storing those items locally.&lt;/p&gt;&lt;h2&gt;Local Storage Options&lt;/h2&gt;&lt;p&gt;When you think about persisting and restoring data locally on the phone, you have a variety of features at your disposal. With the first versions of Windows Phone, you could either use the &lt;a href="http://msdn.microsoft.com/en-us/library/Cc672312(v=vs.95).aspx"&gt;ApplicationSettings&lt;/a&gt; for trivial situations, or you had to pretty much do all the work manually, as in writing to and reading from Isolated Storage files. &lt;/p&gt;&lt;p&gt;With the platform maturing more and more, additional options are established. In particular, Microsoft added local database support in Windows Phone 7.1, built on SQL Server of course. This gives you the comfort of working with relational data and the well known features of LinqToSql for queries. If you want to learn more about local database support, take a look at &lt;a href="http://www.silverlightshow.net/items/Windows-Phone-7.1-Local-SQL-Database.aspx"&gt;Andrea Boschin's article&lt;/a&gt; about it.&lt;/p&gt;&lt;p&gt;The option we decided to use is a community project originally designed and developed by Jeremy Likness: &lt;a href="http://sterling.codeplex.com/"&gt;The Sterling Database&lt;/a&gt;. The project has been around for two years, is now maintained and contributed to by various community members, and has proven its power in several apps on the Marketplace that are using it today.&lt;/p&gt;&lt;h2&gt;What Sterling is&lt;/h2&gt;&lt;p&gt;Let me quote from the Sterling project page on CodePlex to give you a basic understanding of its nature:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;em&gt;"Sterling is a lightweight NoSQL object-oriented database for .Net 4.0, Silverlight 4 and 5, and Windows Phone 7 that works with your existing class structures. Sterling supports full LINQ to Object queries over keys and indexes for fast retrieval of information from large data sets."&lt;/em&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;What exactly does this mean? For starters, instead of mapping your classes to a relational database model, you can simply use your existing data structures right away. In situations like ours, where a data structure has already been established or is determined by some external factors, this can result in less work. It may also give you a more natural and easier way of working with your data, as you don't have to deal with that extra layer and conversion logic between your application objects and data storage. &lt;/p&gt;&lt;p&gt;Although Sterling is a very lightweight project (the core assembly is only ~80 kilobytes big), it still is very flexible. For example, in addition to well-known features like triggers you can also register so-called interceptors that let you change the way Sterling works on a low level, which enables interesting options for example regarding transparent data encryption or optimization (more on that later).&lt;/p&gt;&lt;p&gt;Behind the scenes, Sterling of course also uses Isolated Storage for persistence, but it uses binary serialization, which results in very compact file sizes compared to the built-in serialization options:&lt;/p&gt;&lt;p&gt;&lt;img style="display: block; float: none; margin-left: auto; margin-right: auto;" alt="sizeondisk.png" src="http://i3.codeplex.com/Download?ProjectName=sterling&amp;amp;DownloadId=211262" /&gt;&lt;/p&gt;&lt;p style="text-align: center;"&gt;&lt;span style="font-size: 10px;"&gt;(Image taken from &lt;/span&gt;&lt;a href="http://sterling.codeplex.com/"&gt;&lt;span style="font-size: 10px;"&gt;the Sterling project page&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: 10px;"&gt;)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;The way Sterling performs queries on its keys and indexes (explained below) gives a massive performance benefit, as shown by the following comparison:&lt;/p&gt;&lt;p&gt;&lt;img style="display: block; float: none; margin-left: auto; margin-right: auto;" alt="sterlingspeed.png" src="http://i3.codeplex.com/Download?ProjectName=sterling&amp;amp;DownloadId=211263" /&gt;&lt;/p&gt;&lt;p style="text-align: center;"&gt;&lt;span style="font-size: 10px;"&gt;(Image taken from &lt;/span&gt;&lt;a href="http://sterling.codeplex.com/"&gt;&lt;span style="font-size: 10px;"&gt;the Sterling project page&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: 10px;"&gt;)&lt;/span&gt;&lt;/p&gt;&lt;h1&gt;&lt;span style="font-size: 10px;"&gt;&lt;/span&gt;&lt;/h1&gt;&lt;p&gt;So in certain situations, for example when disk memory consumption or query speeds are crucial and your data is suitable to be stored and handled by Sterling, using that database can be a huge improvement over alternative methods, and/or save you a considerable amount of time compared to custom implementations.&lt;/p&gt;&lt;h2&gt;Setup&lt;/h2&gt;&lt;p&gt;Setting up a Sterling database is easy to do. After pulling in the required references (you can use the available &lt;a href="http://www.nuget.org/packages/SterlingPhone"&gt;NuGet package&lt;/a&gt; for that) simply derive from the built-in database instance base class. You can then provide so-called table definitions that determine what types you want to store in your database, and what indexes should be created for them. For example, the following piece of code creates a table definition for "Article" items, uses the "Guid" property as key, and adds an index for the "PublishDate" property:&lt;/p&gt;&lt;div id="codeSnippetWrapper" class="csharpcode-wrapper"&gt;&lt;div id="codeSnippet" class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; SterlingDatabase : BaseDatabaseInstance&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;  &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;override&lt;/span&gt; List&amp;lt;ITableDefinition&amp;gt; RegisterTables()&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;  {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;    &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; List&amp;lt;ITableDefinition&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;      {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;        CreateTableDefinition&amp;lt;Article, &lt;span class="kwrd"&gt;string&lt;/span&gt;&amp;gt;(article =&amp;gt; article.Guid)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;          .WithIndex&amp;lt;Article, DateTime, &lt;span class="kwrd"&gt;string&lt;/span&gt;&amp;gt;(&lt;span class="str"&gt;"ArticleDateIndex"&lt;/span&gt;, article =&amp;gt; article.PublishDate)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;      };&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;  }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;All that's left to do is initialize the database. A good pattern is to do that when your application starts or gets activated, and to execute the corresponding clean-up when the user leaves your application. The following shows the required code that can then be called in the respective lifetime events of the PhoneApplicationService:&lt;/p&gt;&lt;div id="codeSnippetWrapper" class="csharpcode-wrapper"&gt;&lt;div id="codeSnippet" class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;private&lt;/span&gt; SterlingEngine _engine;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;&lt;span class="kwrd"&gt;private&lt;/span&gt; ISterlingDatabaseInstance _sterlingDatabaseInstance;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;&lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; ActivateSterling()&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;  _engine = &lt;span class="kwrd"&gt;new&lt;/span&gt; SterlingEngine();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;  _engine.Activate();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;  _sterlingDatabaseInstance = _engine.SterlingDatabase.RegisterDatabase&amp;lt;SterlingDatabase&amp;gt;(&lt;span class="kwrd"&gt;new&lt;/span&gt; IsolatedStorageDriver());&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; DeactivateSterling()&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;  _sterlingDatabaseInstance.Flush();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;  _engine.Dispose();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;  _sterlingDatabaseInstance = &lt;span class="kwrd"&gt;null&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;  _engine = &lt;span class="kwrd"&gt;null&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;Do not forget to clean-up in the "Deactivated" event too, as there is no guarantee that the user will return to your app, resulting in tombstoning and silent removal of your app, with the potential to leave your database corrupted.&lt;/p&gt;&lt;h2&gt;Basic Operations&lt;/h2&gt;&lt;p&gt;From the moment of activation on, you can use the database instance to save and load items very easily:&lt;/p&gt;&lt;div id="codeSnippetWrapper" class="csharpcode-wrapper"&gt;&lt;div id="codeSnippet" class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="rem"&gt;// save an article&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;_sterlingDatabaseInstance.Save(article);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;_sterlingDatabaseInstance.Flush();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;&lt;span class="rem"&gt;// load back&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;var loadedArticle = Load&amp;lt;Article&amp;gt;(article.Guid);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;As you can see, the snippet uses both "Save" as well as an additional "Flush" method to save the object. Since Sterling is optimized for performance, it keeps its current keys and indexes in-memory only, until you call "Flush" explicitly. This allows you to do multiple successive "Save" operations without the performance hit of persisting keys and indexes between each of these operations. The drawback is that for single operations, you have to call "Flush" explicitly to keep the database consistent on disk.&lt;/p&gt;&lt;p&gt;One important thing that often causes confusion with inexperienced users, is that the "Load" operation does not cache items in memory. This means that every time you use the "Load" operation, a new instance is returned, i.e. two successive invokes of "Load" with the same "article.Guid" value will return two different objects (for the same article though). To benefit from caching, you have to use queries (see below).&lt;/p&gt;&lt;p&gt;Loading and saving an object will treat the whole object graph connected to that object through properties. Depending on how you set up your database the behavior will be slightly different. To learn more about the details of loading and saving, I recommend reading the excellent documentation of Sterling: &lt;a href="https://sites.google.com/site/sterlingdatabase/sterling-user-guide/4-databases/c-saving-instances"&gt;Saving Instances&lt;/a&gt; and &lt;a href="https://sites.google.com/site/sterlingdatabase/sterling-user-guide/4-databases/d-loading-instances"&gt;Loading Instances&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Deletion of objects is performed using either the object itself, or by passing in the key for that object (which eliminates the need to explicitly load an object just for deletion):&lt;/p&gt;&lt;div id="codeSnippetWrapper" class="csharpcode-wrapper"&gt;&lt;div id="codeSnippet" class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="rem"&gt;// delete by reference&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;var article = _sterlingDatabaseInstance.Load&amp;lt;Article&amp;gt;(guid);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;_sterlingDatabaseInstance.Delete(article);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;&lt;span class="rem"&gt;// or delete by key&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;_sterlingDatabaseInstance.Delete(&lt;span class="kwrd"&gt;typeof&lt;/span&gt;(Article), key);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;Sterling of course also supports deleting all objects of a certain type (truncating a table) and even purging the whole database. You can learn more about this &lt;a href="https://sites.google.com/site/sterlingdatabase/sterling-user-guide/4-databases/f-delete-truncate-and-purge"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;h2&gt;Queries&lt;/h2&gt;&lt;p&gt;The power of Sterling comes with queries. In the above sample, we had added an index for the publish date of articles. This allows us to access stored article instances by their publish dates extremely fast because Sterling holds that data in memory. It uses a lazy load mechanism that only needs to access the disk once you actually need to retrieve the object content. Let me give you an example:&lt;/p&gt;&lt;div id="codeSnippetWrapper" class="csharpcode-wrapper"&gt;&lt;div id="codeSnippet" class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; DateTime DetermineNewestArticle()&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;  var result = _sterlingDatabaseInstance.Query&amp;lt;Article, DateTime, &lt;span class="kwrd"&gt;string&lt;/span&gt;&amp;gt;(&lt;span class="str"&gt;"ArticleDateIndex"&lt;/span&gt;)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;                 .OrderByDescending(o =&amp;gt; o.Index)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;                 .Select(o =&amp;gt; o.Index)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;                 .FirstOrDefault();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;  &lt;span class="kwrd"&gt;return&lt;/span&gt; result;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;This retrieves the date of the newest available article using the respective index, &lt;em&gt;without loading the actual article from disk&lt;/em&gt;. Because the index is available in memory, this is a Linq to Objects operation that is really fast. You can have multiple indexes for each type, to enable different of these query scenarios at the same time.&lt;/p&gt;&lt;p&gt;If you need to actually access the content of the newest article, then the code could look like this:&lt;/p&gt;&lt;div id="codeSnippetWrapper" class="csharpcode-wrapper"&gt;&lt;div id="codeSnippet" class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; Article GetNewestArticle()&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;  var result = _sterlingDatabaseInstance.Query&amp;lt;Article, DateTime, &lt;span class="kwrd"&gt;string&lt;/span&gt;&amp;gt;(&lt;span class="str"&gt;"ArticleDateIndex"&lt;/span&gt;)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;                 .OrderByDescending(o =&amp;gt; o.Index)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;                 .Select(o =&amp;gt; o.LazyValue.Value)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;                 .FirstOrDefault();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;  &lt;span class="kwrd"&gt;return&lt;/span&gt; result;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;Only when you access the "LazyValue.Value" property does Sterling load the data from Isolated Storage. Queries of course are much more powerful than simply loading single objects. You can also combine them and make use of joins, projections and all the other available features. To learn more about complex queries, &lt;a href="https://sites.google.com/site/sterlingdatabase/sterling-user-guide/4-databases/e-queries-and-filters"&gt;the documentation&lt;/a&gt; is a good starting point.&lt;/p&gt;&lt;h3&gt;Caching&lt;/h3&gt;&lt;p&gt;As mentioned above, as soon as you use queries the retrieved values are cached. This means that only the first access of a certain (lazy) value in the key or an index collection results in an actual load operation. Successive queries return the previously loaded object and hence will execute much faster. Don't worry: as soon as you change the object and save it back to Sterling, the cache is cleared for that object, and the next query operation will reload your changed values from disk again (with the result being cached again). Sterling keeps track of save operations internally.&lt;/p&gt;&lt;p&gt;While caching can improve performance of your app tremendously, it also can have some unexpected side effects when you use the same data in different parts of your app at the same time. To learn more about these edge cases, take a look at the docs &lt;a href="https://sites.google.com/site/sterlingdatabase/sterling-user-guide/4-databases/e-queries-and-filters"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;h2&gt;Interceptors&lt;/h2&gt;&lt;p&gt;The data of the SilverlightShow app is easily compressible, because it's mostly text. One of the nice hooks Sterling allows you to use therefore came in handy, to apply a general compression to all the data that is written and read &amp;ndash; without the need to explicitly take care of this manually during each and every save and load operation. The way this works is to add a custom interceptor implementation during the initialization phase of the database:&lt;/p&gt;&lt;div id="codeSnippetWrapper" class="csharpcode-wrapper"&gt;&lt;div id="codeSnippet" class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; ActivateSterling()&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;  _engine = &lt;span class="kwrd"&gt;new&lt;/span&gt; SterlingEngine();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;  _engine.Activate();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;  _sterlingDatabaseInstance = _engine.SterlingDatabase.RegisterDatabase&amp;lt;SterlingDatabase&amp;gt;(&lt;span class="kwrd"&gt;new&lt;/span&gt; IsolatedStorageDriver());&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;  &lt;span class="rem"&gt;// register a custom interceptor&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;  _sterlingDatabaseInstance.RegisterInterceptor&amp;lt;CompressionInterceptor&amp;gt;();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;To create such an interceptor, you can conveniently derive from the existing "BaseSterlingByteInterceptor" base class and override the required methods:&lt;/p&gt;&lt;div id="codeSnippetWrapper" class="csharpcode-wrapper"&gt;&lt;div id="codeSnippet" class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; CompressionInterceptor : BaseSterlingByteInterceptor&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;  &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;byte&lt;/span&gt;[] Save(&lt;span class="kwrd"&gt;byte&lt;/span&gt;[] sourceStream)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;  {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;    &lt;span class="rem"&gt;// do anything you want with the incoming bytes&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;  }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;  &lt;span class="kwrd"&gt;override&lt;/span&gt; &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;byte&lt;/span&gt;[] Load(&lt;span class="kwrd"&gt;byte&lt;/span&gt;[] sourceStream)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;  {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;    &lt;span class="rem"&gt;// reverse whatever you did to the bytes in the Save method here&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;  }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;Your interceptor is used behind the scenes in all the operations, you don't have to change anything in the way you work with Sterling. So this is the perfect place to apply things like on-the-fly compression or encryption.&lt;/p&gt;&lt;h2&gt;Conclusion&lt;/h2&gt;&lt;p&gt;Sterling is an interesting alternative for local storage of data in Windows Phone apps. We were able to reuse our existing data structures without the need to introduce any storage-related changes to them, and the way Sterling handles key and indexes is perfect for our requirements of searching and sorting available items without the need to deserialize their (heavy) content from disk. The possibility to implement a generic data compression easily was the icing on the cake that helped create a great user experience.&lt;/p&gt;</description>      <link>http://www.silverlightshow.net/items/Creating-the-SilverlightShow-Windows-Phone-App-part-4.aspx</link>      <author>editorial@silverlightshow.net (Peter Kuhn )</author>      <comments>http://www.silverlightshow.net/items/Creating-the-SilverlightShow-Windows-Phone-App-part-4.aspx#comments</comments>      <guid isPermaLink="true">http://www.silverlightshow.net/items/Creating-the-SilverlightShow-Windows-Phone-App-part-4.aspx</guid>      <pubDate>Mon, 14 May 2012 18:30:00 GMT</pubDate>    </item>    <item>      <title>Interview with Gill Cleeren and Kevin Dockx on their new book 'Microsoft Silverlight 5 Data and Services Cookbook' (by Packt Publishing)</title>      <description>&lt;div style="border:1px solid #dddddd;border-image: initial; padding-bottom: 5px; background-color: #f3f3f3; margin-top: 5px; padding-left: 10px; margin-left: 10px; padding-top: 5px;"&gt;&lt;p&gt;NOTE: Until May 31st all Microsoft ebooks by &lt;a href="http://ads.silverlightshow.net/a.aspx?ZoneID=59&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=16437" target="_blank"&gt;&lt;img alt="" src="http://ads.silverlightshow.net/a.aspx?ZoneID=59&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=16437" width="0" height="0" style="border-width: 0px;border-style: solid;" /&gt;Packt Publishing&lt;/a&gt;&amp;nbsp;may be purchased with 30% discount, and all Microsoft print books &amp;ndash; with 20% discount. &lt;a href="http://www.packtpub.com/news/packt-microsoft-carnival" target="_blank"&gt;Learn more on this offer here!&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;p&gt;&lt;em&gt;In this interview we talk to &lt;/em&gt;&lt;a href="http://www.snowball.be/"&gt;&lt;em&gt;Gill Cleeren&lt;/em&gt;&lt;/a&gt;&lt;em&gt; and &lt;/em&gt;&lt;a href="http://blog.kevindockx.com/"&gt;&lt;em&gt;Kevin Dockx&lt;/em&gt;&lt;/a&gt;&lt;em&gt; about their just-released book &lt;/em&gt;&lt;em&gt;&lt;a href="http://www.packtpub.com/microsoft-silverlight-5-data-and-services-cookbook/book"&gt;&lt;em&gt;&amp;lsquo;Microsoft Silverlight 5 Data and Services Cookbook&amp;rsquo;&lt;/em&gt;&lt;/a&gt;&lt;/em&gt;&lt;em&gt; by &lt;/em&gt;&lt;a href="http://ads.silverlightshow.net/a.aspx?ZoneID=59&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=16437" target="_blank"&gt;&lt;em&gt;&lt;img alt="" src="http://ads.silverlightshow.net/a.aspx?ZoneID=59&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=16437" width="0" height="0" style="border-width: 0px;border-style: solid;" /&gt;Packt Publishing&lt;/em&gt;&lt;/a&gt;&lt;em&gt;. An overview of this book and sample &lt;/em&gt;&lt;strong style="font-style: italic;"&gt;chapter 8 &amp;lsquo;Talking to WCF and ASMX Services&amp;rsquo;&lt;/strong&gt;&lt;em&gt; may be &lt;/em&gt;&lt;a href="http://www.packtpub.com/sites/default/files/9781849683500-Chapter-8_0.pdf"&gt;&lt;em&gt;downloaded from Packt website&lt;/em&gt;&lt;/a&gt;&lt;em&gt;.&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;SilverlightShow: &lt;/strong&gt;Hi Gill and Kevin! Your new book &lt;strong&gt;&amp;lsquo;Microsoft Silverlight 5 Data and Services Cookbook&amp;rsquo; &lt;/strong&gt;has just been released. This is an updated version of &lt;a href="http://www.packtpub.com/microsoft-silverlight-4-data-and-services-cookbook/book"&gt;Microsoft Silverlight 4 Data and Services Cookbook&lt;/a&gt;, published two years ago. What&amp;rsquo;s new in this version, and why should someone who already got your Silverlight 4 ebook upgrade to this one?&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Gill: &lt;/strong&gt;It&amp;rsquo;s correct to say that it&amp;rsquo;s an updated version for the fifth release of Silverlight. That means that all of the content we had in the original book has been reviewed, corrected where needed and updated to reflect all that&amp;rsquo;s new in Silverlight 5. Of course, Silverlight 5 brought quite a few new features with it in the area that we cover in our book. So we wrote recipes for all these new features. Things like implicit data binding, custom markup extension and so on are deeply covered.&lt;/p&gt;&lt;p&gt;We could have stopped there but we didn&amp;rsquo;t think that we were bringing enough extra value. That&amp;rsquo;s why we included several new chapters on things like MVVM, WCF RIA Services (which was covered in the first edition but has now received much more attention) and local storage. Also, since there are a lot of similarities between Silverlight development and Windows Phone development, we included around 10 recipes to leverage what you&amp;rsquo;ve learned there as well!&lt;strong&gt;     &lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;SilverlightShow: &lt;/strong&gt;Gill, Kevin -&lt;strong&gt; &lt;/strong&gt;which parts of the book have each of you authored, and what would you name as the top/most interesting concepts covered in those? &lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Gill: &lt;/strong&gt;The process of writing a book isn&amp;rsquo;t very linear. In the very first stage, we build up the outline. When that&amp;rsquo;s ready, we start dividing who&amp;rsquo;s going to write what, mostly based on what we are personally most comfortable with, experience-wise. We try to stick to that as much as possible, since we want our books to be based on issues or common problems we&amp;rsquo;ve experienced and figured out ourselves. &lt;/p&gt;&lt;p&gt;In this new edition, the WCF RIA Services and MVVM parts is mostly Kevin&amp;rsquo;s while I&amp;rsquo;ve been covering services, data-binding and the WP7 topics.&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Kevin: &lt;/strong&gt;Well, as Gill said: we&amp;rsquo;ve tried to write the parts we&amp;rsquo;re most comfortable with, from real-life experience on projects. At the time we started writing, Gill already had quite a bit of experience with Windows Phone, while I had been working on various projects in which the MVVM pattern and RIA Services were used extensively &amp;ndash; so it felt like a natural dividing the chapters and recipes to write as such.&lt;/p&gt;&lt;p&gt;In the end, what I&amp;rsquo;m most proud of is the Advanced WCF RIA Services chapter, as it contains a few recipes on topics that aren&amp;rsquo;t very easy to find information on (ValidationContext comes to mind), and the recipes that cover Windows Identity Foundation integration with Silverlight.&lt;strong&gt;     &lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;SilverlightShow: &lt;/strong&gt;Could you share one or two topics from the book that have not been covered extensively anywhere else, including in web resources?&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Gill: &lt;/strong&gt;It&amp;rsquo;s hard to write things today that aren&amp;rsquo;t covered anywhere else. There are many great resources out there. The value of our book - at least we hope - is bringing a lot of practical problems together that we&amp;rsquo;ve both come across in our daily development work. I&amp;rsquo;ve seen people struggle getting their heads around MVVM. That&amp;rsquo;s a typical one. There are a whole lot of blog posts and articles on the topic. We have chosen to include that anyhow since we wanted to give our readers a clean and easy approach to this pattern. Since our book is aimed at LOB developers and the MVVM pattern really shines in that area, we couldn&amp;rsquo;t release a new version without covering that.    &lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Kevin: &lt;/strong&gt;The recipes concerning Windows Identity Foundation integration immediately come to mind. Everything concerning security is very important for business applications, and federation scenarios are often considered when you&amp;rsquo;re writing large LOB applications for (government) companies that have a multitude of applications on-site. Windows Identity Foundation really shines in this area, but it takes a bit of work to &amp;ldquo;get your head around it&amp;rdquo; and understand what&amp;rsquo;s really happening underneath the covers. In these recipes, we&amp;rsquo;ve tried covering that, and of course: explained how exactly the integration with Silverlight works.&lt;strong&gt;     &lt;br /&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;SilverlightShow: &lt;/strong&gt;Several chapters from the book are focused on WCF RIA Services. What&amp;rsquo;s the reason behind this broad coverage?&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Kevin: &lt;/strong&gt;The fact that we&amp;rsquo;ve included a lot more recipes on WCF RIA Services comes from real-life experience: we&amp;rsquo;ve noticed a lot of Silverlight LOB applications use this framework &amp;ndash; after all, it&amp;rsquo;s really powerful and extensible, but you do need a good understanding of what&amp;rsquo;s really going on if you want to use it to its full extent. It&amp;rsquo;s very easy to get started with WCF RIA Services, but it&amp;rsquo;s not so easy to keep doing it &amp;ldquo;right&amp;rdquo;. In the previous book, we had one chapter covering this, but we felt this wasn&amp;rsquo;t enough and didn&amp;rsquo;t really do the framework justice. Splitting the topic up in two chapters allowed for more advanced scenarios and recipes, and allowed us to include some best practices.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;     &lt;br /&gt;SilverlightShow:&lt;/strong&gt; In this book you&amp;rsquo;ve also included recipes related to building Windows Phone 7 business applications. In which aspect of Windows Phone development do developers struggle most, and how does your book help them?&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Gill: &lt;/strong&gt;Silverlight and Windows Phone 7 development are very closely related. I know it&amp;rsquo;s been said before, but it&amp;rsquo;s true: you can easily leverage your Silverlight knowledge on the phone. However, it&amp;rsquo;s not a plain one-on-one copy, each platform has its particularities. That&amp;rsquo;s what we are focusing on in the WP7 part in our book. We don&amp;rsquo;t include the basics - there&amp;rsquo;s other great books and resources available for that. Instead, like with the rest of the book, we focus on the data and service access which tends to have some things you need to keep in mind.&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;     &lt;br /&gt;SilverlightShow: &lt;/strong&gt;How about Silverlight 5? Where do Silverlight 5 developers fail mostly, and why? How does the book help them?&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Kevin&lt;/strong&gt;: Well, it&amp;rsquo;s not that different today than how it was last year, or the year before: it&amp;rsquo;s the basics of Silverlight development that are still unclear to a lot of people: data binding &amp;amp; async communication. Our book covers this, and in addition we&amp;rsquo;ve added the MVVM chapter, more or less a de facto standard for XAML applications, which heavily relies on data binding.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;SilverlightShow: &lt;/strong&gt;Does Silverlight 5 lack something to become a perfect technology for LOB?&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Kevin: &lt;/strong&gt;I was really disappointed when Silverlight 5 was released without WS-Trust support. This was the one big missing feature for LOB applications in Silverlight 4, and it&amp;rsquo;s still missing in Silverlight 5. Through the code provided in the WIF Training Kit we did get some parts of this, but it&amp;rsquo;s still far from perfect &amp;ndash; truly a shame, and I&amp;rsquo;m afraid it won&amp;rsquo;t get fixed.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;SilverlightShow: &lt;/strong&gt;A lot&amp;rsquo;s been written about Silverlight and its impending &amp;ldquo;death&amp;rdquo; &amp;ndash; does the world actually need a new Silverlight book?&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Kevin: &lt;/strong&gt;Still a hot topic, this one ;-) The focus on HTML5 as the technology for the future is a good one, in my opinion &amp;ndash; but there&amp;rsquo;s a huge gap in the Microsoft stack for businesses that need applications that need to be developed today (or at least: there&amp;rsquo;s a gap in what is put forward as the technology of choice), and rolled out in the next 1-3 years. We&amp;rsquo;re talking about companies that need internal LOB applications &amp;ndash; these are often restricted in browser usage and even OS. Silverlight is a mature technology today, has support for the next ten years, and it typically takes about 1/3 less time to develop the same app using XAML-based technology versus HTML/JavaScript based technology: this is why a lot of businesses choose for this technology today.&lt;/p&gt;&lt;p&gt;Next to that, Windows 8 is around the corner, and most of what is learned by developing XAML applications can be leveraged for building Windows 8 Metro applications. The future is centered around API building with multiple clients (intranet &amp;amp; extranet, phone, tablets) on top of that, and focusses more on skill reuse for the front-end than code reuse. HTML5 fits this bill if you&amp;rsquo;ve got the luxury to be able to work for modern browsers, XAML fits this bill even if you don&amp;rsquo;t &amp;ndash; and if you&amp;rsquo;re working for large companies, often you don&amp;rsquo;t.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;     &lt;br /&gt;SilverlightShow: &lt;/strong&gt;And finally, what does a cookbook format mean? How is it better than traditional book content?&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Gill: &lt;/strong&gt;The cookbook format is something people can relate with. When you&amp;rsquo;re developing an application and you&amp;rsquo;re stuck on a problem, you want an answer quickly. By opening up our book, developers can easily find a recipe that helps them with their problem at hand. It&amp;rsquo;s a practical approach, based on issues and problems we&amp;rsquo;ve faced ourselves in everyday application development. By using our own experience, we think we can closely match what problems other Silverlight developers are having.&lt;/p&gt;&lt;p&gt;While you can read the book cover-to-cover, it&amp;rsquo;s an easy format for a quick read or to find a solution for your problem!&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;Thanks Gill and Kevin for giving us an insider view on your book! We&amp;rsquo;ll keep updating SilverlightShow readers with news on the book, including reviews, discounts and availability of more sample chapters. Good luck, and look forward to more excellent content, including &lt;/em&gt;&lt;a href="http://www.silverlightshow.net/ebooks.aspx"&gt;&lt;em&gt;SilverlightShow ebooks&lt;/em&gt;&lt;/a&gt;&lt;em&gt;, authored by you two!&lt;/em&gt;&lt;/p&gt;</description>      <link>http://www.silverlightshow.net/items/Interview-with-Gill-Cleeren-and-Kevin-Dockx-on-their-new-book-Microsoft-Silverlight-5-Data-and-Services-Cookbook-by-Packt-Publishing.aspx</link>      <author>editorial@silverlightshow.net (Silverlight Show )</author>      <comments>http://www.silverlightshow.net/items/Interview-with-Gill-Cleeren-and-Kevin-Dockx-on-their-new-book-Microsoft-Silverlight-5-Data-and-Services-Cookbook-by-Packt-Publishing.aspx#comments</comments>      <guid isPermaLink="true">http://www.silverlightshow.net/items/Interview-with-Gill-Cleeren-and-Kevin-Dockx-on-their-new-book-Microsoft-Silverlight-5-Data-and-Services-Cookbook-by-Packt-Publishing.aspx</guid>      <pubDate>Wed, 09 May 2012 11:35:58 GMT</pubDate>    </item>    <item>      <title>Windows 8 Metro: Layout, view states and navigation</title>      <description>&lt;table width="20"&gt;    &lt;tbody&gt;        &lt;tr&gt;            &lt;td&gt;            &lt;div class="fb-like" data-show-faces="true" data-send="false" data-href="http://www.silverlightshow.net/items/Windows-8-Metro-Layout-view-states-and-navigation.aspx" data-font="segoe ui" data-layout="button_count"&gt;&lt;/div&gt;            &lt;/td&gt;            &lt;td&gt;&lt;a href="https://twitter.com/share" class="twitter-share-button" data-via="silverlightshow" data-counturl="http://www.silverlightshow.net/items/Windows-8-Metro-Layout-view-states-and-navigation.aspx" data-count="horizontal" data-text="Read @aboschin's article '#Windows8 Metro: Layout, view states &amp;amp; navigation' #win8 #win8dev" data-url="http://slshow.net/JirY2v"&gt;Tweet&lt;/a&gt;&lt;/td&gt;            &lt;td&gt;&lt;g:plusone size="medium" href="http://www.silverlightshow.net/items/Windows-8-Metro-Layout-view-states-and-navigation.aspx"&gt;&lt;/g:plusone&gt;            &lt;/td&gt;            &lt;td&gt;            &lt;/td&gt;        &lt;/tr&gt;    &lt;/tbody&gt;&lt;/table&gt;&lt;div style="border: 1px solid #dddddd; background-color: #f3f3f3; margin-top: 5px; margin-left: 150px; padding-left: 10px; padding-top: 10px; width: 400px; text-align: center;"&gt;&lt;strong&gt;&lt;a href="http://www.silverlightshow.net/Storage/Sources/XPG.Metro.NavigationAndViewStates.zip" target="_blank"&gt;Download the source code for this article&lt;/a&gt;&lt;/strong&gt;&lt;ul&gt;&lt;/ul&gt;&lt;/div&gt;&lt;p style="text-align: justify;"&gt;The target devices where it is expected Windows 8 to runs are something of really amazing, since it should run from tablet devices of the most various sizes to the the widest monitor. &lt;/p&gt;&lt;div style="border: 1px solid #dddddd; padding-bottom: 5px; background-color: #f3f3f3; margin-top: 5px; padding-left: 10px; width: 200px; float: right; margin-left: 10px; margin-right: 5px; padding-top: 5px;"&gt;&lt;h3&gt;Don't miss...&lt;/h3&gt;&lt;ul style="list-style-type: circle; margin: 0px; padding-left: 20px; font-size: 12px;"&gt;    &lt;li style="padding-bottom: 5px;"&gt;&lt;a href="http://www.silverlightshow.net/news/Webinar-Live-Tiles-and-Notifications-in-Windows-8.aspx"&gt;Free webinar on May 22: Live Tiles and Notifications in Windows 8&lt;/a&gt; &lt;/li&gt;    &lt;li style="padding-bottom: 5px;"&gt;&lt;a href="http://www.silverlightshow.net/items/Windows-8-and-the-future-of-XAML-Part-1-An-overview-of-the-Windows-8-platform.aspx"&gt;The article series: Windows 8 and the future of XAML&lt;/a&gt; &lt;/li&gt;    &lt;li style="padding-bottom: 5px;"&gt;&lt;a href="http://www.silverlightshow.net/ebooks/wp75.aspx"&gt;Ebook by A. Boschin: WP 7.5 Fundamentals&lt;/a&gt; &lt;/li&gt;&lt;/ul&gt;&lt;p style="padding-bottom: 5px; text-align: center;"&gt;&lt;a href="http://www.silverlightshow.net/ebooks/wp75.aspx" target="_self"&gt;&lt;img style="width: 70px; height: 99px;" alt="Ebook: Windows Phone 7.5 Fundamentals" src="http://www.silverlightshow.net/Storage/Ebooks/wp75_thumb.png" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="http://www.silverlightshow.net/ebooks.aspx"&gt;All SilverlightShow Ebooks&lt;/a&gt;&amp;nbsp;&lt;img alt="" src="http://www.silverlightshow.net/Storage/arrow-content.jpg" /&gt;&lt;/p&gt;&lt;/div&gt;Dealing with various display sizes and with mobile devices requires new capabilities that go beyond the ones required to run on a simple smartphone. First of all you need to adapt the size of your app to the screen, probably reducing or increasing the amount of content you show to the user. Connected with the use of fingers instead of mouse, it is required you are able to use all available space on the screen, expecially with low resolutions. Finally you have to deal with orientation. It is easy and natural to rotate the screen to best fit the content you are using, as an example using a vertical orientation while reading a page.&lt;p style="text-align: justify;"&gt;All these constraints change the game and have been answered by metro-style application. From the point of view of screen size, you are able to deal with it in different ways, adapting the content or introducing additional elements. You are also able to detect changes in orientation and you can take advantage of the whole screen snapping applications on the side and using a navigation paradigm.&lt;/p&gt;&lt;h4 style="text-align: justify;"&gt;Navigate your apps...&lt;/h4&gt;&lt;p style="text-align: justify;"&gt;Navigation applications are something you already know for sure. They exists in WPF and in Silverlight but probably you know the benefits of this paradigm from the web that has originally introduced it with the browser. A metro-style application is by default a navigation application, since in the very first rows of code they runs the Window content is injected with a Frame control. There isn't anything preventing you from using something of different from a Frame as main element but if you want to give the better experience to your user this is a one-way street. &lt;/p&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="border: 1px solid silver; padding: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; width: 97.5%; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; cursor: text; text-align: left;" id="codeSnippetWrapper"&gt;&lt;div style="padding: 0px; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; text-align: left;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;protected&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;override&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; OnLaunched(LaunchActivatedEventArgs args)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum3" style="color: #606060;"&gt;   3:&lt;/span&gt;     &lt;span style="color: #008000;"&gt;// Create a Frame to act navigation context and navigate to the first page&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum4" style="color: #606060;"&gt;   4:&lt;/span&gt;     var rootFrame = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; Frame();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum5" style="color: #606060;"&gt;   5:&lt;/span&gt;     rootFrame.Navigate(&lt;span style="color: #0000ff;"&gt;typeof&lt;/span&gt;(BlankPage));&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum6" style="color: #606060;"&gt;   6:&lt;/span&gt;     &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum7" style="color: #606060;"&gt;   7:&lt;/span&gt;     &lt;span style="color: #008000;"&gt;// Place the frame in the current Window and ensure that it is active&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum8" style="color: #606060;"&gt;   8:&lt;/span&gt;     Window.Current.Content = rootFrame;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum9" style="color: #606060;"&gt;   9:&lt;/span&gt;     Window.Current.Activate();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum10" style="color: #606060;"&gt;  10:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="text-align: justify;"&gt;In these lines, from the default App.xaml.cs file you see how the frame is injected and then the Window activated. Having in you hands the code to initialize the frame is important just because you can wrap the fram itself with some application-wide service like, an example, a wait layer that appears when the application is busy with asynchronous activities. &lt;/p&gt;&lt;p style="text-align: justify;"&gt;Inside the Frame you can navigate Page instances. A page of your application directly of indirectly inherits from the Page class so it is a good candidate to be navigated to. Differently from Silverlight you didn't use an Uri to navigate to a page but its Type. This choice comes probably from the fact that metro-style applications does not need to have deep-linking from a web page, so there is not any reason of having a complete Uri.&lt;/p&gt;&lt;p style="text-align: justify;"&gt;The Frame control exposes all the methods and properties you may need to perform navigation and to detect navigation state. Here is the main:&lt;/p&gt;&lt;p style="text-align: justify;"&gt;&lt;strong&gt;Navigate(Type page)&lt;/strong&gt;: Perform navigation to a page. This have also an overload you can use to pass a parameter to the destination page. The parameter is of type object so you can pass complex objects.&lt;/p&gt;&lt;p style="text-align: justify;"&gt;&lt;strong&gt;GoBack(), GoForward()&lt;/strong&gt;: There go along the navigation stack, back of forward. Side by side with these methods there are two properties, CanGoBack and CanGoForward used if you reached one end of the stack.&lt;/p&gt;&lt;p style="text-align: justify;"&gt;&lt;strong&gt;StopLoading()&lt;/strong&gt;: Stop le loading of a page, e.g. if it is taking longer to load. &lt;/p&gt;&lt;p style="text-align: justify;"&gt;&lt;strong&gt;CurrentSourcePageType&lt;/strong&gt;:&amp;nbsp; The type of the page currently loaded. &lt;/p&gt;&lt;p style="text-align: justify;"&gt;&lt;strong&gt;Navigated, Navigating, NavigationFailed, NavigationStopped&lt;/strong&gt;: These events, exposed also as overridable methods on the Page class let you know when something related to navigation happens.&lt;/p&gt;&lt;p style="text-align: justify;"&gt;Given that your application is subject to be freezed and/or terminated under particular circumstances, the Frame control provides a way to persist the navigation backstack, so it may be resumed when the application is loaded again. In the example project attached to this article, I wrote a simple code to persist and restore navigation across different sessions. No matter if the application is suspended or terminated, the navigation starts always from the last point where it was interrupted:&lt;/p&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="border: 1px solid silver; padding: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; width: 97.5%; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; cursor: text; text-align: left;" id="codeSnippetWrapper"&gt;&lt;div style="padding: 0px; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; text-align: left;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; GoToNext(&lt;span style="color: #0000ff;"&gt;object&lt;/span&gt; sender, RoutedEventArgs e)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum3" style="color: #606060;"&gt;   3:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.Frame.Navigate(&lt;span style="color: #0000ff;"&gt;typeof&lt;/span&gt;(FirstPage));&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum4" style="color: #606060;"&gt;   4:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.SaveAsync();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum5" style="color: #606060;"&gt;   5:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum6" style="color: #606060;"&gt;   6:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum7" style="color: #606060;"&gt;   7:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; async &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; SaveAsync()&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum8" style="color: #606060;"&gt;   8:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum9" style="color: #606060;"&gt;   9:&lt;/span&gt;     Dictionary&amp;lt;&lt;span style="color: #0000ff;"&gt;string&lt;/span&gt;, &lt;span style="color: #0000ff;"&gt;string&lt;/span&gt;&amp;gt; values = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; Dictionary&amp;lt;&lt;span style="color: #0000ff;"&gt;string&lt;/span&gt;, &lt;span style="color: #0000ff;"&gt;string&lt;/span&gt;&amp;gt;();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum10" style="color: #606060;"&gt;  10:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum11" style="color: #606060;"&gt;  11:&lt;/span&gt;     values[Consts.NavigationKey] = &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.Frame.GetNavigationState();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum12" style="color: #606060;"&gt;  12:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum13" style="color: #606060;"&gt;  13:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (&lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.Frame.CurrentSourcePageType != &lt;span style="color: #0000ff;"&gt;null&lt;/span&gt;)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum14" style="color: #606060;"&gt;  14:&lt;/span&gt;         values[Consts.CurrentKey] = &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.Frame.CurrentSourcePageType.FullName;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum15" style="color: #606060;"&gt;  15:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum16" style="color: #606060;"&gt;  16:&lt;/span&gt;     await Utilities.SaveDictionaryAsync(Consts.FileName, values);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum17" style="color: #606060;"&gt;  17:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="text-align: justify;"&gt;This code, inside a page persists the navigation state every time it changes. You have simply to call the SaveAsync methos every time you move across pages, just after the call to the navigation method. It saves the current page and the navigation state using the GetNavigationState() method. Then, in the App.xaml.cs you ar requested to restore the state:&lt;/p&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="border: 1px solid silver; padding: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; width: 97.5%; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; cursor: text; text-align: left;" id="codeSnippetWrapper"&gt;&lt;div style="padding: 0px; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; text-align: left;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;protected&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;override&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; OnLaunched(LaunchActivatedEventArgs args)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum3" style="color: #606060;"&gt;   3:&lt;/span&gt;     &lt;span style="color: #008000;"&gt;// Create a Frame to act navigation context and navigate to the first page&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum4" style="color: #606060;"&gt;   4:&lt;/span&gt;     var rootFrame = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; Frame();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum5" style="color: #606060;"&gt;   5:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum6" style="color: #606060;"&gt;   6:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (args.PreviousExecutionState != ApplicationExecutionState.Running)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum7" style="color: #606060;"&gt;   7:&lt;/span&gt;         &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.LoadAsync(rootFrame, &lt;span style="color: #0000ff;"&gt;typeof&lt;/span&gt;(FirstPage));&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum8" style="color: #606060;"&gt;   8:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum9" style="color: #606060;"&gt;   9:&lt;/span&gt;     &lt;span style="color: #008000;"&gt;// Place the frame in the current Window and ensure that it is active&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum10" style="color: #606060;"&gt;  10:&lt;/span&gt;     Window.Current.Content = rootFrame;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum11" style="color: #606060;"&gt;  11:&lt;/span&gt;     Window.Current.Activate();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum12" style="color: #606060;"&gt;  12:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum13" style="color: #606060;"&gt;  13:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum14" style="color: #606060;"&gt;  14:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;private&lt;/span&gt; async &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; LoadAsync(Frame frame, Type defaultPage = &lt;span style="color: #0000ff;"&gt;null&lt;/span&gt;)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum15" style="color: #606060;"&gt;  15:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum16" style="color: #606060;"&gt;  16:&lt;/span&gt;     var values = await Utilities.LoadDictionaryAsync(Consts.FileName);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum17" style="color: #606060;"&gt;  17:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum18" style="color: #606060;"&gt;  18:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (values.ContainsKey(Consts.NavigationKey))&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum19" style="color: #606060;"&gt;  19:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum20" style="color: #606060;"&gt;  20:&lt;/span&gt;         frame.SetNavigationState((&lt;span style="color: #0000ff;"&gt;string&lt;/span&gt;)values[Consts.NavigationKey]);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum21" style="color: #606060;"&gt;  21:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum22" style="color: #606060;"&gt;  22:&lt;/span&gt;         &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (values.ContainsKey(Consts.CurrentKey))&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum23" style="color: #606060;"&gt;  23:&lt;/span&gt;         {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum24" style="color: #606060;"&gt;  24:&lt;/span&gt;             Type page = Type.GetType((&lt;span style="color: #0000ff;"&gt;string&lt;/span&gt;)values[Consts.CurrentKey]);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum25" style="color: #606060;"&gt;  25:&lt;/span&gt;             frame.Navigate(page);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum26" style="color: #606060;"&gt;  26:&lt;/span&gt;         }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum27" style="color: #606060;"&gt;  27:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum28" style="color: #606060;"&gt;  28:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;else&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (defaultPage != &lt;span style="color: #0000ff;"&gt;null&lt;/span&gt;)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum29" style="color: #606060;"&gt;  29:&lt;/span&gt;         frame.Navigate(defaultPage);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum30" style="color: #606060;"&gt;  30:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="text-align: justify;"&gt;To restore the navigation it reads the string representing the navigation from the filesystem and use the SetNavigationState method to load it in the frame. Then it navigates again to the last page hit by the user. The result is awesome since the application always remember the entire set of actions made by the user.&lt;/p&gt;&lt;p style="text-align: justify;"&gt;As for Silverlight, navigation implies caching. The Page class exposes a NavigationCacheMode property useful to define if your page have to be cached after it is loaded the first time. This means you have to handle your page slight differently. The first time your page ctor will be called and the load event raised. All the following calls omit to call ctor and Load so you have to handle the OnNavigated event to know when the page is loaded again.&lt;/p&gt;&lt;h4 style="text-align: justify;"&gt;Layout and ViewState&lt;/h4&gt;&lt;p style="text-align: justify;"&gt;Once in front of your empty page, there are a number of options to dispose your content on the page. If you ever used layout controls in Silverlight and WPF, you already know the whole story. Grid, StackPanel and Canvas are still there and they works as you already know. &lt;/p&gt;&lt;p style="text-align: justify;"&gt;The real problem with layout in metro-style application comes from two points of view. First of all, applications are requested to go beyond the boundaries of the screen to maximize the space available, and for this aspect there are a set of controls available, but also to handle different size of the screen. The size of the screen can vary from the minimum of 1024x768 (10.6") to huge sizes like 2560x1440. The size of 1366x768 is considered a reference point.&lt;/p&gt;&lt;p style="text-align: justify;"&gt;If you try to start the simulator, on the right side you will find a button that opens a menu with a set of resolutions. Playing with this menu may be interesting to understand what it happens at different resolutions. When you are in start menu and change the value between the 10.6" resolutions, you will notice that the actual size of the tiles remains unchanged also if the pixel density drastically increases. What Windows does is to adapt the size of the elements to three steps: 100%, 140% and 180%. if you take 1366x768 corresponding to 100% you can easily calculate that 1920x1080 corresponds to 140% and 2560x1440 to 180%. The reason to operate this automatic scaling is to always have a size good for finger manipulation. If this scale would not applied the size of a tile at the maximum resolution will be too small to be hit accurately from a finger.&lt;/p&gt;&lt;p style="text-align: justify;"&gt;This automatic resize is good for vector-based graphics but may be drastically bad for bitmap images. It is the reason why you can use a trick to specify three sizes of every image. If you use a Image tag in XAML, since you specify a fixed name for the image you can create three versions and use a name pattern to let the system load the better for the current resolution:&lt;/p&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="border: 1px solid silver; padding: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; width: 97.5%; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; cursor: text; text-align: left;" id="codeSnippetWrapper"&gt;&lt;div style="padding: 0px; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; text-align: left;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;Image&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;Source&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="Assets/image.jpg"&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;Width&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="100"&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;Height&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="100"&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="text-align: justify;"&gt;So after this create three versions of the image adding "scale-*" between the file name and the extension. Windows automatically loads the better image according with the selected resolution. Here is an example:&lt;/p&gt;&lt;ul&gt;    &lt;li&gt;    &lt;div style="text-align: justify;"&gt;image.&lt;strong&gt;scale-100&lt;/strong&gt;.jpg&lt;/div&gt;    &lt;/li&gt;    &lt;li&gt;    &lt;div style="text-align: justify;"&gt;image.&lt;strong&gt;scale-140&lt;/strong&gt;.jpg&lt;/div&gt;    &lt;/li&gt;    &lt;li&gt;    &lt;div style="text-align: justify;"&gt;image.&lt;strong&gt;scale-180&lt;/strong&gt;.jpg&lt;/div&gt;    &lt;/li&gt;&lt;/ul&gt;&lt;p style="text-align: justify;"&gt;While designing the layout of your application there are two strategies you can embrace. You can go for a fixed or adaptive layout. Every choose best fit a specific scenario:&lt;/p&gt;&lt;p style="text-align: justify;"&gt;&lt;strong&gt;Fixed&lt;/strong&gt;: While in fixed layout your application will be scaled according with the screen resolution. The trick is to use a ViewBox control to wrap the entire content of the screen so when the resolution increases it is scaled automatically. This scenario is mostly choosed with games and dashboards where the screen does not go outside the screen boundaries.&lt;/p&gt;&lt;p style="text-align: justify;"&gt;&lt;strong&gt;Adaptive&lt;/strong&gt;: In this layout, the size of items is fixed (according to pixel density rules) but when the screen il larger the number of items presented increases to fill the empty space left. Handling this layout is most difficult then the other but the common applications requires it.&lt;/p&gt;&lt;div style="text-align: justify;"&gt;&lt;table border="0" cellspacing="0" cellpadding="2" width="574" align="center"&gt;    &lt;tbody&gt;        &lt;tr&gt;            &lt;td valign="top" style="width: 286px;"&gt;            &lt;p style="text-align: center;"&gt;&lt;img style="margin: 0px 20px; display: inline;" title="image" alt="image" src="http://www.silverlightshow.net/Storage/Users/AndreaBoschin/_image_5.png" width="240" height="135" /&gt;&lt;/p&gt;            &lt;/td&gt;            &lt;td valign="top" style="width: 286px;"&gt;            &lt;p style="text-align: center;"&gt;&lt;img style="margin: 0px 20px; display: inline;" title="image" alt="image" src="http://www.silverlightshow.net/Storage/Users/AndreaBoschin/_image_6.png" width="240" height="135" /&gt;&lt;/p&gt;            &lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;            &lt;td valign="top" style="width: 286px;"&gt;            &lt;p style="text-align: center;"&gt;23" - 1920x1080&lt;/p&gt;            &lt;/td&gt;            &lt;td valign="top" style="width: 286px;"&gt;            &lt;p style="text-align: center;"&gt;10.6" - 1366x768&lt;/p&gt;            &lt;/td&gt;        &lt;/tr&gt;    &lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;p style="text-align: justify;"&gt;According with user actions, an application can assume 4 different state. FullScreenLandscape, Filled, Snapped and FullScreenPortrait. The figure behind shows the states:&lt;/p&gt;&lt;p style="text-align: justify;"&gt;&lt;img style="display: block; float: none; margin-left: auto; margin-right: auto;" title="image" alt="image" src="http://www.silverlightshow.net/Storage/Users/AndreaBoschin/image_17.png" width="594" height="512" /&gt;&lt;/p&gt;&lt;p style="text-align: justify;"&gt;The application have to support all the states to give an effective experience to the user. To detect the states changes you have to subscribe the ViewStateChanged event on the ApplicationView object. When the event raises the arguments let you know the new state so you have to switch on or off the parts of your application to best fit the available space. The best way to accomplish this task is using the LayoutAwarePage class, created by VisualStudio in the Common folder of the project. This class automatically handles states and map them to VisualStateManager states. Thanks to this mapping you can easily use Blend to edit the page like you are defining the states of a control. &lt;/p&gt;&lt;h4 style="text-align: justify;"&gt;An important argument&lt;/h4&gt;&lt;p style="text-align: justify;"&gt;In this article I've scratched the surface of layout and navigation. Especially layout is something that needs to be deeply understand to create effective apps, able to give a good experience to the user. I suggesto to read some good MSDN articles: &lt;/p&gt;&lt;ul&gt;    &lt;li&gt;    &lt;div style="text-align: justify;"&gt;&lt;a title="http://msdn.microsoft.com/en-us/library/windows/apps/hh780612.aspx" href="http://msdn.microsoft.com/en-us/library/windows/apps/hh780612.aspx"&gt;http://msdn.microsoft.com/en-us/library/windows/apps/hh780612.aspx&lt;/a&gt;&lt;/div&gt;    &lt;/li&gt;    &lt;li&gt;    &lt;div style="text-align: justify;"&gt;&lt;a title="http://msdn.microsoft.com/en-us/library/windows/apps/hh465362.aspx" href="http://msdn.microsoft.com/en-us/library/windows/apps/hh465362.aspx"&gt;http://msdn.microsoft.com/en-us/library/windows/apps/hh465362.aspx&lt;/a&gt;&lt;/div&gt;    &lt;/li&gt;    &lt;li&gt;    &lt;div style="text-align: justify;"&gt;&lt;a title="http://msdn.microsoft.com/en-us/library/windows/apps/hh465371.aspx" href="http://msdn.microsoft.com/en-us/library/windows/apps/hh465371.aspx"&gt;http://msdn.microsoft.com/en-us/library/windows/apps/hh465371.aspx&lt;/a&gt;&lt;/div&gt;    &lt;/li&gt;&lt;/ul&gt;&lt;p style="text-align: justify;"&gt;In the next article I will go depth in the lifetime matter to understand suspension and how to handle this important task.&lt;/p&gt;</description>      <link>http://www.silverlightshow.net/items/Windows-8-Metro-Layout-view-states-and-navigation.aspx</link>      <author>editorial@silverlightshow.net (Andrea Boschin  )</author>      <comments>http://www.silverlightshow.net/items/Windows-8-Metro-Layout-view-states-and-navigation.aspx#comments</comments>      <guid isPermaLink="true">http://www.silverlightshow.net/items/Windows-8-Metro-Layout-view-states-and-navigation.aspx</guid>      <pubDate>Mon, 07 May 2012 00:21:25 GMT</pubDate>    </item>    <item>      <title>International Code Sharing</title>      <link>http://feeds.johnpapa.net/~r/JohnPapa/~3/Cvx6dGZJZxk/international-code-sharing</link>      <description>&lt;p&gt;A Swede, and Italian/American, and a … Ward Bell walk into a bar …&lt;/p&gt; &lt;p align="left"&gt;OK, so I don’t exactly know what &lt;a href="https://twitter.com/#!/wardbell"&gt;Ward Bell&lt;/a&gt; is (besides a great friend and brilliant colleague). And what’s he doing walking into a bar with a Swede? And how did they do that since Ward lives in San Francisco, CA and &lt;a href="https://twitter.com/#!/hfjallemark"&gt;Hans Fjällemark&lt;/a&gt; lives in Sweden? And why did they invite me, the Italian/American, since I don’t drink? They went to the bar to share code ideas, of course!&lt;a href="http://johnpapa.net/Media/Default/Windows-Live-Writer/5f8c7c51c063_78B7/image_4.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://johnpapa.net/Media/Default/Windows-Live-Writer/5f8c7c51c063_78B7/image_thumb_1.png" width="520" height="269"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="left"&gt;I’ve always enjoyed working on side projects with friends so I could share ideas and bounce crazy ones off each other. The ultimate result is better code and a lot of fun. Ward and I have been friends for years and we often chat over the 3 hour time different from Florida to California via Skype while working out different patterns for building apps. One project Ward was instrumental in helping me work through was how I use a service locator (aka my ServiceProvider) for MVVM with XAML.&lt;/p&gt; &lt;p align="left"&gt;Hans is a new friend who I ran into on Twitter. he lives in Sweden, but thanks to Skype the 8 hour time difference is not a problem.&amp;nbsp; I wanted a designer to help with my &lt;a href="http://jpapa.me/jsrenderps"&gt;JsRender course’s&lt;/a&gt; demo layout and he was willing to help out (did a great job too). Together we came up with a nice layout for showing demos and key code concepts. What really helped is that Hans is a good designer and a good developer. Later, Hans and I worked out a bunch of small open source projects, one of which is the recently released &lt;a href="https://github.com/CodeSeven/toastr"&gt;toastr on github&lt;/a&gt;.&lt;/p&gt; &lt;p align="left"&gt;My point here is that all 3 of us have greatly benefited not only by creating better code, but also by motivating each other. Motivation is key so side projects don’t get left hanging (at least for me). And I find it directly helps me to build patterns that I can apply to my day job. &lt;/p&gt; &lt;p align="left"&gt;So how does this work? We use a few tools … Skype for IM and screen share, DropBox for instant sharing of ideas, and github for a a private repository and source control. &lt;/p&gt; &lt;p align="left"&gt;I highly recommend giving this type of collaboration a try. Find somebody that you know or who is on twitter, regardless if they are down the hall or on the other side of the world. With tools like Skype, DropBox and github there is no reason not to. And who knows, you might meet some great people like Hans and Ward &lt;img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://johnpapa.net/Media/Default/Windows-Live-Writer/5f8c7c51c063_78B7/wlEmoticon-smile_2.png"&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;&lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=Cvx6dGZJZxk:ox4matovWgQ:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?i=Cvx6dGZJZxk:ox4matovWgQ:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=Cvx6dGZJZxk:ox4matovWgQ:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?i=Cvx6dGZJZxk:ox4matovWgQ:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=Cvx6dGZJZxk:ox4matovWgQ:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=Cvx6dGZJZxk:ox4matovWgQ:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JohnPapa/~4/Cvx6dGZJZxk" height="1" width="1"/&gt;</description>      <pubDate>Fri, 04 May 2012 14:21:29 GMT</pubDate>      <guid isPermaLink="false">http://johnpapa.net:80/international-code-sharing</guid>      <origLink xmlns="http://rssnamespace.org/feedburner/ext/1.0">http://johnpapa.net:80/international-code-sharing</origLink>    </item>    <item>      <title>Yet Another Podcast #64–John Papa &amp; Javascript</title>      <link>http://feedproxy.google.com/~r/JesseLiberty-SilverlightGeek/~3/9a90IWHY32k/</link>      <comments>http://jesseliberty.com/2012/05/03/yet-another-podcast-64john-papa-javascript/#comments</comments>      <pubDate>Thu, 03 May 2012 17:44:03 +0000</pubDate>      <creator xmlns="http://purl.org/dc/elements/1.1/">Jesse Liberty</creator>      <category><![CDATA[Essentials]]></category>      <category><![CDATA[YapCast]]></category>      <guid isPermaLink="false">http://jesseliberty.com/?p=5267</guid>      <encoded xmlns="http://purl.org/rss/1.0/modules/content/"><![CDATA[Talking with John Papa and Jon Galloway about Javascript, JavaScript libraries and JavaScript patterns. John Papa’s Web Site Jon Galloway’s Web Site JsRender course toastr&#160; Knockout course Sammy JsRender Knockout Bootstrap Amplify &#160; Listen &#124; Yet Another Podcast Call in &#8230;...<br/><br/>For the complete article and hyperlinks, please visit my blog at http://JesseLiberty.com<div class="feedflare"><a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=9a90IWHY32k:e3l67x7hymM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=9a90IWHY32k:e3l67x7hymM:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=9a90IWHY32k:e3l67x7hymM:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?i=9a90IWHY32k:e3l67x7hymM:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=9a90IWHY32k:e3l67x7hymM:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?i=9a90IWHY32k:e3l67x7hymM:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=9a90IWHY32k:e3l67x7hymM:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?i=9a90IWHY32k:e3l67x7hymM:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=9a90IWHY32k:e3l67x7hymM:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?d=qj6IDK7rITs" border="0"></img></a></div><img src="http://feeds.feedburner.com/~r/JesseLiberty-SilverlightGeek/~4/9a90IWHY32k" height="1" width="1"/>]]></encoded>      <commentRss xmlns="http://wellformedweb.org/CommentAPI/">http://jesseliberty.com/2012/05/03/yet-another-podcast-64john-papa-javascript/feed/</commentRss>      <comments xmlns="http://purl.org/rss/1.0/modules/slash/">3</comments>      <enclosure url="http://jesseliberty.com/wp-content/media/Show64.mp3" length="31984260" type="audio/mpeg" />      <origLink xmlns="http://rssnamespace.org/feedburner/ext/1.0">http://jesseliberty.com/2012/05/03/yet-another-podcast-64john-papa-javascript/</origLink>    </item>    <item>      <title>Create Games for Windows 8 using Physamajig!</title>      <description>&lt;P&gt;The next update of &lt;A HREF="http://www.andybeaulieu.com/Home/tabid/67/EntryID/223/Default.aspx"&gt;Physamajig&lt;/A&gt; will allow users to create their own "Mini-Games" - without writing code! This new version will be released after the June 2012 &lt;A href="https://twitter.com/#!/BuildWindows8/status/194627936115101696"&gt;Windows 8 Release Preview&lt;/A&gt;. Like the &lt;A href="http://apps.microsoft.com/webpdp/en-us/app/physamajig/b4ece0fe-ee25-4118-8efc-281f7823ae38/m/ROW"&gt;current release of Physamajig&lt;/A&gt;, you just draw out elements on the screen to create physics objects - but in the new version, you can add Behaviors to your objects to add much more interactivity.&lt;/P&gt;&lt;P&gt;So what kind of games will Physamjig allow you to create without using code? This video shows a few examples:&lt;/P&gt;&lt;IFRAME height=450 src="http://www.youtube.com/embed/-vR1y9KbPU0" frameBorder=0 width=600 allowfullscreen&gt;&lt;/IFRAME&gt;&lt;P&gt;&lt;BR&gt;My inspiration for the no-code approach came from Behaviors and Triggers inside Expression Blend, which I used for previous versions of the &lt;A href="http://physicshelper.codeplex.com/"&gt;Physics Helper Library&lt;/A&gt;. Inside Expression Blend, you just drag/drop Behaviors onto elements to add runtime logic to them. It was a great way to encapsulate complex logic and allow designers to add interactivity to their creations without needing to write code.&lt;/P&gt;&lt;P&gt;Since Behaviors and Triggers are not (yet) present in WinRT Metro, I had to create my own custom implementation of them. A Trigger is generally an event, such as the user making a gesture on the screen, a collision, or an object being destroyed. A Behavior is what happens in response to the trigger, such as applying force to an object, playing a sound, or destroying an object. In Physamajig, the designer for adding Behaviors looks like this:&lt;/P&gt;&lt;IMG src="http://www.andybeaulieu.com/downloads/BehaviorDesignerInPhysamajig.png"&gt; &lt;P&gt;&lt;BR&gt;If this designer looks familiar to you, it might be because you've seen the cool &lt;A href="http://research.microsoft.com/apps/video/default.aspx?id=160768"&gt;Project Mayhem&lt;/A&gt; from Microsoft Research which was another source of inspiration for me. Project Mayhem calls them "Events" and "Reactions," but really these are the same as Triggers and Behaviors. In Mayhem, the designer looks like this:&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://www.andybeaulieu.com/downloads/mayhem-designer.jpg"&gt; &lt;/P&gt;&lt;P&gt;So is there really such a thing as the "no code scenario?" Will it ever be possible to put together complex, custom solutions using a simple UI to snap together various logic? I am not a believer yet, but I am convinced that adding Behaviors/Triggers (aka Reactions/Events) in a solution can greatly increase productivity and customization in many solutions.&lt;/P&gt;&lt;P&gt;Let me know what you think, and I'll leave you with one last teaser video, this one with extra cheesiness!&lt;/P&gt;&lt;IFRAME height=450 src="http://www.youtube.com/embed/5WfMmHlIBfw" frameBorder=0 width=600 allowfullscreen&gt;&lt;/IFRAME&gt;</description>      <link>http://www.andybeaulieu.com/Home/tabid/67/EntryID/225/Default.aspx</link>      <author>andy@andybeaulieu.com</author>      <comments>http://www.andybeaulieu.com/Home/tabid/67/EntryID/225/Default.aspx#Comments</comments>      <guid isPermaLink="true">http://www.andybeaulieu.com/Default.aspx?tabid=67&amp;EntryID=225</guid>      <pubDate>Thu, 03 May 2012 17:26:00 GMT</pubDate>      <comments xmlns="http://purl.org/rss/1.0/modules/slash/">1</comments>      <ping xmlns="http://madskills.com/public/xml/rss/module/trackback/">http://www.andybeaulieu.com/DesktopModules/Blog/Trackback.aspx?id=225</ping>    </item>    <item>      <title>Metro style applications – designing for the user</title>      <description>&lt;table width="20"&gt;    &lt;tbody&gt;        &lt;tr&gt;            &lt;td&gt;            &lt;div class="fb-like" data-show-faces="true" data-send="false" data-href="http://www.silverlightshow.net/items/Metro-style-applications-designing-for-the-user.aspx" data-font="segoe ui" data-layout="button_count"&gt;&lt;/div&gt;            &lt;/td&gt;            &lt;td&gt;&lt;a href="https://twitter.com/share" class="twitter-share-button" data-via="silverlightshow" data-counturl="http://www.silverlightshow.net/items/Metro-style-applications-designing-for-the-user.aspx" data-count="horizontal" data-text="Reading SilverlightShow article 'Metro style apps &amp;ndash; designing for the user' #win8dev #win8" data-url="http://slshow.net/KMMYzQ"&gt;Tweet&lt;/a&gt;&lt;/td&gt;            &lt;td&gt;&lt;g:plusone size="medium" href="http://www.silverlightshow.net/items/Metro-style-applications-designing-for-the-user.aspx"&gt;&lt;/g:plusone&gt;            &lt;/td&gt;            &lt;td&gt;            &lt;/td&gt;        &lt;/tr&gt;    &lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;It has been months since Windows 8 is available for developers and the need for new applications is growing in a fast pace. &lt;/p&gt;&lt;div style="border:1px solid #dddddd;border-image: initial; padding-bottom: 5px; background-color: #f3f3f3; margin-top: 5px; padding-left: 10px; width: 200px; float: right; margin-left: 10px; margin-right: 5px; padding-top: 5px;"&gt;&lt;h3&gt;Don't miss...&lt;/h3&gt;&lt;ul style="list-style-type: circle; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 20px; font-size: 12px;"&gt;    &lt;li style="padding-bottom: 5px;"&gt;&lt;a href="http://www.silverlightshow.net/Webinars.aspx"&gt;Recordings of SilverlightShow Win 8 webinars&lt;/a&gt;&lt;/li&gt;    &lt;li style="padding-bottom: 5px;"&gt;&lt;a href="http://www.silverlightshow.net/items/Windows-8-and-the-future-of-XAML-Part-1-An-overview-of-the-Windows-8-platform.aspx"&gt;The article series: Windows 8 and the future of XAML&lt;/a&gt; &lt;/li&gt;    &lt;li style="padding-bottom: 5px;"&gt;&lt;a href="http://www.silverlightshow.net/ebooks/win8_odata.aspx"&gt;Ebook: Windows 8 XAML Metro Apps with OData&lt;/a&gt; &lt;/li&gt;&lt;/ul&gt;&lt;p style="padding-bottom: 5px; text-align: center;"&gt;&lt;a href="http://www.silverlightshow.net/ebooks/win8_odata.aspx" target="_self"&gt;&lt;img style="width: 107px; height: 150px;" alt="Ebook: Windows 8 XAML Metro Apps with OData" src="http://www.silverlightshow.net/Storage/Ebooks/win8_odata.png" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="http://www.silverlightshow.net/ebooks.aspx"&gt;All SilverlightShow Ebooks&lt;/a&gt;&amp;nbsp;&lt;img alt="" src="http://www.silverlightshow.net/Storage/arrow-content.jpg" /&gt;&lt;/p&gt;&lt;/div&gt;And nothing is more exacting than a computer user in 21&lt;sup&gt;st&lt;/sup&gt; century. It&amp;rsquo;s quite difficult to build the &lt;em&gt;right&lt;/em&gt; application, moreover &amp;ndash; it&amp;rsquo;s even more difficult to stay on top and not to be, metaphorically, stepped over by the big players. They always know what exactly the user wants and have the resources to provide it to him. But that&amp;rsquo;s not always what has to happen after all.&lt;br /&gt;&lt;p&gt;You have the power to build what the user wants and even build it so that s/he would feel it so natural to use your Metro application. That is to design the application in a way that using the fingers on the display seems to be a pleasure, but not a challenge.&lt;br /&gt;&amp;nbsp;&lt;/p&gt;&lt;h2&gt;Okay, let&amp;rsquo;s make our Metro applications look great!&lt;/h2&gt;&lt;p&gt;Designing the Metro application is different from designing the common and straightforward desktop application. Obviously, using fingers on touch instead of mouse cursor is a big difference. And the Metro style applications will soon become the mainstream. &lt;/p&gt;&lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-gb/library/windows/apps/hh700403"&gt;Here&lt;/a&gt; you can find design assets for creating great Metro application mock-ups. The download contains layered PhotoShop files representing common controls and components, project layouts and templates. &lt;/p&gt;&lt;p&gt;In the download you will find lots of .psd files that you can use to build a sketch or mocked prototype of your application. It seems that everything you would ever need is in:&lt;/p&gt;&lt;ul&gt;    &lt;li&gt;&lt;strong&gt;Common controls.&lt;/strong&gt; A variety of styles of all controls in dark and light Metro themes.&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Common components.&lt;/strong&gt; Tiles with the 1x1 and 2x1 ratio, contracts &amp;ndash; the charms bar, search, share and settings side menus and more, and the keyboard.&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Base layouts.&lt;/strong&gt; For fill, full, portrait and snap views.&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Project templates.&lt;/strong&gt; For light and dark themes.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Microsoft provides you with all you could need, but you are, of course, not limited only to the list. All files are layered and fully editable to stick with your mock-up design needs.&lt;/p&gt;&lt;h2&gt;User experience design patterns&lt;/h2&gt;&lt;p&gt;Here come the UX design patterns. They encapsulate the most important principles in Windows 8 Metro applications and guide you to the ultimate design. Using the patterns helps you in finding answers to questions related to content organization in pages, placing buttons and commands and the touch gestures and interactions.&lt;/p&gt;&lt;h3&gt;Navigation design&lt;/h3&gt;&lt;p&gt;The navigation design patters guide developers in organizing application content in pages, subpages, sections and categories so the users feel it comfortable and intuitively to switch between application screens and navigate through different views. It focuses mainly on two types of navigation.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;img alt="" src="http://www.silverlightshow.net/Storage/Users/lnikolov/MetroAppsDesign/hub.png" style="float: left; margin-right: 15px;        border-width: 0px;border-style: solid;" /&gt;&lt;/p&gt;&lt;p&gt;The &lt;em&gt;Hub&lt;/em&gt; design pattern, or hierarchical system of navigation, is the most commonly used in the consumers preview. It is appropriate when the application consists of large amount of data that also varies a lot. The content is organized in levels and each level is responsible for a specific context. The top-most page &amp;ndash; the Hub page, also referred as initial page, is where the content is presented in different sections with different contexts. The Hub page usually provides very different categories of content and less functionality. Its main focus is the content presentation. Each section of the Hub page is associated with a Section page that is more specific in its content presentation. It often contains a number of data items. Each item is then presented in details in the Details page &amp;ndash; the third and last level of content.&lt;!--&lt;/p--&gt;&lt;/p&gt;&lt;p&gt;&lt;img alt="" src="http://www.silverlightshow.net/Storage/Users/lnikolov/MetroAppsDesign/flat.png" style="float: left; margin-right: 15px;" /&gt;The Flat design system is used mostly in applications that have a single purpose and clear interaction and process flow. Such an application is document creation tool that has small number of pages that have to be executed all in a specific order.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;On the navigation design documentation page &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/hh761500.aspx"&gt;here&lt;/a&gt; you can also find guidelines and basic navigation concepts for Metro applications.&lt;/p&gt;&lt;h3&gt;Commanding design&lt;/h3&gt;&lt;p&gt;&lt;img alt="" src="http://www.silverlightshow.net/Storage/Users/lnikolov/MetroAppsDesign/communication.png" style="float: left; margin-right: 15px;" /&gt;The commanding design guidelines that you can find &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/hh761499.aspx"&gt;here&lt;/a&gt; describe the best practices in Metro applications for placing and using command buttons in all possible ways. The focus is on what the user should be able to do and how this should happen. When possible you must allow manipulating items and executing commands directly from the canvas and not by the charms and the application bar. The command buttons have to be consistently used in all application views so it is the same and intuitively for users to execute commands from everywhere. To avoid complexity limit the number of commands and always consider the placement of the button &amp;ndash; this could improve the speed a command can be acted upon.&lt;/p&gt;&lt;h3&gt;Touch interaction design&lt;/h3&gt;&lt;p&gt;On the Microsoft Build conference last year Jensen Harris of the Windows User Experience team announced the results from usability research conducted from Microsoft in their dedicated labs for the comfortable zones of interaction and behavior when using a touch screen device like the Metro tablet. Everyone uses the touch device in a slightly different way in different postures &amp;ndash; on the knee, on tables, with two hands on the side, etc. The last turned to be the most common posture. &lt;/p&gt;The touch interaction guidelines (that you can find in details &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/hh465415.aspx"&gt;here&lt;/a&gt;) describe how to provide good touch interaction experience with your application partly relying on researches among users.&lt;br /&gt;&lt;p&gt;&lt;strong&gt;Interaction comfortable area:&lt;/strong&gt; Because the Windows 8 tablets are most often held along the side, the bottom corners and sides are ideal locations to put your interaction elements. To comfortably reach the center of the screen it takes you a posture change &amp;ndash; put the important interaction interface close to the edges in the user&amp;rsquo;s comfortable zone.&lt;/p&gt;&lt;p&gt;&lt;img alt="" src="http://www.silverlightshow.net/Storage/Users/lnikolov/MetroAppsDesign/touch_interaction.png" /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Reading comfortable area:&lt;/strong&gt; Content in the top half of the screen is easier to read than content in bottom half or the middle because it is often partly covered by your fingers.&lt;/p&gt;&lt;p&gt;&lt;img alt="" src="http://www.silverlightshow.net/Storage/Users/lnikolov/MetroAppsDesign/reading_comf.png" /&gt;&lt;/p&gt;&lt;p&gt;Windows 8 has several standard touch interactions, which effects shouldn&amp;rsquo;t change when the display is touched with more fingers than expected.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;img alt="" src="http://www.silverlightshow.net/Storage/Users/lnikolov/MetroAppsDesign/Windows-8-Touch-Interactions.png" style="width: 450px; height: 258px;" /&gt;&lt;/p&gt;&lt;p&gt;Elements from your interface that could be moved around should follow the finger direction while the display is touched. Just like in real world &amp;ndash; the pen is in your hand while you don&amp;rsquo;t put it on the desk. All interactions should be observed, i.e. user should feel or see a feedback from his actions. It&amp;rsquo;s not acceptable to press a button with your finger and don&amp;rsquo;t see any flash or any kind of feedback. You could be misled that your touch hasn&amp;rsquo;t been registered from the device.&amp;nbsp; And last but definitely not least &amp;ndash; always consider the size of the things. The error rate increases with the size getting smaller. The recommended minimum size for a touch target is 7x7 mm (40x40 pixels) with at least 2 mm padding. Of course, when the accuracy matters, the size gets bigger.&lt;/p&gt;&lt;p&gt;Touch interactions are important. Think if the interactions as the language that your application uses to communicate with the user. You need this language fluent!&lt;/p&gt;&lt;h2&gt;Conclusion&lt;/h2&gt;Designing your application in a way that you put yourself in the user shoes is a key factor for the vitality of a future product. In a world where the user is ruling and defines the standards, the design and feel of your application is also the packaging. And the bad pack is even not considered as an option. This article is about attracting users with nice and intuitive user experience in Windows 8 Metro applications. To keep a user, though, you need also the content and value. Harnessing the power of the navigation, commands and touch interactions guidelines and patterns parallel with the content may be the key of your success!</description>      <link>http://www.silverlightshow.net/items/Metro-style-applications-designing-for-the-user.aspx</link>      <author>editorial@silverlightshow.net (Lazar Nikolov )</author>      <comments>http://www.silverlightshow.net/items/Metro-style-applications-designing-for-the-user.aspx#comments</comments>      <guid isPermaLink="true">http://www.silverlightshow.net/items/Metro-style-applications-designing-for-the-user.aspx</guid>      <pubDate>Wed, 02 May 2012 12:21:00 GMT</pubDate>    </item>    <item>      <title>New Course on JsRender Templating Fundamentals with JavaScript</title>      <link>http://feeds.johnpapa.net/~r/JohnPapa/~3/Xu75Niebxtk/new-course-on-jsrender-templating-fundamentals-with-javascript</link>      <description>&lt;p align="justify"&gt;Super fast rendering, code-less tag syntax, and no DOM nor jQuery dependency. That’s &lt;a href="https://github.com/BorisMoore/jsrender"&gt;JsRender&lt;/a&gt;!&lt;/p&gt; &lt;p align="justify"&gt;My latest course &lt;a href="http://jpapa.me/jsrenderps"&gt;JsRender Fundamentals&lt;/a&gt; is now available at &lt;a href="http://pluralsight.net"&gt;Pluralsight&lt;/a&gt;! Learn how to build fast, robust, and maintainable Web applications with JavaScript, jQuery and JsRender: the successor to jQuery Templates.&lt;/p&gt; &lt;p align="justify"&gt;&lt;strong&gt;Free Preview:&lt;/strong&gt;&lt;/p&gt; &lt;div style="padding-bottom: 0px; padding-left: 0px; width: 448px; padding-right: 0px; display: block; float: none; margin-left: auto; margin-right: auto; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:1c5e2b60-6bab-4c92-910f-8f76567e004e"&gt;&lt;embed height="252" type="application/x-shockwave-flash" width="448" src="http://www.youtube.com/v/03xbkl1bjkY?hd=1" wmode="transparent"&gt;&lt;/embed&gt;&amp;nbsp;&lt;/div&gt; &lt;p align="justify"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;strong&gt;Course Description:&lt;/strong&gt;&lt;/p&gt; &lt;p align="justify"&gt;JsRender (the successor to jQuery Templates) is a JavaScript library that allows you to define a boilerplate structure once and reuse it to generate content dynamically. Learn how JsRender brings a new templating library to HTML5 development that has a code-less tag syntax, high performance, no dependency on jQuery nor a DOM, supports creating custom functions, and uses pure string based rendering.&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://jpapa.me/jsrenderps"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="jsrender-ps12" border="0" alt="jsrender-ps12" src="http://johnpapa.net/Media/Default/Windows-Live-Writer/New-Course-on-JsRender-Templating-Fundam_F44E/jsrender-ps12_2f31fc1d-f4b1-4f64-b72d-84191061dbbc.png" width="520" height="102"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;strong&gt;What are the modules?&lt;/strong&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://johnpapa.net/Media/Default/Windows-Live-Writer/New-Course-on-JsRender-Templating-Fundam_F44E/ps2_thumb20_thumb_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="ps2_thumb20_thumb" border="0" alt="ps2_thumb20_thumb" src="http://johnpapa.net/Media/Default/Windows-Live-Writer/New-Course-on-JsRender-Templating-Fundam_F44E/ps2_thumb20_thumb_thumb.png" width="30" height="31"&gt;&lt;/a&gt;0: Course Overview &lt;/p&gt; &lt;p align="justify"&gt;&amp;gt; 1 minute teaser trailer on what the course covers&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://johnpapa.net/Media/Default/Windows-Live-Writer/New-Course-on-JsRender-Templating-Fundam_F44E/ps2_thumb25_thumb_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="ps2_thumb25_thumb" border="0" alt="ps2_thumb25_thumb" src="http://johnpapa.net/Media/Default/Windows-Live-Writer/New-Course-on-JsRender-Templating-Fundam_F44E/ps2_thumb25_thumb_thumb.png" width="30" height="31"&gt;&lt;/a&gt;1: Getting Started with JsRender&lt;/p&gt; &lt;p align="justify"&gt;This first module sets the foundations for the course by showing you everything you need to know to get started with JsRender and some helpful resources. You'll also learn a few tips on some tools and conventions that may help you along the way.&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://johnpapa.net/Media/Default/Windows-Live-Writer/New-Course-on-JsRender-Templating-Fundam_F44E/ps2_thumb23_thumb_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="ps2_thumb23_thumb" border="0" alt="ps2_thumb23_thumb" src="http://johnpapa.net/Media/Default/Windows-Live-Writer/New-Course-on-JsRender-Templating-Fundam_F44E/ps2_thumb23_thumb_thumb.png" width="30" height="31"&gt;&lt;/a&gt; 2: JsRender Core Tokens&lt;/p&gt; &lt;p align="justify"&gt;This module introduces the core JsRender token syntax for HTML encoding, handling conditionals, expressions, and looping through data. Also covered are how to use JsRender without jQuery and the #data and #index tokens.&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://johnpapa.net/Media/Default/Windows-Live-Writer/New-Course-on-JsRender-Templating-Fundam_F44E/ps2_thumb27_thumb_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="ps2_thumb27_thumb" border="0" alt="ps2_thumb27_thumb" src="http://johnpapa.net/Media/Default/Windows-Live-Writer/New-Course-on-JsRender-Templating-Fundam_F44E/ps2_thumb27_thumb_thumb.png" width="30" height="31"&gt;&lt;/a&gt;3: View Paths, Nesting and Context Changes&lt;/p&gt; &lt;p align="justify"&gt;This module covers how to manage object hierarchies, changing context, view paths, and contextual parameters using the JsRender features.&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://johnpapa.net/Media/Default/Windows-Live-Writer/New-Course-on-JsRender-Templating-Fundam_F44E/ps2_thumb29_thumb_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="ps2_thumb29_thumb" border="0" alt="ps2_thumb29_thumb" src="http://johnpapa.net/Media/Default/Windows-Live-Writer/New-Course-on-JsRender-Templating-Fundam_F44E/ps2_thumb29_thumb_thumb.png" width="30" height="31"&gt;&lt;/a&gt;4: Managing Templates&lt;/p&gt; &lt;p align="justify"&gt;This module covers important management and performance tips for your templates using JsRender and jQuery. You will learn how and when to use strings to store templates, how to compile and name 1 or more templates, and how to use external templates.&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://johnpapa.net/Media/Default/Windows-Live-Writer/New-Course-on-JsRender-Templating-Fundam_F44E/ps2_thumb31_thumb_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="ps2_thumb31_thumb" border="0" alt="ps2_thumb31_thumb" src="http://johnpapa.net/Media/Default/Windows-Live-Writer/New-Course-on-JsRender-Templating-Fundam_F44E/ps2_thumb31_thumb_thumb.png" width="30" height="31"&gt;&lt;/a&gt;5: Advanced JsRender Concepts and Tips&lt;/p&gt; &lt;p align="justify"&gt;This module demonstrates how to create your own JsRender tags, converters and helper functions to create more powerful and cleaner templates through separation of behavior and structure. These tips can create powerful, resuable and more maintainable templates for web applications.&lt;/p&gt; &lt;p align="justify"&gt;&lt;strong&gt;Demos:&lt;/strong&gt;&lt;/p&gt; &lt;p align="left"&gt;The course includes 20+ demos that you can run (some within Visual Studio and others from &lt;a href="http://jsfiddle.net"&gt;JsFiddle&lt;/a&gt;)&lt;/p&gt; &lt;p align="left"&gt;&lt;a href="http://johnpapa.net/Media/Default/Windows-Live-Writer/New-Course-on-JsRender-Templating-Fundam_F44E/image_thumb4_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image_thumb4" border="0" alt="image_thumb4" src="http://johnpapa.net/Media/Default/Windows-Live-Writer/New-Course-on-JsRender-Templating-Fundam_F44E/image_thumb4_thumb.png" width="520" height="316"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p align="justify"&gt;&lt;strong&gt;Parting Thoughts:&lt;/strong&gt;&lt;/p&gt; &lt;p align="justify"&gt;I extend a sincere thank you to some great folks who helped influence this course through their contributions to open source, the plug in community, and some by helping me vet the content and ideas. They are, in no particular order:&lt;/p&gt; &lt;ul&gt; &lt;li&gt; &lt;div align="justify"&gt;&lt;a href="https://twitter.com/#!/BorisMoore"&gt;Boris Moore&lt;/a&gt; – creative mind behind of JsRender and jQuery Templates&lt;/div&gt; &lt;li&gt; &lt;div align="justify"&gt;&lt;a href="http://twitter.com/hfjallemark"&gt;Hans Fjällemark&lt;/a&gt; – designed the responsive web design layout for the demos&lt;/div&gt; &lt;li&gt; &lt;div align="justify"&gt;&lt;a href="https://twitter.com/#!/wardbell"&gt;Ward Bell&lt;/a&gt; – helped vet my ideas for the “code concepts” window in the demos&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="feedflare"&gt;&lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=Xu75Niebxtk:m5Pp8xyWxnU:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?i=Xu75Niebxtk:m5Pp8xyWxnU:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=Xu75Niebxtk:m5Pp8xyWxnU:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?i=Xu75Niebxtk:m5Pp8xyWxnU:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=Xu75Niebxtk:m5Pp8xyWxnU:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=Xu75Niebxtk:m5Pp8xyWxnU:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JohnPapa/~4/Xu75Niebxtk" height="1" width="1"/&gt;</description>      <pubDate>Tue, 01 May 2012 21:23:46 GMT</pubDate>      <guid isPermaLink="false">http://johnpapa.net:80/new-course-on-jsrender-templating-fundamentals-with-javascript</guid>      <origLink xmlns="http://rssnamespace.org/feedburner/ext/1.0">http://johnpapa.net:80/new-course-on-jsrender-templating-fundamentals-with-javascript</origLink>    </item>    <item>      <title>Windows 8 and the future of XAML Part 6: Tiles, toasts and badges</title>      <description>&lt;table width="20"&gt;    &lt;tbody&gt;        &lt;tr&gt;            &lt;td&gt;            &lt;div class="fb-like" data-show-faces="true" data-send="false" data-href="http://www.silverlightshow.net/items/Windows-8-and-the-future-of-XAML-Part-6-Tiles-toasts-and-badges.aspx" data-font="segoe ui" data-layout="button_count"&gt;&lt;/div&gt;            &lt;/td&gt;            &lt;td&gt;&lt;a href="https://twitter.com/share" class="twitter-share-button" data-via="silverlightshow" data-counturl="http://www.silverlightshow.net/items/Windows-8-and-the-future-of-XAML-Part-6-Tiles-toasts-and-badges.aspx" data-count="horizontal" data-text="Reading @gillcleeren's article '#Windows8 &amp;amp; the future of #XAML: Tiles, toasts &amp;amp; badges' #win8 " data-url="http://slshow.net/IGbxzg"&gt;Tweet&lt;/a&gt;&lt;/td&gt;            &lt;td&gt;&lt;g:plusone size="medium" href="http://www.silverlightshow.net/items/Windows-8-and-the-future-of-XAML-Part-6-Tiles-toasts-and-badges.aspx"&gt;&lt;/g:plusone&gt;            &lt;/td&gt;            &lt;td&gt;            &lt;/td&gt;        &lt;/tr&gt;    &lt;/tbody&gt;&lt;/table&gt;&lt;div style="border:1px solid #dddddd;border-image: initial; background-color: #f3f3f3; margin-top: 5px; margin-left: 150px; padding-left: 10px; padding-top: 10px; width: 400px; text-align: center;"&gt;&lt;strong&gt;&lt;a href="http://www.silverlightshow.net/Storage/Sources/WorkingWithTiles.zip"&gt;Download the source code for this article&lt;/a&gt;&lt;/strong&gt;&lt;ul&gt;&lt;/ul&gt;&lt;/div&gt;&lt;p&gt;Welcome to part 6 already in this Windows 8 series. Since the goal of this articles is bringing you in touch with all the important aspects of Windows 8 development, we need to dive into tiles.&lt;/p&gt;&lt;div style="border:1px solid #dddddd;border-image: initial; padding-bottom: 5px; background-color: #f3f3f3; margin-top: 5px; padding-left: 10px; width: 200px; float: right; margin-left: 10px; margin-right: 5px; padding-top: 5px;"&gt;&lt;h3&gt;Don't miss...&lt;/h3&gt;&lt;ul style="list-style-type: circle; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 20px; font-size: 12px;"&gt;    &lt;li style="padding-bottom: 5px;"&gt;&lt;a href="http://www.silverlightshow.net/Webinars.aspx"&gt;Recordings of SilverlightShow Win 8 webinars&lt;/a&gt;&lt;/li&gt;    &lt;li style="padding-bottom: 5px;"&gt;&lt;a href="http://www.silverlightshow.net/items/Windows-8-Metro-Create-your-apps-with-simplicity-in-mind.aspx"&gt;The article series: Windows 8 Metro&lt;/a&gt; &lt;/li&gt;    &lt;li style="padding-bottom: 5px;"&gt;&lt;a href="http://www.silverlightshow.net/ebooks/win8_odata.aspx"&gt;Ebook: Windows 8 XAML Metro Apps with OData&lt;/a&gt; &lt;/li&gt;&lt;/ul&gt;&lt;p style="padding-bottom: 5px; text-align: center;"&gt;&lt;a href="http://www.silverlightshow.net/ebooks/win8_odata.aspx" target="_self"&gt;&lt;img style="width: 107px; height: 150px;" alt="Ebook: Windows 8 XAML Metro Apps with OData" src="http://www.silverlightshow.net/Storage/Ebooks/win8_odata.png" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="http://www.silverlightshow.net/ebooks.aspx"&gt;All SilverlightShow Ebooks&lt;/a&gt;&amp;nbsp;&lt;img alt="" src="http://www.silverlightshow.net/Storage/arrow-content.jpg" /&gt;&lt;/p&gt;&lt;/div&gt;Tiles are therefore the main topic of this very article. If you&amp;rsquo;re coming from a Windows Phone 7 background, the concept of tiles is probably already familiar to you. However, Windows 8 brings quite a few new things to the table, including the concept of badges. Toasts are also covered here; conceptually, these already existed in Windows Phone 7 development as well but have been adapted for use in a Windows 8 environment.&lt;h2&gt;The concepts of tiles&lt;/h2&gt;&lt;p&gt;In Windows 8, due to the new way application lifetime management, only one application can be running at any point in time (except when the user has two applications side-by-side using snap view; in that case, two applications are running at the same time). &lt;/p&gt;If not running, the application is suspended. We&amp;rsquo;ll cover the lifetime management in a coming article.&lt;p&gt;If an application wants to inform the user about an event or any update really, by default, it can only do so while it&amp;rsquo;s running in the foreground. Because this wouldn&amp;rsquo;t lead to a great user experience, Microsoft invented tiles. Tiles are the little blocks, pinned to the start screen. The image below shows some tiles. &lt;/p&gt;&lt;p&gt;&lt;img style="border:0px;  border-image: initial; display: inline;" title="image" alt="image" src="http://www.silverlightshow.net/Storage/Users/gillcleeren/image_5d8693b1-e6ee-44f5-86b9-a50814b9c7d7.png" width="453" height="533" /&gt;  &lt;/p&gt;&lt;p&gt;While a tile is a way to launch an application, it can be much more. Users will pin applications they use most to their start screen. A tile can be made a live tile. A live tile is being updated with new information while the application is or isn&amp;rsquo;t running. Therefore, the tile can be seen as an extension of the application, allowing the developer to convey information while the application is not the foreground application (read: when it&amp;rsquo;s not running).  &lt;/p&gt;&lt;p&gt;Like in Windows Phone 7, the start screen is a means of giving the user access to his most important info. Using a live tile, this becomes possible. The tile can be a way of engaging the user back in the application: imagine you&amp;rsquo;ve written an RSS application. Using a live tile, you can update the information shown in the start screen. When the user notices the article showing, it can result in a launch of the application. &lt;/p&gt;&lt;p&gt;Looking at the live tiles (and frankly, screenshots don&amp;rsquo;t do them justice), they may seem a bit complicated for developers to create at first sight. All the animations and different types that exist however, are all based on templates which are pure XML. Indeed, there&amp;rsquo;s no need to create tiles from scratch, Microsoft did the hard part. For developers, it&amp;rsquo;s just using these templates and Windows 8 will handle the rest. We&amp;rsquo;ll see these templates in a minute. &lt;/p&gt;&lt;h2&gt;Tiles: basic ones and live ones&lt;/h2&gt;&lt;p&gt;Let&amp;rsquo;s now look at how we can create these tiles. Up first, basic tiles. &lt;/p&gt;&lt;h3&gt;Basic tiles&lt;/h3&gt;&lt;p&gt;In Visual Studio, we can as a bare minimum, include the default tile, which is a square. When installing the application, the tile that&amp;rsquo;s shown by default is the square tile. It&amp;rsquo;s the user who can select that your application gets a wide tile. However, it&amp;rsquo;s up to the developer on the other hand to include a wide tile in Visual Studio as well. In the screenshot below, you can see the package manifest editor where we are selecting images. Notice that Visual Studio hints at what the sizes of these should be. &lt;/p&gt;&lt;p&gt;&lt;img style="border:0px;  border-image: initial; display: inline;" title="image" alt="image" src="http://www.silverlightshow.net/Storage/Users/gillcleeren/image_22a933b9-8525-4829-a585-2576354fb11e.png" width="609" height="190" /&gt;  &lt;/p&gt;&lt;p&gt;At this point, our application has a basic tile, which isn&amp;rsquo;t doing anything at all. It&amp;rsquo;s acting like an icon on the desktop basically. Below is the wide tile. &lt;/p&gt;&lt;p&gt;&lt;img style="border:0px;  border-image: initial; display: inline;" title="image" alt="image" src="http://www.silverlightshow.net/Storage/Users/gillcleeren/image_f185ee50-06de-40b6-b0a8-67a3850c71f3.png" width="430" height="222" /&gt;  &lt;/p&gt;&lt;p&gt;And here&amp;rsquo;s the square tile. &lt;/p&gt;&lt;p&gt;&lt;img style="border:0px;  border-image: initial; display: inline;" title="image" alt="image" src="http://www.silverlightshow.net/Storage/Users/gillcleeren/image_4bbfd14d-6912-425b-a20f-636e4afc0c15.png" width="276" height="241" /&gt;  &lt;/p&gt;&lt;p&gt;Both wide and square tiles can get updates. When receiving updates, tiles become live tiles. &lt;/p&gt;&lt;h3&gt;Live tiles&lt;/h3&gt;&lt;p&gt;Live tiles are where the fun begins. A live tile can display updates to the user. Below you can see a tile displaying different statuses.  &lt;/p&gt;&lt;p&gt;&lt;img style="border:0px;  border-image: initial; display: inline;" title="image" alt="image" src="http://www.silverlightshow.net/Storage/Users/gillcleeren/image_4595445c-401f-4903-92c8-03dec1e2f475.png" width="353" height="214" /&gt;  &lt;/p&gt;&lt;p&gt;It&amp;rsquo;s easy to understand that this way of displaying information extends the way the application works: in many apps, the information on the tile is some summary of the most important information of the application. Apart from text, tiles can also display images or a combination of the two. &lt;/p&gt;&lt;p&gt;&lt;img style="border:0px;  border-image: initial; display: inline;" title="image" alt="image" src="http://www.silverlightshow.net/Storage/Users/gillcleeren/image_8b554412-5352-4c06-8c26-64a54346994d.png" width="359" height="184" /&gt;  &lt;/p&gt;&lt;p&gt;To make a tile become a live tile, we need to send it a message. This message consists of XML in the form of a predefined template. Microsoft has included quite a few templates for both the square and the wide templates; below we can see a sample of this XML:  &lt;/p&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;div style="padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;     text-align: left;border-style: none;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;tile&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;  &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;visual&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;version&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;='1'&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;lang&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;='en-US'&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;binding&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;template&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;='TileWideText03'&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;      &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;text&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;id&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;='1'&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;Hello World! My very own tile notification&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;      &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;text&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;binding&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;binding&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;template&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;='TileSquareText04'&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;      &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;text&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;id&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;='1'&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;Hello World! My very own tile notification&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;      &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;text&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;binding&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;  &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;visual&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;tile&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;The template takes complete care of the display of the tile: rendering of the tile as well as all animations are done entirely based on the XML. We as developers don&amp;rsquo;t need to worry about these; the only thing we need to do is sending the tile updated XML. In a tile, we can include text (in some predefined fields in the XML) as well as images. Images can be *.png or *.jpg files (we&amp;rsquo;ve seen these in the above screenshots).&lt;/p&gt;&lt;p&gt;Let&amp;rsquo;s see how we can create a live tile. In this article, we are working with an application called &amp;ldquo;WorkingWithTiles&amp;rdquo;. The UI is very simple, it contains a few buttons which will trigger the execution of a tile update.&lt;/p&gt;&lt;p&gt;&lt;img style="border:0px;  border-image: initial; display: inline;" title="image" alt="image" src="http://www.silverlightshow.net/Storage/Users/gillcleeren/image_63685347-65a2-470e-a2e3-1004f12d6a7a.png" width="609" height="390" /&gt;&lt;/p&gt;&lt;p&gt;We can work with the raw XML (shown above) where we modify the XML and send that XML directly to the tile.&lt;/p&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;div style="padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;     text-align: left;border-style: none;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; UpdateTileWithText(&lt;span style="color: #0000ff;"&gt;string&lt;/span&gt; text)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    XmlDocument tileXml = TileUpdateManager.GetTemplateContent(TileTemplateType.TileWideText03);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    XmlNodeList textElements = tileXml.GetElementsByTagName(&lt;span style="color: #006080;"&gt;"text"&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    textElements.Item(0).AppendChild(tileXml.CreateTextNode(text));&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    TileNotification tile = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; TileNotification(tileXml);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    TileUpdateManager.CreateTileUpdaterForApplication().Update(tile);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;In the code above, we first retrieve the content using the TileUpdateManager.GetTemplateContent. TileTemplateType is an enumeration that contains all templates. In the following lines, we replace the contents of the text field. Finally, we create a TileNotification instance, which in the next line is sent to the TileUpdateManager.&lt;/p&gt;&lt;p&gt;Below you can see the updated tile.&lt;/p&gt;&lt;p&gt;&lt;img style="border:0px;  border-image: initial; display: inline;" title="image" alt="image" src="http://www.silverlightshow.net/Storage/Users/gillcleeren/image_76353f85-e672-4f58-9982-4852a0ab451f.png" width="328" height="172" /&gt;&lt;/p&gt;&lt;p&gt;Now we&amp;rsquo;ll take a look at updating both text and an image. The code is similar although a bit longer since we are adding an image and text. Notice that we are also including the contents of the square tile here, since we don&amp;rsquo;t know if the user has a wide tile or a square tile pinned from our app.&lt;/p&gt;&lt;pre&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/pre&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;div style="padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;     text-align: left;border-style: none;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; UpdateTileWithImage(&lt;span style="color: #0000ff;"&gt;string&lt;/span&gt; text, &lt;span style="color: #0000ff;"&gt;string&lt;/span&gt; imageSrc)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    XmlDocument tileXml = TileUpdateManager.GetTemplateContent(TileTemplateType.TileWideImageAndText01);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    XmlNodeList textElements = tileXml.GetElementsByTagName(&lt;span style="color: #006080;"&gt;"text"&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    textElements.Item(0).AppendChild(tileXml.CreateTextNode(text));&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    XmlNodeList imageElements = tileXml.GetElementsByTagName(&lt;span style="color: #006080;"&gt;"image"&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    XmlElement imageElement = (XmlElement)imageElements.Item(0);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    imageElement.SetAttribute(&lt;span style="color: #006080;"&gt;"src"&lt;/span&gt;, imageSrc);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    imageElement.SetAttribute(&lt;span style="color: #006080;"&gt;"alt"&lt;/span&gt;, &lt;span style="color: #006080;"&gt;"Image description"&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    XmlDocument squareTileXml = TileUpdateManager.GetTemplateContent(TileTemplateType.TileSquareImage);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    XmlNodeList squareImageElements = squareTileXml.GetElementsByTagName(&lt;span style="color: #006080;"&gt;"image"&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    XmlElement squareImageElement = (XmlElement)squareImageElements.Item(0);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    squareImageElement.SetAttribute(&lt;span style="color: #006080;"&gt;"src"&lt;/span&gt;, imageSrc);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    squareImageElement.SetAttribute(&lt;span style="color: #006080;"&gt;"alt"&lt;/span&gt;, &lt;span style="color: #006080;"&gt;"Image description"&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    IXmlNode subnode = tileXml.ImportNode(squareTileXml.GetElementsByTagName(&lt;span style="color: #006080;"&gt;"binding"&lt;/span&gt;).Item(0), &lt;span style="color: #0000ff;"&gt;true&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    tileXml.GetElementsByTagName(&lt;span style="color: #006080;"&gt;"visual"&lt;/span&gt;).Item(0).AppendChild(subnode);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    TileNotification tile = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; TileNotification(tileXml);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    TileUpdateManager.CreateTileUpdaterForApplication().Update(tile);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;When we look at the start screen now, we&amp;rsquo;ll see the following tile.&lt;/p&gt;&lt;p&gt;&lt;img style="border:0px;  border-image: initial; display: inline;" title="image" alt="image" src="http://www.silverlightshow.net/Storage/Users/gillcleeren/image_6abcf027-b0a8-4eef-8c1c-43b01db7efd0.png" width="339" height="181" /&gt;&lt;/p&gt;&lt;p&gt;Using the XML directly is maybe a bit cumbersome. In the SDK samples, a handy library is included called NotificationExtensions. This wraps the XML editing and gives us types to work with. The XML editing is abstracted away. Below you can see the code for the text -only tile update.&lt;/p&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;div style="padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;     text-align: left;border-style: none;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; UpdateTileWithTextExtensions(&lt;span style="color: #0000ff;"&gt;string&lt;/span&gt; text)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    ITileWideText03 tileContent = TileContentFactory.CreateTileWideText03();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    tileContent.TextHeadingWrap.Text = text;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    ITileSquareText04 squareContent = TileContentFactory.CreateTileSquareText04();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    squareContent.TextBodyWrap.Text = text;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    tileContent.SquareContent = squareContent;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    TileUpdateManager.CreateTileUpdaterForApplication().Update(tileContent.CreateNotification());&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre&gt;&lt;/pre&gt;&lt;p&gt;And below is the tile update containing an image and text.&lt;/p&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;div style="padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;     text-align: left;border-style: none;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; UpdateTextAndImageExtensions(&lt;span style="color: #0000ff;"&gt;string&lt;/span&gt; text, &lt;span style="color: #0000ff;"&gt;string&lt;/span&gt; imageSrc)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    ITileWideImageAndText01 tileContent = TileContentFactory.CreateTileWideImageAndText01();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    tileContent.TextCaptionWrap.Text = text;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    tileContent.Image.Src = imageSrc;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    tileContent.Image.Alt = &lt;span style="color: #006080;"&gt;"Web image"&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    ITileSquareImage squareContent = TileContentFactory.CreateTileSquareImage();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    squareContent.Image.Src = imageSrc;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    squareContent.Image.Alt = &lt;span style="color: #006080;"&gt;"Web image"&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    tileContent.SquareContent = squareContent;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    TileUpdateManager.CreateTileUpdaterForApplication().Update(tileContent.CreateNotification());&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;As you can see, it&amp;rsquo;s much easier to work with these instead of directly editing the XML. The result is of course exactly the same.&lt;/p&gt;&lt;h3&gt;Secondary tiles&lt;/h3&gt;&lt;p&gt;By default, an app can only have a single tile. There are quite a few scenarios however where the user may want more than one tile of your application pinned to his start screen. Imagine you&amp;rsquo;re building a weather application. The user may want to pin to his start screen his current location but also the cities he&amp;rsquo;s to visit in the coming time. Or imagine you have again that RSS application. In such an app, a user may want to pin one or more RSS feeds so he gets notified about their updates on the start screen.&lt;/p&gt;&lt;p&gt;To cover this, we have secondary tiles. Such a tile works in the same way as a regular live tile, but it can be added to the start screen by the user from within the application. To be able to pin content, the developer however has to build in this option in the application (for example adding a Pin to Start button in the App Bar on the detail page of the weather for a city). Let&amp;rsquo;s look at this in some code.&lt;/p&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;div style="padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;     text-align: left;border-style: none;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span style="color: #0000ff;"&gt;private&lt;/span&gt; async &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; CreateSecondaryTile_Click_1(&lt;span style="color: #0000ff;"&gt;object&lt;/span&gt; sender, RoutedEventArgs e)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    Uri logo = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; Uri(&lt;span style="color: #006080;"&gt;"ms-appx:///assets/small.png"&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    Uri smallLogo = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; Uri(&lt;span style="color: #006080;"&gt;"ms-appx:///assets/secondary.png"&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    &lt;span style="color: #0000ff;"&gt;string&lt;/span&gt; tileActivationArguments = &lt;span style="color: #006080;"&gt;"timeTileWasPinned="&lt;/span&gt; + DateTime.Now.ToLocalTime().ToString();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    &lt;span style="color: #008000;"&gt;// Create a 1x1 Secondary tile&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    SecondaryTile secondaryTile = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; SecondaryTile(&lt;span style="color: #006080;"&gt;"AppSecondaryTile"&lt;/span&gt;,&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;                                                    &lt;span style="color: #006080;"&gt;"Next webinar"&lt;/span&gt;,&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;                                                    &lt;span style="color: #006080;"&gt;""&lt;/span&gt;,&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;                                                    tileActivationArguments,&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;                                                    TileOptions.ShowNameOnLogo,&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;                                                    smallLogo);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    secondaryTile.ForegroundText = ForegroundText.Light;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    &lt;span style="color: #0000ff;"&gt;bool&lt;/span&gt; isPinned = await secondaryTile.RequestCreateForSelectionAsync&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;        (GetElementRect((FrameworkElement)sender), Windows.UI.Popups.Placement.Right);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre&gt;&lt;/pre&gt;&lt;p&gt;Notice that it&amp;rsquo;s also possible to pass contextual information from the tile. It wouldn&amp;rsquo;t be a good experience if the user clicks the tile and arrives on the default landing page of the application. Creating a secondary tile is done by using asynchronous code, hence the use of the await/async pattern.&lt;/p&gt;&lt;p&gt;The user has to approve the secondary tile. This is done using the RequestCreateForSelectionAsync. The result of this is shown below.&lt;/p&gt;&lt;p&gt;&lt;img style="border:0px;  border-image: initial; display: inline;" title="image" alt="image" src="http://www.silverlightshow.net/Storage/Users/gillcleeren/image_2b214062-658a-445c-a7bf-e8f0e77860e9.png" width="384" height="342" /&gt;&lt;/p&gt;&lt;p&gt;If we run this code now, we get the following secondary tile.&lt;/p&gt;&lt;p&gt;&lt;img style="border:0px;  border-image: initial; display: inline;" title="image" alt="image" src="http://www.silverlightshow.net/Storage/Users/gillcleeren/image_2e1cfb14-2bfa-4607-b780-bdce74ded3a6.png" width="203" height="195" /&gt;&lt;/p&gt;&lt;h5&gt;&lt;/h5&gt;&lt;h3&gt;Badges&lt;/h3&gt;&lt;p&gt;Finally, as developers, we have the ability to display badges on the tile. A badge consists of a number between 0 and 99 or a glyph. The badge is an overlay on top of the tile. Adding a badge is done again using XML templates: by sending some XML to the tile (or to the secondary tile), the badge gets added to the tile. Let&amp;rsquo;s take a look at adding the badge from code. In here, we are updating the tile with a number.&lt;/p&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;div style="padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;     text-align: left;border-style: none;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; UpdateBadgeWithNumber(&lt;span style="color: #0000ff;"&gt;int&lt;/span&gt; number)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    BadgeNumericNotificationContent badgeContent = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; BadgeNumericNotificationContent((&lt;span style="color: #0000ff;"&gt;uint&lt;/span&gt;)number);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    BadgeUpdateManager.CreateBadgeUpdaterForApplication().Update(badgeContent.CreateNotification());&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre&gt;&lt;/pre&gt;&lt;p&gt;The tile now looks as follows.&lt;/p&gt;&lt;p&gt;&lt;img style="border:0px;  border-image: initial; display: inline;" title="image" alt="image" src="http://www.silverlightshow.net/Storage/Users/gillcleeren/image_a60f4902-04ba-42be-94ef-4b93537e9655.png" width="163" height="142" /&gt;&lt;/p&gt;&lt;p&gt;Now that we&amp;rsquo;ve seen tiles and their options, let&amp;rsquo;s look at notifications.&lt;/p&gt;&lt;h2&gt;Notifications&lt;/h2&gt;&lt;p&gt;A tile update isn&amp;rsquo;t guaranteed to be seen by the user. If our application has an important update to convey to the user, it might not be a good idea to just update the tile. In this case, it might be better to send a notification that the user will see on top of the running application. If you&amp;rsquo;ve been doing Windows Phone 7 development, you&amp;rsquo;ll probably recognize this pattern.&lt;/p&gt;&lt;p&gt;Like a tile, notifications are also built using XML templates. Because of the fact they are displayed over the running application, they are bound to get the user&amp;rsquo;s attention more quickly. Notifications aren&amp;rsquo;t permanent (they disappear automatically) and only 4 are shown at the same time. Just like with secondary tiles, it&amp;rsquo;s possible to pass context so that the user is brought automatically to the correct location within the application.&lt;/p&gt;&lt;p&gt;Notifications shouldn&amp;rsquo;t be used to spam the user though. Ultimately, the user remains in control: he can decide to turn off notifications for your app or for the entire system altogether. Therefore, don&amp;rsquo;t count on the fact that the user has seen the update!&lt;/p&gt;&lt;p&gt;Let&amp;rsquo;s add a notification message to the code now.&lt;/p&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;div style="padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;     text-align: left;border-style: none;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span style="color: #0000ff;"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; CreateToast()&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    IToastNotificationContent toastContent = &lt;span style="color: #0000ff;"&gt;null&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    IToastText01 templateContent = ToastContentFactory.CreateToastText01();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    templateContent.TextBodyWrap.Text = &lt;span style="color: #006080;"&gt;"SilverlightShow webinar starts now!"&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    toastContent = templateContent;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    ToastNotification toast = toastContent.CreateNotification();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    ToastNotificationManager.CreateToastNotifier().Show(toast);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre&gt;&lt;/pre&gt;&lt;p&gt;Below you can see the notification being shown to the user.&lt;/p&gt;&lt;p&gt;If your toasts aren&amp;rsquo;t displaying, check that in the manifest declaration, this has been set to enabled.&lt;/p&gt;&lt;h4&gt;&lt;/h4&gt;&lt;h2&gt;But what about non-running applications?&lt;/h2&gt;&lt;p&gt;We&amp;rsquo;ve now seen how we can update the tiles as well as send notifications from the main code of the application? But what if the app isn&amp;rsquo;t running? That will be covered in the next part of this series!&lt;/p&gt;&lt;h2&gt;Summary&lt;/h2&gt;&lt;p&gt;In this article, we&amp;rsquo;ve looked at the different types of updates applications can send to the user. We haven&amp;rsquo;t looked at how to do so from the cloud. That will be covered in the next article. Stay tuned!&lt;/p&gt;&lt;h2&gt;About the author&lt;/h2&gt;&lt;p&gt;Gill Cleeren is Microsoft Regional Director (www.theregion.com), Silverlight MVP (former ASP.NET MVP) and Telerik MVP. He lives in Belgium where he works as .NET architect at Ordina (http://www.ordina.be/). Passionate about .NET, he&amp;rsquo;s always playing with the newest bits. In his role as Regional Director, Gill has given many sessions, webcasts and trainings on new as well as existing technologies, such as Silverlight, ASP.NET and WPF at conferences including TechEd Berlin 2010, TechDays Belgium &amp;ndash; Switzerland - Sweden, DevDays NL, NDC Oslo Norway, SQL Server Saturday Switserland, Spring Conference UK, Silverlight Roadshow in Sweden, Telerik RoadShow UK&amp;hellip; He&amp;rsquo;s also the author of many articles in various developer magazines and for SilverlightShow.net and he organizes the yearly Community Day event in Belgium. He also leads Visug (&lt;a href="http://www.visug.be/" target="_blank"&gt;www.visug.be&lt;/a&gt;), the largest .NET user group in Belgium. Gill is the author of &amp;ldquo;Silverlight 4 Data and Services Cookbook&amp;rdquo;. In 2012, the second edition, &amp;ldquo;Silverlight 5 Data and Services Cookbook&amp;rdquo; is released.&lt;/p&gt;&lt;p&gt;You can find his blog at &lt;a href="http://www.snowball.be/" target="_blank"&gt;www.snowball.be&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Twitter: &lt;a href="http://twitter.com/gillcleeren" target="_blank"&gt;@gillcleeren&lt;/a&gt;&lt;/p&gt;</description>      <link>http://www.silverlightshow.net/items/Windows-8-and-the-future-of-XAML-Part-6-Tiles-toasts-and-badges.aspx</link>      <author>editorial@silverlightshow.net (Gill Cleeren )</author>      <comments>http://www.silverlightshow.net/items/Windows-8-and-the-future-of-XAML-Part-6-Tiles-toasts-and-badges.aspx#comments</comments>      <guid isPermaLink="true">http://www.silverlightshow.net/items/Windows-8-and-the-future-of-XAML-Part-6-Tiles-toasts-and-badges.aspx</guid>      <pubDate>Tue, 01 May 2012 13:47:22 GMT</pubDate>    </item>    <item>      <title>Simple JavaScript Notifications with toastr</title>      <link>http://feeds.johnpapa.net/~r/JohnPapa/~3/0u0Zzd7cT6k/toastr100beta</link>      <description>&lt;p&gt;My friend &lt;a href="http://twitter.com/hfjallemark"&gt;Hans Fjällemark&lt;/a&gt; and I have been collaborating on some JavaScript libraries lately and we decided it was time to release &lt;a href="http://jpapa.me/c7toastr"&gt;toastr&lt;/a&gt;, the first of them, on github. Our collaborative organization is under &lt;a title="https://github.com/CodeSeven" href="https://github.com/CodeSeven"&gt;https://github.com/CodeSeven&lt;/a&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;toastr is a simple JavaScript toast notification library that is small, easy to use, and extendable. It allows you to create simple toasts with HTML5 and JavaScript like this:&lt;/p&gt; &lt;p&gt;&lt;a href="http://johnpapa.net/Media/Default/Windows-Live-Writer/toastr_13960/image_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://johnpapa.net/Media/Default/Windows-Live-Writer/toastr_13960/image_thumb.png" width="377" height="79"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Simply include the files in your HTML page and write a simple line of code like this:&lt;/p&gt; &lt;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: 'Courier New', 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"&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;toastr.success(&lt;span style="color: #006080"&gt;'Are you the six fingered man?'&lt;/span&gt;, &lt;span style="color: #006080"&gt;'Inigo Montoya'&lt;/span&gt;);    &lt;/pre&gt;&lt;br&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;p align="justify"&gt;Hans is a great developer / designer and has recently helped me created some nice responsive designs in some demos and &lt;a href="http://www.pluralsight-training.net/"&gt;Pluralsight&lt;/a&gt; courses. You can see the layout he helped design and create in my latest course, &lt;a href="http://jpapa.me/jsrenderps"&gt;JsRender Fundamentals&lt;/a&gt; on &lt;a href="http://www.pluralsight-training.net/"&gt;Pluralsight&lt;/a&gt; now.&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;a href="http://jpapa.me/jsrenderps"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="jsrender ps" border="0" alt="jsrender ps" src="http://johnpapa.net/Media/Default/Windows-Live-Writer/toastr_13960/jsrender%20ps_31c81a43-2ce7-4e2f-994d-bb523e799492.png" width="500" height="79"&gt;&lt;/a&gt;&lt;/p&gt;&lt;h3&gt;The API&lt;/h3&gt;&lt;p&gt;There are 4 methods to learn. info, warning, success and error. The each have a message and an optional title.&lt;/p&gt;&lt;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: 'Courier New', 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"&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #008000"&gt;// Display a info toast, with no title&lt;/span&gt;&lt;br&gt;toastr.info(&lt;span style="color: #006080"&gt;'Are you the six fingered man?'&lt;/span&gt;)&lt;br&gt;&lt;br&gt;&lt;span style="color: #008000"&gt;// Display a warning toast, with no title&lt;/span&gt;&lt;br&gt;toastr.warning(&lt;span style="color: #006080"&gt;'My name is Inigo Montoya. You Killed my father, prepare to die!'&lt;/span&gt;)&lt;br&gt;&lt;br&gt;&lt;span style="color: #008000"&gt;// Display a success toast, with a title&lt;/span&gt;&lt;br&gt;toastr.success(&lt;span style="color: #006080"&gt;'Have fun storming the castle!'&lt;/span&gt;, &lt;span style="color: #006080"&gt;'Miracle Max Says'&lt;/span&gt;)&lt;br&gt;&lt;br&gt;&lt;span style="color: #008000"&gt;// Display an error toast, with a title&lt;/span&gt;&lt;br&gt;toastr.error(&lt;span style="color: #006080"&gt;'I do not think that word means what you tink it means.'&lt;/span&gt;, &lt;span style="color: #006080"&gt;'Inconceivable!'&lt;/span&gt;)&lt;/pre&gt;&lt;br&gt;&lt;/div&gt;After having it in alpha for a few weeks and accepting feedback on it, we decided today to take it to beta as the API has stabilized.&amp;nbsp; &lt;h3&gt;toastr is Responsive&lt;/h3&gt;&lt;p&gt;Just include the viewport meta tag and the toastr-responsive.css, and toastr will adjust to different device sizes. &lt;a href="http://www.responsinator.com/?url=http%3A%2F%2Fcodeseven.github.com%2Ftoastr%2F"&gt;See toastr and its responsive web design here on responsinator.com&lt;/a&gt;&amp;nbsp; &lt;/p&gt;&lt;p&gt;&lt;a href="http://johnpapa.net/Media/Default/Windows-Live-Writer/toastr_13960/image_4.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://johnpapa.net/Media/Default/Windows-Live-Writer/toastr_13960/image_thumb_1.png" width="129" height="244"&gt;&lt;/a&gt;&lt;a href="http://johnpapa.net/Media/Default/Windows-Live-Writer/toastr_13960/image_6.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://johnpapa.net/Media/Default/Windows-Live-Writer/toastr_13960/image_thumb_2.png" width="244" height="128"&gt;&lt;/a&gt;&lt;/p&gt;&lt;h3&gt;Some important links:&lt;/h3&gt;&lt;ol&gt;&lt;li&gt;see toastr in action at &lt;a href="http://codeseven.github.com/toastr/"&gt;toastr’s demo page here&lt;/a&gt; &lt;li&gt;grab toastr from github at &lt;a href="https://github.com/CodeSeven/toastr"&gt;https://github.com/CodeSeven/toastr&lt;/a&gt;&lt;/li&gt;&lt;/ol&gt;&lt;h3&gt;&lt;strong&gt;What Else Can toastr Do?&lt;/strong&gt;&lt;/h3&gt;&lt;p&gt;Check out the demo for these and other examples of toastr in action.&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Override the css classes to change the appearance &lt;li&gt;Set the fadeOut, fadeIn, and timeOut settings &lt;li&gt;Set timeOut to 0 to make the toast sticky &lt;li&gt;Position the toast in the top left, top right, bottom right, or bottom left &lt;li&gt;Set the message to HTML content&amp;nbsp; and/or wire event handlers up to that content. &lt;li&gt;For debugging, set the debug info to true to show all of the options and setting in the browser’s console window&lt;/li&gt;&lt;/ol&gt;&lt;h3&gt;&lt;strong&gt;Unit Tests&lt;/strong&gt;&lt;/h3&gt;&lt;p&gt;Feel free to &lt;a href="http://codeseven.github.com/toastr/tests/toastr-unit-tests.html"&gt;check out toastr’s unit tests, which you can run online here&lt;/a&gt;. We decided to go simple and use QUnit, which does the job quite nicely.&lt;/p&gt;&lt;h3&gt;NuGet&lt;/h3&gt;&lt;p&gt;I published a &lt;a href="https://nuget.org/packages/toastr"&gt;package on NuGet for toastr that you can find here&lt;/a&gt;. Be sure to allow searching for pre-release packages (NuGet disables that by default). We do not foresee any changes to the API so this beta should be pretty solid. If we receive no major issues, we’ll go RC very soon.&lt;/p&gt;&lt;div class="feedflare"&gt;&lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=0u0Zzd7cT6k:USA3MTNAI7Y:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?i=0u0Zzd7cT6k:USA3MTNAI7Y:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=0u0Zzd7cT6k:USA3MTNAI7Y:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?i=0u0Zzd7cT6k:USA3MTNAI7Y:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=0u0Zzd7cT6k:USA3MTNAI7Y:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=0u0Zzd7cT6k:USA3MTNAI7Y:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JohnPapa/~4/0u0Zzd7cT6k" height="1" width="1"/&gt;</description>      <pubDate>Tue, 01 May 2012 13:46:32 GMT</pubDate>      <guid isPermaLink="false">http://johnpapa.net:80/toastr100beta</guid>      <origLink xmlns="http://rssnamespace.org/feedburner/ext/1.0">http://johnpapa.net:80/toastr100beta</origLink>    </item>    <item>      <title>2 Months with the ASUS ZenBook UX31E</title>      <link>http://feeds.johnpapa.net/~r/JohnPapa/~3/B8fsDx1iC00/2-months-with-the-asus-zenbook-ux31e</link>      <description>&lt;p&gt;It’s been over 2 months since I’ve been using my &lt;a href="http://www.amazon.com/dp/B005SY32Q2/?t=johnpanet-20"&gt;ASUS ZenBook UX31E&lt;/a&gt; out and about for blogging, surfing, coding, and presentations. I wrote about the slick look of the UX31E and &lt;a href="http://johnpapa.net/review-of-the-asus-zenbook-ux31e"&gt;my (poor) opinion of the keyboard and the screen&amp;nbsp; last month&lt;/a&gt; and frankly that has not changed. However, I have found the UX31E to be ideal for several situations over that time, so I’ll focus my wrap up on what this sub $1000 ultrabook is good for. &lt;/p&gt; &lt;p&gt;&lt;br&gt;&lt;img src="http://johnpapa.net/Media/Default/Windows-Live-Writer/5-Weeks-Later-with-the-ASUS-ZenBook-UX31_7B93/WP_000530_thumb.jpg"&gt;&lt;img src="http://johnpapa.net/Media/Default/Windows-Live-Writer/5-Weeks-Later-with-the-ASUS-ZenBook-UX31_7B93/WP_000532_thumb.jpg"&gt;&lt;/p&gt; &lt;h3&gt;Speed&lt;/h3&gt; &lt;p&gt;I give a lot of presentations with multiple instances of Visual Studio and heavy loads of software running on my computer. I won’t suffer a laptop that performs sluggishly in front of a room of developers because it needlessly detracts from the presentation. The good news is that the UX31E is really fast for a small lightweight laptop. I have been able to run multiple demos, powerpoint, presentation tools, and other apps during my presentations and the machine has not missed a beat. The best thing I can say about its performance is that I never once paused for concern over how it was performing on stage. &lt;br&gt;&lt;/p&gt; &lt;h3&gt;Projection&lt;/h3&gt;&lt;br&gt; &lt;p&gt;It frustrates me to no end when a laptop does not work well with projectors. Laptop is ready to go, you are on stage, you plug it into the projector, and the resolution you want to use is not available. Ugh. The UX31E worked great with many of the projectors I connected to it. Now, this is not often just on the laptop. The projector and video card in the laptop have a lot to do with this too. I bring multiple laptops to presentations (call me careful, call me prepared). The point is that when some of my laptops were not working with the resolution I wanted, the UX31E always came up aces.&amp;nbsp; When giving a presentation the last things you want to worry about are the speed of your laptop and how it will project to the screen. Kudos go to the UX31E on both of these points.&lt;br&gt;&lt;/p&gt; &lt;h3&gt;Boot Up / Awake&lt;/h3&gt;&lt;br&gt; &lt;p&gt;&lt;img style="display: inline; float: right" align="right" src="http://ecx.images-amazon.com/images/I/41ZNTQkRKGL._SL500_AA300_.jpg" width="225" height="225"&gt;It really is amazing at how fast this computer comes awake from sleep. Open the lid, count to 3 and before you can do that it’s ready to go. At first I did not appreciate this feature, but after using it for a few months I really grew to appreciate how fast it came awake. I’d be sitting chatting with some folks about code and they’d ask to see a demo. I could just whip out the UX31E, open the lid, and in seconds I was running my demo. Now that is sweet.&lt;br&gt;&lt;/p&gt; &lt;h3&gt;Summary&lt;/h3&gt;&lt;br&gt; &lt;p&gt;Due to the keyboard responsiveness issue I experienced I found the UX31E not to be good for me for everyday development, but I did find it to be very valuable for travel and presentations. However if you do a lot of presentations and/or travel, this could be an ideal laptop.&lt;/p&gt; &lt;p&gt;&lt;br&gt;… And to be clear …&lt;br&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;Disclosure of Material Connection: I received one or more of the products or services mentioned above for free in the hope that I would mention it on my blog. Regardless, I only recommend products or services I use personally and believe my readers will enjoy. I am disclosing this in accordance with &lt;a href="http://www.access.gpo.gov/nara/cfr/waisidx_03/16cfr255_03.html"&gt;the Federal Trade Commission’s 16 CFR, Part 255: “Guides Concerning the Use of Endorsements and Testimonials in Advertising.”&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;div class="feedflare"&gt;&lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=B8fsDx1iC00:RFEGw6801DA:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?i=B8fsDx1iC00:RFEGw6801DA:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=B8fsDx1iC00:RFEGw6801DA:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?i=B8fsDx1iC00:RFEGw6801DA:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=B8fsDx1iC00:RFEGw6801DA:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=B8fsDx1iC00:RFEGw6801DA:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JohnPapa/~4/B8fsDx1iC00" height="1" width="1"/&gt;</description>      <pubDate>Mon, 30 Apr 2012 14:19:20 GMT</pubDate>      <guid isPermaLink="false">http://johnpapa.net:80/2-months-with-the-asus-zenbook-ux31e</guid>      <origLink xmlns="http://rssnamespace.org/feedburner/ext/1.0">http://johnpapa.net:80/2-months-with-the-asus-zenbook-ux31e</origLink>    </item>    <item>      <title>Celebration! 120&amp;rsquo;000 downloads for #mvvmlight, 2 copies of Expression Studio to win</title>      <link>http://geekswithblogs.net/lbugnion/archive/2012/04/29/celebration-120rsquo000-downloads-for-mvvmlight-2-copies-of-expression-studio.aspx</link>      <description>&lt;p&gt;That is a symbolic milestone: Last week, MVVM Light reached the bar of 120’000 downloads on &lt;a href="http://mvvmlight.codeplex.com"&gt;http://mvvmlight.codeplex.com&lt;/a&gt;, the site that has been hosting source and installers since the beginning of the project (100'000 downloads) and on &lt;a href="http://blog.galasoft.ch/archive/2012/04/22/mvvmlight-v4rc-available-on-nuget.aspx"&gt;Nuget, the popular package manager for .NET&lt;/a&gt; (20'000 downloads). &lt;a href="http://galasoft.ch/mvvm/installing/nuget/"&gt;More information about Nuget and MVVM Light&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;a href="#celebration120000"&gt;&lt;img alt="Celebration" src="http://farm9.staticflickr.com/8011/6957464264_3747ab1c99_o.png" width="366" height="268" /&gt;&lt;/a&gt;     &lt;br /&gt;    &lt;br /&gt;&lt;em&gt;&lt;strong&gt;&lt;a href="#celebration120000"&gt;&lt;font size="2"&gt;Scroll down to have a chance to win a copy of            &lt;br /&gt;Expression Studio V4!&lt;/font&gt;&lt;/a&gt;&lt;/strong&gt;&lt;/em&gt; &lt;/p&gt;  &lt;p&gt;&lt;a href="#celebration120000"&gt;&lt;img alt="2012042203" src="http://farm9.staticflickr.com/8009/6957711812_e1fb18bf3e_o.png" width="484" height="225" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;MVVM Light started its “career” on Codeplex in October 2009. Back then it was intended as a set of classes I could use when blogging about MVVM, to avoid having to repeat the same concepts over and over again. These ideas were born from discussions on the &lt;a href="http://groups.google.com/group/wpf-disciples?hl=en"&gt;WPF disciples mailing list&lt;/a&gt; (now renamed to “XAML disciples”), a group of friends who talks about everything and anything and occasionally about coding. In fact in some cases some code was even &lt;strike&gt;stolen&lt;/strike&gt; borrowed with appreciation from some of the individuals on this list. Since then of course, the code has evolved, driven by requests from the community. I have a lot of appreciation for everyone who helps, and for the many interesting discussions around MVVM and other coding concepts.&lt;/p&gt;  &lt;p&gt;I remember one discussion (in a sauna in Seattle, of all places) with my friend Josh Smith about what I wanted to achieve with MVVM Light. Back then I told him that my goal was to have this side project, but that I didn’t intend to let it grow too big. I can say with confidence that I failed big time: MVVM Light is taking a lot of my free time, but what a reward!&lt;/p&gt;  &lt;h2&gt;Multiple platforms&lt;/h2&gt;  &lt;p&gt;MVVM Light is available these days for Silverlight 3, Silverlight 4, Silverlight 5, WPF3.5, WPF4, Windows Phone, WinRT (Windows 8). I know for a fact that it is running into many Windows Phone applications (MVVM Light for WP7 was released within a few days from every major version of Windows Phone).&lt;/p&gt;  &lt;p&gt;Lesser known fact, MVVM Light is also running on XBOX: At the end of last year, a lot of new applications were released for this platform. The applications are XAML based, and MVVM Light was chosen as the framework of choice to build these applications. There is no obligation, but this is driving adoption of MVVM Light in the living room!&lt;/p&gt;  &lt;p&gt;Of course Windows 8 is also supported. Here too, MVVM Light was available within a few days from the major releases (developer preview, customer preview) and that will continue. I have the chance to have people within Microsoft who are using MVVM Light and helping me with issues, again it is a great pleasure to have this collaboration.&lt;/p&gt;  &lt;h2&gt;An amazing community&lt;/h2&gt;  &lt;p&gt;If like me you &lt;a href="https://twitter.com/#!/search/mvvmlight%20OR%20%22mvvm%20light%22"&gt;follow the #mvvmlight tag on Twitter&lt;/a&gt;, you will see that many people worldwide are using it. I love to see tweets about it in all kinds of languages (in fact if I would love to travel to all the places where it is used :)&lt;/p&gt;  &lt;p&gt;I also receive many more emails than I can handle. I really do my best to answer everything, sometimes with a delay, but I fail. If you have sent me an email and it was not answered, please accept my sincere apologies. It’s simply too much to handle. On the other hand, if you have technical questions, make sure to post the on &lt;a href="http://stackoverflow.com/questions/tagged/mvvm-light"&gt;StackOverflow with the tag "mvvm-light"&lt;/a&gt;!! Questions there are rarely left unanswered, and I am also checking them out from time to time. Crowdsourcing the tech support has probably been one of the best decisions I ever made in this project!&lt;/p&gt;  &lt;h2&gt;Things I would like to do (or to have done differently)&lt;/h2&gt;  &lt;p&gt;Not everything is perfect in this project, by far. There are a few things I really would like to do better, and some thing I would like to have done differently.&lt;/p&gt;  &lt;p&gt;First, the documentation: This is an oft-heard comment and it is true, there isn’t a structure documentation concept. There are however many many articles by MVVM Light enthusiasts, but I agree that for a beginner it can be a daunting task to find their way through all the information. So yes, this is still a big project and a big plan, I want to have a solid documentation concept. When? Well that is the big question, because that takes a lot of time. The balance between coding and documenting is really not easy. That said, the whole source code is documented, so at least that is clean :)&lt;/p&gt;  &lt;p&gt;Another thing I regret is that I took over too many new features and bug fixes in V4. Because of that the gap between V3 and V4 was much too long. I will change that in the next version, and release true RTM versions more often. &lt;/p&gt;  &lt;h2&gt;V4 and then?&lt;/h2&gt;  &lt;p&gt;These days I was busy releasing V4 release candidate (RC) to &lt;a href="http://mvvmlight.codeplex.com/SourceControl/list/changesets"&gt;Codeplex (source)&lt;/a&gt;, &lt;a href="http://blog.galasoft.ch/archive/2012/04/22/mvvmlight-v4rc-available-on-nuget.aspx"&gt;Nuget&lt;/a&gt; and to create an MSI installer. I will give a couple of weeks to the RC just to catch last minutes bugs (if available) and make a few minor adjustments. It means that V4 will definitely be released in the next few weeks.&lt;/p&gt;  &lt;p&gt;And then… well then I want to tackle a few things: more documentation, and starting to work on V5. I also have a couple of applications for the phone and for Windows 8 that I would love to finalize. I guess that rest is for the dead, eh? ;)&lt;/p&gt;  &lt;p&gt;Again, I want to thank everyone who sends me messages of support through the years. I could not have done all this without the moral help of the community.&lt;/p&gt;  &lt;h2&gt;&lt;a name="celebration120000"&gt;&lt;/a&gt;Celebration&lt;/h2&gt;  &lt;p&gt;To celebrate this milestone, I am giving away two copies of &lt;a href="http://www.microsoft.com/expression/products/Purchase.aspx"&gt;Expression Studio 4 Ultimate&lt;/a&gt; (includes Expression Blend, Sketchflow, Expression Design, Expression Encoder Pro and Expression Web+Superpreview). &lt;a href="http://www.microsoft.com/expression/products/Purchase.aspx"&gt;&lt;strong&gt;This is a value of 599 USD each&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;!&lt;/strong&gt;&lt;/p&gt; &lt;a href="http://www.microsoft.com/expression/products/Purchase.aspx"&gt;&lt;img alt="2012042203" src="http://farm9.staticflickr.com/8009/6957711812_e1fb18bf3e_o.png" width="484" height="225" /&gt;&lt;/a&gt;   &lt;p&gt;Not only you will have a chance to win this for &lt;strong&gt;as little as 10 USD&lt;/strong&gt;, but in addition &lt;strong&gt;the whole proceeds of this auction will be sent to the &lt;/strong&gt;&lt;a href="http://www.calcuttarescue.org"&gt;&lt;strong&gt;humanitarian organization Calcutta Rescue&lt;/strong&gt;&lt;/a&gt;. I have many ties with this organization and I was even president of the Swiss organization (in charge of gathering funds in Switzerland) for quite a few years. In 2007, I had the chance to visit the projects personally and I can attest that they are extremely well managed. &lt;a href="http://www.flickr.com/photos/lbugnion/sets/72157629876997873/"&gt;You can see pictures of this visit on my Flickr page&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;In order to participate, follow the easy step:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://galasoft.ch/mvvm/120000/"&gt;Go to this page on my website&lt;/a&gt; and make a donation of &lt;strong&gt;at least 10 USD&lt;/strong&gt;. You are welcomed to give more of course! &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;On May 29th, I will block the counters and will randomly pick two winners for the Expression Studio copies. Winners will be notified per email and the prizes sent by standard mail. I will personally ensure that the funds are sent to Calcutta Rescue by the intermediary of the Swiss organization Calcutta Espoir, whose sole purpose is to gather funds in Switzerland for the Indian NGO.&lt;/p&gt;  &lt;p&gt;I count on you, awesome MVVM Light community, to make this action a success! See you on May 29th to announce the winners!&lt;/p&gt;  &lt;p&gt;Cheers    &lt;br /&gt;Laurent&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;div style="margin-bottom: -1em"&gt;   &lt;div style="vertical-align: middle"&gt;&lt;a href="http://www.galasoft.ch/"&gt;&lt;img title="GalaSoft Laurent Bugnion" alt="GalaSoft Laurent Bugnion" src="http://www.galasoft.ch/logo/Current/logo_120x30.png" /&gt;&lt;/a&gt; &lt;/div&gt;    &lt;div style="position: relative; left: 130px; top: -36px"&gt;&lt;strong&gt;&lt;a href="http://www.galasoft.ch/contact_en.html"&gt;Laurent Bugnion (GalaSoft)&lt;/a&gt;&lt;/strong&gt;       &lt;br /&gt;&lt;a href="http://feeds.feedburner.com/galasoft"&gt;Subscribe&lt;/a&gt; | &lt;a href="http://twitter.com/lbugnion"&gt;Twitter&lt;/a&gt; | &lt;a href="http://www.facebook.com/lbugnion"&gt;Facebook&lt;/a&gt; | &lt;a href="http://www.flickr.com/photos/lbugnion"&gt;Flickr&lt;/a&gt; | &lt;a href="http://www.linkedin.com/in/lbugnion"&gt;LinkedIn&lt;/a&gt;       &lt;br /&gt;&lt;iframe style="border-top-style: none; margin-bottom: -20px; height: 23px; width: 450px; border-bottom-style: none; overflow: hidden; border-right-style: none; border-left-style: none; margin-top: 7px" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblog.galasoft.ch&amp;amp;layout=standard&amp;amp;show_faces=true&amp;amp;width=450&amp;amp;action=like&amp;amp;colorscheme=light" frameborder="0" allowtransparency="allowtransparency" scrolling="no"&gt;&lt;/iframe&gt;&lt;/div&gt; &lt;/div&gt; &lt;img src="http://geekswithblogs.net/lbugnion/aggbug/149494.aspx" width="1" height="1" /&gt;</description>      <creator xmlns="http://purl.org/dc/elements/1.1/">Laurent Bugnion</creator>      <guid>http://geekswithblogs.net/lbugnion/archive/2012/04/29/celebration-120rsquo000-downloads-for-mvvmlight-2-copies-of-expression-studio.aspx</guid>      <pubDate>Sun, 29 Apr 2012 19:05:11 GMT</pubDate>      <comment xmlns="http://wellformedweb.org/CommentAPI/">http://geekswithblogs.net/lbugnion/comments/149494.aspx</comment>      <comments>http://geekswithblogs.net/lbugnion/archive/2012/04/29/celebration-120rsquo000-downloads-for-mvvmlight-2-copies-of-expression-studio.aspx#feedback</comments>      <comments xmlns="http://purl.org/rss/1.0/modules/slash/">3</comments>      <commentRss xmlns="http://wellformedweb.org/CommentAPI/">http://geekswithblogs.net/lbugnion/comments/commentRss/149494.aspx</commentRss>      <ping xmlns="http://madskills.com/public/xml/rss/module/trackback/">http://geekswithblogs.net/lbugnion/services/trackbacks/149494.aspx</ping>    </item>    <item>      <title>Develop your app for everyone&amp;ndash;localize your UI</title>      <category>developer</category>      <category>expression</category>      <category>tech stuff</category>      <category>windows</category>      <category>xaml</category>      <link>http://feeds.timheuer.com/~r/timheuer/~3/oa8sktFJiSg/localize-windows-8-application.aspx</link>      <description>&lt;p&gt;Being more involved in the engineering process of a product I had the chance to participate in the design of various features instead of just the ones that I’m responsible for delivering.  One of those areas was the way we would enable developers to produce localized applications.  Before this process I have to be honest and as an app developer never really paid much attention to providing localized versions of any app that I wrote.  I had absolutely no good reason for coming to that decision, just never bothered.  In helping to design and understand localization a bit more I can say that it is easy to do this in your app and there shouldn’t be any excuse for any app developer to create their application in a way to make it localized at any given moment.  Note I didn’t say localized immediately, but rather I mean to create your app in a way that would make it easy to provide a localized version in a fairly quick turnaround.&lt;/p&gt;  &lt;p&gt;As I do some app development for Windows 8 I wanted to share my thoughts around localization and what it really means to me to provide a ‘world-ready’ application.  The three areas of focus are 1) how the platforms support a localized app, 2) what technical tools you have to automate localization 3) getting culture-correct localization and 4) testing your localized app.&lt;/p&gt;  &lt;h2&gt;Platform support for localization&lt;/h2&gt;  &lt;p&gt;The first thing you have to understand is how the platform you are targeting enables support for your app to easily be localized.  This may be in how you organize your content, how you name certain things, and how you write code.  For most platforms there is a pretty predictable method of doing this.  I would argue not all platforms make this extremely intuitive, but also state that inferring how (and what) you want to localize your app isn’t something a platform can predict well for every app.  It is important for the app developer to &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh465405.aspx"&gt;plan for a global market&lt;/a&gt; and fully understand the models before writing a line of code to understand how to make the app localized more easily later in the process.&lt;/p&gt;  &lt;p&gt;For Windows 8, a new resource model is introduced for WinRT that is common across the entire platform regardless of the UI framework choice.  The areas you should understand are &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.resources.aspx"&gt;&lt;strong&gt;Windows.ApplicationModel.Resources&lt;/strong&gt;&lt;/a&gt; and &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.resources.core.aspx"&gt;&lt;strong&gt;Windows.ApplicationModel.Resources.Core&lt;/strong&gt;&lt;/a&gt;.  These two areas are where most Windows 8 developers will spend most of their time with regard to localization of UI strings (and other content).  For most, the &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.resources.resourceloader.getstring.aspx"&gt;GetString()&lt;/a&gt; method is probably where you’ll spend your time when using code.  String values are indexed during the build process of your application.  Your strings will either reside in a RESJSON (for HTML/JS) or RESW (for XAML) file.  Both of these are essentially name/value collections for your strings.  An example of the process of naming and managing your string resources can be found here: &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/hh465248.aspx"&gt;How to manage string resources&lt;/a&gt;.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; Yes the Consumer Preview version of that documentation shows only Javascript right now, but will be updated.  The naming conventions are the same.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;In XAML we created a new way to do XAML UI localization in your markup, by moving some functionality into the platform for you.  Previously in platforms like Silverlight people used &lt;a href="http://timheuer.com/blog/archive/2009/08/26/silverlight-string-localization.aspx"&gt;techniques like data binding&lt;/a&gt; to accomplish the mapping from the RESX-generated class to the UI.  Because the indexing of the string resources changed a bit (i.e., currently no strongly-typed resource class representation), we wanted to have the platform do some more heavy lifting for you.  We already load the index file (resources.pri) automatically during load of the app, so we’re aware of the resources and all the context the app may have (i.e., what locale, screen resolution, etc.).  Because of this we enabled a markup mechanism in XAML for you to provide easy string localization.  Let’s use a simple example of a TextBlock that you might have a static string:&lt;/p&gt;  &lt;div id="codeSnippetWrapper" style="cursor: text; font-size: 8pt; border-top: silver 1px solid; font-family: 'Courier New', courier, monospace; border-right: silver 1px solid; width: 97.5%; border-bottom: silver 1px solid; overflow: auto; padding-bottom: 4px; direction: ltr; text-align: left; padding-top: 4px; padding-left: 4px; margin: 20px 0px 10px; border-left: silver 1px solid; line-height: 12pt; padding-right: 4px; background-color: #f4f4f4"&gt;   &lt;div id="codeSnippet" style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;     &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum1" style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBlock&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Uid&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="MyTextBlock"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;FontSize&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="24.667"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Design Placeholder"&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;Notice the x:Uid value here.  This now maps back to the key in your RESW file.  Anything with that starting key will have properties merged into it.  So we can have a key in our RESW for “Text” using the key name &lt;em&gt;MyTextBlock.Text&lt;/em&gt; with a value of “Hello World” and the runtime will do the replacement for you.  This applies to properties other than text (i.e. width) as well as attached properties.  While we think this is a great new method, it may not work for everyone’s situations and you still have control over retrieving strings using the Windows.ApplicationModel.Resources WinRT APIs.  You can read more about this method with some examples here: &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh771181.aspx"&gt;&lt;strong&gt;QuickStart: Make your Metro style app world ready&lt;/strong&gt;&lt;/a&gt; and an SDK Sample here: &lt;a href="http://code.msdn.microsoft.com/windowsapps/Application-resources-and-cd0c6eaa"&gt;Application Resources&lt;/a&gt;.&lt;/p&gt;&lt;h2&gt;Tools to help with localizing content&lt;/h2&gt;&lt;p&gt;Once you have understood what your platform provides and you have taken the effort to prepare your app for easy localization, the next step is to actually use tools/process to perform the localization.  I’ve come across a few tools that I think are helpful for XAML developers who are ‘small shops’ and don’t have an existing process for app localization.&lt;/p&gt;&lt;p&gt;The easiest thing for a developer to do is to use machine translation using automated services.  There are a few tools out there that I think can be helpful for this method.  It is important to note we are talking about machine translation here…I will get to that point later on in the post.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;RESX Translator with Bing&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Since the RESW format is identical with RESW (restriction is that RESW only supports string values currently), you can use a lot of existing RESX tools.  There is a &lt;a href="http://resxtranslatorbing.codeplex.com/"&gt;&lt;strong&gt;RESX Translator with Bing&lt;/strong&gt; project on CodePlex&lt;/a&gt; that was done by Microsoft UK Consulting Services.  This allows you to select a file and source language and translate to any language that Microsoft Translator supports.  &lt;/p&gt;&lt;p&gt;&lt;img title="RESX Translator with Bing" style="float: none; margin-left: auto; display: block; margin-right: auto" alt="RESX Translator with Bing" src="http://storage2.timheuer.com/bingtranslator.png" /&gt;&lt;/p&gt;&lt;p&gt;Since the current project supports (and only loads) .resx files, I had submitted some patch files to quickly make it support the .resw file extension.  The contributor hasn’t accepted these patches, but you can &lt;a href="http://resxtranslatorbing.codeplex.com/SourceControl/list/patches"&gt;find them on the patches section for the project&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Multilingual App Toolkit&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Released with the Visual Studio 11 Beta, the &lt;a href="http://msdn.microsoft.com/en-us/windows/apps/hh848309"&gt;&lt;strong&gt;Multilingual App Toolkit&lt;/strong&gt;&lt;/a&gt; from Microsoft provides an integrated method for generating resources for your app.  One of the benefits of this app is that it produces some standards-based files that are used to send to localizers and can be used in other tools.  This includes the TPX and &lt;a href="http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=xliff"&gt;&lt;strong&gt;XLIFF&lt;/strong&gt;&lt;/a&gt; file formats.  Once installed the tool is integrated within visual studio and your flow would be something like the following.&lt;/p&gt;&lt;p&gt;First you’d have your app and an initial RESW file containing your default language (in my case en-US) resources.  Once I have that I can right-click on the project and choose &lt;em&gt;Add translation languages&lt;/em&gt; and when doing so, launches:&lt;/p&gt;&lt;p&gt;&lt;img title="Add translation language dialog" style="float: none; margin-left: auto; display: block; margin-right: auto" alt="Add translation language dialog" src="http://storage2.timheuer.com/mltranslist.png" /&gt;&lt;/p&gt;&lt;p&gt;which I can select the languages I would prefer.  Notice the translator icon next to some of them indicating that these could be machine-translated.  Once you select the languages you want, you’ll see a folder within your app that contains the configuration information:&lt;/p&gt;&lt;p&gt;&lt;img title="Multilingual resources folder" style="float: none; margin-left: auto; display: block; margin-right: auto" alt="Multilingual resources folder" src="http://storage2.timheuer.com/mlfolder.png" /&gt;&lt;/p&gt;&lt;p&gt;Now if you open the XLF files you’ll basically see some XML that contains configuration information but initially won’t see any of your string values.  You need to do a build to populate those files.  After building you’ll see the XLF files regenerated with the keys to be localized:&lt;/p&gt;&lt;div id="codeSnippetWrapper" style="cursor: text; font-size: 8pt; border-top: silver 1px solid; font-family: 'Courier New', courier, monospace; border-right: silver 1px solid; width: 97.5%; border-bottom: silver 1px solid; overflow: auto; padding-bottom: 4px; direction: ltr; text-align: left; padding-top: 4px; padding-left: 4px; margin: 20px 0px 10px; border-left: silver 1px solid; line-height: 12pt; padding-right: 4px; background-color: #f4f4f4"&gt;  &lt;div id="codeSnippet" style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum1" style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="color: #800000"&gt;xml&lt;/span&gt; &lt;span style="color: #ff0000"&gt;version&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="1.0"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;encoding&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="utf-8"&lt;/span&gt;?&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum2" style="color: #606060"&gt;   2:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;xliff&lt;/span&gt; &lt;span style="color: #ff0000"&gt;version&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="1.2"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;xmlns&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="urn:oasis:names:tc:xliff:document:1.2"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;xmlns:xsi&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="http://www.w3.org/2001/XMLSchema-instance"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;xsi:schemaLocation&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum3" style="color: #606060"&gt;   3:&lt;/span&gt;   &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;file&lt;/span&gt; &lt;span style="color: #ff0000"&gt;datatype&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="xml"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;source-language&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="en-US"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;target-language&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="de-DE"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;original&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="LocTesting_Multilingual.prilog.xml"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;tool-id&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="MAT"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;product-name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="LocTesting"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;product-version&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Version 1"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;build-num&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="1.0.0.0"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum4" style="color: #606060"&gt;   4:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;header&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum5" style="color: #606060"&gt;   5:&lt;/span&gt;       &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;tool&lt;/span&gt; &lt;span style="color: #ff0000"&gt;tool-id&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="MAT"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;tool-name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Multilingual App Toolkit"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;tool-version&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="1.0"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;tool-company&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Microsoft"&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum6" style="color: #606060"&gt;   6:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;header&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum7" style="color: #606060"&gt;   7:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;body&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum8" style="color: #606060"&gt;   8:&lt;/span&gt;       &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;group&lt;/span&gt; &lt;span style="color: #ff0000"&gt;id&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Resources"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum9" style="color: #606060"&gt;   9:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;trans-unit&lt;/span&gt; &lt;span style="color: #ff0000"&gt;id&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Resources\SomeTextBlock\Text"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;translate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="yes"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;xml:space&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="preserve"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum10" style="color: #606060"&gt;  10:&lt;/span&gt;           &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;source&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;Good morning!  Have a nice day!&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;source&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum11" style="color: #606060"&gt;  11:&lt;/span&gt;           &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;target&lt;/span&gt; &lt;span style="color: #ff0000"&gt;state&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="new"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;Good morning!  Have a nice day!&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;target&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum12" style="color: #606060"&gt;  12:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;trans-unit&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum13" style="color: #606060"&gt;  13:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;trans-unit&lt;/span&gt; &lt;span style="color: #ff0000"&gt;id&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Resources\SomeButton\Content"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;translate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="yes"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;xml:space&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="preserve"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum14" style="color: #606060"&gt;  14:&lt;/span&gt;           &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;source&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;Click to Save&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;source&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum15" style="color: #606060"&gt;  15:&lt;/span&gt;           &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;target&lt;/span&gt; &lt;span style="color: #ff0000"&gt;state&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="new"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;Click to Save&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;target&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum16" style="color: #606060"&gt;  16:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;trans-unit&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum17" style="color: #606060"&gt;  17:&lt;/span&gt;       &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;group&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum18" style="color: #606060"&gt;  18:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;body&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum19" style="color: #606060"&gt;  19:&lt;/span&gt;   &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;file&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum20" style="color: #606060"&gt;  20:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;xliff&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;Now you send those off for translation by right-clicking on the XLF file and choosing &lt;em&gt;Send for translation&lt;/em&gt; which will give you a dialog to choose if you want to mail them or save to a folder and which format (TPX/XLIFF).  At this point your translation process can begin.  If you don’t have a translation process where you would normally send the XLIFF files, you can use the &lt;strong&gt;MAT Localization Editor&lt;/strong&gt; that is installed with the toolkit.  Launching this tool and opening your XLIFF file will allow you (or the person doing translations) to edit the files with the correct value.  The MAT editor also has the Microsoft Translator capability as well.  Here’s an example of the above German file in the editor with one value translated by the Microsoft Translator:&lt;/p&gt;&lt;p&gt;&lt;img title="MAT Localization Editor" style="float: none; margin-left: auto; display: block; margin-right: auto" alt="MAT Localization Editor" src="http://storage2.timheuer.com/mateditor.png" /&gt;&lt;/p&gt;&lt;p&gt;Once you have the edited XLIFF file you import that back into your project.  Notice there are some other workflow-related properties in the XLIFF (i.e., Signed off, ready for review, etc.) that you can enforce.  Right-click on the XLF file in your project and choose &lt;em&gt;Import translation&lt;/em&gt; and the XLIFF file that was modified.  Once imported, when I build next the signed-off items will be indexed within my app’s resource lookup (resources.pri) and packaged.  You will not see any new RESW files generated as using this process does the indexing during the build process with the XLF file and a build task.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Amanuens&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Another tool that I’ve come across is &lt;a href="http://www.amanuens.com"&gt;&lt;strong&gt;Amanuens&lt;/strong&gt;&lt;/a&gt;, which is more of a service/tool than anything that integrates into Visual Studio or runs on your machine.  This service acts as a broker to translators.  You basically create a project and then upload files to be localized.  After you login and create a project (specifying the type as Metro as they now &lt;a href="http://blog.amanuens.com/2012/03/06/support-for-windows-metro-resource-files/"&gt;support Windows 8 application file types&lt;/a&gt;) then you upload your “master” RESW/RESJSON file.  After doing that you can assign a translation and this is the core of their service.  You can assign a file for translation to a person that is a user on the system as you may have a German speaking friend who might help you out.  Or you can assign to an agency and get a quote:&lt;/p&gt;&lt;p&gt;&lt;img title="Amanuens agency service" style="float: none; margin-left: auto; display: block; margin-right: auto" alt="Amanuens agency service" src="http://storage2.timheuer.com/amanuensagency.png" /&gt;&lt;/p&gt;&lt;p&gt;This way you can send it off and wait.  Either way when the translation comes back you just download the file, put it in your project in the appropriate folder and rebuild your app.  Amanuens is a &lt;a href="http://amanuens.com/pricing"&gt;pay service&lt;/a&gt; with a free option, but if you have an app and want to manage the workflow of that process, it seems like a pretty cool service.  They also have automatic source control synchronization that you can opt-in for so as your translations come in, they are automatically in your app via a repo sync.&lt;/p&gt;&lt;h2 /&gt;&lt;h2&gt;Culture-correct localization&lt;/h2&gt;&lt;p&gt;While all the above tools are awesome and fast to get you started, to build a really targeted localized app it is highly recommended you do more than machine translation, or at a minimum verify that machine translation.  Many times, especially for east Asian languages, the machine translation can be grammatically incorrect or sometimes culturally insensitive as most do dictionary-based translation rather than really understanding any context.&lt;/p&gt;&lt;p&gt;I recall a time in high school where a classmate went to Germany for exchange.  Having taken 6 semesters of German she felt pretty confident in her skills.  Little did she know her hoch Deutsch would prove to be a problem.  Upon arrival she went to a café with some friends and proclaimed she was hot.  However, her dictionary translation was bad and she effectively said “I’m horny” which immediately caught the attention of all the men in the room.  So it is key to understand context and culture when translating!&lt;/p&gt;&lt;p&gt;For this services like Amanuens really help out in both the flow and identifying a person to do the translation.  If you don’t know anyone who speaks Swedish, but want to target that market, using a service could help you get more culturally-correct translations for your app over &lt;em&gt;just&lt;/em&gt; machine translation.  This, of course, does not come without a cost, but usually it is minimal and is a one-time translation.&lt;/p&gt;&lt;p&gt;One thing I’d love to see happen is somewhat of a co-op of software developers from around the world to offer translation help.  Working at Microsoft I had the chance to get correct translations of my Sudoku app for German, Japanese, Korean and French.  It was helpful to just send off the RESW file and get back the translation from a human who speaks the language and understands technology terms as well.  A service like Amanuens can help facilitate that co-op having a bank of users that are willing to donate their translation services for your project.  I think the struggle is that it is mostly English apps that need the help and hard for an English person to really reciprocate the value.  But if you are willing to help out other software developers perhaps we can start this co-op idea?&lt;/p&gt;&lt;h2&gt;Testing your localized app&lt;/h2&gt;&lt;p&gt;[!!_Śò ẃĥâт đõ Уôú ďó įƒ ўôú đõи'ť ћãνê тŕáйşłâţêď ţę×т ýęţ áйď ẅàήт тó тęšť ÿòµѓ ãрρ?_!!!!!!!!!!!!!!!!!!!!!!!!]&lt;/p&gt;&lt;p&gt;Could you read that?  Squint a little more.  It is what we call Pseudo Language.  Not a ‘real’ language but something that simulates a lot of different characteristics of localized language challenges.  Using the Multilingual Toolkit you can have all your strings translated to this Pseudo Language (sometimes called “ploc” within the walls of Microsoft) to test your app before your real language translations come in.  Using ploc helps you identify various artifacts that may exist in localizing an app.  Let’s take a simple example from above.  We had a button that said “Click to Save” in English and we translated it to German.  When rendered it would look like this respectively:&lt;/p&gt;&lt;p&gt;&lt;img src="http://storage2.timheuer.com/buttonen.png" /&gt; &lt;img src="http://storage2.timheuer.com/buttonde.png" /&gt;&lt;/p&gt;&lt;p&gt;Notice that the German translation didn’t fit within the Button MaxWidth we had set because the translation of the text was longer than our English version.  Testing this is important for us to realize we need to change the constraint of the XAML sizes to accommodate our languages that we are targeting.&lt;/p&gt;&lt;p&gt;Historically testing localized versions of apps may have been challenging requiring you to install a language pack, try to navigate menus that you may not understand, or relying on others to verify for you.  In Windows 8, this process has become easier using the language list preferences.  The Building Windows 8 blog had a post called “&lt;strong&gt;&lt;a href="http://blogs.msdn.com/b/b8/archive/2012/02/21/using-the-language-you-want.aspx"&gt;Using the language you want&lt;/a&gt;&lt;/strong&gt;” which talks about this concept in detail.  &lt;/p&gt;&lt;blockquote&gt;  &lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; If using the Pseudo Language option and you want to test, when in the Language panel search for “qps-ploc” and you’ll see it under English (qps-ploc) as an option and then you can really test the boundaries of your app with the ploc strings!&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;Effectively as a developer I can go into the Language panel, add German, set it as my first language and run my app.  Now I’ll get my German resources first and I can visible verify things that need to be changed without installing any language pack on my machine…and I can quickly change back without any reboots.&lt;/p&gt;&lt;h2&gt;Summary&lt;/h2&gt;&lt;p&gt;Developing your application to be world-ready doesn’t have to be a huge undertaking and can turn out not to be difficult at all for your app.  While not every app is going to be the same and how you choose to architect your code may dictate &lt;strong&gt;how&lt;/strong&gt; you get your resources, the concepts are still the same and starting with the mindset that your app may be localized at some point is the right thing to do.  Using RESW/RESJSON from the start and understanding the options you have for extracting those resources will make localization later very easy…in fact in some cases as easy as just putting in the updated RESW file and recompiling.&lt;/p&gt;&lt;p&gt;Start smart from the beginning and think global even if you aren’t ready for it just yet.  You never know when your German friend might help out translating for you and then you can instantly expand to that market within a day!&lt;/p&gt;&lt;p&gt;Hope this helps!&lt;/p&gt;&lt;div id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:058a11cc-b085-47a6-abfe-7314d5427369" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"&gt;&lt;span class="tags"&gt;tags: &lt;a href="http://timheuer.com/blog/Tags/winrt/default.aspx" rel="tag"&gt;winrt&lt;/a&gt;, &lt;a href="http://timheuer.com/blog/Tags/windows+8/default.aspx" rel="tag"&gt;windows 8&lt;/a&gt;, &lt;a href="http://timheuer.com/blog/Tags/xaml/default.aspx" rel="tag"&gt;xaml&lt;/a&gt;, &lt;a href="http://timheuer.com/blog/Tags/localization/default.aspx" rel="tag"&gt;localization&lt;/a&gt;, &lt;a href="http://timheuer.com/blog/Tags/xliff/default.aspx" rel="tag"&gt;xliff&lt;/a&gt;, &lt;a href="http://timheuer.com/blog/Tags/translator/default.aspx" rel="tag"&gt;translator&lt;/a&gt;, &lt;a href="http://timheuer.com/blog/Tags/globalization/default.aspx" rel="tag"&gt;globalization&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="wlWriterHeaderFooter" style="margin:0px; padding:0px 0px 0px 0px;"&gt;&lt;hr /&gt;&lt;div class="cc-license"&gt;This work is licensed under a &lt;a href="http://creativecommons.org/licenses/by/3.0/"&gt;Creative Commons Attribution By license.&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;img src="http://timheuer.com/blog/aggbug/14836.aspx" width="1" height="1" /&gt;&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/_YifJibItKigoXJ1FoaBnbH3qGQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_YifJibItKigoXJ1FoaBnbH3qGQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/_YifJibItKigoXJ1FoaBnbH3qGQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_YifJibItKigoXJ1FoaBnbH3qGQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/timheuer/~4/oa8sktFJiSg" height="1" width="1"/&gt;</description>      <creator xmlns="http://purl.org/dc/elements/1.1/">Tim Heuer</creator>      <guid isPermaLink="false">http://timheuer.com/blog/archive/2012/04/26/localize-windows-8-application.aspx</guid>      <pubDate>Thu, 26 Apr 2012 18:47:48 GMT</pubDate>      <comments>http://timheuer.com/blog/archive/2012/04/26/localize-windows-8-application.aspx#feedback</comments>      <comments xmlns="http://purl.org/rss/1.0/modules/slash/">11</comments>      <commentRss xmlns="http://wellformedweb.org/CommentAPI/">http://timheuer.com/blog/comments/commentRss/14836.aspx</commentRss>      <ping xmlns="http://madskills.com/public/xml/rss/module/trackback/">http://timheuer.com/blog/services/trackbacks/14836.aspx</ping>      <origLink xmlns="http://rssnamespace.org/feedburner/ext/1.0">http://timheuer.com/blog/archive/2012/04/26/localize-windows-8-application.aspx</origLink>    </item>    <item>      <title>GridView Control in Windows 8</title>      <link>http://feedproxy.google.com/~r/JesseLiberty-SilverlightGeek/~3/_vemEh5ePZI/</link>      <comments>http://jesseliberty.com/2012/04/26/gridview-control-in-windows-8/#comments</comments>      <pubDate>Thu, 26 Apr 2012 18:09:26 +0000</pubDate>      <creator xmlns="http://purl.org/dc/elements/1.1/">Jesse Liberty</creator>      <category><![CDATA[Essentials]]></category>      <category><![CDATA[Mini-Tutorial]]></category>      <category><![CDATA[Windows 8]]></category>      <guid isPermaLink="false">http://jesseliberty.com/?p=5259</guid>      <encoded xmlns="http://purl.org/rss/1.0/modules/content/"><![CDATA[While ListBox and ComboBox continue to work in Windows 8, their use is discouraged. They are not designed well for touch input and there are new and more powerful controls in WinRT that you can use instead; specifically the ListView &#8230; Continue reading &#8594;<br/><br/>For the complete article and hyperlinks, please visit my blog at http://JesseLiberty.com<div class="feedflare"><a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=_vemEh5ePZI:cL2AYq8XDO0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=_vemEh5ePZI:cL2AYq8XDO0:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=_vemEh5ePZI:cL2AYq8XDO0:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?i=_vemEh5ePZI:cL2AYq8XDO0:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=_vemEh5ePZI:cL2AYq8XDO0:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?i=_vemEh5ePZI:cL2AYq8XDO0:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=_vemEh5ePZI:cL2AYq8XDO0:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?i=_vemEh5ePZI:cL2AYq8XDO0:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=_vemEh5ePZI:cL2AYq8XDO0:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?d=qj6IDK7rITs" border="0"></img></a></div><img src="http://feeds.feedburner.com/~r/JesseLiberty-SilverlightGeek/~4/_vemEh5ePZI" height="1" width="1"/>]]></encoded>      <commentRss xmlns="http://wellformedweb.org/CommentAPI/">http://jesseliberty.com/2012/04/26/gridview-control-in-windows-8/feed/</commentRss>      <comments xmlns="http://purl.org/rss/1.0/modules/slash/">3</comments>      <origLink xmlns="http://rssnamespace.org/feedburner/ext/1.0">http://jesseliberty.com/2012/04/26/gridview-control-in-windows-8/</origLink>    </item>    <item>      <title>SilverlightShow Interview with Ido Flatow - Presenter at 3 sessions at Visual Studio Live!New York 4-day Conference</title>      <description>&lt;p&gt;&lt;strong&gt;In this SilverlightShow interview, we talk with Ido Flatow &amp;ndash;presenter of 3 WCF sessions at &lt;a href="http://ads.silverlightshow.net/a.aspx?ZoneID=55&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=47615" target="_blank"&gt;&lt;img alt="" src="http://ads.silverlightshow.net/a.aspx?ZoneID=55&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=47615" width="0" height="0" style="border-width: 0px;border-style: solid;" /&gt;Visual Stuido Live!New York&lt;/a&gt; conference (May 14-17, 2012). The topics of the sessions are: &lt;/strong&gt;&lt;a href="http://vslive.com/Events/New-York-2012/Sessions/Thursday/TH17-Monitoring-and-Troubleshooting-WCF-Services.aspx"&gt;&lt;strong&gt;Monitoring and Troubleshooting WCF Services&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;, &lt;/strong&gt;&lt;a href="http://vslive.com/Events/New-York-2012/Sessions/Thursday/TH09-Whats-New-in-WCF-4.aspx"&gt;&lt;strong&gt;What's New in WCF 4&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt; and &lt;/strong&gt;&lt;a href="http://vslive.com/Events/New-York-2012/Sessions/Thursday/TH13-Whats-New-in-WCF-4.5.aspx"&gt;&lt;strong&gt;What's New in WCF 4.5&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;.     &lt;br /&gt;As we have announced, SilverlightShow is the &lt;/strong&gt;&lt;a href="http://vslive.com/events/new-york-2012/information/sponsors.aspx"&gt;&lt;strong&gt;Social Media Premiere Partner&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt; for this conference and we are &lt;/strong&gt;&lt;a href="http://www.silverlightshow.net/community/contest_vslive_NY.aspx"&gt;&lt;strong&gt;sending one SilverlightShow member to this conference for free&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;.&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;About Ido:&lt;/em&gt;&lt;/strong&gt;&lt;em&gt; &lt;/em&gt;&lt;em&gt;Ido Flatow is a Microsoft MVP for Connected Systems Development, Microsoft Certified Trainer, senior architect, and trainer at SELA Group International. He has over 14 years of experience in developing, designing and managing information systems, and is currently consulting and lecturing on Entity Framework and web-related technologies, such as WCF, ASP.NET, IIS, Silverlight, and Windows Azure. Ido is the author of Microsoft's Official WCF 4 course (10263A).&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;SilverlightShow: Hi Ido! Nice to meet you online! You are presenting 3 sessions on WCF in &lt;a href="http://ads.silverlightshow.net/a.aspx?ZoneID=55&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=47615" target="_blank"&gt;&lt;img alt="" src="http://ads.silverlightshow.net/a.aspx?ZoneID=55&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=47615" width="0" height="0" style="border-width: 0px;border-style: solid;" /&gt;VS Live! New York event&lt;/a&gt;, and all three are among the most-awaited sessions at the event. We also have a number of articles on WCF on &lt;a href="http://www.silverlightshow.net/"&gt;SilverlightShow&lt;/a&gt;, and all of them are highly popular, with &lt;a href="http://www.silverlightshow.net/items/WCF-RIA-Services-Part-1-Getting-Started.aspx"&gt;WCF RIA Services by Brian Noyes&lt;/a&gt; beating all records. Why is that? Why is WCF so important for developers?&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;IF&lt;/strong&gt;: Today, a lot of the applications we develop are distributed applications with various front-ends (desktop, mobile, web) and back-ends, and these two parts need to communicate with each other. Windows Communication Foundation (WCF) is the framework that allows us to create that connection, by enabling us to create services that can be accessed from everywhere using various ways of communication, such as HTTP and TCP. WCF is all about connecting distributed systems, whether they are entirely written in .NET or have parts of them written in other platforms, such as Java, PHP, JavaScript, or even native C++ - WCF is interoperable and uses a lot of standards, such as the WS-* protocols, in order to provide that ability.    &lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style="text-align: center;"&gt;&lt;a href="http://ads.silverlightshow.net/a.aspx?ZoneID=57&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=79518" target="_blank"&gt;&lt;img alt="" src="http://ads.silverlightshow.net/a.aspx?ZoneID=57&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=79518" width="468" height="60" style="border-width: 0px;border-style: solid;" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;SilverlightShow&lt;/strong&gt;: &lt;strong&gt;What the most challenging feature, or aspect of WCF, where do developers struggle most?&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;IF&lt;/strong&gt;: I think that most WCF developers would agree with me when I say that the most challenging part of WCF is the pile of configuration you sometimes have to write in order to host your service. That is actually one of the issues that are well known about WCF, and in every version of WCF we see more and more improvements that are intended to reduce the amount of configuration we write. In two of my sessions, &amp;ldquo;what&amp;rsquo;s new in WCF 4&amp;rdquo; and &amp;ldquo;what&amp;rsquo;s new in WCF 4.5&amp;rdquo; I will show the configuration simplification that has been done over the years in WCF. In addition to configuration, there is another aspect of WCF that a lot of developers struggle with and that is troubleshooting services. When a WCF service fails the error can vary from a very detailed exception to a disconnected channel without any apparent reason. The problem is that many developers are not familiar with the troubleshooting tools offered by WCF, and on many occasions I find myself answering in forums &amp;ldquo;please use WCF tracing - that will show you exactly what the problem is&amp;rdquo;. In my &amp;ldquo;Monitoring and troubleshooting WCF services&amp;rdquo; session I plan to show some of these troubleshooting tools, so people can finally have confidence when having to troubleshoot their services.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;SilverlightShow&lt;/strong&gt;: &lt;strong&gt;What&amp;rsquo;s the most interesting or the best use of WCF you are aware of? Can you give an example with some application perhaps?&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;IF&lt;/strong&gt;: Well, it&amp;rsquo;s hard to pinpoint the &amp;ldquo;best&amp;rdquo; use of WCF, but I&amp;rsquo;ve seen WCF taken to the extreme in various scenarios - from applications that load services dynamically according to different devices which are connected to the servers, through highly-secured WCF services that work smoothly with Java clients, to projects that wrote their own WCF transport channels and encoders in order to get the best performance out of WCF.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;SilverlightShow&lt;/strong&gt;: &lt;strong&gt;From the total list of 3 sessions, which one do you think would be most challenging for the attendees, and why?&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;IF&lt;/strong&gt;: I think that would be the &amp;ldquo;Monitoring and troubleshooting WCF services&amp;rdquo;, because unlike the &amp;ldquo;what&amp;rsquo;s new&amp;rdquo; sessions where I show a set of new features, the monitoring session is all about the hidden gems of WCF - a lot of WCF developers are not aware to the variety of monitoring techniques that are given out-of-the-box with WCF, and to the various configurations that affect our service&amp;rsquo;s performance. The monitoring session is actually part of an advanced WCF workshop I often deliver, and I always hear people, even experienced WCF developers, saying &amp;ldquo;I didn&amp;rsquo;t know that, I&amp;rsquo;ll need to check it out&amp;rdquo;.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;SilverlightShow&lt;/strong&gt;: &lt;strong&gt;Could you disclose some interesting tip/trick/demo that attendees would see in any of your sessions in New York? &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;IF&lt;/strong&gt;: For those of you who will miss my monitoring session, here&amp;rsquo;s a tip - we all know that WCF supports tracing and message logging, and that we need to configure in advance the logging setting. In fact, with WCF 4 you can use WMI (Windows Management Instrumentation) to change some of the logging settings in runtime, without stopping your service - this is most useful in production environments when you want to start tracking a problem and therefore need to adjust the service&amp;rsquo;s logging level. You can read about this feature on MSDN (&lt;a href="http://msdn.microsoft.com/en-us/library/ms735120.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms735120.aspx&lt;/a&gt;), or just come to my session and see how it works (my demos will also be available for download afterwards).&lt;/p&gt;&lt;p&gt;&lt;strong&gt;SilverlightShow: How and where may conference attendees meet you during the conference?&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;IF:&lt;/strong&gt; You can probably track me down between sessions, during the birds-of-a-feather lunch, or at any of the other events during the conference - I will be the one wearing a speaker name tag that says &amp;ldquo;Ido Flatow&amp;rdquo;. You can also follow me on twitter (&lt;a href="https://twitter.com/#!/IdoFlatow" target="_blank"&gt;@IdoFlatow&lt;/a&gt;) to get updates on my sessions, and links to the slides and demos I will show in my sessions.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Thanks Ido for this interview! Wish you, as well as our free pass winner a great conference event!&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;hr /&gt;&lt;strong&gt;&lt;em&gt;&lt;div style="text-align: center;"&gt;&lt;strong&gt;&lt;em&gt;Get $300 off the standard price of &lt;a href="http://ads.silverlightshow.net/a.aspx?ZoneID=56&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=71903" target="_blank"&gt;&lt;img alt="" src="http://ads.silverlightshow.net/a.aspx?ZoneID=56&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=71903" width="0" height="0" style="border-width: 0px;border-style: solid;" /&gt;Visual Studio Live! New York Best Value package&lt;/a&gt; by using this code exclusive to SilverlightShow readers and members: VSNYTU&lt;/em&gt;&lt;/strong&gt;&lt;/div&gt;&lt;/em&gt;&lt;/strong&gt;</description>      <link>http://www.silverlightshow.net/items/SilverlightShow-Interview-with-Ido-Flatow-Presenter-at-3-sessions-at-Visual-Studio-Live-New-York-4-day-Conference.aspx</link>      <author>editorial@silverlightshow.net (Silverlight Show )</author>      <comments>http://www.silverlightshow.net/items/SilverlightShow-Interview-with-Ido-Flatow-Presenter-at-3-sessions-at-Visual-Studio-Live-New-York-4-day-Conference.aspx#comments</comments>      <guid isPermaLink="true">http://www.silverlightshow.net/items/SilverlightShow-Interview-with-Ido-Flatow-Presenter-at-3-sessions-at-Visual-Studio-Live-New-York-4-day-Conference.aspx</guid>      <pubDate>Tue, 24 Apr 2012 13:46:27 GMT</pubDate>    </item>    <item>      <title>Making a Great Snapped View for your Web Site on IE10 on Windows 8</title>      <link>http://feedproxy.google.com/~r/Synergist/~3/Jkrod9acmi0/making-a-great-snapped-view-for-your-web-site-on-ie10-on-windows-8.aspx</link>      <pubDate>Tue, 24 Apr 2012 03:11:15 GMT</pubDate>      <guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10296966</guid>      <creator xmlns="http://purl.org/dc/elements/1.1/">Synergist</creator>      <comments xmlns="http://purl.org/rss/1.0/modules/slash/">1</comments>      <commentRss xmlns="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/synergist/rsscomments.aspx?WeblogPostID=10296966</commentRss>      <comments>http://blogs.msdn.com/b/synergist/archive/2012/04/23/making-a-great-snapped-view-for-your-web-site-on-ie10-on-windows-8.aspx#comments</comments>      <description>&lt;p&gt;One of the great features of Windows 8 Metro Applications is the &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/hh465371.aspx"&gt;Snapped View&lt;/a&gt; where app developers create a 320px wide view of their app.&amp;#160; When the user snaps their app to the left or the right of the screen they can continue using their primary app while still having the secondary app visible in a thinner view.&amp;#160; The project templates in Visual Studio come with this capability built-in to make it easier to address this important part of the application experience.&amp;#160; If you build your Metro application with HTML, you see that this is done with &lt;a href="http://www.w3.org/TR/css3-mediaqueries/"&gt;CSS Media Queries&lt;/a&gt;, a feature supported in all HTML5 modern browsers.&amp;#160; This is also the way that you support snapped view for your website, with the &lt;a href="http://msdn.microsoft.com/library/ie/hh708740.aspx"&gt;@-ms-viewport&lt;/a&gt; rule (since it’s Microsoft-specific today, it has the –ms- prefix and can be safely ignored by other browsers.&lt;/p&gt;  &lt;pre class="csharpcode"&gt;@media screen and (max-width: 400px) {  @-ms-viewport { width: 320px; }  &lt;span class="rem"&gt;/* CSS for 320px width snapped view goes here */&lt;/span&gt;} &lt;/pre&gt;&lt;p&gt;Since Mobile browsers like Windows Phone’s IE and the iPhone both report their width as 320 px, you may be able to reuse the media queries that you created for mobile for the snapped view by adding one line of css to your style sheet.&amp;#160; If you are intrigued by CSS Media Queries, and want to see more examples of responsive design that use them, take a look at the &lt;a href="http://mediaqueri.es/"&gt;Media Queries&lt;/a&gt; site which hosts a great collection of them.&amp;#160; &lt;/p&gt;&lt;p&gt;You can also take a look at a site that I’ve been working on that uses media queries and implements the snapped mode media query at &lt;a href="http://timelapseapp.com/"&gt;TimeLapseApp.com.&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-05-metablogapi/2818.Screenshot_2D00_5_5F00_4B2BEE88.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Screenshot (5)" border="0" alt="Screenshot (5)" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-05-metablogapi/6710.Screenshot_2D00_5_5F00_thumb_5F00_0A1D6F24.png" width="138" height="312" /&gt;&lt;/a&gt;&amp;#160;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-05-metablogapi/5141.Screenshot_2D00_4_5F00_69962F71.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Screenshot (4)" border="0" alt="Screenshot (4)" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-83-05-metablogapi/4478.Screenshot_2D00_4_5F00_thumb_5F00_754B76A3.png" width="552" height="312" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;h3&gt;More details&lt;/h3&gt;&lt;ul&gt;  &lt;li&gt;&lt;a href="http://msdn.microsoft.com/library/ie/hh708740.aspx"&gt;IE10 Device Adaptation on MSDN&lt;/a&gt; &lt;/li&gt;  &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/hh465371.aspx"&gt;Guidelines for Snapped and Filled Views on MSDN&lt;/a&gt; &lt;/li&gt;&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10296966" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/Synergist/~4/Jkrod9acmi0" height="1" width="1"/&gt;</description>      <category domain="http://blogs.msdn.com/b/synergist/archive/tags/Metro/">Metro</category>      <category domain="http://blogs.msdn.com/b/synergist/archive/tags/IE10/">IE10</category>      <category domain="http://blogs.msdn.com/b/synergist/archive/tags/Windows+8/">Windows 8</category>      <origLink xmlns="http://rssnamespace.org/feedburner/ext/1.0">http://blogs.msdn.com/b/synergist/archive/2012/04/23/making-a-great-snapped-view-for-your-web-site-on-ie10-on-windows-8.aspx</origLink>    </item>    <item>      <title>#mvvmlight V4RC available on #nuget</title>      <link>http://geekswithblogs.net/lbugnion/archive/2012/04/22/mvvmlight-v4rc-available-on-nuget.aspx</link>      <description>&lt;p&gt;I just published the MVVM Light V4 RC packages to Nuget. Note that this is still technically a preview, so the main package is still V3. The V4 packages are available here:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Package with libraries and content:      &lt;br /&gt;When you install this package into a “virgin” application (i.e. an application without ViewModelLocator, preferably a brand new application), it installs a new ViewModel folder with a MainViewModel, ViewModelLocator and adds an entry into the App.xaml file to intialize a the ViewModelLocator in the global resources.       &lt;br /&gt;Do not use this package if you want only the libraries, this will add content files! &lt;/li&gt;    &lt;li&gt;Package with libraries only:      &lt;br /&gt;This installs and references only the libraries. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Both packages are available for Silverlight 3, Silverlight 4, Silverlight 5, .NET3.5SP1, .NET4, Windows Phone 7.0, Windows Phone 7.1 &lt;strong&gt;and Windows 8 (WinRT)&lt;/strong&gt;. That last one is brand new! :)&lt;/p&gt;  &lt;h2&gt;Nuget prerequisites&lt;/h2&gt;  &lt;p&gt;Follow the steps to install Nuget (if needed):&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;In Visual Studio 10 or 11, select the menu Tools, Extension Manager. &lt;/li&gt;    &lt;li&gt;In the Extension manager, select Online Extensions, Visual Studio Gallery. &lt;/li&gt;    &lt;li&gt;In the field marked “Search Installed Extensions:, enter “nuget”. &lt;/li&gt;    &lt;li&gt;Select the Nuget entry and then press Install. &lt;/li&gt;    &lt;li&gt;Restart Visual Studio. &lt;/li&gt; &lt;/ul&gt;  &lt;h2&gt;Installing from VS directly&lt;/h2&gt;  &lt;p&gt;In Visual Studio, follow these steps to install the packages:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Open an application without MVVM Light installed. &lt;/li&gt;    &lt;li&gt;Right click on the project and select Manage Nuget Packages. &lt;/li&gt; &lt;/ul&gt; &lt;a title="Manage Nuget Packages" href="http://www.flickr.com/photos/36917929@N06/6956827460/"&gt;&lt;img alt="2012042201" src="http://farm8.staticflickr.com/7229/6956827460_183ae37263_o.png" width="413" height="144" /&gt;&lt;/a&gt;   &lt;ul&gt;   &lt;li&gt;In the Manage Nuget Packages dialog, select Online (on the left). &lt;/li&gt;    &lt;li&gt;Enter “mvvmlight” in the Search Online field. &lt;/li&gt;    &lt;li&gt;You will see four choices:      &lt;ul&gt;       &lt;li&gt;MVVM Light: This is the stable release (V3RTM) with content files. &lt;strong&gt;Not available for Windows 8!&lt;/strong&gt; &lt;/li&gt;        &lt;li&gt;MVVM Light libraries only: This is the stable release (V3RTM), only libraries. &lt;strong&gt;Not available for Windows 8!&lt;/strong&gt; &lt;/li&gt;        &lt;li&gt;&lt;strong&gt;MVVM Light [Preview]&lt;/strong&gt;: This is V4RC with content files. &lt;/li&gt;        &lt;li&gt;&lt;strong&gt;MVVM Light libraries only [Preview]&lt;/strong&gt;: This is V4RC, only libraries. &lt;/li&gt;     &lt;/ul&gt;   &lt;/li&gt;    &lt;li&gt;Select the package you want to install and press Install. &lt;/li&gt; &lt;/ul&gt; &lt;a title="MVVM Light Packages" href="http://www.flickr.com/photos/36917929@N06/6956857708/"&gt;&lt;img alt="2012042202" src="http://farm9.staticflickr.com/8005/6956857708_d9ed4a31e6_o.png" width="599" height="331" /&gt;&lt;/a&gt;   &lt;p&gt;That’s it.&lt;/p&gt;  &lt;h2&gt;Updating from VS directly&lt;/h2&gt;  &lt;p&gt;If you have a previous version already installed, you can look for the update with the following steps:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Right click on the project and select Manage Nuget Packages. &lt;/li&gt;    &lt;li&gt;In the Manage Nuget Packages dialog, click on Updates. &lt;/li&gt;    &lt;li&gt;If an update for the given package is available, you can install it from there, &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;As usual, please try it out and let me know if something does not work right!&lt;/p&gt;  &lt;p&gt;Happy coding    &lt;br /&gt;Laurent&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;div style="margin-bottom: -1em"&gt;   &lt;div style="vertical-align: middle"&gt;&lt;a href="http://www.galasoft.ch/"&gt;&lt;img title="GalaSoft Laurent Bugnion" alt="GalaSoft Laurent Bugnion" src="http://www.galasoft.ch/logo/Current/logo_120x30.png" /&gt;&lt;/a&gt; &lt;/div&gt;    &lt;div style="position: relative; left: 130px; top: -36px"&gt;&lt;strong&gt;&lt;a href="http://www.galasoft.ch/contact_en.html"&gt;Laurent Bugnion (GalaSoft)&lt;/a&gt;&lt;/strong&gt;       &lt;br /&gt;&lt;a href="http://feeds.feedburner.com/galasoft"&gt;Subscribe&lt;/a&gt; | &lt;a href="http://twitter.com/lbugnion"&gt;Twitter&lt;/a&gt; | &lt;a href="http://www.facebook.com/lbugnion"&gt;Facebook&lt;/a&gt; | &lt;a href="http://www.flickr.com/photos/lbugnion"&gt;Flickr&lt;/a&gt; | &lt;a href="http://www.linkedin.com/in/lbugnion"&gt;LinkedIn&lt;/a&gt;       &lt;br /&gt;&lt;iframe style="border-top-style: none; margin-bottom: -20px; height: 23px; width: 450px; border-bottom-style: none; overflow: hidden; border-right-style: none; border-left-style: none; margin-top: 7px" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblog.galasoft.ch/archive/2012/04/22/mvvmlight-v4rc-available-on-nuget.aspx&amp;amp;layout=standard&amp;amp;show_faces=true&amp;amp;width=450&amp;amp;action=like&amp;amp;colorscheme=light" frameborder="0" allowtransparency="allowtransparency" scrolling="no"&gt;&lt;/iframe&gt;&lt;/div&gt; &lt;/div&gt; &lt;img src="http://geekswithblogs.net/lbugnion/aggbug/149386.aspx" width="1" height="1" /&gt;</description>      <creator xmlns="http://purl.org/dc/elements/1.1/">Laurent Bugnion</creator>      <guid>http://geekswithblogs.net/lbugnion/archive/2012/04/22/mvvmlight-v4rc-available-on-nuget.aspx</guid>      <pubDate>Sun, 22 Apr 2012 19:13:56 GMT</pubDate>      <comment xmlns="http://wellformedweb.org/CommentAPI/">http://geekswithblogs.net/lbugnion/comments/149386.aspx</comment>      <comments>http://geekswithblogs.net/lbugnion/archive/2012/04/22/mvvmlight-v4rc-available-on-nuget.aspx#feedback</comments>      <comments xmlns="http://purl.org/rss/1.0/modules/slash/">3</comments>      <commentRss xmlns="http://wellformedweb.org/CommentAPI/">http://geekswithblogs.net/lbugnion/comments/commentRss/149386.aspx</commentRss>      <ping xmlns="http://madskills.com/public/xml/rss/module/trackback/">http://geekswithblogs.net/lbugnion/services/trackbacks/149386.aspx</ping>    </item>    <item>      <title>Declaring an ICommand in Windows 8 Consumer Preview</title>      <link>http://geekswithblogs.net/lbugnion/archive/2012/04/20/declaring-an-icommand-in-windows-8-consumer-preview.aspx</link>      <description>&lt;div&gt;[Update 24/4/2012]&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;Well I'll be… after I posted this, a few people wrote to me and told me they are unable to repro the issue. I then tested again and indeed, it works. No idea why I couldn't get it to work in the first place.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://blog.galasoft.ch/archive/2012/04/24/icommand-issue-in-windows-8-correction.aspx"&gt;More details here.&lt;/a&gt; Sorry about the confusion people!&lt;/div&gt; &lt;img src="http://geekswithblogs.net/lbugnion/aggbug/149379.aspx" width="1" height="1" /&gt;</description>      <creator xmlns="http://purl.org/dc/elements/1.1/">Laurent Bugnion</creator>      <guid>http://geekswithblogs.net/lbugnion/archive/2012/04/20/declaring-an-icommand-in-windows-8-consumer-preview.aspx</guid>      <pubDate>Fri, 20 Apr 2012 14:43:39 GMT</pubDate>      <comment xmlns="http://wellformedweb.org/CommentAPI/">http://geekswithblogs.net/lbugnion/comments/149379.aspx</comment>      <comments>http://geekswithblogs.net/lbugnion/archive/2012/04/20/declaring-an-icommand-in-windows-8-consumer-preview.aspx#feedback</comments>      <comments xmlns="http://purl.org/rss/1.0/modules/slash/">8</comments>      <commentRss xmlns="http://wellformedweb.org/CommentAPI/">http://geekswithblogs.net/lbugnion/comments/commentRss/149379.aspx</commentRss>      <ping xmlns="http://madskills.com/public/xml/rss/module/trackback/">http://geekswithblogs.net/lbugnion/services/trackbacks/149379.aspx</ping>    </item>    <item>      <title>SilverlightShow Interview with Brian Noyes - Presenter of 4 Sessions at Visual Studio Live!New York 4-day Conference</title>      <description>&lt;p&gt;&lt;strong&gt;In this SilverlightShow interview, we talk with Brian Noyes &amp;ndash;presenter at a total of 4 sessions at &lt;a href="http://ads.silverlightshow.net/a.aspx?ZoneID=55&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=47615" target="_blank"&gt;&lt;img alt="" src="http://ads.silverlightshow.net/a.aspx?ZoneID=55&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=47615" width="0" height="0" style="border-width: 0px;border-style: solid;" /&gt;Visual Stuido Live!New York&lt;/a&gt; conference (May 14-17, 2012). The topics of the sessions are: &lt;/strong&gt;&lt;a href="http://vslive.com/Events/New-York-2012/Sessions/Wednesday/W02-Build-Portable-XAML-Client-App-Logic-and-Resources.aspx"&gt;&lt;strong&gt;Building Portable XAML Client App Logic and Resources&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;, &lt;/strong&gt;&lt;a href="http://vslive.com/Events/New-York-2012/Sessions/Tuesday/T17-Building-Extensible-XAML-Client-Apps.aspx"&gt;&lt;strong&gt;Building Extensible XAML Client Apps&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;, &lt;/strong&gt;&lt;a href="http://vslive.com/Events/New-York-2012/Sessions/Wednesday/W09-Learn-to-Behave-Extend-Your-XAML-with-Behaviors.aspx"&gt;&lt;strong&gt;Learn to Behave - Extend Your XAML with Behaviors&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt; and &lt;/strong&gt;&lt;a href="http://vslive.com/Events/New-York-2012/Sessions/Wednesday/W05-Securing-and-Personalizing-Silverlight-5-Client-Apps.aspx"&gt;&lt;strong&gt;Securing and Personalizing Silverlight 5 Client Apps&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;.     &lt;br /&gt;As we have announced, SilverlightShow is the &lt;/strong&gt;&lt;a href="http://vslive.com/events/new-york-2012/information/sponsors.aspx"&gt;&lt;strong&gt;Social Media Premiere Partner&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt; for this conference and we are &lt;/strong&gt;&lt;a href="http://www.silverlightshow.net/community/contest_vslive_NY.aspx"&gt;&lt;strong&gt;sending one SilverlightShow member to this conference for free&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;.&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;About Brian:&lt;/em&gt;&lt;/strong&gt;&lt;em&gt; &lt;/em&gt;&lt;em&gt;Brian Noyes is Chief Architect of IDesign Inc, a Microsoft Regional Director and Microsoft MVP. Brian is a frequent top rated speaker at conferences including VSLive, Microsoft TechEd US, EU, Africa, and Asia, DevConnections, DevTeach and others. Brian is author of Developers Guide to Microsoft Prism 4, Developing Applications with Windows Workflow Foundation, Data Binding in Windows Forms 2.0, and Smart Client Deployment with ClickOnce. Brian got started programming as a hobby while flying F-14 Tomcats in the US Navy, later turning his passion for code into his current career.&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;Brian is also a recognized &lt;/em&gt;&lt;a href="http://www.silverlightshow.net/Search/Learn.aspx?q=brian-noyes"&gt;&lt;em&gt;article&lt;/em&gt;&lt;/a&gt;&lt;em&gt; and &lt;/em&gt;&lt;a href="http://www.silverlightshow.net/ebooks.aspx"&gt;&lt;em&gt;ebook&lt;/em&gt;&lt;/a&gt;&lt;em&gt; author at SilverlightShow, as well as one of our most appreciated &lt;/em&gt;&lt;a href="http://www.silverlightshow.net/Webinars.aspx"&gt;&lt;em&gt;webinar&lt;/em&gt;&lt;/a&gt;&lt;em&gt; presenters (join his upcoming webinar on May 30: &lt;/em&gt;&lt;a href="http://www.silverlightshow.net/news/Webinar-Prism-and-WCF-RIA-Services.aspx"&gt;&lt;em&gt;Prism and WCF: Two Great Toolkits that Work Great Together&lt;/em&gt;&lt;/a&gt;&lt;em&gt;). &lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;SilverlightShow: Hi Brian! Your 4 upcoming sessions in VS Live! New York event are currently among the ones attracting most interest, according to the organizers. Why do you think is that?&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;BN:&lt;/strong&gt; A lot of people either have a deep investment in XAML client technologies already or are headed in that direction now that it is clear XAML has a long and vibrant future being one of the primary ways of building Windows 8 client applications. My topics target both those in the trenches using XAML today and are focused on topics that will help them write cleaner, more maintainable and well designed application, as well as helping them understand how to position those apps for moving to Windows 8 at the point where it makes sense to do so.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;SilverlightShow&lt;/strong&gt; : &lt;strong&gt;Your&lt;/strong&gt;&lt;a href="http://vslive.com/Events/New-York-2012/Sessions/Wednesday/W02-Build-Portable-XAML-Client-App-Logic-and-Resources.aspx"&gt;&lt;strong&gt; first session&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt; covers porting existing WPF / Silverlight apps to Win 8 / Metro. This seems to be a big concern for developers, judging by our &lt;/strong&gt;&lt;a href="http://www.silverlightshow.net/Webinars.aspx"&gt;&lt;strong&gt;recent webinar sessions on Win 8&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;. What are the top difficulties developers face when porting an app to Win 8, and how will you address them in your session?&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;BN:&lt;/strong&gt; The first and most important thing to is have a clear understand of what kinds of code can be reused, in some form, between the old and new XAML technologies. Just because both use XAML and C#/VB doesn&amp;rsquo;t mean it is a seamless transition. The good news is that developer skills transition pretty seamlessly. But I&amp;rsquo;ll got through a number of concrete examples to show specifically what kinds of code can be shared without modification, what requires little tweaks, and what is complete throw away &amp;ndash; both in the XAML code and in the supporting C# or VB. I&amp;rsquo;ll show concrete examples of things like styles and templates from WPF and Silverlight that will or will not work on the new platform and show how to design code like view models to work on both platforms. The bottom line is that attendees should walk away with their expectations set correctly &amp;ndash; not expecting that everything will just move over seamlessly, but also definitely not a complete rewrite if they start following certain patterns in their XAML and code today in Silverlight and WPF.&lt;/p&gt;&lt;p style="text-align: center;"&gt;&lt;a href="http://ads.silverlightshow.net/a.aspx?ZoneID=57&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=79518" target="_blank"&gt;&lt;img alt="" src="http://ads.silverlightshow.net/a.aspx?ZoneID=57&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=79518" width="468" height="60" style="border-width: 0px;border-style: solid;" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;SilverlightShow&lt;/strong&gt; : &lt;strong&gt;One of your sessions is on &lt;/strong&gt;&lt;a href="http://vslive.com/Events/New-York-2012/Sessions/Wednesday/W05-Securing-and-Personalizing-Silverlight-5-Client-Apps.aspx"&gt;&lt;strong&gt;Securing and Personalizing Silverlight 5 Client Apps&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;. Does Silverlight 5 lack something to become the perfect technology for LOB applications?&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;BN:&lt;/strong&gt; OK, I have to admit a sarcastic answer pops to mind: &amp;ldquo;A clear future?&amp;rdquo; Certainly the biggest problem Silverlight 5 has today is the uncertainty over the future evolution of Silverlight and whether there will be future versions and what that means in terms of using it today. But that is something I can&amp;rsquo;t really address myself other than to say &amp;ndash; Silverlight is a fantastic technology for building desktop client applications today and for at least a number of years to come. In terms of the talk, one thing Silverlight itself lacks a little out of the box are built in security features on the client side. That is a big part of what this talk is about &amp;ndash; leveraging everything Silverlight has in the box, and then supplementing it with WCF RIA Services which provides some very rich security and personalization mechanisms for both the client and service side.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;SilverlightShow&lt;/strong&gt; : &lt;strong&gt;From the total list of 4 sessions, which one do you think would be most challenging for the attendees, and why?&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;BN:&lt;/strong&gt; Definitely the &lt;a href="http://vslive.com/Events/New-York-2012/Sessions/Tuesday/T17-Building-Extensible-XAML-Client-Apps.aspx"&gt;Buidling Extensible XAML Client Applications&lt;/a&gt; talk, and the reason is sheer density of the material. In this talk I am jamming into a 75 minute session how to use the Model-View-ViewModel (MVVM) pattern, Managed Extensibility Framework (MEF) and the Prism toolkit to build highly extensible and loosely coupled applications. That means they have to jump on board and understand the fundamentals of three complex supporting technologies as well as seeing how they all fit together coherently in a very short period of time. Despite that I&amp;rsquo;ve given it a few times in other places and it has been very well received. There are lots of great talks on single technologies, but this one is pretty unique in showing how to combine the three very cleanly. And best of all a good part of the talk is walking through a sample application that shows how it all works that is based on several real world projects I have been the architect for where I have used these techniques with great success.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;SilverlightShow&lt;/strong&gt; &lt;strong&gt;: And which topic was most challenging for you to prepare? And why did you decide to go for it?&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;BN:&lt;/strong&gt; It is a coin toss between the &lt;a href="http://vslive.com/Events/New-York-2012/Sessions/Wednesday/W02-Build-Portable-XAML-Client-App-Logic-and-Resources.aspx"&gt;Building Portable XAML App Logic and Resources&lt;/a&gt; and the &lt;a href="http://vslive.com/Events/New-York-2012/Sessions/Tuesday/T17-Building-Extensible-XAML-Client-Apps.aspx"&gt;Building Extensible XAML Client Applications&lt;/a&gt; talks. The first because it is all new technology moving onto the WinRT platform and trying to figure out what works and what doesn&amp;rsquo;t without a lot of samples or documentation to go by, and the latter for just trying to figure out how to cover everything I need to convey the essence of three deep technologies and how they fit together in a single session. Bottom line I like picking challenging topics that I know the hard core developers will drink in. There are lots of choices for learning the mainstream topics, but I try to go for more niche but hard to answer on your own topics.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;SilverlightShow&lt;/strong&gt; : &lt;strong&gt;We currently have a &lt;/strong&gt;&lt;a href="http://www.silverlightshow.net/community/contest_vslive_NY.aspx"&gt;&lt;strong&gt;contest running, giving one free pass to VS Live! New York&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;. Contestants are asked to provide their top reason for wanting to join this event. What would you suggest them as a top reason for joining this conference?&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;BN:&lt;/strong&gt; VSLive! is a great show with a dazzling line of the best speakers that I am honored to get to join into. It&amp;rsquo;s a great location, with well picked topics and speakers but not so big that the attendees get lost in the crowd &amp;ndash; there are plenty of opportunities to track down the speakers and ask questions and learn a lot while having fun in just a few days time.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;SilverlightShow: How and where may conference attendees meet you during the conference?&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;BN:&lt;/strong&gt; The best bet is always to corner me right before or after one of my sessions, I always try to make point of sticking around outside the room to get all the questions answered that come up afterwards. I also encourage people to come up and talk to me before the talk as well &amp;ndash; too often people come in and sit quietly, but that is a great time to get a discussion going that can influence what I cover in the talk. I&amp;rsquo;ll also be wandering around in the expo hall area and people can always find me on Twitter &lt;a href="http://twitter.com/briannoyes"&gt;@briannoyes&lt;/a&gt; and try to arrange a meet up.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Thanks Brian for this interview! Wish you, as well as our free pass winner, a great conference event!&lt;/strong&gt;&lt;/p&gt;</description>      <link>http://www.silverlightshow.net/items/SilverlightShow-Interview-with-Brian-Noyes-Presenter-of-4-Sessions-at-Visual-Studio-Live-New-York-4-day-Conference.aspx</link>      <author>editorial@silverlightshow.net (Silverlight Show )</author>      <comments>http://www.silverlightshow.net/items/SilverlightShow-Interview-with-Brian-Noyes-Presenter-of-4-Sessions-at-Visual-Studio-Live-New-York-4-day-Conference.aspx#comments</comments>      <guid isPermaLink="true">http://www.silverlightshow.net/items/SilverlightShow-Interview-with-Brian-Noyes-Presenter-of-4-Sessions-at-Visual-Studio-Live-New-York-4-day-Conference.aspx</guid>      <pubDate>Fri, 20 Apr 2012 12:18:37 GMT</pubDate>    </item>    <item>      <title>"If I have seen further, it is by standing on the shoulders of giants" [An alternate implementation of HTTP gzip decompression for Windows Phone]</title>      <link>http://blogs.msdn.com/b/delay/archive/2012/04/19/quot-if-i-have-seen-further-it-is-by-standing-on-the-shoulders-of-giants-quot-an-alternate-implementation-of-http-gzip-decompression-for-windows-phone.aspx</link>      <pubDate>Thu, 19 Apr 2012 16:56:00 GMT</pubDate>      <guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10295435</guid>      <creator xmlns="http://purl.org/dc/elements/1.1/">David Anson</creator>      <comments xmlns="http://purl.org/rss/1.0/modules/slash/">2</comments>      <wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/delay/rsscomments.aspx?WeblogPostID=10295435</wfw:commentRss>      <comments>http://blogs.msdn.com/b/delay/archive/2012/04/19/quot-if-i-have-seen-further-it-is-by-standing-on-the-shoulders-of-giants-quot-an-alternate-implementation-of-http-gzip-decompression-for-windows-phone.aspx#comments</comments>      <description>&lt;div class="delay"&gt;&lt;p&gt;The &lt;a href="http://en.wikipedia.org/wiki/HTTP"&gt;HTTP protocol&lt;/a&gt; supports &lt;a href="http://en.wikipedia.org/wiki/Data_compression"&gt;data compression&lt;/a&gt; of network traffic via the &lt;a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11"&gt;Content-Encoding header&lt;/a&gt;. Compressing network traffic is beneficial because it reduces the amount of data that needs to be transmitted over the network - and sending fewer bytes obviously takes less time! The tradeoff is that it takes a bit of extra work to &lt;em&gt;de&lt;/em&gt;compress the data, but because the bottleneck is nearly always network, HTTP compression should be a win pretty much every time. And when you're dealing with comparatively slow, unreliable networks like the ones used by cell phones, the advantages of compression are even more significant.&lt;/p&gt;&lt;blockquote&gt;&lt;strong&gt;Aside&lt;/strong&gt;: Because most networks are lossy and transfer data in &lt;a href="http://en.wikipedia.org/wiki/Packet_(information_technology)"&gt;packets&lt;/a&gt;, sending just &lt;em&gt;one&lt;/em&gt; fewer byte can be meaningful if it reduces the number of packets.&lt;/blockquote&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;You might reasonably expect that enabling compression for Windows Phone web requests is as simple as setting the &lt;a href="http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.automaticdecompression.aspx"&gt;HttpWebRequest.AutomaticDecompression property&lt;/a&gt; available since .NET 2.0. Unfortunately, this property is &lt;strong&gt;not&lt;/strong&gt; supported by current versions of the Windows Phone platform, so it's up to application developers to add HTTP compression support themselves. Consequently, a number of home-grown solutions have cropped up.&lt;/p&gt;&lt;p&gt;One popular example is &lt;a href="http://www.sharpgis.net/post/2011/05/29/GZIP-Compressed-Web-Requests-in-WP7.aspx"&gt;Morten Nielsen's GZipWebClient&lt;/a&gt;. Naturally, Morten didn't want to implement his own compression library, so he's using &lt;a href="http://sharpziplib.com/"&gt;SharpZipLib&lt;/a&gt; to do the heavy lifting. This is a great example of reuse, but it's important to note that SharpZipLib is licensed under the &lt;a href="http://en.wikipedia.org/wiki/Gpl"&gt;GNU General Public License (GPL)&lt;/a&gt; and some developers won't be comfortable with the implications of using GPL code in their own project. (For more on what those implications are, the &lt;a href="http://en.wikipedia.org/wiki/Gpl"&gt;Wikipedia article for GPL&lt;/a&gt; has a fairly detailed overview which includes mention of ambiguities around the definition of "derivative works".)&lt;/p&gt;&lt;blockquote&gt;&lt;strong&gt;Aside&lt;/strong&gt;: Of course, there are other options. Another popular library is &lt;a href="http://dotnetzip.codeplex.com/"&gt;DotNetZip&lt;/a&gt; which claims to be under the &lt;a href="http://opensource.org/licenses/ms-pl.html"&gt;MS-PL (Microsoft Public License)&lt;/a&gt;, the same permissive "do pretty much whatever you want with the code" license I use for this blog. However, a brief look at the license files it comes with suggests &lt;a href="http://dotnetzip.codeplex.com/SourceControl/changeset/view/81674#1579682"&gt;maybe that's&lt;/a&gt; not &lt;a href="http://dotnetzip.codeplex.com/SourceControl/changeset/view/81674#1638503"&gt;the whole story&lt;/a&gt; because there are at least four &lt;em&gt;other&lt;/em&gt; licenses called out there.&lt;/blockquote&gt;&lt;p&gt;As you can probably tell, I'm not the biggest fan of lawyers, ambiguity, or unnecessary risk [ &lt;nobr&gt;:)&lt;/nobr&gt; ], so I'm always happy to have a simple, "no restrictions" solution - even if that means I have to create one myself. In this case, what I wanted was a way to decompress gzip data on Windows Phone &lt;em&gt;without&lt;/em&gt; needing a separate library. That's when I remembered &lt;strong&gt;another&lt;/strong&gt; of Morten's posts, this one &lt;a href="http://www.sharpgis.net/post/2009/04/22/REALLY-small-unzip-utility-for-Silverlight.aspx"&gt;about unzipping files under Silverlight&lt;/a&gt;. I figured that maybe if I &lt;a href="http://en.wikipedia.org/wiki/Reese%27s_Peanut_Butter_Cups"&gt;put the chocolate in the peanut butter&lt;/a&gt;, I could come up with a simple, dependency-free solution to the gzip problem on Windows Phone!&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The basic idea is to create a bit of code that customizes the user's &lt;a href="http://msdn.microsoft.com/en-us/library/system.net.webclient(v=vs.95).aspx"&gt;WebClient&lt;/a&gt;/&lt;a href="http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest(v=vs.95).aspx"&gt;HttpWebRequest&lt;/a&gt; to add the &lt;a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.3"&gt;Accept-Encoding&lt;/a&gt; header. Once that's in place, servers that support gzip automatically compress their response bodies. To decompress the downloaded response on the phone, another bit of code is used to wrap the compressed response stream in a &lt;a href="http://en.wikipedia.org/wiki/ZIP_(file_format)"&gt;ZIP archive&lt;/a&gt; and hand it off to &lt;a href="http://msdn.microsoft.com/en-us/library/cc190632(v=VS.95).aspx"&gt;Application.GetResourceStream&lt;/a&gt; which does the heavy lifting and provides access to the decompressed response stream. What's nice about this technique is that the decompression implementation is part of the Silverlight framework - meaning applications don't need to pull in a bunch of external code &lt;strong&gt;or&lt;/strong&gt; increase their size!&lt;/p&gt;&lt;p&gt;I wanted this to be easy, so I've created a &lt;code&gt;WebClient&lt;/code&gt; subclass and all you have to do is change this:&lt;/p&gt;&lt;pre style="color: #000000;"&gt;client = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt;&lt;span style="color: #2b91af;"&gt; WebClient&lt;/span&gt;();&lt;/pre&gt;&lt;p&gt;Into this:&lt;/p&gt;&lt;pre style="color: #000000;"&gt;client = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt;&lt;span style="color: #2b91af;"&gt; &lt;span style="background-color: yellow;"&gt;Gzip&lt;/span&gt;WebClient&lt;/span&gt;();&lt;/pre&gt;&lt;p&gt;After which your application's HTTP requests will &lt;strong&gt;automatically&lt;/strong&gt; benefit from gzip compression!&lt;/p&gt;&lt;p&gt;Of course, some people like to work a little closer to the metal and I've done a similar thing for the &lt;code&gt;HttpWebRequest&lt;/code&gt;/&lt;code&gt;HttpWebResponse&lt;/code&gt; crowd. Change this:&lt;/p&gt;&lt;pre style="color: #000000;"&gt;request = &lt;span style="color: #2b91af;"&gt;WebRequest&lt;/span&gt;.CreateHttp(_uri);request.BeginGetResponse(callback, request);&lt;span style="color: #008000;"&gt;// ... &lt;/span&gt;response = (&lt;span style="color: #2b91af;"&gt;HttpWebResponse&lt;/span&gt;)request.EndGetResponse(result);stream = response.GetResponseStream();&lt;span style="color: #008000;"&gt;// ...&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;Into this:&lt;/p&gt;&lt;pre style="color: #000000;"&gt;request = &lt;span style="color: #2b91af;"&gt;WebRequest&lt;/span&gt;.CreateHttp(_uri);request.BeginGet&lt;span style="background-color: yellow;"&gt;Compressed&lt;/span&gt;Response(callback, request);&lt;span style="color: #008000;"&gt;// ... &lt;/span&gt;response = (&lt;span style="color: #2b91af;"&gt;HttpWebResponse&lt;/span&gt;)request.EndGetResponse(result);stream = response.Get&lt;span style="background-color: yellow;"&gt;Compressed&lt;/span&gt;ResponseStream();&lt;span style="color: #008000;"&gt;// ...&lt;/span&gt;&lt;/pre&gt;&lt;p&gt;And you're set!&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Great, that's all well and good, but &lt;em&gt;does any of this really matter&lt;/em&gt;? &lt;a href="http://en.wikipedia.org/wiki/Minimalism"&gt;Less is clearly more&lt;/a&gt;, but is there actually a noticeable difference when using gzip? I wanted to answer that question for myself, so the sample application for this post not only exercises the code I've written, it also acts as a simple, real-time performance report! The sample makes continuous requests for &lt;a href="http://microsoft.com/"&gt;http://microsoft.com/&lt;/a&gt; using &lt;code&gt;WebClient&lt;/code&gt;, standard &lt;code&gt;HttpWebRequest&lt;/code&gt;/&lt;code&gt;HttpWebResponse&lt;/code&gt;, my custom &lt;code&gt;GzipWebClient&lt;/code&gt;, my &lt;code&gt;Compressed&lt;/code&gt; helpers for &lt;code&gt;HttpWebRequest&lt;/code&gt;/&lt;code&gt;HttpWebResponse&lt;/code&gt;, and (optionally) Morten's &lt;code&gt;GZipWebClient&lt;/code&gt; (for comparison purposes). As the data is collected, it's charted via the &lt;a href="http://cesso.org/r/DVLinks"&gt;Silverlight Toolkit's Data Visualization library&lt;/a&gt; (&lt;a href="http://blogs.msdn.com/b/delay/archive/2010/08/04/why-didn-t-i-think-of-that-in-the-first-place-windows-phone-7-charting-example-updated-to-include-reusable-platform-consistent-style-and-templates.aspx"&gt;which I've previously shown running on Windows Phone&lt;/a&gt;).&lt;/p&gt;&lt;p&gt;Here's what it looks like running in the emulator using a wired connection:&lt;/p&gt;&lt;img title="GzipDemo on Windows Phone" alt="GzipDemo on Windows Phone" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-60-92-metablogapi/5658.GzipDemo_2D00_Emulator.png" width="400" height="240" /&gt;&lt;p&gt;In the chart above, you can clearly see which requests are using gzip and which aren't! Not only are the gzip-enabled requests noticeably faster &lt;em&gt;on average&lt;/em&gt;, they're nearly &lt;strong&gt;always&lt;/strong&gt; faster even in the worst case. What's more, while there's variability for both kinds of requests (that's part of how the internet works), the delta between best/worst times of gzip-compressed requests is smaller (i.e., they're more consistent).&lt;/p&gt;&lt;p&gt;That's pretty compelling data, but the &lt;strong&gt;real&lt;/strong&gt; benefit comes when the phone's data connection is used. Here's the output from the same app using the cell network (via Excel this time):&lt;/p&gt;&lt;img title="HTTP Request Performance" alt="HTTP Request Performance" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-60-92-metablogapi/0572.GzipDemo_2D00_Performance.png" width="554" height="315" /&gt;&lt;p&gt;All our previous observations remain true - and are even more pronounced in this scenario. Gzip-compressed HTTP requests are &lt;em&gt;significantly&lt;/em&gt; faster (taking less than half the time) and more predictable than traditional requests for the same data.&lt;/p&gt;&lt;p&gt;Awesome!&lt;/p&gt;&lt;blockquote&gt;&lt;strong&gt;Aside&lt;/strong&gt;: Based on the chart above, it seems reasonable to claim all three gzip solutions are equivalent. That said, if you squint just right, it looks like using &lt;code&gt;HttpWebRequest&lt;/code&gt; is - on average - marginally quicker than using &lt;code&gt;WebClient&lt;/code&gt; (as you'd expect; &lt;code&gt;WebClient&lt;/code&gt; calls &lt;code&gt;HttpWebRequest&lt;/code&gt; under the covers). Additionally, &lt;code&gt;SharpGIS.GZipWebClient&lt;/code&gt; appears to be - on average - very &lt;em&gt;slightly&lt;/em&gt; quicker than &lt;code&gt;Delay.GzipWebClient&lt;/code&gt; (which is also not surprising when you consider the hoops my code jumps through to avoid the external dependency). Bear in mind, though, that these differences only really show up at the millisecond level, and seem unlikely to be significant for most real-world scenarios.&lt;/blockquote&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt; &lt;a href="http://cesso.org/Samples/GzipDemo/GzipDemo.zip"&gt;[Click here to download the source code for the gzip helper classes and the sample application shown above]&lt;/a&gt; &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;OR&lt;/p&gt;&lt;p&gt;&lt;strong&gt; &lt;a href="http://nuget.org/packages/Delay.GzipWebClient"&gt;[Click here to visit the NuGet gallery page for &lt;code&gt;Delay.GzipWebClient&lt;/code&gt; which contains the code for both gzip helper classes]&lt;/a&gt; &lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Notes&lt;/strong&gt;:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;Using the code I've authored is quite easy:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;If you want to use &lt;code&gt;GzipWebClient&lt;/code&gt;, simply add the &lt;code&gt;GzipWebClient.cs&lt;/code&gt; and &lt;code&gt;GzipExtensions.cs&lt;/code&gt; files to your project, reference the &lt;code&gt;Delay&lt;/code&gt; namespace, and replace any instances of &lt;code&gt;WebClient&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;If you're a &lt;code&gt;HttpWebRequest&lt;/code&gt;/&lt;code&gt;HttpWebResponse&lt;/code&gt; fan, you only need to add &lt;code&gt;GzipExtensions.cs&lt;/code&gt; to your project, reference the &lt;code&gt;Delay&lt;/code&gt; namespace, and invoke the extension methods &lt;code&gt;HttpWebRequest.BeginGetCompressedResponse&lt;/code&gt; and &lt;code&gt;HttpWebResponse.GetCompressedResponseStream&lt;/code&gt; (as shown above).&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;By default, the sample application does not include Morten's &lt;code&gt;GZipWebClient&lt;/code&gt; because I don't want to get into the business of distributing someone else's code. However it's easy to include - the following comment in &lt;code&gt;MainPage.xaml.cs&lt;/code&gt; tells you how:&lt;/p&gt;&lt;pre style="color: #008000;"&gt;// For an additional scenario, un-comment the following line and install the "SharpGIS.GZipWebClient" NuGet package//#define SHARPGIS&lt;/pre&gt;&lt;p&gt;The code to use that assembly is already in the sample application; you just need to provide the bits if you want to try it out. &lt;nobr&gt;:)&lt;/nobr&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;The implementation of the gzip-to-ZIP wrapper is fairly straightforward: it reads the gzip-compressed response from the server, wraps it in a stream that represents a valid ZIP archive with a single file compressed using the &lt;a href="http://en.wikipedia.org/wiki/Deflate"&gt;deflate algorithm&lt;/a&gt; which both specifications share, and hands that off to the Silverlight framework to return a decompressed stream for that file. To be clear, the compressed data isn't altered - it's simply re-packaged into a format that's more useful. &lt;nobr&gt;:)&lt;/nobr&gt; If you're interested in the specifics, you'll probably want to familiarize yourself with the &lt;a href="http://tools.ietf.org/rfc/rfc1952.txt"&gt;gzip specification&lt;/a&gt; and the &lt;a href="http://www.pkware.com/documents/casestudies/APPNOTE.TXT"&gt;ZIP file specification&lt;/a&gt; and then have a look at the code.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;There are two minor inefficiencies in my code, one of which seems unavoidable and the other of which could be dealt with.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;The unavoidable one - and the reason I think SharpZipLib might be a smidge quicker - is that the size/checksum data for the gzip data is provided at the &lt;strong&gt;end&lt;/strong&gt; of the download stream, but is needed at the &lt;strong&gt;beginning&lt;/strong&gt; of the wrapper stream. If the correct values aren't used, the ZIP wrapper will be rejected - but those values are not known until the entire response has been downloaded. Therefore, it's not possible for my implementation to proactively process the data while it is being downloaded; the download must be buffered instead. A decompression library won't suffer from this limitation and ought to be quicker as a result.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;The avoidable inefficiency is that a single copy of the input data is made when creating the ZIP wrapper stream. To be clear, this is the &lt;em&gt;only&lt;/em&gt; time data is copied (I've structured the code so there isn't any buffer resizing, etc.), but it's not technically necessary because the ZIP wrapper stream &lt;em&gt;could&lt;/em&gt; operate directly from the download buffers. I may make this improvement in the future, but expect the performance difference to be negligible.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Compressing HTTP traffic is a pretty clear win for desktop applications - and an even bigger benefit for mobile apps communicating over slower, less reliable cellular networks. The Windows Phone platform doesn't make using gzip easy, but it's possible if you're sufficiently motivated. For people who aren't intimidated by licenses, there are already some good options for gzip - but for those who aren't comfortable with what's out there, I'm offering a &lt;strong&gt;new&lt;/strong&gt; option under one of the most permissive licenses around.&lt;/p&gt;&lt;p&gt;I hope you find it useful!&lt;/p&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10295435" width="1" height="1"&gt;</description>      <category domain="http://blogs.msdn.com/b/delay/archive/tags/Technical/">Technical</category>      <category domain="http://blogs.msdn.com/b/delay/archive/tags/Silverlight/">Silverlight</category>      <category domain="http://blogs.msdn.com/b/delay/archive/tags/Silverlight+Toolkit/">Silverlight Toolkit</category>      <category domain="http://blogs.msdn.com/b/delay/archive/tags/Windows+Phone/">Windows Phone</category>    </item>    <item>      <title>Workaround for CA0055 Error with Silverlight Projects in Visual Studio 2010</title>      <link>http://feedproxy.google.com/~r/TheSilverlightBlog/~3/6CBhP2txuEk/workaround-for-ca0055-error-with-silverlight-projects-in-visual-studio-2010.aspx</link>      <pubDate>Wed, 18 Apr 2012 18:33:00 GMT</pubDate>      <guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10295053</guid>      <creator xmlns="http://purl.org/dc/elements/1.1/">Silverlight Team</creator>      <comments xmlns="http://purl.org/rss/1.0/modules/slash/">0</comments>      <commentRss xmlns="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/silverlight/rsscomments.aspx?WeblogPostID=10295053</commentRss>      <comments>http://blogs.msdn.com/b/silverlight/archive/2012/04/18/workaround-for-ca0055-error-with-silverlight-projects-in-visual-studio-2010.aspx#comments</comments>      <description>&lt;p&gt;&lt;a href="https://connect.microsoft.com/VisualStudio/feedback/details/713608/ca0055-silverlight5-business-application-project"&gt;This connect bug&lt;/a&gt; describes an issue with creating certain types of Silverlight projects in Visual Studio. If you're referencing Silverlight 4 DLLs from a Silverlight 5 project, you may run into this &lt;a href="http://msdn.microsoft.com/en-us/library/y8hcsad3(v=vs.80).aspx"&gt;code analysis/FXCop&lt;/a&gt; issue yourself if code analysis is part of your process. The core of the problem is a versioning decision in Silverlight 5 which results in compile-time violation due to loading two different versions of mscorlib in the same project. It manifests as the following error:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Error 2 CA0055 : Could not unify the platforms (mscorlib, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, mscorlib, Version=5.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) for 'MyProject.Silverlight\obj\Debug\MyProject.dll'.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;More &lt;a href="http://msdn.microsoft.com/en-us/library/ms244741.aspx"&gt;information on CA0055 may be found on MSDN&lt;/a&gt;.&lt;/p&gt;  &lt;h5&gt;How to Reproduce the Issue … in theory&lt;/h5&gt;  &lt;p&gt;In theory, all you need to do to reproduce the issue is reference a SL4-targeted DLL from an SL5 application. However, in practice, there are other factors in play. For example, it may matter which mscorlib version gets loaded first.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://10rem.net/blog/2012/04/17/workaround-for-ca0055-error-with-silverlight-projects-in-visual-studio-2010"&gt;Read more…&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10295053" width="1" height="1"&gt;&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/QhGVvnc_Noy354W5X_Ju1Rem9Xk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/QhGVvnc_Noy354W5X_Ju1Rem9Xk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/QhGVvnc_Noy354W5X_Ju1Rem9Xk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/QhGVvnc_Noy354W5X_Ju1Rem9Xk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;&lt;a href="http://feeds.feedburner.com/~ff/TheSilverlightBlog?a=6CBhP2txuEk:67vtTUwpIcs:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheSilverlightBlog?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheSilverlightBlog?a=6CBhP2txuEk:67vtTUwpIcs:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheSilverlightBlog?i=6CBhP2txuEk:67vtTUwpIcs:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/TheSilverlightBlog?a=6CBhP2txuEk:67vtTUwpIcs:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/TheSilverlightBlog?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/TheSilverlightBlog/~4/6CBhP2txuEk" height="1" width="1"/&gt;</description>      <category domain="http://blogs.msdn.com/b/silverlight/archive/tags/Tips+and+Training/">Tips and Training</category>      <origLink xmlns="http://rssnamespace.org/feedburner/ext/1.0">http://blogs.msdn.com/b/silverlight/archive/2012/04/18/workaround-for-ca0055-error-with-silverlight-projects-in-visual-studio-2010.aspx</origLink>    </item>    <item>      <title>Windows 8 Metro: Starting your first App from scratch</title>      <description>&lt;table width="20"&gt;    &lt;tbody&gt;        &lt;tr&gt;            &lt;td&gt;            &lt;div class="fb-like" data-show-faces="true" data-send="false" data-href="http://www.silverlightshow.net/items/Windows-8-Metro-Starting-your-first-App-from-scratch.aspx" data-font="segoe ui" data-layout="button_count"&gt;&lt;/div&gt;            &lt;/td&gt;            &lt;td&gt;&lt;a href="https://twitter.com/share" class="twitter-share-button" data-via="silverlightshow" data-counturl="http://www.silverlightshow.net/items/Windows-8-Metro-Starting-your-first-App-from-scratch.aspx" data-count="horizontal" data-text="Read @aboschin's article '#Windows8 Metro: Starting your 1st App from scratch' #win8 #win8dev" data-url="http://slshow.net/IREer7"&gt;Tweet&lt;/a&gt;&lt;/td&gt;            &lt;td&gt;&lt;g:plusone size="medium" href="http://www.silverlightshow.net/items/Windows-8-Metro-Starting-your-first-App-from-scratch.aspx"&gt;&lt;/g:plusone&gt;            &lt;/td&gt;            &lt;td&gt;            &lt;/td&gt;        &lt;/tr&gt;    &lt;/tbody&gt;&lt;/table&gt;&lt;div style="border:1px solid #dddddd;border-image: initial; background-color: #f3f3f3; margin-top: 5px; margin-left: 150px; padding-left: 10px; padding-top: 10px; width: 400px; text-align: center;"&gt;&lt;strong&gt;&lt;a href="http://www.silverlightshow.net/Storage/Sources/Application1.zip"&gt;Download the source code for this article&lt;/a&gt;&lt;/strong&gt;&lt;ul&gt;&lt;/ul&gt;&lt;/div&gt;&lt;p style="text-align: justify;"&gt;&amp;nbsp;&lt;br /&gt;After the &lt;a href="http://www.silverlightshow.net/items/Windows-8-Metro-Create-your-apps-with-simplicity-in-mind.aspx" target="_self"&gt;first article in this series&lt;/a&gt;, where I briefly discussed about design aspects of the new Metro interface, involving simplicity, flatness, emptiness and the pillars of this new beautiful paradigm, as promised, it is now time to start exploring the tools available to start create your applications. &lt;/p&gt;&lt;div style="border:1px solid #dddddd;border-image: initial; padding-bottom: 5px; background-color: #f3f3f3; margin-top: 5px; padding-left: 10px; width: 200px; float: right; margin-left: 10px; margin-right: 5px; padding-top: 5px;"&gt;&lt;h3&gt;Don't miss...&lt;/h3&gt;&lt;ul style="list-style-type: circle; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 20px; font-size: 12px;"&gt;    &lt;li style="padding-bottom: 5px;"&gt;&lt;a href="http://www.silverlightshow.net/Webinars.aspx"&gt;Our two Win 8 webinars on April 24 and May 17&lt;/a&gt; &lt;/li&gt;    &lt;li style="padding-bottom: 5px;"&gt;&lt;a href="http://www.silverlightshow.net/items/Windows-8-and-the-future-of-XAML-Part-1-An-overview-of-the-Windows-8-platform.aspx"&gt;The article series: Windows 8 and the future of XAML&lt;/a&gt; &lt;/li&gt;    &lt;li style="padding-bottom: 5px;"&gt;&lt;a href="http://www.silverlightshow.net/ebooks/wp75.aspx"&gt;Ebook by A. Boschin: WP 7.5 Fundamentals&lt;/a&gt; &lt;/li&gt;&lt;/ul&gt;&lt;p style="padding-bottom: 5px; text-align: center;"&gt;&lt;a href="http://www.silverlightshow.net/ebooks/wp75.aspx" target="_self"&gt;&lt;img style="width: 70px; height: 99px;" alt="Ebook: Windows Phone 7.5 Fundamentals" src="http://www.silverlightshow.net/Storage/Ebooks/wp75_thumb.png" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="http://www.silverlightshow.net/ebooks.aspx"&gt;All SilverlightShow Ebooks&lt;/a&gt;&amp;nbsp;&lt;img alt="" src="http://www.silverlightshow.net/Storage/arrow-content.jpg" /&gt;&lt;/p&gt;&lt;/div&gt;At the date of this article, you have to be aware that I'm discussing about the "Windows 8 Consumer Preview" bits so, when then next releases will be available, something I've written might become obsolete due to changes made by the team. However, being at the second public preview of Windows 8 means that it is sufficiently stable to write something of reliable.&lt;p style="text-align: justify;"&gt;To follow this article and probably the next ones, it is obviously required an installation of Windows 8 CP. You can download it from &lt;a href="http://msdn.microsoft.com/en-us/windows/apps/br229516" target="_blank"&gt;this page&lt;/a&gt;. After you installed the operating system, you have to install Visual Studio 11 Express beta and Blend. These tools are included in the SDK you can download from the same page. My suggestion is to use a Virtual Machine to host all this software because when it will be obsoleted by a new version you can easily delete the virtual machine and create another one from scratch. Finally, it is important to download the "design assets", a 48MB zip files that contains a number of templates and images to help designers and developer to work with Metro constraints. I will be back to some of these templates in following articles.&lt;/p&gt;&lt;h4 style="text-align: justify;"&gt;Meet the Visual Studio IDE&lt;/h4&gt;&lt;p style="text-align: justify;"&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/AndreaBoschin/_image_2.png"&gt;&lt;img style="margin-top: 15px; margin-right: 20px; margin-bottom: 5px; margin-left: 0px; display: inline; float: left;" title="image" alt="image" src="http://www.silverlightshow.net/Storage/Users/AndreaBoschin/__image_thumb.png" width="302" height="450" /&gt;&lt;/a&gt;Give that you downloaded and installed all the requirements, I guess you have firstly opened Visual Studio 2011 and problably you have been doomed by the great difference between its IDE and the previous versions. Since Visual Studio 2010 has been a big step with its new user interface, the IDE you have just opened makes a triple jump forward and embraces a number of Metro UI pillars, first of all the one I posed at the first in my list, that says "Be Authentically Digital". The new Visual Studio IDE have lost any minimal &lt;a href="http://medialoot.com/blog/skeuomorphic-design/" target="_blank"&gt;skeuomorphism&lt;/a&gt; in favor of a more flat appearance. &lt;/p&gt;&lt;p style="text-align: justify;"&gt;At the moment I've suspended my judgement about this new look&amp;amp;feel. The reason for this suspension is that I'm too much accustomed to the older interface and I'm now too much confused to be objective in my judgment but I need to be in touch with it for sometime to understand if this interpretation of Metro pillars makes me happy. What I can say at the moment is that I do not have any nostalgia of the skeuomorphic UI of VS2010 but I think they should have to use a more wide palette to avoid to make interface flatness to be semantically flat. &lt;/p&gt;&lt;p style="text-align: justify;"&gt;From the functional point of view, the IDE has a number of advantages. As an example I've added a screenshoot of the new Solution Explorer. What immediately catches the eye is the new hierarchy that is able to show the structure of the classes, methods, properties and so on. Another new feature is the automatic preview of files. When you select a file in the explorer, it is automatically opened as an interactive preview and if you make a change in the code, the file is finally opened. Hard to explain but simple to try if you select *.cs files in the tree.&lt;/p&gt;&lt;h4 style="text-align: justify;"&gt;Create and understand the project structure&lt;/h4&gt;&lt;p style="text-align: justify;"&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/AndreaBoschin/image_4.png"&gt;&lt;img style="margin-top: 10px; margin-right: 0px; margin-bottom: 0px; margin-left: 15px; display: inline; float: right;" title="image" alt="image" src="http://www.silverlightshow.net/Storage/Users/AndreaBoschin/image_thumb_1.png" width="191" height="126" /&gt;&lt;/a&gt;Once you gained the "New Project" window from the start screen or from the File menu, you choose between a number of templates. Metro applications can be created using two ways. If you like you can embrace HTML5 and Javascript or you can choose to use XAML coupled with C#, VB.NET or C++. The choose of the language to use currently is not matter of features because there are very few differences between what you can do in HTML or XAML. It is for sure matter of skills and development effort. Coupling XAML with C# is the most effective and fast way to develop a Metro application and it should be the primary choice when you are doing something more than an exercise. C# let you have real object orientation, compile time checking and other facilities. If you or your team have strong HTML skills, nothing prevent you from use it and Javascript but you have to plan for almost double or triple of the development time. It is for this reason in this series I will cover primary XAML and C#. &lt;/p&gt;&lt;p style="text-align: justify;"&gt;The templates in Visual Studio are modeled on this choice; you have templates for HTML+Javascript, XAML+C#, XAML+VB and XAML+C++. As the figure shows you have three templatates available:&lt;/p&gt;&lt;ul&gt;    &lt;li&gt;    &lt;div style="text-align: justify;"&gt;Blank: is the most simple template and probably it will be always the better point to start from. &lt;/div&gt;    &lt;/li&gt;    &lt;li&gt;    &lt;div style="text-align: justify;"&gt;Grid: It creates an application the uses the new GridView control as the main Application Hub.&lt;/div&gt;    &lt;/li&gt;    &lt;li&gt;    &lt;div style="text-align: justify;"&gt;Split: It is an example of an application that splits contents in columns.&lt;/div&gt;    &lt;/li&gt;&lt;/ul&gt;&lt;p style="text-align: justify;"&gt;If Grid and Split templates are good for the first exercises, the Blank Application template is probably to most useful for real world purposes. After you create the project you will get the structure shown in the Solution Explorer screenshot in the previous paragraph. There is a number of items in the project, mostly of them are known to people that have already used Silverlight but other are specific to Metro applications. Here is the most important elements:&lt;/p&gt;&lt;ul&gt;    &lt;li&gt;    &lt;div style="text-align: justify;"&gt;&lt;strong&gt;App.xaml/App.xaml.cs&lt;/strong&gt; - Silverlight, Windows Phone and WPF developers already known this file. It handles the lifetime of the application. In Metro apps it handles events like Launched, Suspending, Activated and Resume. These can be used to manage the state of the application when it is suspended by the operating system. In the OnLaunched method, called when the application starts, it is initialized the main Frame. Metro applications are basically navigable applications; nothing prevents to inject directly a page instead of a Frame but you lose the entire navigation facilities.         &lt;br /&gt;    &lt;/div&gt;    &lt;/li&gt;    &lt;li&gt;    &lt;div style="text-align: justify;"&gt;&lt;strong&gt;BlankPage.xaml&lt;/strong&gt; - This is the first page your application will show. If you want you can change it by editing the App.xaml.cs file and it does not have nothing different from every other page. Every page takes a reference to the main frame and can use it to navigate from one to another.         &lt;br /&gt;    &lt;/div&gt;    &lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;    &lt;li&gt;    &lt;div style="text-align: justify;"&gt;&lt;strong&gt;Application1_TemporaryKey.pfx&lt;/strong&gt; - This file is a self generated certificate, required to sign the application package. To run in the metro AppContainer, an application needs to be signed so Visual Studio automatically generates a certificate and adds it to the project. The certificate is used for development purposes. It happened sometimes I've got errors caused by a not trusted certificate. In the case, you can manually regenerate the certificate or try to add it to the Windows Trust Root store of the machine where you work.         &lt;br /&gt;    &lt;/div&gt;    &lt;/li&gt;    &lt;li&gt;    &lt;div style="text-align: justify;"&gt;&lt;strong&gt;Package.appxmanifest&lt;/strong&gt; - This represents the manifest of the application. The manifest contains all the informations required to run the application, define its capabilities, the way it communicate with other apps and how it is packaged. If you double click the file you get an editor that let you easily change its content. There is a number of things you can define: application logos, orientation, titles and notifications. You can also determine capabilities that is what the application can and can't do. Finally if you needs to manage the certificate this is the right place, going to the packaging tab.         &lt;br /&gt;    &lt;/div&gt;    &lt;/li&gt;    &lt;li&gt;    &lt;div style="text-align: justify;"&gt;&lt;strong&gt;Common (directory)&lt;/strong&gt; - The content of this directory is someway strange. Inside it there are a number of classes that helps to manage layout, databinding and a bunch of converters. It contains also a ResourceDictionary (StandardStyles.xaml) with a series of styles. I think it is strange because I expect to have mosto of them compiled inside an assembly but have a look at this directory because i may contains something you really need.&lt;/div&gt;    &lt;/li&gt;&lt;/ul&gt;&lt;p style="text-align: justify;"&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/AndreaBoschin/_image_10.png"&gt;&lt;img style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 15px; display: inline; float: right;" title="image" alt="image" src="http://www.silverlightshow.net/Storage/Users/AndreaBoschin/_image_thumb_4.png" width="379" height="235" /&gt;&lt;/a&gt;The first time you compile or run an application, Visual Studio (but also Blend) asks you to create a developer account. To accomplish this task you have to enter a live id account and you will be granted of a 1 month long license that you can use for free. Every time you activate another instance of Visual Studio (e.g. creating another virtual machine) your license is renewed and the month starts again. &lt;/p&gt;&lt;h4 style="text-align: justify;"&gt;Create your first app&lt;/h4&gt;&lt;p style="text-align: justify;"&gt;Now that the project has been created you can start to implement your application interface and logic. For the first touch I will avoid a simple Hallo World but I'll drive you to create a single page application that is able to download a rss feed and display the titles in a grid layout. Inside this very basic app (view a screenshot on the right side) I used some of the interesting features of XAML for Metro. &lt;/p&gt;&lt;p style="text-align: justify;"&gt;All the code of the application is inside the BlankPage.xaml and BlankPage.xaml.cs files. As usual the xaml file represents the user interface description and the cs file is the codebehind of the page. Here is the very basic XAML content of my application. You have simply to cut &amp;amp; paste it in the BankPage.xaml file (be aware I called it Application1):&lt;/p&gt;&lt;div style="border:1px solid silver;border-image: initial; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin-top: 20px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow-x: auto; overflow-y: auto; cursor: text; padding-top: 4px; text-align: left;" id="codeSnippetWrapper"&gt;&lt;div style="padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;     text-align: left;border-style: none;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;Page&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt;   2:&lt;/span&gt;     &lt;span style="color: #ff0000;"&gt;x:Class&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="Application1.BlankPage"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum3" style="color: #606060;"&gt;   3:&lt;/span&gt;     &lt;span style="color: #ff0000;"&gt;xmlns&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="http://schemas.microsoft.com/winfx/2006/xaml/presentation"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum4" style="color: #606060;"&gt;   4:&lt;/span&gt;     &lt;span style="color: #ff0000;"&gt;xmlns:x&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="http://schemas.microsoft.com/winfx/2006/xaml"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum5" style="color: #606060;"&gt;   5:&lt;/span&gt;     &lt;span style="color: #ff0000;"&gt;xmlns:local&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="using:Application1"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum6" style="color: #606060;"&gt;   6:&lt;/span&gt;     &lt;span style="color: #ff0000;"&gt;xmlns:d&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="http://schemas.microsoft.com/expression/blend/2008"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum7" style="color: #606060;"&gt;   7:&lt;/span&gt;     &lt;span style="color: #ff0000;"&gt;xmlns:mc&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="http://schemas.openxmlformats.org/markup-compatibility/2006"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum8" style="color: #606060;"&gt;   8:&lt;/span&gt;     &lt;span style="color: #ff0000;"&gt;mc:Ignorable&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="d"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum9" style="color: #606060;"&gt;   9:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum10" style="color: #606060;"&gt;  10:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;Grid&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;Background&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="White"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum11" style="color: #606060;"&gt;  11:&lt;/span&gt;         &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;ItemsControl&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="items"&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;VerticalAlignment&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="Center"&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;HorizontalAlignment&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="Stretch"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum12" style="color: #606060;"&gt;  12:&lt;/span&gt;             &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;ItemsControl.ItemContainerTransitions&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum13" style="color: #606060;"&gt;  13:&lt;/span&gt;                 &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;TransitionCollection&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum14" style="color: #606060;"&gt;  14:&lt;/span&gt;                     &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;EntranceThemeTransition&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum15" style="color: #606060;"&gt;  15:&lt;/span&gt;                 &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;TransitionCollection&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum16" style="color: #606060;"&gt;  16:&lt;/span&gt;             &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;ItemsControl.ItemContainerTransitions&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum17" style="color: #606060;"&gt;  17:&lt;/span&gt;             &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;ItemsControl.ItemsPanel&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum18" style="color: #606060;"&gt;  18:&lt;/span&gt;                 &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;ItemsPanelTemplate&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum19" style="color: #606060;"&gt;  19:&lt;/span&gt;                     &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;VariableSizedWrapGrid&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;Orientation&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="Horizontal"&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;MaximumRowsOrColumns&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="3"&lt;/span&gt; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum20" style="color: #606060;"&gt;  20:&lt;/span&gt;                                            &lt;span style="color: #ff0000;"&gt;ItemWidth&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="240"&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;ItemHeight&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="120"&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;HorizontalAlignment&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="Center"&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;VerticalAlignment&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="Center"&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum21" style="color: #606060;"&gt;  21:&lt;/span&gt;                 &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;ItemsPanelTemplate&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum22" style="color: #606060;"&gt;  22:&lt;/span&gt;             &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;ItemsControl.ItemsPanel&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum23" style="color: #606060;"&gt;  23:&lt;/span&gt;             &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;ItemsControl.ItemTemplate&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum24" style="color: #606060;"&gt;  24:&lt;/span&gt;                 &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;DataTemplate&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum25" style="color: #606060;"&gt;  25:&lt;/span&gt;                     &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;Border&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;Padding&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="10"&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;Margin&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="10"&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;d:DesignWidth&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="387.5"&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;d:DesignHeight&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="101.5"&lt;/span&gt; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum26" style="color: #606060;"&gt;  26:&lt;/span&gt;                             &lt;span style="color: #ff0000;"&gt;PointerReleased&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="HandlePointerReleased"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum27" style="color: #606060;"&gt;  27:&lt;/span&gt;                             &lt;span style="color: #ff0000;"&gt;BorderBrush&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="#FF666666"&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;BorderThickness&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="1"&lt;/span&gt; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum28" style="color: #606060;"&gt;  28:&lt;/span&gt;                             &lt;span style="color: #ff0000;"&gt;Background&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="#FFFF9900"&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;Tag&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="{Binding}"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum29" style="color: #606060;"&gt;  29:&lt;/span&gt;                         &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;TextBlock&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="{Binding Title.Text}"&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;TextWrapping&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="Wrap"&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;Foreground&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="White"&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;FontSize&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="16"&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum30" style="color: #606060;"&gt;  30:&lt;/span&gt;                     &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;Border&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum31" style="color: #606060;"&gt;  31:&lt;/span&gt;                 &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;DataTemplate&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum32" style="color: #606060;"&gt;  32:&lt;/span&gt;             &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;ItemsControl.ItemTemplate&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum33" style="color: #606060;"&gt;  33:&lt;/span&gt;         &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;ItemsControl&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum34" style="color: #606060;"&gt;  34:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;Grid&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum35" style="color: #606060;"&gt;  35:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;Page&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="text-align: justify;"&gt;The main content of the screen is a simple ItemsControl. This control let you display a collection and apply a DataTemplate to define the elements used to visually represent each item in the collection. The ItemsControl usually have a stacked layout; to display elements in a grid I use a layout element called "VariableSizedWrapGrid". This element organizes the items in a grid using a layout similar to the Silverlight's WrapPanel. &lt;/p&gt;&lt;p style="text-align: justify;"&gt;In the ItemTemplate property I've created a DataTemplate with a simple Border and TextBlock. This will display the title of an item into a rectangle. Finally, to make the application a bit more pleasant, I've added a EntranceThemeTransition that gives a beautiful entrance effect hard to describe using words. Then go to the BlankPage.xaml.cs file and change the OnNavigatedTo method and enter the following code: &lt;/p&gt;&lt;div style="border:1px solid silver;border-image: initial; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin-top: 20px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow-x: auto; overflow-y: auto; cursor: text; padding-top: 4px; text-align: left;" id="codeSnippetWrapper"&gt;&lt;div style="padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;     text-align: left;border-style: none;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;protected&lt;/span&gt; async &lt;span style="color: #0000ff;"&gt;override&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; OnNavigatedTo(NavigationEventArgs e)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum3" style="color: #606060;"&gt;   3:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.items.ItemsSource = await GetFeed();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum4" style="color: #606060;"&gt;   4:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum5" style="color: #606060;"&gt;   5:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum6" style="color: #606060;"&gt;   6:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;private&lt;/span&gt; async Task&amp;lt;IEnumerable&amp;lt;SyndicationItem&amp;gt;&amp;gt; GetFeed()&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum7" style="color: #606060;"&gt;   7:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum8" style="color: #606060;"&gt;   8:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;try&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum9" style="color: #606060;"&gt;   9:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum10" style="color: #606060;"&gt;  10:&lt;/span&gt;         Uri uri = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; Uri(&lt;span style="color: #006080;"&gt;"http://www.xamlplayground.org/syndication.axd"&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum11" style="color: #606060;"&gt;  11:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum12" style="color: #606060;"&gt;  12:&lt;/span&gt;         SyndicationClient client = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; SyndicationClient();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum13" style="color: #606060;"&gt;  13:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum14" style="color: #606060;"&gt;  14:&lt;/span&gt;         var feed = await client.RetrieveFeedAsync(uri);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum15" style="color: #606060;"&gt;  15:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum16" style="color: #606060;"&gt;  16:&lt;/span&gt;         &lt;span style="color: #0000ff;"&gt;return&lt;/span&gt; feed.Items;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum17" style="color: #606060;"&gt;  17:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum18" style="color: #606060;"&gt;  18:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;catch&lt;/span&gt;(Exception ex)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum19" style="color: #606060;"&gt;  19:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum20" style="color: #606060;"&gt;  20:&lt;/span&gt;         Windows.UI.Popups.MessageDialog dlg = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; Windows.UI.Popups.MessageDialog(ex.Message);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum21" style="color: #606060;"&gt;  21:&lt;/span&gt;         dlg.ShowAsync();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum22" style="color: #606060;"&gt;  22:&lt;/span&gt;         &lt;span style="color: #0000ff;"&gt;throw&lt;/span&gt; ex;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum23" style="color: #606060;"&gt;  23:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum24" style="color: #606060;"&gt;  24:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum25" style="color: #606060;"&gt;  25:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum26" style="color: #606060;"&gt;  26:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; HandlePointerReleased(&lt;span style="color: #0000ff;"&gt;object&lt;/span&gt; sender, PointerEventArgs e)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum27" style="color: #606060;"&gt;  27:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum28" style="color: #606060;"&gt;  28:&lt;/span&gt;     FrameworkElement border = sender &lt;span style="color: #0000ff;"&gt;as&lt;/span&gt; FrameworkElement;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum29" style="color: #606060;"&gt;  29:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum30" style="color: #606060;"&gt;  30:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (border != &lt;span style="color: #0000ff;"&gt;null&lt;/span&gt;)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum31" style="color: #606060;"&gt;  31:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum32" style="color: #606060;"&gt;  32:&lt;/span&gt;         SyndicationItem item = border.Tag &lt;span style="color: #0000ff;"&gt;as&lt;/span&gt; SyndicationItem;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum33" style="color: #606060;"&gt;  33:&lt;/span&gt;         Windows.System.Launcher.LaunchUriAsync(&lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; Uri(item.Id));&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum34" style="color: #606060;"&gt;  34:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum35" style="color: #606060;"&gt;  35:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="text-align: justify;"&gt;The code here downloads the feed of my weblog at &lt;a href="http://xamlplayground.org/"&gt;http://xamlplayground.org&lt;/a&gt; and then load it into the ItemsControl using the ItemsSource property. Pay attention to this code that use the awesome async and wait keywords. I will be back on asynchronous programming later in this series, but to full understand this code think at these keywords like your best friends to simplify the calling of asynchronous methods thanks to the integration of the Task Parallel Library. Take note also the that asynchronicity hightly pervades Metro applications and WinRT at a level you don't expect for sure.&lt;/p&gt;&lt;p style="text-align: justify;"&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/AndreaBoschin/image_12.png"&gt;&lt;img style="margin-top: 5px; margin-right: 15px; margin-bottom: 0px; margin-left: 0px; display: inline; float: left;" title="image" alt="image" src="http://www.silverlightshow.net/Storage/Users/AndreaBoschin/image_thumb_5.png" width="202" height="130" /&gt;&lt;/a&gt;After you completed the code in XAML and C# as I described you can run the application using F5 in Visual Studio. This task deployes the application to the AppContainer and runs it in debug mode like every other application you are habit to develop. Using the Metro UI of your operating system is probably good to appreciate the user interface aspects, but if you do not have a touch enabled monitor you can use the simulator. It allows to use the mouse like a finger on your touch device and includes the simulation of gestures like drag, hold, pinch and rotate but also a gps tool to inject locations in tested applications. It is not like having a true touch enabled device but you can spare a lot of money and start today your development.&lt;/p&gt;&lt;h4 style="text-align: justify;"&gt;Deploy and run&lt;/h4&gt;&lt;p style="text-align: justify;"&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/AndreaBoschin/image21.png"&gt;&lt;img style="margin-top: 9px; margin-right: 0px; margin-bottom: 0px; margin-left: 15px; display: inline; float: right;" title="image" alt="image" src="http://www.silverlightshow.net/Storage/Users/AndreaBoschin/image21_thumb.png" width="247" height="290" /&gt;&lt;/a&gt;But, what it happens when the application is compiled and then deployed? Visual Studio is a good friend for the developer but it hides the details that are automatically accomplished when you hit F5. This is good for most of the times but annoying if you are curious to know the insides of Metro apps. I will start saying that your C# code is simply an abstraction created on top of WinRT, the core runtime that is shared between all the consumer languages (C#, Javascript, VB.NET and Managed C++). This abstraction is made to (luckily) hide the fact that under the hoods of WinRT there is still C++ and COM. These APIs are exposed to your C# code with a bunch of metadata files that "translates" them to the C# compiler like normal assembly references. These metadata containers are known as .winmd files.&lt;/p&gt;&lt;p style="text-align: justify;"&gt;So, when you hit F5 in Visual Studio the very first operation is to compile your C# code connecting all the referenced APIs and, the product of this compilation is a exe file paired with a AppManifest.xml file and all the resources (mostly are xaml and images). All these files are created in the bin directory related to the target configuration. See&amp;nbsp; the image on the side for an example. &lt;/p&gt;&lt;p style="text-align: justify;"&gt;This is only the first stage. If you try to run the exe that is output of this stage you get an error stating that it can run only in the context of an AppContainer. This is because the compilation follows a new target output "&lt;a href="http://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;frm=1&amp;amp;source=web&amp;amp;cd=1&amp;amp;ved=0CCcQFjAA&amp;amp;url=http%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2Fhh547139(v%3Dvs.110).aspx&amp;amp;ei=2teKT5TMGcTe4QTs1KTvCQ&amp;amp;usg=AFQjCNHUMpu8-x7hdZr8SFjd-OQrfSImcw&amp;amp;sig2=FQ8leS8zASLNK7rJ3_0srw" target="_blank"&gt;appcontainerexe&lt;/a&gt;". So, after the compilation, the application needs to be packaged into a zip file (do you remember xap files?) called APPX before it is deployed. To create this package Visual Studio uses the &lt;a href="http://msdn.microsoft.com/en-us/library/windows/desktop/hh446767(v=vs.85).aspx" target="_blank"&gt;MakeAppx.exe utility&lt;/a&gt;. You can manually pack or unpack appx using this executable from a command prompt targeting Visual Studio 2011. &lt;/p&gt;&lt;p style="text-align: justify;"&gt;The last step before the package is deployed is the signing process. For this purpose Visual Studio takes the certificate linked to the project and using the signtool.exe utility it signs the package then deployes it to the Metro AppContainer. To fully satisfy your curiosity you can manually accomplish this task using the Add-AppxPackage cmdlet included in powershell. Here is a reference to all the cmdlets available for common tasks: &lt;a title="http://technet.microsoft.com/en-us/library/hh856045.aspx" href="http://technet.microsoft.com/en-us/library/hh856045.aspx"&gt;http://technet.microsoft.com/en-us/library/hh856045.aspx&lt;/a&gt;. For example running the Get-AppxPackage without parameters you will get the full listing of installed apps.&lt;/p&gt;&lt;h4 style="text-align: justify;"&gt;Moving forward to the next step&lt;/h4&gt;&lt;p style="text-align: justify;"&gt;In this article I've introduced a numeber of features, some have been explained and other remains open for the next articles in this series. Now that that you have been introduced to the concepts of Metro an you wrote your first example it is time to take in serious consideration the programming aspects of a Metro application. In the next article I will introduce how to handle the layout and navigation. Layout is a very important aspect in Metro since it involves the orientation and the view states. Navigation let you expand your scope to multipage apps. For the moment enjoy yourself with attached code.&lt;/p&gt;</description>      <link>http://www.silverlightshow.net/items/Windows-8-Metro-Starting-your-first-App-from-scratch.aspx</link>      <author>editorial@silverlightshow.net (Andrea Boschin  )</author>      <comments>http://www.silverlightshow.net/items/Windows-8-Metro-Starting-your-first-App-from-scratch.aspx#comments</comments>      <guid isPermaLink="true">http://www.silverlightshow.net/items/Windows-8-Metro-Starting-your-first-App-from-scratch.aspx</guid>      <pubDate>Wed, 18 Apr 2012 01:18:00 GMT</pubDate>    </item>    <item>      <title>Slides and source code for my past talks this year</title>      <link>http://geekswithblogs.net/lbugnion/archive/2012/04/18/slides-and-source-code-for-my-past-talks-this-year.aspx</link>      <description>&lt;p&gt;I had the chance to be invited to talk at various conferences this year already, and I promised to post the slides and source code, so here it is!&lt;/p&gt;  &lt;h2&gt;MVVM Applied: From Silverlight to Windows Phone to Windows 8&lt;/h2&gt;  &lt;p&gt;&lt;em&gt;&lt;a href="http://www.microsoft.com/belux/techdays/2012/Home.aspx"&gt;Belgium&lt;/a&gt;, &lt;a href="http://www.techdays.nl/"&gt;Netherlands&lt;/a&gt;, &lt;a href="http://www.microsoft.com/bg-bg/default.aspx"&gt;Bulgaria&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;The Model-View-View Model pattern is a common denominator between applications using XAML to create the user interface. First applied in WPF, it was then easily ported to Silverlight and Windows Phone development. With WinRT and the Metro-style applications, XAML is now a first-class citizen for native Windows 8 development. Here too, the MVVM pattern is making developers' life easier, and proven components can be used to simplify and speed up application development. In this session, Laurent Bugnion, the creator of the acclaimed MVVM Light Toolkit, will present best practices around XAML-based Windows 8 application development, and how to leverage code and skills in Windows 8 too.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="https://skydrive.live.com/redir.aspx?cid=40cffde85f1ab56a&amp;amp;resid=40CFFDE85F1AB56A!1268&amp;amp;parid=40CFFDE85F1AB56A!1267"&gt;Download the slides&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="https://skydrive.live.com/redir.aspx?cid=40cffde85f1ab56a&amp;amp;resid=40CFFDE85F1AB56A!1269&amp;amp;parid=40CFFDE85F1AB56A!1267"&gt;Source code: Start&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="https://skydrive.live.com/redir.aspx?cid=40cffde85f1ab56a&amp;amp;resid=40CFFDE85F1AB56A!1274&amp;amp;parid=40CFFDE85F1AB56A!1267"&gt;Source code: Silverlight 5&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="https://skydrive.live.com/redir.aspx?cid=40cffde85f1ab56a&amp;amp;resid=40CFFDE85F1AB56A!1270&amp;amp;parid=40CFFDE85F1AB56A!1267"&gt;Source code: Windows Phone 7&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="https://skydrive.live.com/redir.aspx?cid=40cffde85f1ab56a&amp;amp;resid=40CFFDE85F1AB56A!1273&amp;amp;parid=40CFFDE85F1AB56A!1267"&gt;Source code: Windows 8&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="https://skydrive.live.com/redir.aspx?cid=40cffde85f1ab56a&amp;amp;resid=40CFFDE85F1AB56A!1271&amp;amp;parid=40CFFDE85F1AB56A!1267"&gt;Snippets, Visual Studio 10&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="https://skydrive.live.com/redir.aspx?cid=40cffde85f1ab56a&amp;amp;resid=40CFFDE85F1AB56A!1272&amp;amp;parid=40CFFDE85F1AB56A!1267"&gt;Snippets, Visual Studio 11&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://channel9.msdn.com/Events/TechDays/Techdays-2012-the-Netherlands/2264"&gt;Video&lt;/a&gt; (or see below) &lt;/li&gt; &lt;/ul&gt;  &lt;h2&gt;100% Fidelity: From Comps to Apps, Tips and Tricks for XAML Integration&lt;/h2&gt;  &lt;p&gt;&lt;em&gt;&lt;a href="http://www.techdays.nl/"&gt;Netherlands&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Designers create a vision, and this vision becomes an application. With some technologies, the transition from the vision to the UI can be a painful and frustrating exercise. With XAML however, we have tools and techniques that make this transition much easier and allow for 100% fidelity to the comps. In this session, Laurent Bugnion (Director of UX Integration, IdentityMine) will show tips and tricks gathered over 6 years of experience. We will talk about design time data, exporting assets from Adobe design applications, measuring and adapting, animations... Together we will learn techniques that apply to multiple platforms, from Silverlight to Windows Phone 7 to WinRT, WPF, Microsoft Surface, Kinect and more.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="https://skydrive.live.com/redir.aspx?cid=40cffde85f1ab56a&amp;amp;resid=40CFFDE85F1AB56A!1276&amp;amp;parid=40CFFDE85F1AB56A!1275"&gt;Download the slides&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://channel9.msdn.com/Events/TechDays/Techdays-2012-the-Netherlands/2288"&gt;Video&lt;/a&gt; (or see below) &lt;/li&gt; &lt;/ul&gt;  &lt;h2&gt;Metro Design Principles&lt;/h2&gt;  &lt;p&gt;&lt;em&gt;Switzerland (Tech Conference), &lt;a href="http://www.microsoft.com/de-ch/events/shape/"&gt;Switzerland (Shape)&lt;/a&gt;, &lt;a href="http://www.microsoft.com/bg-bg/default.aspx"&gt;Bulgaria&lt;/a&gt;, &lt;a href="http://www.microsoft.com/gulf/opendoor/uae.html"&gt;Dubai&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;The Metro design language is becoming an intrinsic part of the Microsoft user experience. Already, we can find it on Zune (where it all started), Windows Phone 7 (where it was refined and perfected), Xbox, Windows 8, as well as on the Microsoft.com website. In this session, we will dive into the history of this design language, study its characteristics and show tips and tricks to implement Metro user interfaces in Windows Phone and Windows 8.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="https://skydrive.live.com/redir.aspx?cid=40cffde85f1ab56a&amp;amp;resid=40CFFDE85F1AB56A!1284&amp;amp;parid=40CFFDE85F1AB56A!1277"&gt;Download the slides&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;  &lt;h2&gt;Building The Apps of the Future on Windows 8!&lt;/h2&gt;  &lt;p&gt;&lt;a href="http://www.microsoft.com/gulf/opendoor/uae.html"&gt;&lt;em&gt;Dubai&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The future of application development is here! Attend this session to get a comprehensive view of app development on Microsoft's latest client platform - Windows 8!&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="https://skydrive.live.com/redir.aspx?cid=40cffde85f1ab56a&amp;amp;resid=40CFFDE85F1AB56A!1280&amp;amp;parid=40CFFDE85F1AB56A!1278"&gt;Download the slides&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="https://skydrive.live.com/redir.aspx?cid=40cffde85f1ab56a&amp;amp;resid=40CFFDE85F1AB56A!1283&amp;amp;parid=40CFFDE85F1AB56A!1278"&gt;Source code&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;h2&gt;Going mobile with Windows Phone&lt;/h2&gt;  &lt;p&gt;&lt;a href="http://www.microsoft.com/gulf/opendoor/uae.html"&gt;&lt;em&gt;Dubai&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;This session is intended to introduce developers to Windows Phone. It isn’t your boring old level 100 intro session. This session assumes that you know how to develop applications and skips past the "hello world" stuff to talk about tools, navigation elements, the back stack, phone controls and the marketplace.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="https://skydrive.live.com/redir.aspx?cid=40cffde85f1ab56a&amp;amp;resid=40CFFDE85F1AB56A!1281&amp;amp;parid=40CFFDE85F1AB56A!1279"&gt;Download the slides&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="https://skydrive.live.com/redir.aspx?cid=40cffde85f1ab56a&amp;amp;resid=40CFFDE85F1AB56A!1282&amp;amp;parid=40CFFDE85F1AB56A!1279"&gt;Source code&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt; &lt;/p&gt;  &lt;h2&gt;Video: MVVM Applied: From Silverlight to Windows Phone to Windows 8&lt;/h2&gt;  &lt;p&gt;&lt;iframe style="height: 484px; width: 956px" src="http://channel9.msdn.com/Events/TechDays/Techdays-2012-the-Netherlands/2264/player?w=956&amp;amp;h=484" frameborder="0" scrolling="no"&gt;&lt;/iframe&gt;&lt;/p&gt;  &lt;h2&gt; &lt;/h2&gt;  &lt;h2&gt;Video: 100% fidelity: from comps to appl, tips and tricks for XAML integration&lt;/h2&gt;  &lt;p&gt;&lt;iframe style="height: 484px; width: 956px" src="http://channel9.msdn.com/Events/TechDays/Techdays-2012-the-Netherlands/2288/player?w=956&amp;amp;h=484" frameborder="0" scrolling="no"&gt;&lt;/iframe&gt;&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;div style="margin-bottom: -1em"&gt;   &lt;div style="vertical-align: middle"&gt;&lt;a href="http://www.galasoft.ch/"&gt;&lt;img title="GalaSoft Laurent Bugnion" alt="GalaSoft Laurent Bugnion" src="http://www.galasoft.ch/logo/Current/logo_120x30.png" /&gt;&lt;/a&gt; &lt;/div&gt;    &lt;div style="position: relative; left: 130px; top: -36px"&gt;&lt;strong&gt;&lt;a href="http://www.galasoft.ch/contact_en.html"&gt;Laurent Bugnion (GalaSoft)&lt;/a&gt;&lt;/strong&gt;       &lt;br /&gt;&lt;a href="http://feeds.feedburner.com/galasoft"&gt;Subscribe&lt;/a&gt; | &lt;a href="http://twitter.com/lbugnion"&gt;Twitter&lt;/a&gt; | &lt;a href="http://www.facebook.com/lbugnion"&gt;Facebook&lt;/a&gt; | &lt;a href="http://www.flickr.com/photos/lbugnion"&gt;Flickr&lt;/a&gt; | &lt;a href="http://www.linkedin.com/in/lbugnion"&gt;LinkedIn&lt;/a&gt;       &lt;br /&gt;&lt;iframe style="border-top-style: none; margin-bottom: -20px; height: 23px; width: 450px; border-bottom-style: none; overflow: hidden; border-right-style: none; border-left-style: none; margin-top: 7px" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblog.galasoft.ch/archive/2012/04/18/slides-and-source-code-for-my-past-talks-this-year.aspx&amp;amp;layout=standard&amp;amp;show_faces=true&amp;amp;width=450&amp;amp;action=like&amp;amp;colorscheme=light" frameborder="0" allowtransparency="allowtransparency" scrolling="no"&gt;&lt;/iframe&gt;&lt;/div&gt; &lt;/div&gt; &lt;img src="http://geekswithblogs.net/lbugnion/aggbug/149357.aspx" width="1" height="1" /&gt;</description>      <creator xmlns="http://purl.org/dc/elements/1.1/">Laurent Bugnion</creator>      <guid>http://geekswithblogs.net/lbugnion/archive/2012/04/18/slides-and-source-code-for-my-past-talks-this-year.aspx</guid>      <pubDate>Tue, 17 Apr 2012 22:28:56 GMT</pubDate>      <comment xmlns="http://wellformedweb.org/CommentAPI/">http://geekswithblogs.net/lbugnion/comments/149357.aspx</comment>      <comments>http://geekswithblogs.net/lbugnion/archive/2012/04/18/slides-and-source-code-for-my-past-talks-this-year.aspx#feedback</comments>      <comments xmlns="http://purl.org/rss/1.0/modules/slash/">1</comments>      <commentRss xmlns="http://wellformedweb.org/CommentAPI/">http://geekswithblogs.net/lbugnion/comments/commentRss/149357.aspx</commentRss>      <ping xmlns="http://madskills.com/public/xml/rss/module/trackback/">http://geekswithblogs.net/lbugnion/services/trackbacks/149357.aspx</ping>    </item>    <item>      <title>Workaround for CA0055 Error with Silverlight Projects in Visual Studio 2010</title>      <author>Pete Brown	</author>      <link>http://10rem.net/blog/2012/04/17/workaround-for-ca0055-error-with-silverlight-projects-in-visual-studio-2010</link>      <pubDate>Tue, 17 Apr 2012 19:07:46 GMT</pubDate>      <guid>http://10rem.net/blog/2012/04/17/workaround-for-ca0055-error-with-silverlight-projects-in-visual-studio-2010</guid>      <description>&lt;p&gt;&lt;ahref="https://connect.microsoft.com/VisualStudio/feedback/details/713608/ca0055-silverlight5-business-application-project"&gt;This connect bug&lt;/a&gt; describes an issue with creating certain typesof Silverlight projects in Visual Studio. If you're referencingSilverlight 4 DLLs from a Silverlight 5 project, you may run intothis &lt;ahref="http://msdn.microsoft.com/en-us/library/y8hcsad3(v=vs.80).aspx"&gt;code analysis/FXCop&lt;/a&gt; issue yourself if code analysis is part ofyour process. The core of the problem is a versioning decision inSilverlight 5 which results in compile-time violation due toloading two different versions of mscorlib in the same project. Itmanifests as the following error:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Error 2 CA0055 : Could not unify the platforms (mscorlib,Version=2.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e,mscorlib, Version=5.0.5.0, Culture=neutral,PublicKeyToken=7cec85d7bea7798e) for'MyProject.Silverlight\obj\Debug\MyProject.dll'.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;More &lt;ahref="http://msdn.microsoft.com/en-us/library/ms244741.aspx"&gt;informationon CA0055 may be found on MSDN&lt;/a&gt;.&lt;/p&gt;&lt;h3&gt;How to Reproduce the Issue … in theory&lt;/h3&gt;&lt;p&gt;In theory, all you need to do to reproduce the issue isreference a SL4-targeted DLL from an SL5 application. However, inpractice, there are other factors in play. For example, it maymatter which mscorlib version gets loaded first.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;These steps won't repro the problem on my installation,but I'm putting them out here in case they help you visualize theissue (and also because I had already written them up when Irealized they don't repro here -- I don't want all these bits to goto waste).&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Create a Silverlight 4 class library. Make sure you targetSilverlight 4. I named mine SL4ClassLibrary. The actual code isunimportant, but I set it to the following:&lt;/p&gt;&lt;pre class="brush: csharp;"&gt;namespace SL4ClassLibrary&lt;br /&gt;{&lt;br /&gt;    public class Class1&lt;br /&gt;    {&lt;br /&gt;        public string Foo = "Bar";&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;Next, add a Silverlight 5 Application project. Make sure ittargets Silverlight 5. Here's what my solution looks like:&lt;/p&gt;&lt;p&gt;&lt;ahref="http://10rem.net/media/84844/Windows-Live-Writer_3f6292c37abe_F3BC_image_2.png" target="_blank"&gt;&lt;img src="http://10rem.net/media/84849/Windows-Live-Writer_3f6292c37abe_F3BC_image_thumb.png" width="308" height="335" alt="image" border="0" style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Build the solution.&lt;/p&gt;&lt;p&gt;Next, add a File Reference (not a project reference) from theSilverlight 5 client app to the Silverlight 4 DLL.&lt;/p&gt;&lt;p&gt;&lt;ahref="http://10rem.net/media/84854/Windows-Live-Writer_3f6292c37abe_F3BC_image_4.png" target="_blank"&gt;&lt;img src="http://10rem.net/media/84859/Windows-Live-Writer_3f6292c37abe_F3BC_image_thumb_1.png" width="500" height="269" alt="image" border="0" style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;If you build it now, everything works fine. The key step here isto add code analysis. Many organizations have code analysis as arequired part of their build process, using the compilercommand-line arguments. If you don't, you can turn it on via themenu:&lt;/p&gt;&lt;p&gt;&lt;ahref="http://10rem.net/media/84864/Windows-Live-Writer_3f6292c37abe_F3BC_image_8.png" target="_blank"&gt;&lt;img src="http://10rem.net/media/84869/Windows-Live-Writer_3f6292c37abe_F3BC_image_thumb_3.png" width="342" height="257" alt="image" border="0" style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Then check the "Enable Code Analysis on Build" checkbox.&lt;/p&gt;&lt;p&gt;&lt;ahref="http://10rem.net/media/84874/Windows-Live-Writer_3f6292c37abe_F3BC_image_6.png" target="_blank"&gt;&lt;img src="http://10rem.net/media/84879/Windows-Live-Writer_3f6292c37abe_F3BC_image_thumb_2.png" width="500" height="339" alt="image" border="0" style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Now build the solution. In theory, you'll get a CA0055 error,but as I mentioned at the top, that doesn't happen on my install.Most of the people who have reported this issue on the connect bughave mentioned it in the context of the Business ApplicationTemplate or third party controls.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Remember, this is a code analysis compile/build issue,not a runtime issue, so if you get past compiling your application,you're good.&lt;/strong&gt;&lt;/p&gt;&lt;h3&gt;The Workaround&lt;/h3&gt;&lt;p&gt;This is already planned to be fixed in Visual Studio 11 RC.However, we do have a manual workaround for this to help youcontinue working if you're running into this scenario today. Thiswill unblock using FxCop in Visual Studio 2010.&lt;/p&gt;&lt;p&gt;A high level walkthrough of how this works from the command lineis:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;We will tell FxCop which version of the runtime it will beusing by pointing it to Silverlight 5's installed mscorlib.dllusing the /platform argument&lt;/li&gt;&lt;li&gt;Tell FxCop where to find all of the referenced assemblies using/d (short for /directory) arguments: Use as many /d:&amp;lt;folder&amp;gt;arguments as necessary for FxCop to find all of the referencedassemblies.&lt;/li&gt;&lt;li&gt;Use either /console to tell FxCop to output the results to theconsole window, or /out:&amp;lt;file&amp;gt; to tell FxCop to write theresults to an .xml file&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;To run FxCop from the command line for a default BusinessApplication:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Add the %Visual Studio Install Directory%\Team Tools\StaticAnalysis\FxCop folder to PATH&lt;/li&gt;&lt;li&gt;Run "fxcopcmd.exe /file:&amp;lt;SL Business Application binary&amp;gt;/platform:&amp;lt;SL5 Reference Assemblies Directory\mscorlib.dll&amp;gt;/d:&amp;lt;SL4 Reference Assemblies Directory&amp;gt; /d:&amp;lt;SL4 SDK ClientLibraries Directory&amp;gt;"&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;An example of what this looks like on an x64 operating systemwith all of the default install directories is:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;SET PATH=%PATH%;C:\Program Files (x86)\Microsoft Visual Studio10.0\Team Tools\Static Analysis Tools\FxCop&lt;/li&gt;&lt;li&gt;fxcopcmd /file:BusinessApplication1.dll /platform:"C:\ProgramFiles (x86)\ReferenceAssemblies\Microsoft\Framework\Silverlight\v5.0\mscorlib.dll"/d:"C:\Program Files (x86)\ReferenceAssemblies\Microsoft\Framework\Silverlight\v4.0" /d:"C:\ProgramFiles (x86)\Microsoft SDKs\Silverlight\v4.0\Libraries\Client"/out:results.xml&lt;/li&gt;&lt;li&gt;NOTE: If you receive a CA0001 error: "The following error wasencountered while reading module 'XXXX.YYYYY' : Assembly referencecannot be resolved…" this means that you need to find where thatassembly is installed to on your machine and add an additional/d:&amp;lt;installed directory&amp;gt; argument pointing FxCop to wherethose assemblies are installed.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;My thanks to the Silverlight Team and to Andrew Hall for theinformation on this workaround.&lt;/p&gt;&lt;p&gt;Of course, the easiest and best solution, if you can do it, isto use libraries that specifically target Silverlight 5, and makesure all references from your Silverlight 5 project are tolibraries targeting Silverlight 5.&amp;nbsp; We know that's notpossible in all cases, including the specific reported businessapplication case, which is why we documented this workaround.&lt;/p&gt;&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/7j0XQ_LOsYrspu8Y4DbHXs3BxzU/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/7j0XQ_LOsYrspu8Y4DbHXs3BxzU/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/7j0XQ_LOsYrspu8Y4DbHXs3BxzU/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/7j0XQ_LOsYrspu8Y4DbHXs3BxzU/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/PeteBrown-Silverlight/~4/bU1_qm2GVuU" height="1" width="1"/&gt;</description>    </item>    <item>      <title>Windows 8 and the future of XAML: Part 5: More contracts in WinRT/Windows 8</title>      <description>&lt;table width="20"&gt;    &lt;tbody&gt;        &lt;tr&gt;            &lt;td&gt;            &lt;div class="fb-like" data-show-faces="true" data-send="false" data-href="http://www.silverlightshow.net/items/Windows-8-and-the-future-of-XAML-Part-5-More-contracts-in-WinRT-Windows-8.aspx" data-font="segoe ui" data-layout="button_count"&gt;&lt;/div&gt;            &lt;/td&gt;            &lt;td&gt;&lt;a href="https://twitter.com/share" class="twitter-share-button" data-via="silverlightshow" data-counturl="http://www.silverlightshow.net/items/Windows-8-and-the-future-of-XAML-Part-5-More-contracts-in-WinRT-Windows-8.aspx" data-count="horizontal" data-text="Reading @gillcleeren's article '#Windows8 &amp;amp; the future of #XAML: More Contracts in #WinRT/#Win8" data-url="http://slshow.net/I2Q007"&gt;Tweet&lt;/a&gt;&lt;/td&gt;            &lt;td&gt;&lt;g:plusone size="medium" href="http://www.silverlightshow.net/items/Windows-8-and-the-future-of-XAML-Part-5-More-contracts-in-WinRT-Windows-8.aspx"&gt;&lt;/g:plusone&gt;            &lt;/td&gt;            &lt;td&gt;            &lt;/td&gt;        &lt;/tr&gt;    &lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;In the previous article, we&amp;rsquo;ve introduced contracts in Windows 8. To quickly recapitulate, a contract allows Metro style applications in Windows 8 to communicate which each other or with Windows, without there being a hard reference between the participants of the communication. We&amp;rsquo;ve seen how the search contract allows applications to open themselves up to Windows so they can be search. There&amp;rsquo;s of course a contract that specifies how this searching is to be done: an application has to follow the rules specified in the contract so that Windows can communicate with the app in the way it needs to do.&lt;/p&gt;&lt;p&gt;In this article, we&amp;rsquo;ll dive some more in contracts, more specifically, the share contract.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.silverlightshow.net/Storage/Sources/Share_contract.zip"&gt;The code for this article can be downloaded here&lt;/a&gt;. &lt;/strong&gt;&lt;/p&gt;&lt;div style="border:1px solid #dddddd;border-image: initial; padding-bottom: 5px; background-color: #f3f3f3; margin-top: 5px; padding-left: 10px; width: 200px; float: right; margin-left: 10px; margin-right: 5px; padding-top: 5px;"&gt;&lt;h3&gt;Don't miss...&lt;/h3&gt;&lt;ul style="list-style-type: circle; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 20px; font-size: 12px;"&gt;    &lt;li style="padding-bottom: 5px;"&gt;&lt;a href="http://www.silverlightshow.net/news/Webinar-Contracts-and-Charms-in-Windows-8.aspx"&gt;Gill's webinar on April 24: Contracts and Charms in Windows 8&lt;/a&gt; &lt;/li&gt;    &lt;li style="padding-bottom: 5px;"&gt;&lt;a href="http://www.silverlightshow.net/items/Using-the-Live-SDK-in-Windows-8-XAML-C-Metro-Applications.aspx"&gt;Article: Using the Live SDK in Windows 8 XAML/C# Metro Applications&lt;/a&gt; &lt;/li&gt;    &lt;li style="padding-bottom: 5px;"&gt;&lt;a href="http://www.silverlightshow.net/ebooks/win8_odata.aspx"&gt;Ebook: Windows 8 XAML Metro Apps with OData&lt;/a&gt; &lt;/li&gt;&lt;/ul&gt;&lt;p style="padding-bottom: 5px; text-align: center;"&gt;&lt;a href="http://www.silverlightshow.net/ebooks/win8_odata.aspx" target="_self"&gt;&lt;img style="width: 107px; height: 150px;" alt="Ebook: Windows 8 XAML Metro Apps with OData" src="http://www.silverlightshow.net/Storage/Ebooks/win8_odata.png" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="http://www.silverlightshow.net/ebooks.aspx"&gt;All SilverlightShow Ebooks&lt;/a&gt;&amp;nbsp;&lt;img alt="" src="http://www.silverlightshow.net/Storage/arrow-content.jpg" /&gt;&lt;/p&gt;&lt;/div&gt;&lt;h2&gt;We love sharing&lt;/h2&gt;&lt;p&gt;Sharing information has become something very trivial. Millions of sites out there have sharing options. &amp;ldquo;Share this on Twitter&amp;rdquo;, &amp;ldquo;Post on Facebook&amp;rdquo;, &amp;ldquo;Share via mail&amp;rdquo; and tons of other options have been popping up everywhere on the internet. Why? People love sharing. When they find something cool or they&amp;rsquo;ve just read the most interesting article, people want to share that with their contacts. Perhaps they want to broadcast it, using a social network. Or perhaps they want to target a specific contact and send the information via mail. Also, people sometimes want to share information related to something they have done or found inside an application. Perhaps they&amp;rsquo;ve achieved a high-score in some game and they want to brag with it. Or, they have found a great recipe in a cookbook application. &lt;/p&gt;&lt;p&gt;As you can see, sharing is all around us. One problem though is the fact that it&amp;rsquo;s sometimes still too hard for people to quickly share the information they want to share. As said, a lot of sites have embedded sharing icons. But are they always easy to find? Or what happens if you use a social network that the site you&amp;rsquo;re using isn&amp;rsquo;t listed? In that case you need to go and paste the link to the social networking site. Or as mentioned with the game high-scores: if the game doesn&amp;rsquo;t support sharing, how are you going to proof that you&amp;rsquo;ve really attained that high-score? Perhaps through a screenshot that you manually have to take, copy and paste to another site or application. &lt;/p&gt;&lt;p&gt;From a developer&amp;rsquo;s perspective as well, implementing the right sharing options can be hard. Sites offer often quite a few sharing options and maintaining all these external links can be a time-consuming task. What if tomorrow Twitter decides they want to implement that option differently? You as the developer need to go and change your implementation. And even then, perhaps the visitor of your site (or user from your application) uses some obscure social network (perhaps one that&amp;rsquo;s relevant in his home country) that you haven&amp;rsquo;t implemented&amp;hellip; &lt;/p&gt;&lt;p&gt;Microsoft thought about offering an integrated sharing experience in Windows 8. It&amp;rsquo;s built into the system to offer both the end-user and the developer an easy and universal way of sharing information. This is the share contract.  &lt;/p&gt;&lt;h2&gt;The share contract&lt;/h2&gt;&lt;p&gt;Through the share contract, Windows 8 makes it possible for 2 applications to share information with each other. The big plus for developers is that the 2 application don&amp;rsquo;t have to know each other. Sharing is always done between two applications: the share source and the share target. The share source will share information in a specific format defined by the contract; the share target will be getting that information through Windows. Since the information is in a specific format, the developer of the share target can anticipate on this and write his code based on this format. &lt;/p&gt;&lt;p&gt;Note that Windows is the mediator between the two apps. It handles the process of getting the information from the share source and getting it to the share target. It&amp;rsquo;s safe to say that we have some kind of pub/sub architecture. &lt;/p&gt;&lt;p&gt;Let&amp;rsquo;s take a look at the share contract in action. Below you can see the CookBook application. I&amp;rsquo;m not very much of a cook but I can image that people would love to share a recipe with someone via mail or perhaps on Facebook. From within the Cookbook application, we use the Charms (swipe in from the right or use Win + C) and select Share. &lt;/p&gt;&lt;p&gt;&lt;img style="border:0px;  border-image: initial; display: inline;" title="clip_image001" alt="clip_image001" src="http://www.silverlightshow.net/Storage/Users/gillcleeren/clip_image001_d7a1fdce-890f-48ef-861d-abc3c2a7e2bb.png" width="328" height="430" /&gt; &lt;/p&gt;&lt;p&gt;In most apps (at least from the list of apps currently available), it&amp;rsquo;s the developer who has chosen what we can share. In the CookBook app, it&amp;rsquo;s created this way as well. Of course, the developer of the application can also select to allow the user to specify the information he wants to share. After clicking/tapping on Share, the list of share targets appears. If you&amp;rsquo;ve read the previous article, it&amp;rsquo;s easy to see a similarity between this and the list of apps that registered for Search. Indeed, being a Share target is done through a declaration (as we&amp;rsquo;ll see later in this article). Based on the contents of the data being shared, this list is filtered automatically by Windows. &lt;/p&gt;&lt;p&gt;&lt;img style="border:0px;  border-image: initial; display: inline;" title="clip_image002" alt="clip_image002" src="http://www.silverlightshow.net/Storage/Users/gillcleeren/clip_image002_42e0f34a-8805-4744-80d1-15add17bc9b9.png" width="501" height="401" /&gt; &lt;/p&gt;&lt;p&gt;Now that the user made a selection, the share target app opens. In most cases, the app doesn&amp;rsquo;t open in its default view. Instead, it opens a specific view for handling the sharing operation. Below, we see the SDK Sample Target application accepting the share data. &lt;/p&gt;&lt;p&gt;&lt;img style="border:0px;  border-image: initial; display: inline;" title="clip_image004" alt="clip_image004" src="http://www.silverlightshow.net/Storage/Users/gillcleeren/clip_image004_744a1ef4-0a53-40c6-9117-3dee9457dac4.jpg" width="609" height="329" /&gt; &lt;/p&gt;&lt;p&gt;Let&amp;rsquo;s now look at how we can create both an application that is a share source and an application that is a share target. We&amp;rsquo;ll start with the source. &lt;/p&gt;&lt;h2&gt;Making your application a share source&lt;/h2&gt;&lt;p&gt;Implementing the share contract as source in your application comes down to the following steps: &lt;/p&gt;&lt;ul&gt;    &lt;li&gt;Via code, registering your application with the DataTransferManager. &lt;/li&gt;    &lt;li&gt;Your application should register itself for the DataRequested event of the DataTransferManager.&lt;/li&gt;    &lt;li&gt;Filling up the DataPackage when the above mentioned event is fired by Windows&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Let&amp;rsquo;s look at these steps in a sample application. Create a new C# Metro style application and name it MyShareSource. The UI is nothing more than a basic Button that triggers the display of the Share UI. We are going to share basic text here. The UI of the app is shown below. &lt;/p&gt;&lt;p&gt;&lt;img style="border:0px;  border-image: initial; display: inline;" title="clip_image006" alt="clip_image006" src="http://www.silverlightshow.net/Storage/Users/gillcleeren/clip_image006_a394dcde-1878-4945-8dcc-cd81933233d7.jpg" width="609" height="210" /&gt; &lt;/p&gt;&lt;p&gt;The registration with the DataTransferManager is done in a separate method named RegisterForSharing() which we&amp;rsquo;ve called from the constructor. We retrieve the DataTransferManager and then register for the DataRequested event. This event will be triggered when the user indicates he/she wants to share data from the application. This event is triggered by Windows; in fact, it is triggered by the Share Broker. The Share Broker is the component that sits between the source and the target applications. The first thing it does is handling the incoming sharing request (triggered by the user willing to share) and routing it to the source application. Below we see the RegisterForSharing() method. &lt;/p&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;div style="padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;     text-align: left;border-style: none;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; BlankPage()&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.InitializeComponent(); &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    RegisterForSharing();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;} &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span style="color: #0000ff;"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; RegisterForSharing()&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    DataTransferManager datatransferManager;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    datatransferManager = DataTransferManager.GetForCurrentView();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    datatransferManager.DataRequested += newTypedEventHandler&amp;lt;DataTransferManager,DataRequestedEventArgs&amp;gt;(&lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.DataRequested);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;pre&gt;&lt;/pre&gt;&lt;p&gt;In the DataRequested event, we create the something called the Data Package. This can be seen as a container for data; it contains the data that the source application shares with the target. It can contain several formats, varying from simple text and URIs to images and even custom data formats. The latter should mostly be used if you want to target a specific share target app (for example, you&amp;rsquo;ve created 2 Metro style apps between which you want to exchange data). You can add more than one type of format (for example, an image, text, URI and a custom format all at once). Based on the contents, the Share Broker will filter the list of target applications. Below is the code for the DataRequested event where we build up the Data Package.&lt;/p&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;div style="padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;     text-align: left;border-style: none;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; DataRequested(DataTransferManager sender, DataRequestedEventArgs e)        &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;{            &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    e.Request.Data.Properties.Title = &lt;span style="color: #006080;"&gt;"Sample sharing source"&lt;/span&gt;;            &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    e.Request.Data.Properties.Description = &lt;span style="color: #006080;"&gt;"This is some Lorem ipsum text"&lt;/span&gt;;             &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    e.Request.Data.SetText(ShareContent.Text);        &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;Run the application now and notice that when clicking, you&amp;rsquo;ll see that the Share UI is shown. If you have any apps registered as target, you can go ahead and share the text.&lt;br /&gt;&lt;img style="border:0px;  border-image: initial; display: inline;" title="clip_image007" alt="clip_image007" src="http://www.silverlightshow.net/Storage/Users/gillcleeren/clip_image007_49d618e9-7949-4078-8a82-62459b8d683b.png" width="554" height="418" /&gt;&lt;/p&gt;&lt;p&gt;Now that we can share data, let&amp;rsquo;s see what we need to do to accept data.&lt;/p&gt;&lt;h4&gt;Making your application a share target&lt;/h4&gt;&lt;p&gt;We&amp;rsquo;ve seen that the Share Broker has asked the source application to create the Data Package. Once ready, it will inspect it and look at the different data types included. Based on this, the long list of all registered target apps is filtered to only those that can handle at least one of the included types. This is something we don&amp;rsquo;t have to worry about, it&amp;rsquo;s done for us.&lt;/p&gt;&lt;p&gt;When the user selects an application, the Share Broker will start the target app. It gets activated (remember the search activation from the last article) and gets passed in the data package (the target app gets read-access). The target app can (but is not forced) to send a completion so that the source app knows it can continue its normal run.&lt;/p&gt;&lt;p&gt;Notice that the sharing experience is in-context, meaning that the user doesn&amp;rsquo;t leave the application to go and copy/paste some information in another application!&lt;/p&gt;&lt;p&gt;Let&amp;rsquo;s see how we can make this working. Create a new Metro style app and name it MyShareTarget.&lt;/p&gt;&lt;p&gt;First, add a new Share Target Contract from the Project template window and name it SimpleShareTarget.&lt;/p&gt;&lt;p&gt;&lt;img style="border:0px;  border-image: initial; display: inline;" title="clip_image006[1]" alt="clip_image006[1]" src="http://www.silverlightshow.net/Storage/Users/gillcleeren/clip_image006%5B1%5D_51dc2b40-76b4-437d-abe5-a0452ee8f94f.jpg" width="609" height="210" /&gt;&lt;/p&gt;&lt;p&gt;Adding this template does a number of things. First, it adds a declaration to your manifest: the Share Target declaration. Based on this, Windows will know that your application can be the target of a share operation. We need to specify the types of content, shared via the Data Package, we want to receive. Since we are sharing text in the MyShareSource application, we specify that as the only type here.&lt;/p&gt;&lt;p&gt;&lt;img style="border:0px;  border-image: initial; display: inline;" title="clip_image009" alt="clip_image009" src="http://www.silverlightshow.net/Storage/Users/gillcleeren/clip_image009_c68f0c5e-82e7-4fe6-9dd0-ab41d7b11f4a.jpg" width="609" height="251" /&gt;&lt;/p&gt;&lt;p&gt;Secondly, your App.xaml.cs is modified: it overrides the OnShareTargetActivated, accepting a ShareTargetActivatedEventArgs instance. The code is shown below.&lt;/p&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;div style="padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;     text-align: left;border-style: none;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span style="color: #0000ff;"&gt;protected&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;override&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; OnShareTargetActivated(Windows.ApplicationModel.Activation.ShareTargetActivatedEventArgs args)        &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;{            &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    var shareTargetPage = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; MyShareTarget.SimpleShareTarget();            &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    shareTargetPage.Activate(args);        &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;Notice what this code does: it doesn&amp;rsquo;t load the default start page, instead it activates a new page of type SimpleShareTarget. The code for this Activate() method is also generated. We need to make some changes to it so that the shared text will also appear. Below is the code for this method.&lt;/p&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;div style="padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;     text-align: left;border-style: none;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; async &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; Activate(ShareTargetActivatedEventArgs args)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;._shareOperation = args.ShareOperation;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    &lt;span style="color: #008000;"&gt;// Communicate metadata about the shared content through the view model&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    var shareProperties = &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;._shareOperation.Data.Properties;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    var thumbnailImage = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; BitmapImage();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.DefaultViewModel[&lt;span style="color: #006080;"&gt;"Title"&lt;/span&gt;] = shareProperties.Title;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.DefaultViewModel[&lt;span style="color: #006080;"&gt;"Description"&lt;/span&gt;] = shareProperties.Description;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.DefaultViewModel[&lt;span style="color: #006080;"&gt;"Image"&lt;/span&gt;] = thumbnailImage;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.DefaultViewModel[&lt;span style="color: #006080;"&gt;"Sharing"&lt;/span&gt;] = &lt;span style="color: #0000ff;"&gt;false&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.DefaultViewModel[&lt;span style="color: #006080;"&gt;"ShowImage"&lt;/span&gt;] = &lt;span style="color: #0000ff;"&gt;false&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (_shareOperation.Data.Contains(StandardDataFormats.Text))&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;        &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.DefaultViewModel[&lt;span style="color: #006080;"&gt;"MainText"&lt;/span&gt;] = await _shareOperation.Data.GetTextAsync();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    Window.Current.Content = &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    Window.Current.Activate();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    &lt;span style="color: #008000;"&gt;// Update the shared content's thumbnail image in the background&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (shareProperties.Thumbnail != &lt;span style="color: #0000ff;"&gt;null&lt;/span&gt;)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;        var stream = await shareProperties.Thumbnail.OpenReadAsync();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;        thumbnailImage.SetSource(stream);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;        &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.DefaultViewModel[&lt;span style="color: #006080;"&gt;"ShowImage"&lt;/span&gt;] = &lt;span style="color: #0000ff;"&gt;true&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;We also need to update the UI for the SimpleShareTarget.xaml view so that we see the text. &lt;/p&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;div style="padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;     text-align: left;border-style: none;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;Grid&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;Grid&lt;/span&gt;.&lt;span style="color: #ff0000;"&gt;Row&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="1"&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;Grid&lt;/span&gt;.&lt;span style="color: #ff0000;"&gt;ColumnSpan&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="2"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;TextBlock&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;        &lt;span style="color: #ff0000;"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="{Binding MainText}"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;        &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;        &lt;span style="color: #ff0000;"&gt;Foreground&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="{StaticResource ApplicationSecondaryTextBrush}"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;        &lt;span style="color: #ff0000;"&gt;Style&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="{StaticResource BodyTextStyle}"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;Grid&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;Now run the MyShareTarget app. You won&amp;rsquo;t see anything, since now the BlankPage.xaml is running. Behind the scenes though, your app has registered itself to be a share target.&lt;/p&gt;&lt;p&gt;To see that in action, run the MyShareSource application again. Now when you click on Share, you&amp;rsquo;ll see your application listed. Select it and watch your content being shared with the target application!&lt;/p&gt;&lt;h4&gt;&lt;img style="border:0px;  border-image: initial; display: inline;" title="clip_image011" alt="clip_image011" src="http://www.silverlightshow.net/Storage/Users/gillcleeren/clip_image011_a5ae959c-83fd-4a41-8c36-80dc3d84d749.jpg" width="527" height="494" /&gt;&lt;/h4&gt;&lt;h2&gt;Summary&lt;/h2&gt;&lt;p&gt;In this article, we&amp;rsquo;ve taken a look at a second interesting contract in Windows 8: the sharing contract. It allows two applications to communicate with each other without there being a hard reference between the two.&lt;/p&gt;&lt;p&gt;In the next article, we&amp;rsquo;ll dive into the creation of tiles! Stay tuned!&lt;/p&gt;&lt;h2&gt;About the author&lt;/h2&gt;&lt;p&gt;Gill Cleeren is Microsoft Regional Director (&lt;a href="http://www.silverlightshow.net/sitefinity/admin/www.theregion.com" target="_blank"&gt;www.theregion.com&lt;/a&gt;), Silverlight MVP (former ASP.NET MVP) and Telerik MVP. He lives in Belgium where he works as .NET architect at Ordina (http://www.ordina.be). Passionate about .NET, he&amp;rsquo;s always playing with the newest bits. In his role as Regional Director, Gill has given many sessions, webcasts and trainings on new as well as existing technologies, such as Silverlight, ASP.NET and WPF at conferences including TechEd Berlin 2010, TechDays Belgium &amp;ndash; Switzerland - Sweden, DevDays NL, NDC Oslo Norway, SQL Server Saturday Switserland, Spring Conference UK, Silverlight Roadshow in Sweden, Telerik RoadShow UK&amp;hellip; He&amp;rsquo;s also the author of many articles in various developer magazines and for SilverlightShow.net and he organizes the yearly Community Day event in Belgium. He also leads Visug (&lt;a href="http://www.silverlightshow.net/sitefinity/admin/www.visug.be" target="_blank"&gt;www.visug.be&lt;/a&gt;), the largest .NET user group in Belgium. Gill recently published his first book: &amp;ldquo;Silverlight 4 Data and Services Cookbook&amp;rdquo; (Packt Publishing). His second book, Silverlight 5 Data and Services Cookbook will be released early 2012. You can find his blog at &lt;a href="http://www.silverlightshow.net/sitefinity/admin/www.snowball.be" target="_blank"&gt;www.snowball.be&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Twitter: @gillcleeren&lt;/p&gt;</description>      <link>http://www.silverlightshow.net/items/Windows-8-and-the-future-of-XAML-Part-5-More-contracts-in-WinRT-Windows-8.aspx</link>      <author>editorial@silverlightshow.net (Gill Cleeren )</author>      <comments>http://www.silverlightshow.net/items/Windows-8-and-the-future-of-XAML-Part-5-More-contracts-in-WinRT-Windows-8.aspx#comments</comments>      <guid isPermaLink="true">http://www.silverlightshow.net/items/Windows-8-and-the-future-of-XAML-Part-5-More-contracts-in-WinRT-Windows-8.aspx</guid>      <pubDate>Tue, 17 Apr 2012 09:04:00 GMT</pubDate>    </item>    <item>      <title>Win 8 Page Navigation</title>      <link>http://feedproxy.google.com/~r/JesseLiberty-SilverlightGeek/~3/XG3wBuwwElg/</link>      <comments>http://jesseliberty.com/2012/04/16/win-8-page-navigation/#comments</comments>      <pubDate>Mon, 16 Apr 2012 17:27:21 +0000</pubDate>      <creator xmlns="http://purl.org/dc/elements/1.1/">Jesse Liberty</creator>      <category><![CDATA[Essentials]]></category>      <category><![CDATA[Windows 8]]></category>      <guid isPermaLink="false">http://jesseliberty.com/?p=5255</guid>      <encoded xmlns="http://purl.org/rss/1.0/modules/content/"><![CDATA[Let’s start with something relatively easy… navigating between pages in Windows 8. Create a new application in Visual Studio 11.&#160; Add two BlankPages to the application, naming the first Page1.xaml and the second (you guessed it) Page2.xaml.&#160; Find the Page &#8230; Continue reading &#8594;<br/><br/>For the complete article and hyperlinks, please visit my blog at http://JesseLiberty.com<div class="feedflare"><a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=XG3wBuwwElg:AKM3wgpIgf0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=XG3wBuwwElg:AKM3wgpIgf0:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=XG3wBuwwElg:AKM3wgpIgf0:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?i=XG3wBuwwElg:AKM3wgpIgf0:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=XG3wBuwwElg:AKM3wgpIgf0:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?i=XG3wBuwwElg:AKM3wgpIgf0:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=XG3wBuwwElg:AKM3wgpIgf0:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?i=XG3wBuwwElg:AKM3wgpIgf0:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=XG3wBuwwElg:AKM3wgpIgf0:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?d=qj6IDK7rITs" border="0"></img></a></div><img src="http://feeds.feedburner.com/~r/JesseLiberty-SilverlightGeek/~4/XG3wBuwwElg" height="1" width="1"/>]]></encoded>      <commentRss xmlns="http://wellformedweb.org/CommentAPI/">http://jesseliberty.com/2012/04/16/win-8-page-navigation/feed/</commentRss>      <comments xmlns="http://purl.org/rss/1.0/modules/slash/">4</comments>      <origLink xmlns="http://rssnamespace.org/feedburner/ext/1.0">http://jesseliberty.com/2012/04/16/win-8-page-navigation/</origLink>    </item>    <item>      <title>Part 5: Developing for a multitude of clients: strategies for code reuse and keeping costs in check.</title>      <description>&lt;p&gt;Welcome to the fifth part of this article series on strategies for designing your application for a multitude of different clients.&amp;nbsp; In the &lt;a href="http://www.silverlightshow.net/items/Developing-for-a-multitude-of-clients-strategies-for-code-reuse-and-keeping-costs-in-check.aspx"&gt;first part&lt;/a&gt;, we&amp;rsquo;ve looked into the &lt;strong&gt;business case &amp;amp; some general concerns&lt;/strong&gt;, and in the &lt;a href="http://www.silverlightshow.net/items/Developing-for-a-multitude-of-clients-strategies-for-code-reuse-and-keeping-costs-in-check-part-2.aspx"&gt;second part&lt;/a&gt;, we made a choice for a &lt;strong&gt;service layer: WCF RIA Services&lt;/strong&gt;.&amp;nbsp; In the &lt;a href="http://www.silverlightshow.net/items/Part-3-Developing-for-a-multitude-of-clients-strategies-for-code-reuse-and-keeping-costs-in-check.aspx"&gt;third part&lt;/a&gt;, we&amp;rsquo;ve seen how we can use &lt;strong&gt;MEF for on demand loading &amp;amp; code reuse&lt;/strong&gt; across different clients, and in the &lt;a href="http://www.silverlightshow.net/items/Part-4-Developing-for-a-multitude-of-clients-strategies-for-code-reuse-and-keeping-costs-in-check.aspx" target="_blank"&gt;fourth part&lt;/a&gt;, we&amp;rsquo;ve learned how to load a &lt;strong&gt;multitude of assemblies on demand&lt;/strong&gt;, and we&amp;rsquo;ve learned how we can &lt;strong&gt;navigate to views in an on-demand loaded assembly&lt;/strong&gt; by implementing a custom content loader in combination with a view factory.&lt;/p&gt;&lt;div style="border:1px solid #dddddd;border-image: initial; padding-bottom: 5px; background-color: #f3f3f3; margin-top: 5px; padding-left: 10px; width: 200px; float: right; margin-left: 10px; padding-top: 5px;"&gt;&lt;h3&gt;More resources...&lt;/h3&gt;&lt;ul style="list-style-type: circle; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 20px; font-size: 12px;"&gt;    &lt;li style="padding-bottom: 5px;"&gt;&lt;a href="http://www.silverlightshow.net/items/WCF-RIA-Services-Part-1-Getting-Started.aspx"&gt;10-part Article Series: WCF RIA Services&lt;/a&gt; &lt;/li&gt;    &lt;li style="padding-bottom: 5px;"&gt;&lt;a href="http://www.silverlightshow.net/news/Webinar-Contracts-and-Charms-in-Windows-8.aspx"&gt;Upcoming Webinar: Contracts and Charms in Windows 8&lt;/a&gt; &lt;/li&gt;    &lt;li style="padding-bottom: 5px;"&gt;&lt;a href="http://www.silverlightshow.net/ebooks/wcf_ria_collections.aspx"&gt;Kevin's ebook: Working with Collections in WCF RIA Services&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style="padding-bottom: 5px; text-align: center;"&gt;&lt;a href="http://www.silverlightshow.net/ebooks/wcf_ria_collections.aspx"&gt;&lt;img style="border:0px solid; border-image: initial;" alt="Working with Collections in WCF RIA Services: Ebook" src="http://www.silverlightshow.net/Storage/Ebooks/wcfriacoll_ebook_cover.png" usemap="#rade_img_map_1291385581316" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="http://www.silverlightshow.net/ebooks.aspx"&gt;All SilverlightShow Ebooks&lt;/a&gt;&amp;nbsp;&lt;img alt="" src="http://www.silverlightshow.net/Storage/arrow-content.jpg" /&gt;&lt;/p&gt;&lt;/div&gt;&lt;p&gt;In this part, we&amp;rsquo;re going to add another client to equation: a Silverlight Out of Browser client.&amp;nbsp; After all the work we&amp;rsquo;ve done on the previous articles, we&amp;rsquo;ll see just how easy it is to reuse most of the code we already have.&lt;/p&gt;&lt;p&gt;You can &lt;a href="http://www.silverlightshow.net/Storage/Sources/MultipleClientsPart5.zip"&gt;download the source code for this article here&lt;/a&gt; (you can log in to the demo application with &lt;strong&gt;pete.campbell@madmen.com / abc@123&lt;/strong&gt;).&lt;/p&gt;&lt;h3&gt;Getting started: adding a new, Silverlight Out of Browser client&lt;/h3&gt;&lt;p&gt;To start, we&amp;rsquo;re going to have to add a new client to our solution.&amp;nbsp; I&amp;rsquo;ve added a new Silverlight client, named SalesDashboard.Silverlight.DesktopClient, to the solution, and configured it to run as an Out of Browser application (project properties &amp;ndash;&amp;gt; Silverlight).&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/KevinDockx/___image_6.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;        border-width: 0px;border-style: solid;" title="image" alt="image" src="http://www.silverlightshow.net/Storage/Users/KevinDockx/___image_thumb_2.png" width="379" height="227" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;As we&amp;rsquo;re aiming to reuse a lot of code, the Out of Browser application itself doesn&amp;rsquo;t really have to contain a lot of code: in essence, we&amp;rsquo;ll need to ensure the correct references are there, and the correct assemblies are loaded when we start the application &amp;ndash; just like we did with the in-browser Silverlight client.&lt;/p&gt;&lt;p&gt;For the references, we can simply go down the same road as explained in the previous article: commonly used code, existing assemblies that contain classes used throughout the application, &amp;hellip; are added as a reference.&amp;nbsp; This includes the MVVM Light related assemblies, Toolkit assemblies, &amp;hellip; On the other hand, code that belongs to a specific module is loaded on demand: we do add them as references, but we set the Copy Local flag to false, ensuring they&amp;rsquo;re not copied to the output directory (and thus not packaged in the resulting XAP file, keeping file size and initial load small).&lt;/p&gt;&lt;p&gt;For our new client application, this results in setting the Copy Local flag to false for SalesDashboard.Client.Model (the generated model), SalesDashboard.SL.Modules.EmpOpp.ViewModels (the ViewModels from the Employee Opportunity module) and SalesDashboard.SL.Modules.EmpOpp.Views (the Views from the Employee Opportunity module) : these will be loaded when we start the application.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/KevinDockx/________image_2.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;        border-width: 0px;border-style: solid;" title="image" alt="image" src="http://www.silverlightshow.net/Storage/Users/KevinDockx/________image_thumb.png" width="393" height="534" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;For demo purposes, this should result in the same application running in the browser as out of the browser, but remember: as this series is about separating out your application in modules &amp;amp; reusable code, nothing stops us from loading different modules in the Out of Browser application.&amp;nbsp; &lt;/p&gt;&lt;p&gt;But wait &amp;ndash; if the resulting applications should be the same, and we&amp;rsquo;ve separated out as much as possible, shouldn&amp;rsquo;t we simply be able to copy/paste the code from the in-browser application?&amp;nbsp; Well, let&amp;rsquo;s try that, shall we?&amp;nbsp; Simply copy/paste the MainPage.xaml (and .cs) and App.xaml (and .cs) code into the Out of Browser application, and try to run the application.&amp;nbsp; &lt;/p&gt;&lt;p&gt;It compiles.&amp;nbsp; But it doesn&amp;rsquo;t run.&amp;nbsp; Although we don&amp;rsquo;t really have to change a lot &amp;ndash; two things, actually.&amp;nbsp; Let&amp;rsquo;s look into those.&lt;/p&gt;&lt;h3&gt;The first issue: errors when loading assemblies.&lt;/h3&gt;&lt;p&gt;The first thing we will notice when we try to start our application is a &amp;ldquo;Type not found&amp;rdquo; error:&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/KevinDockx/______image_4.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;        border-width: 0px;border-style: solid;" title="image" alt="image" src="http://www.silverlightshow.net/Storage/Users/KevinDockx/______image_thumb_1.png" width="643" height="244" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;HeaderView is a view which is defined in an assembly we&amp;rsquo;re loading at startup: SalesDashboard.SL.Modules.EmpOpp.Views.&amp;nbsp; An error like this suggests the assembly hasn&amp;rsquo;t been loaded, so therefore, an instance of HeaderView cannot be added to the MainPage.&amp;nbsp; &lt;/p&gt;&lt;p&gt;If we look into what happens at application start, something immediately becomes obvious: we&amp;rsquo;re passing in a list of assemblies to load to our ParallelAsyncProcessor instance.&amp;nbsp; Code like this will try to find these assemblies in its own startup directory &amp;ndash; that worked fine for the in-browser application (as the assemblies are deployed to the Webhosts&amp;rsquo; ClientBin folder), but for the Out of Browser application, this isn&amp;rsquo;t sufficient anymore.&amp;nbsp; We need to pass in the exact Uri:&lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;foreach&lt;/span&gt; (var dependency &lt;span class="kwrd"&gt;in&lt;/span&gt; lstDependencies){    &lt;span class="rem"&gt;// note:  pass in another variable instead of directly passing in the dependency string. &lt;/span&gt;    &lt;span class="rem"&gt;// This ensures this new value is used when executing the parallel processes instead &lt;/span&gt;    &lt;span class="rem"&gt;// of using the last passed-in string multiple times &lt;/span&gt;    var foo = dependency;    var catalogDep = &lt;span class="kwrd"&gt;new&lt;/span&gt; SuperDeploymentCatalog(        &lt;span class="kwrd"&gt;new&lt;/span&gt; Uri(&lt;span class="str"&gt;"http://localhost/SalesDashboard.WebHost/ClientBin/"&lt;/span&gt; + foo));    catalog.Catalogs.Add(catalogDep);    EventHandler&amp;lt;AsyncCompletedEventArgs&amp;gt; handler = &lt;span class="kwrd"&gt;null&lt;/span&gt;;    handler = (s, a) =&amp;gt;    {        parallelAsyncProcesser.ProcessComplete(foo);        catalogDep.DownloadCompleted -= handler;    };    catalogDep.DownloadCompleted += handler;    parallelAsyncProcesser.AddToParallelQueue(() =&amp;gt; catalogDep.DownloadAsync(), foo);}&lt;/pre&gt;&lt;style type="text/css"&gt;    .csharpcode, .csharpcode pre    {    font-size: small;    color: black;    font-family: consolas, "Courier New", courier, monospace;    background-color: #ffffff;    /*white-space: pre;*/    }    .csharpcode pre { margin: 0em; }    .csharpcode .rem { color: #008000; }    .csharpcode .kwrd { color: #0000ff; }    .csharpcode .str { color: #006080; }    .csharpcode .op { color: #0000c0; }    .csharpcode .preproc { color: #cc6633; }    .csharpcode .asp { background-color: #ffff00; }    .csharpcode .html { color: #800000; }    .csharpcode .attr { color: #ff0000; }    .csharpcode .alt    {    background-color: #f4f4f4;    width: 100%;    margin: 0em;    }    .csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;p&gt;If we now build and run the application again, we&amp;rsquo;ll see we won&amp;rsquo;t get any errors anymore.&amp;nbsp; The problem?&amp;nbsp; We don&amp;rsquo;t get anything at all anymore: just a white page, nothing more.&amp;nbsp; What&amp;rsquo;s going on?&lt;/p&gt;&lt;h3&gt;The second issue: no more errors, but a white screen instead of an application.&lt;/h3&gt;&lt;p&gt;To be honest, this issue actually left me quite puzzled for a while when I first ran into it.&amp;nbsp; I started looking through my code, but couldn&amp;rsquo;t find anything out of the ordinary &amp;ndash; after all, we&amp;rsquo;re executing the exact same code as in an in-browser application.&amp;nbsp; What I did notice was that the callback handlers, used by the SuperDeploymentCatalog, didn&amp;rsquo;t return anymore: it seemed as though the requests for external assemblies were executed, but they never returned: a callback wasn&amp;rsquo;t received anymore.&amp;nbsp; I started looking around on the internet, and finally found out how this issue can be resolved: by setting the RootVisual element before loading the assemblies on-demand (not sure anymore if it was &lt;a href="http://10rem.net/blog" target="_blank"&gt;Pete Browns&amp;rsquo; blog&lt;/a&gt; or &lt;a href="http://csharperimage.jeremylikness.com/" target="_blank"&gt;Jeremy Likness&amp;rsquo; blog&lt;/a&gt; where I read about this first, but both are great resources to check out).&lt;/p&gt;&lt;p&gt;Apparently, setting the RootVisual ensures some behind-the-screens wiring is done, so the handlers actually return, and the applications&amp;rsquo; code continues.&amp;nbsp; I don&amp;rsquo;t find this behavior documented anywhere on MSDN &amp;ndash; I would actually qualify this as a bug that only happens in an Out of Browser Silverlight application.&lt;/p&gt;&lt;p&gt;How can we solve this?&amp;nbsp; We cannot set the RootVisual to an instance of MainPage when the application loads, as that would result in composition &amp;amp; instantiation errors: the controls on our MainPage are defined in assemblies that are loaded on-demand.&amp;nbsp; What we can do is create an extra user control, and set that as the RootVisual when we start the application.&amp;nbsp; Afterwards, after our assemblies have been loaded, we add an instance of MainPage to that user control, as its only child (note: setting the RootVisual to a dummy control on load, and changing it to an instance of MainPage after the assemblies have been loaded doesn&amp;rsquo;t work either).&lt;/p&gt;&lt;p&gt;To this avail, I created a user control, MainPageHost.&amp;nbsp; This is actually a simply, empty control, which only contains a LayoutRoot element.&lt;/p&gt;&lt;p&gt;In Application_Startup, we set the RootVisual to an instance of MainPageHost. Once the assemblies have been loaded, I call a method on MainPageHost, LoadApplication().&amp;nbsp; This method sets the MainPageHosts&amp;rsquo; LayoutRoot (which is a Border) child to an instance of MainPage().&amp;nbsp; This results in our application getting instantiated, which now works because all necessary assemblies have been loaded.&lt;/p&gt;&lt;p&gt;Code in App.xaml.cs:&lt;/p&gt;&lt;pre class="csharpcode"&gt;parallelAsyncProcesser.AllProcessesCompleted += () =&amp;gt;{    &lt;span class="rem"&gt;// dependencies have been loaded, init app startpage&lt;/span&gt;     (&lt;span class="kwrd"&gt;this&lt;/span&gt;.RootVisual &lt;span class="kwrd"&gt;as&lt;/span&gt; MainPageHost).LoadApplication();};&lt;/pre&gt;&lt;p&gt;Code in MainPageHost.xaml.cs:&lt;/p&gt;&lt;style type="text/css"&gt;    .csharpcode, .csharpcode pre    {    font-size: small;    color: black;    font-family: consolas, "Courier New", courier, monospace;    background-color: #ffffff;    /*white-space: pre;*/    }    .csharpcode pre { margin: 0em; }    .csharpcode .rem { color: #008000; }    .csharpcode .kwrd { color: #0000ff; }    .csharpcode .str { color: #006080; }    .csharpcode .op { color: #0000c0; }    .csharpcode .preproc { color: #cc6633; }    .csharpcode .asp { background-color: #ffff00; }    .csharpcode .html { color: #800000; }    .csharpcode .attr { color: #ff0000; }    .csharpcode .alt    {    background-color: #f4f4f4;    width: 100%;    margin: 0em;    }    .csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;internal&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; LoadApplication(){    LayoutRoot.Child = &lt;span class="kwrd"&gt;new&lt;/span&gt; MainPage();}&lt;/pre&gt;&lt;style type="text/css"&gt;    .csharpcode, .csharpcode pre    {    font-size: small;    color: black;    font-family: consolas, "Courier New", courier, monospace;    background-color: #ffffff;    /*white-space: pre;*/    }    .csharpcode pre { margin: 0em; }    .csharpcode .rem { color: #008000; }    .csharpcode .kwrd { color: #0000ff; }    .csharpcode .str { color: #006080; }    .csharpcode .op { color: #0000c0; }    .csharpcode .preproc { color: #cc6633; }    .csharpcode .asp { background-color: #ffff00; }    .csharpcode .html { color: #800000; }    .csharpcode .attr { color: #ff0000; }    .csharpcode .alt    {    background-color: #f4f4f4;    width: 100%;    margin: 0em;    }    .csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;p&gt;We can now build and run our application &amp;ndash; and everything will work as it&amp;rsquo;s supposed to work.&amp;nbsp; We&amp;rsquo;ve now created an Out of Browser client with very little effort, composing the application on-load by reusing the components we&amp;rsquo;ve separated out in the previous articles of this series.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/KevinDockx/_image_8.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;        border-width: 0px;border-style: solid;" title="image" alt="image" src="http://www.silverlightshow.net/Storage/Users/KevinDockx/_image_thumb_3.png" width="599" height="359" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;h3&gt;Conclusion&lt;/h3&gt;&lt;p&gt;In this article, we&amp;rsquo;ve seen how we can add an extra client to our solution, which reuses a lot of code from the previous articles in this series.&amp;nbsp; We&amp;rsquo;ve also learned how to work around 2 issues: passing in the correct Uri so the assemblies that have to be loaded can be found, and ensuring the necessary behind-the-screens wiring is done so the application execution can continue as expected.&lt;/p&gt;&lt;h3&gt;What&amp;rsquo;s next?&lt;/h3&gt;&lt;p&gt;Stay tuned for the next part of this article series, in which we&amp;rsquo;ll add a Windows Phone client to the equation! &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;About the author&lt;/h3&gt;&lt;p&gt;Kevin Dockx lives in Belgium and works at RealDolmen, one of Belgium's biggest ICT companies, where he is a technical specialist/project leader on .NET web applications, mainly Silverlight, and a solution manager for Rich Applications (Silverlight, Windows Phone 7 Series, WPF, Surface, HTML5). His main focus lies on all things Silverlight, but he still keeps an eye on the new developments concerning other products from the Microsoft .NET (Web) Stack. As a Silverlight enthusiast, he's a regular speaker on various national and international events, like Microsoft Techdays in Belgium, Portugal &amp;amp; Finland, NDC2011, Community Day, ... Next to that, he also authored a best-selling Silverlight book, Packt Publishing's &lt;a href="https://www.packtpub.com/microsoft-silverlight-4-data-and-services-cookbook/book"&gt;Silverlight 4 Data and Services Cookbook&lt;/a&gt;, together with Gill Cleeren. His blog, which contains various tidbits on Silverlight, .NET, and the occasional rambling, can be found at&lt;a href="http://blog.kevindockx.com/"&gt;http://blog.kevindockx.com/&lt;/a&gt;, and you can contact him on Twitter via &lt;a href="http://twitter.com/#!/KevinDockx"&gt;@KevinDockx&lt;/a&gt;.&lt;/p&gt;</description>      <link>http://www.silverlightshow.net/items/Part-5-Developing-for-a-multitude-of-clients-strategies-for-code-reuse-and-keeping-costs-in-check.aspx</link>      <author>editorial@silverlightshow.net (Kevin Dockx )</author>      <comments>http://www.silverlightshow.net/items/Part-5-Developing-for-a-multitude-of-clients-strategies-for-code-reuse-and-keeping-costs-in-check.aspx#comments</comments>      <guid isPermaLink="true">http://www.silverlightshow.net/items/Part-5-Developing-for-a-multitude-of-clients-strategies-for-code-reuse-and-keeping-costs-in-check.aspx</guid>      <pubDate>Mon, 16 Apr 2012 13:18:00 GMT</pubDate>    </item>    <item>      <title>Here comes Windows 8</title>      <link>http://feedproxy.google.com/~r/JesseLiberty-SilverlightGeek/~3/P0TCxYUg9sc/</link>      <comments>http://jesseliberty.com/2012/04/13/here-comes-windows-8/#comments</comments>      <pubDate>Fri, 13 Apr 2012 19:41:21 +0000</pubDate>      <creator xmlns="http://purl.org/dc/elements/1.1/">Jesse Liberty</creator>      <category><![CDATA[Essentials]]></category>      <guid isPermaLink="false">http://jesseliberty.com/?p=5246</guid>      <encoded xmlns="http://purl.org/rss/1.0/modules/content/"><![CDATA[As part of my new work for Telerik, and in preparation for writing a book on Windows 8 XAML programming for APress, I’ve been digging into Win 8.&#160; Rather than waiting for it all to become clear, I’ve decided to &#8230; Continue reading &#8594;<br/><br/>For the complete article and hyperlinks, please visit my blog at http://JesseLiberty.com<div class="feedflare"><a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=P0TCxYUg9sc:dBOtVXvSyOo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=P0TCxYUg9sc:dBOtVXvSyOo:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=P0TCxYUg9sc:dBOtVXvSyOo:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?i=P0TCxYUg9sc:dBOtVXvSyOo:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=P0TCxYUg9sc:dBOtVXvSyOo:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?i=P0TCxYUg9sc:dBOtVXvSyOo:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=P0TCxYUg9sc:dBOtVXvSyOo:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?i=P0TCxYUg9sc:dBOtVXvSyOo:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=P0TCxYUg9sc:dBOtVXvSyOo:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?d=qj6IDK7rITs" border="0"></img></a></div><img src="http://feeds.feedburner.com/~r/JesseLiberty-SilverlightGeek/~4/P0TCxYUg9sc" height="1" width="1"/>]]></encoded>      <commentRss xmlns="http://wellformedweb.org/CommentAPI/">http://jesseliberty.com/2012/04/13/here-comes-windows-8/feed/</commentRss>      <comments xmlns="http://purl.org/rss/1.0/modules/slash/">2</comments>      <origLink xmlns="http://rssnamespace.org/feedburner/ext/1.0">http://jesseliberty.com/2012/04/13/here-comes-windows-8/</origLink>    </item>    <item>      <title>Creating the SilverlightShow Windows Phone App: part 3</title>      <description>&lt;table width="20"&gt;    &lt;tbody&gt;        &lt;tr&gt;            &lt;td&gt;            &lt;div class="fb-like" data-show-faces="true" data-send="false" data-href="http://www.silverlightshow.net/items/Creating-the-SilverlightShow-Windows-Phone-App-part-3.aspx" data-font="segoe ui" data-layout="button_count"&gt;&lt;/div&gt;            &lt;/td&gt;            &lt;td&gt;&lt;a href="https://twitter.com/share" class="twitter-share-button" data-via="silverlightshow" data-counturl="http://www.silverlightshow.net/items/Creating-the-SilverlightShow-Windows-Phone-App-part-3.aspx" data-count="horizontal" data-text="Reading @Mister_Goodcat's article: Creating the SilverlightShow #WindowsPhone App: part 3 #wpdev" data-url="http://slshow.net/IE4Ege"&gt;Tweet&lt;/a&gt;&lt;/td&gt;            &lt;td&gt;&lt;g:plusone size="medium" href="http://www.silverlightshow.net/items/Creating-the-SilverlightShow-Windows-Phone-App-part-3.aspx"&gt;&lt;/g:plusone&gt;            &lt;/td&gt;            &lt;td&gt;            &lt;/td&gt;        &lt;/tr&gt;    &lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;In the first parts of the series about developing &lt;a href="http://windowsphone.com/s?appid=aa47a1d4-3418-496d-862f-36eb1ec78f43"&gt;the SilverlightShow Windows Phone app&lt;/a&gt; I explained the general development process and the technical details of accessing and optimizing the RSS feeds of the site. Now that we are able to access all of the content from the phone, the next step is to take a look at what was necessary to display what we have to the user while preserving a native look and feel. If you haven't seen the app in action, &lt;a href="http://www.silverlightshow.net/video/SilverlightShow-WP7-App-Intro.aspx"&gt;here&lt;/a&gt; is a short video about it.&lt;/p&gt;&lt;div style="border:1px solid #dddddd;border-image: initial; padding-bottom: 5px; background-color: #f3f3f3; margin-top: 5px; padding-left: 10px; width: 200px; float: right; margin-left: 10px; padding-top: 5px;"&gt;&lt;h3&gt;More resources...&lt;/h3&gt;&lt;ul style="list-style-type: circle; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 20px; font-size: 12px;"&gt;    &lt;li style="padding-bottom: 5px;"&gt;&lt;a href="http://www.silverlightshow.net/news/Webinar-Advanced-MVVM-for-Windows-Phone.aspx"&gt;Upcoming webinar by Peter Kuhn: Advanced MVVM for Windows Phone Developers&lt;/a&gt; &lt;/li&gt;    &lt;li style="padding-bottom: 5px;"&gt;&lt;a href="http://www.silverlightshow.net/video/WP-Sockets-webinar-recording.aspx"&gt;Recording of webinar by Peter Kuhn: Networking with Sockets in Windows Phone&lt;/a&gt; &lt;/li&gt;    &lt;li style="padding-bottom: 5px;"&gt;&lt;a href="http://www.silverlightshow.net/ebooks/ebook_xna.aspx"&gt;Peter's ebook: XNA for Silverlight Developers&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style="padding-bottom: 5px; text-align: center;"&gt;&lt;a href="http://www.silverlightshow.net/ebooks/ebook_xna.aspx"&gt;&lt;img style="border:0px solid; border-image: initial; width: 80px; height: 113px;" alt="XNA for Silverlight Developers" src="http://www.silverlightshow.net/Storage/Ebooks/xna_ebook_cover_150.png" usemap="#rade_img_map_1291385581316" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="http://www.silverlightshow.net/ebooks.aspx"&gt;All SilverlightShow Ebooks&lt;/a&gt;&amp;nbsp;&lt;img alt="" src="http://www.silverlightshow.net/Storage/arrow-content.jpg" /&gt;&lt;/p&gt;&lt;/div&gt;&lt;p&gt;When you recall the details of the previous part or simply take a quick look at the RSS feeds of the SilverlightShow site again (&lt;a href="http://www.silverlightshow.net/FeedGenerator.ashx?type=Article"&gt;sample&lt;/a&gt;), you will see that the content of each category (news, articles, events) is stored as fully formatted HTML already. All of it is produced by authors in WYSIWYG tools like Windows Live Writer and directly uploaded to the site's content management system. Even though we receive a slightly optimized and cleaned version of that rich content on the phone, it's still HTML. The fundamental decision to make hence was whether we would take that content as-is or transform it into something more native to the phone platform.&lt;/p&gt;&lt;h2&gt;HTML or not HTML, that is the question&lt;/h2&gt;&lt;p&gt;I have talked about the problems of parsing real-world HTML in the last part already, and how malformed tags and content can easily break a strict approach. We could have used a specialized parser like the &lt;a href="http://htmlagilitypack.codeplex.com/"&gt;Html Agility Pack&lt;/a&gt; I've suggested before, to ease some of these problems. However, these tools can only help with certain technical details, to fix low-level issues. SilverlightShow is a platform that is open for anyone to contribute and be an author for their respective area, and that variety is also reflected in the technical structure of the content. An analysis of the existing data revealed that sometimes articles are structured with div elements, sometimes people use paragraph tags; some like to present tabular information, others make heavy use of images, diagrams and screenshots. In addition, we have code snippets for different languages, bulleted lists, and of course the normal styling features you have in HTML for highlighting and font formatting.&lt;/p&gt;&lt;p&gt;All of this quickly lead to the conclusion that any attempt to transform the existing content into something native to Windows Phone (=XAML) would result in various problems:&lt;/p&gt;&lt;ul&gt;    &lt;li&gt;Either we would have to spend a large amount of time to support an insane amount of formatting features, or&lt;/li&gt;    &lt;li&gt;We needed to make sure that all (future) content is only using a limited subset of the available options (which would require a very sophisticated technical review process before publishing any new item), or&lt;/li&gt;    &lt;li&gt;We would only support a small subset of the available features in HTML and simply strip the rest, which would result in a more or less significantly worse experience for phone users compared to the normal desktop experience.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;In any case, we were sure that none of the above solutions could be implemented in a way that is safe and robust enough for all future content. No matter how thorough you test and create an app like this, since you highly depend on external factors that are completely out of your hands it's almost inevitably that something is going to break at some point in the future.&lt;/p&gt;&lt;p&gt;The logical consequence was to use the content as is, and present it within the app using the web browser control. Obviously the team at Microsoft has much more resources and knowledge, and put more effort into creating a full featured HTML parser and rendering engine than we ever could &amp;ndash; why not make use of that and provide the best presentation possible by using this built-in option? This seemed like the perfect compromise to us: creating a nice application to give users the best look and feel as well as a native, integrated experience, and embed the existing content in a way that provides the same nice presentation as accessing the site.&lt;/p&gt;&lt;h2&gt;What's in a color?&lt;/h2&gt;&lt;p&gt;Using the web browser control in a satisfactory way turned out to be much harder than expected. Along the way we hit quite some obstacles that were hard to overcome. And I'm not talking about advanced or obscure things but pretty basic features. For example, setting the background color of the control can become a challenge if you want it to be perfect. The web browser control is only a shallow wrapper around a native component and in turn makes use of the built-in rendering capabilities of Internet Explorer to display its content. The way the control works unfortunately does not allow to e.g. work with advanced features like transparency for the background.&lt;/p&gt;&lt;p&gt;&lt;img style="display: block; float: none; margin-left: auto; margin-right: auto;" alt="visual_tree" src="http://www.pitorque.de/MisterGoodcat/image.axd?picture=visual_tree.png" /&gt;&lt;/p&gt;&lt;p&gt;This analysis of the visual tree of the web browser control I did a while back shows the native Internet Explorer component named "TileHost" as last element. So, with the background color solely determined by the content that is displayed, the natural next step is to simply adjust that data in the HTML content itself. The items we download from the RSS feeds are only HTML fragments and need to be extended to a full and valid HTML page anyway (which means adding html, head and body tags etc.). During that step, we inject some custom styling data, for example for the pre tags of code snippets, and also for the background color:&lt;/p&gt;&lt;div id="codeSnippetWrapper" class="csharpcode-wrapper"&gt;&lt;div id="codeSnippet" class="csharpcode"&gt;&lt;pre class="alt"&gt;var styleElement = ownerDoc.CreateElement(&lt;span class="str"&gt;"style"&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;&lt;span class="rem"&gt;// [...]&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;const&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; &lt;span class="kwrd"&gt;value&lt;/span&gt; = &lt;span class="str"&gt;"body { font-size: 10pt; background-color: #000000; color: #ffffff; }"&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;var valueNode = ownerDoc.CreateTextNode(&lt;span class="kwrd"&gt;value&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;styleElement.ChildNodes.Add(valueNode);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;headElement.ChildNodes.Add(styleElement);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;The problem with this approach is that before any content is rendered, the web browser control's background color is white by default. This means that when you set it to a black background like we do with the above code, you will see some flickering, because it takes a short amount of time for the content to be loaded and rendered. The background will rapidly switch between the default white and your desired background color every time you change the content. &lt;/p&gt;&lt;p&gt;This annoying behavior cannot be suppressed by any of the built-in features easily. The simplest solution I found on the web was a suggestion by Colin Eberhardt to create an overlay (another UI element, like a rectangle) with the desired background color, and then fade out that overlay once the content in the web browser control has finished rendering. He has used a similar technique in his PhoneGap experiments to overcome the same issue there (you can find his blog post on this &lt;a href="http://www.scottlogic.co.uk/blog/colin/2011/12/a-simple-multi-page-windows-phone-7-phonegap-example/"&gt;here&lt;/a&gt;). This workaround is not yet added to the SilverlightShow app &amp;ndash; if you play with the app you will therefore see the said flickering when you e.g. navigate back and forth between the content items.&lt;/p&gt;&lt;p&gt;If you think that this is quite some work for something as simple as setting a background color, then you haven't thought about theming yet.&lt;/p&gt;&lt;h3&gt;I Want Change&lt;/h3&gt;&lt;p&gt;In the above paragraphs, I showed the code used to produce a constant background of black for the web browser control. However, Windows Phone supports both a dark and a light theme, and naturally we wanted to give users of our app the same choice. If a user has set their phone to the light theme, we wanted to invert the presentation scheme of the content items to display black text on white background. Due to the same problems mentioned above, this cannot be achieved by simply setting some properties on the control. Also, we couldn't simply inject the style in the way shown above when we download the content, because obviously the user can switch themes at any time in between uses of the app. So what we had to do instead is find a way to dynamically set the new colors within the HTML content of the control. JavaScript to the rescue!&lt;/p&gt;&lt;p&gt;The idea is to inject some JavaScript into the content that is to displayed, in the same way that we inject the style data above, so we can let that JavaScript code perform the required changes for us whenever it is required. To this end, the web browser control provides a method named &lt;a href="http://msdn.microsoft.com/en-us/library/cc491132(v=vs.95).aspx"&gt;InvokeScript&lt;/a&gt;, which lets you execute a JavaScript function defined in the current content dynamically. The injected code can be something simple like this:&lt;/p&gt;&lt;div id="codeSnippetWrapper" class="csharpcode-wrapper"&gt;&lt;div id="codeSnippet" class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;function&lt;/span&gt; changeBackgroundToWhite() { &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;  document.body.style.background = &lt;span class="str"&gt;'white'&lt;/span&gt;; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;  document.body.style.color = &lt;span class="str"&gt;'black'&lt;/span&gt;; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;Injecting this works the same way as before with the styles:&lt;/p&gt;&lt;div id="codeSnippetWrapper" class="csharpcode-wrapper"&gt;&lt;div id="codeSnippet" class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="rem"&gt;// create script element and attributes&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;&lt;span class="kwrd"&gt;var&lt;/span&gt; scriptElement = ownerDoc.CreateElement(&lt;span class="str"&gt;"script"&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;var&lt;/span&gt; scriptTypeAttribute = ownerDoc.CreateAttribute(&lt;span class="str"&gt;"type"&lt;/span&gt;, &lt;span class="str"&gt;"text/javascript"&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;scriptElement.Attributes.Add(scriptTypeAttribute);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;&lt;span class="rem"&gt;// create script content&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;string&lt;/span&gt; script = &lt;span class="str"&gt;"[...]"&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;&lt;span class="kwrd"&gt;var&lt;/span&gt; scriptContent = ownerDoc.CreateTextNode(script);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;scriptElement.ChildNodes.Add(scriptContent);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;&lt;span class="rem"&gt;// add everything to the head tag&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;headElement.ChildNodes.Add(scriptElement);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;Now we are able to switch the color scheme when the device currently is set to use the light scheme:&lt;/p&gt;&lt;div id="codeSnippetWrapper" class="csharpcode-wrapper"&gt;&lt;div id="codeSnippet" class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;var&lt;/span&gt; lightThemeVisibility = (Visibility)Application.Current.Resources[&lt;span class="str"&gt;"PhoneLightThemeVisibility"&lt;/span&gt;];&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;&lt;span class="kwrd"&gt;if&lt;/span&gt; (lightThemeVisibility == Visibility.Visible)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;  ContentWebBrowser.InvokeScript(&lt;span class="str"&gt;"changeBackgroundToWhite"&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;em&gt;Note: Due to an issue with detecting theme changes after you return from tombstoning in the current release of the phone OS switching to the light theme that way (and not having a way to switch back) is actually sufficient in our case.&lt;/em&gt;&lt;/p&gt;&lt;h2&gt;Where am I?&lt;/h2&gt;&lt;p&gt;One of the most annoying problems with the web browser control is that it does not display a scroll bar to give the user an indication of what part of the page they are currently looking at, or how much more content there is during scrolling. I have written a detailed analysis of the problem a while ago in my blog; if you're interested in learning more on the technical details, you can read that post &lt;a href="http://www.pitorque.de/MisterGoodcat/post/Somethings-Missing-from-the-WebBrowser-Control.aspx"&gt;here&lt;/a&gt;. The following is a screenshot taken from that post to demonstrate the issue:&lt;/p&gt;&lt;p&gt;&lt;img style="display: block; float: none; margin-left: auto; margin-right: auto;" alt="ie9_webbrowser_control_comparison" src="http://www.pitorque.de/MisterGoodcat/image.axd?picture=ie9_webbrowser_control_comparison.png" /&gt;&lt;/p&gt;&lt;p&gt;In my post I also explain a workaround that tries to emulate the behavior of the built-in browser experience. To achieve that I'm once again injecting some custom JavaScript into the content, but this time I communicate with the outer application from that very JavaScript, using the well-known "external.notify" mechanism. The corresponding JavaScript looks like this:&lt;/p&gt;&lt;div id="codeSnippetWrapper" class="csharpcode-wrapper"&gt;&lt;div id="codeSnippet" class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;function&lt;/span&gt; initialize() { &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;  window.external.notify(&lt;span class="str"&gt;"scrollHeight="&lt;/span&gt; + document.body.scrollHeight.toString()); &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;  window.external.notify(&lt;span class="str"&gt;"clientHeight="&lt;/span&gt; + document.body.clientHeight.toString()); &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;  window.onscroll = onScroll; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;function&lt;/span&gt; onScroll(e) { &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;  &lt;span class="kwrd"&gt;var&lt;/span&gt; scrollPosition = document.body.scrollTop; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;  window.external.notify(&lt;span class="str"&gt;"scrollTop="&lt;/span&gt; + scrollPosition.toString()); &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;window.onload = initialize;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;On the Silverlight side of things, you are able to capture these calls and process the information accordingly; in the case of the SilverlightShow app, I'm using it to update a fake scrollbar overlay I've added to the web browser control.&lt;/p&gt;&lt;div id="codeSnippetWrapper" class="csharpcode-wrapper"&gt;&lt;div id="codeSnippet" class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="rem"&gt;// e.g. in the constructor, or in XAML&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;ContentWebBrowser.ScriptNotify += ContentWebBrowser_ScriptNotify;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;&lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; ContentWebBrowser_ScriptNotify(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, NotifyEventArgs e)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;  &lt;span class="rem"&gt;// parse e.Value and use it to update a fake ScrollBar element&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;Unfortunately, the way the web browser works on the phone (and I think the web browsers on other mobile platforms and brands work in a similar way) is that they make heavy use of GPU features and deferred rendering to optimize performance. Only by using these tricks can they provide a smooth scrolling and zooming experience. The side effect of this is that the respective scrolling properties and events are not invoked until the panning has come to an end, which in turn means a limitation of this visualization workaround is that it's only updated once the user has finished scrolling.&lt;/p&gt;&lt;h2&gt;And Some Fine-Tuning&lt;/h2&gt;&lt;p&gt;As the name already says, one of the core features of HTML is its hyperlinked nature. The content available from SilverlightShow is no different in that. Articles and news contain links to external sources and other web sites all the time. Since we have even less control over that external content in a technical sense, and also out of legal reasons and other considerations, we decided that users of the SilverlightShow app should not be able to navigate to that external content within the web browser control, and within the context of the phone app itself. Instead, the idea is to intercept those navigational events and relay them to the built-in web browser of the Windows Phone operating system. This not only makes sure that the target page is displayed correctly and in the best way possible on the phone, but it also makes it as clear as possible to the user that they're leaving the content provided by SilverlightShow. At the same time, features like fast app switching and tombstoning allow a quick and seamless transition back to the app with no drawbacks for the user.&lt;/p&gt;&lt;p&gt;To make this work, you can simply handle &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.phone.controls.webbrowser.navigating(v=vs.92).aspx"&gt;the "Navigating" event&lt;/a&gt; of the web browser controls, cancel the navigation that is about to happen, and simply hand off that task to the platform's built-in web browser:&lt;/p&gt;&lt;div id="codeSnippetWrapper" class="csharpcode-wrapper"&gt;&lt;div id="codeSnippet" class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; WebBrowser_Navigating(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, NavigatingEventArgs e)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;    &lt;span class="rem"&gt;// we cancel all internal navigation...&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;    var uri = e.Uri;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;    e.Cancel = &lt;span class="kwrd"&gt;true&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;    &lt;span class="kwrd"&gt;try&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;    {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;        &lt;span class="rem"&gt;// ... and instead launch an external web browser for this&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;        WebBrowserTask task = &lt;span class="kwrd"&gt;new&lt;/span&gt; WebBrowserTask();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;        task.Uri = uri;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;        task.Show();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;    }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;    &lt;span class="kwrd"&gt;catch&lt;/span&gt; (Exception ex)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;    {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;        &lt;span class="rem"&gt;// do some error handling&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;    }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;em&gt;Note: You may need to add some additional code to prevent that logic from kicking in when you set or refresh your own internal content.&lt;/em&gt;&lt;/p&gt;&lt;h2&gt;Conclusion&lt;/h2&gt;&lt;p&gt;The web browser control that is built into the framework is a powerful tool to display HTML content within your application. Unfortunately, it comes with some limitations that require unconventional and creative workarounds and solutions to provide a good user experience. Some issues like the missing scroll bars even cannot be fully resolved with the current given possibilities. If you can live with these limitations and the additional effort to achieve seemingly simply things, the control still provides a great way to present rich content, especially if it's already available as HTML.&lt;/p&gt;</description>      <link>http://www.silverlightshow.net/items/Creating-the-SilverlightShow-Windows-Phone-App-part-3.aspx</link>      <author>editorial@silverlightshow.net (Peter Kuhn )</author>      <comments>http://www.silverlightshow.net/items/Creating-the-SilverlightShow-Windows-Phone-App-part-3.aspx#comments</comments>      <guid isPermaLink="true">http://www.silverlightshow.net/items/Creating-the-SilverlightShow-Windows-Phone-App-part-3.aspx</guid>      <pubDate>Thu, 12 Apr 2012 10:44:00 GMT</pubDate>    </item>    <item>      <title>New Article on JsRender Templating</title>      <link>http://feeds.johnpapa.net/~r/JohnPapa/~3/hdSZZNQ6szk/clientin1204</link>      <description>&lt;p&gt;Super fast rendering, easy to pick up, no DOM nor jQuery dependency. That’s JsRender. &lt;a href="http://jpapa.me/clientIn1204"&gt;Check out this month’s Client Insight column where I cover the basics of JsRender&lt;/a&gt;. And be on the lookout for my new full length course on JsRender, coming to &lt;a href="http://www.pluralsight-training.net/microsoft/Authors/Details?handle=john-papa"&gt;Pluralsight&lt;/a&gt; in May 2012.&lt;/p&gt; &lt;p&gt;&lt;a href="https://github.com/BorisMoore/jsrender"&gt;JsRender&lt;/a&gt; is the &lt;a href="http://jpapa.me/jsrenderroadmap"&gt;successor to jQuery Templates&lt;/a&gt; created by Boris Moore. It brings a new templating library to HTML5 development that has a code-less tag syntax, high performance, no dependency on jQuery nor a DOM, supports creating custom functions, and uses pure string-based rendering. &lt;/p&gt; &lt;p&gt;So instead of writing code like this:&lt;/p&gt; &lt;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: 'Courier New', 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"&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;var&lt;/span&gt; i = 1;&lt;br&gt;$(my.vm.movies).each(&lt;span style="color: #0000ff"&gt;function&lt;/span&gt; () {&lt;br&gt;  &lt;span style="color: #0000ff"&gt;var&lt;/span&gt; movie = &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;;&lt;br&gt;  $(&lt;span style="color: #006080"&gt;"#movieContainer1"&lt;/span&gt;).append(&lt;br&gt;    &lt;span style="color: #006080"&gt;"&amp;lt;div&amp;gt;"&lt;/span&gt; + i++ + &lt;span style="color: #006080"&gt;": "&lt;/span&gt; + movie.name + &lt;span style="color: #006080"&gt;" ("&lt;/span&gt;&lt;br&gt;    + movie.releaseYear + &lt;span style="color: #006080"&gt;")&amp;lt;/div&amp;gt;"&lt;/span&gt;);&lt;br&gt;});&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;you can write code like this:&lt;/p&gt;&lt;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: 'Courier New', 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"&gt;&lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;div&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;    {{:#index+1}}: {{:name}} ({{:releaseYear}})&lt;br&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;div&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;&lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=hdSZZNQ6szk:CVCRyjdBzqM:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?i=hdSZZNQ6szk:CVCRyjdBzqM:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=hdSZZNQ6szk:CVCRyjdBzqM:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?i=hdSZZNQ6szk:CVCRyjdBzqM:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=hdSZZNQ6szk:CVCRyjdBzqM:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=hdSZZNQ6szk:CVCRyjdBzqM:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JohnPapa/~4/hdSZZNQ6szk" height="1" width="1"/&gt;</description>      <pubDate>Wed, 11 Apr 2012 12:49:13 GMT</pubDate>      <guid isPermaLink="false">http://johnpapa.net:80/clientin1204</guid>      <origLink xmlns="http://rssnamespace.org/feedburner/ext/1.0">http://johnpapa.net:80/clientin1204</origLink>    </item>    <item>      <title>Creating the SilverlightShow Windows Phone App: part 2</title>      <description>&lt;table width="20"&gt;    &lt;tbody&gt;        &lt;tr&gt;            &lt;td&gt;            &lt;div class="fb-like" data-show-faces="true" data-send="false" data-href="http://www.silverlightshow.net/items/Creating-the-SilverlightShow-Windows-Phone-App-part-2.aspx" data-font="segoe ui" data-layout="button_count"&gt;&lt;/div&gt;            &lt;/td&gt;            &lt;td&gt;&lt;a href="https://twitter.com/share" class="twitter-share-button" data-via="silverlightshow" data-counturl="http://www.silverlightshow.net/items/Creating-the-SilverlightShow-Windows-Phone-App-part-2.aspx" data-count="horizontal" data-text="Reading @Mister_Goodcat's article: Creating the SilverlightShow #WindowsPhone App: part 2 #wpdev" data-url="http://slshow.net/HxccRV"&gt;Tweet&lt;/a&gt;&lt;/td&gt;            &lt;td&gt;&lt;g:plusone size="medium" href="http://www.silverlightshow.net/items/Creating-the-SilverlightShow-Windows-Phone-App-part-2.aspx"&gt;&lt;/g:plusone&gt;            &lt;/td&gt;            &lt;td&gt;            &lt;/td&gt;        &lt;/tr&gt;    &lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;In the &lt;a href="http://www.silverlightshow.net/items/Creating-the-SilverlightShow-Windows-Phone-App.aspx"&gt;first part&lt;/a&gt; of this mini series I was mostly talking about the process of developing the SilverlightShow Windows Phone application, and didn't discuss any of the technical specifics. Today I want to dive into some of the details around downloading and optimizing RSS feeds. I not only want to give you insight into the particular problems we were facing, but also some hopefully useful advice and guidelines should you ever want to develop a similar feature for your own application. If you haven't used or seen the app yet, you can watch a quick intro video &lt;a href="http://www.silverlightshow.net/video/SilverlightShow-WP7-App-Intro.aspx"&gt;here&lt;/a&gt; and find it on the Marketplace &lt;a href="http://windowsphone.com/s?appid=aa47a1d4-3418-496d-862f-36eb1ec78f43"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;h2&gt;It's all about content&lt;/h2&gt;&lt;p&gt;As described before, the SilverlightShow portal has already established a nice infrastructure for creating, maintaining and accessing its rich content, and that includes multiple RSS feeds which seamlessly cover all the data we need in the mobile app. &lt;/p&gt;&lt;div style="border: 1px solid #dddddd; padding-bottom: 5px; background-color: #f3f3f3; margin-top: 5px; padding-left: 10px; width: 200px; float: right; margin-left: 10px; padding-top: 5px;"&gt;&lt;h3&gt;More resources...&lt;/h3&gt;&lt;ul style="list-style-type: circle; margin: 0px; padding-left: 20px; font-size: 12px;"&gt;    &lt;li style="padding-bottom: 5px;"&gt;&lt;a href="http://www.silverlightshow.net/video/Advanced-MVVM-for-WPDev-Webinar.aspx"&gt;Webinar recording: Advanced MVVM for Windows Phone Developers&lt;/a&gt; &lt;/li&gt;    &lt;li style="padding-bottom: 5px;"&gt;&lt;a href="http://www.silverlightshow.net/video/Recording-of-Windows-Phone-Raw-Camera-Webinar.aspx"&gt;Recording of webinar by Peter Kuhn: Windows Phone Raw Camera Access&lt;/a&gt; &lt;/li&gt;    &lt;li style="padding-bottom: 5px;"&gt;&lt;a href="http://www.silverlightshow.net/ebooks/wp7_exam.aspx"&gt;Peter's ebook: Getting Ready for the Windows Phone 7 Exam 70-599&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style="padding-bottom: 5px; text-align: center;"&gt;&lt;a href="http://www.silverlightshow.net/ebooks/wp7_exam.aspx"&gt;&lt;img style="border: 0px solid; width: 80px; height: 113px;" alt="Getting Ready for the Windows Phone 7 Exam 70-599" src="http://www.silverlightshow.net/Storage/Ebooks/wp7_exam_cover.png" usemap="#rade_img_map_1291385581316" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="http://www.silverlightshow.net/ebooks.aspx"&gt;All SilverlightShow Ebooks&lt;/a&gt;&amp;nbsp;&lt;img alt="" src="http://www.silverlightshow.net/Storage/arrow-content.jpg" /&gt;&lt;/p&gt;&lt;/div&gt;So the first step was to prototype an app that could download and display the content provided by these feeds, to evaluate whether going down that road is feasible.&lt;p&gt;When you search for samples and tutorials on RSS feed reading on Windows Phone, you inevitably will find articles that recommend using the Syndication assembly that comes with Silverlight, which indeed is safe to use on the phone too. I won't post any links here, because I strongly vote against doing this. If you still want to try it out yourself, you will realize that the parser included with this library is really strict, and unfortunately that means it's fighting severe problems with real world RSS feeds. A single unexpected space character somewhere in the data of feed items &lt;a href="https://connect.microsoft.com/VisualStudio/feedback/details/325421/syndicationfeed-load-fails-to-parse-datetime-against-a-real-world-feeds-ie7-can-read"&gt;can result in an exception&lt;/a&gt; and the inability to parse the feed at all. As you can see in the old Connect bug I've just linked to, people continue complaining about this and other issues with the Syndication framework even though the bug entry itself is "closed as fixed".&amp;nbsp; &lt;/p&gt;&lt;h2&gt;Don't use System.ServiceModel.Syndication.dll&lt;/h2&gt;&lt;p&gt;In an environment where you have full control over the very detail of the feeds you may be able to work around this problem, but most of the time you are not. For example here at SilverlightShow, we weren't able to fix some of the glitches that let the Syndication framework fail, because the feeds are not created manually, but handled by a third-party framework for generating RSS feeds from existing data. So what's the alternative? Fortunately, parsing RSS feeds manually isn't such a big deal, because in the end it all comes down to walking an XML tree and extracting the data you want from its elements. When you do that, you are able to handle the specific problems of the feed you're dealing with yourself, or can create a parse algorithm for e.g. date values (these often are problematic) that is more forgiving and flexible than the built-in parser of the Syndication framework. &lt;/p&gt;&lt;p&gt;If you're looking for a full example, I'm pleased to announce that the official RSS starter kit for Windows Phone switched to a more robust way of parsing the feeds just a few days ago, and can now be recommended as a great starting point for these kinds of applications. It used to use the Syndication framework but Chris Koenig decided to change the implementation to manual processing recently. You can find its web site &lt;a href="http://aka.ms/wpskrss"&gt;here&lt;/a&gt;, and its GitHub page &lt;a href="https://github.com/ChrisKoenig/Windows-Phone-Starter-Kit-for-RSS"&gt;here&lt;/a&gt;. The code for downloading and parsing essentially looks like this:&lt;/p&gt;&lt;div id="codeSnippetWrapper" class="csharpcode-wrapper"&gt;&lt;div id="codeSnippet" class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="rem"&gt;// retrieve the feed and it's items from the internet&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;var request = HttpWebRequest.CreateHttp(SelectedFeed.RssUrl) &lt;span class="kwrd"&gt;as&lt;/span&gt; HttpWebRequest;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;request.BeginGetResponse((token) =&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;  &lt;span class="rem"&gt;// process the response&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;  &lt;span class="kwrd"&gt;using&lt;/span&gt; (var response = request.EndGetResponse(token) &lt;span class="kwrd"&gt;as&lt;/span&gt; HttpWebResponse)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;  &lt;span class="kwrd"&gt;using&lt;/span&gt; (var stream = response.GetResponseStream())&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;  &lt;span class="kwrd"&gt;using&lt;/span&gt; (var reader = XmlReader.Create(stream))&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;  {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;    var doc = XDocument.Load(reader);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;   &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;    &lt;span class="rem"&gt;// ...&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;    feed.Description = doc.Root.GetSafeElementString(&lt;span class="str"&gt;"summary"&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;    &lt;span class="rem"&gt;// ...&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;    &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (var item &lt;span class="kwrd"&gt;in&lt;/span&gt; doc.Root.Elements(doc.Root.GetDefaultNamespace() + &lt;span class="str"&gt;"entry"&lt;/span&gt;))&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;    {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;      var newItem = &lt;span class="kwrd"&gt;new&lt;/span&gt; RssItem()&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;      {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;        Title = item.GetSafeElementString(&lt;span class="str"&gt;"title"&lt;/span&gt;),&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;        &lt;span class="rem"&gt;// ...&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;      }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;    }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;  }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;In the SilverlightShow app, we're using a slightly different approach to squeeze out the last bit of performance :). Instead of working with Linq to Xml, the code uses the XmlReader object directly to sequentially extract all the required information from the feed. Like:&lt;/p&gt;&lt;div id="codeSnippetWrapper" class="csharpcode-wrapper"&gt;&lt;div id="codeSnippet" class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; ReadFeed(XmlReader xmlReader, FeedData result)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;  &lt;span class="kwrd"&gt;try&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;  {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;    xmlReader.ReadStartElement(&lt;span class="str"&gt;"rss"&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;    xmlReader.ReadStartElement(&lt;span class="str"&gt;"channel"&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;    &lt;span class="kwrd"&gt;while&lt;/span&gt; (xmlReader.IsStartElement())&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;    {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;      &lt;span class="kwrd"&gt;if&lt;/span&gt; (xmlReader.IsStartElement(&lt;span class="str"&gt;"title"&lt;/span&gt;))&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;      {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;        result.Title = xmlReader.ReadElementContentAsString();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;      }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;      &lt;span class="rem"&gt;// ...&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;    }  &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;  }   &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;  &lt;span class="rem"&gt;// ...&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;Working this way, you are flexible enough to e.g. apply a more relaxed date parsing, or process the content in any way you want. You'll also be able to do your own custom error handling, for example to only skip a single item if you're unable to parse it, instead of throwing away the whole feed content when you run into a small error.&lt;/p&gt;&lt;h2&gt;Optimizations, optimizations, optimizations&lt;/h2&gt;&lt;p&gt;Now that we were able to correctly load the content in question onto the phone, it was important to evaluate whether doing this was a practical solution. One of the invaluable helpers in the tool box of every developer to analyze these scenarios is a network monitoring tool. I generally start with Fiddler because it's so simple and convenient to use, and only switch to more advanced tools when Fiddler isn't able to capture the traffic or provide the information I need. For developing with the Windows Phone emulator, Fiddler is perfectly fine as long as you remember to first start Fiddler and then launch the emulator afterwards (or you won't be able to capture any of the emulator's traffic). You can find more information and download Fiddler for free &lt;a href="http://www.fiddler2.com/"&gt;here&lt;/a&gt;. &lt;/p&gt;&lt;p&gt;In the case of analyzing the RSS feeds of SilverlightShow you don't even have to go through the Windows Phone emulator, but can access the feed directly in your browser and watch the traffic in Fiddler that way. One of the particular feeds we are interested in is the one that retrieves article content from the site:&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/FeedGenerator.ashx?type=Article"&gt;http://www.silverlightshow.net/FeedGenerator.ashx?type=Article&lt;/a&gt;&lt;/p&gt;&lt;p&gt;At the time of writing this article, the size of the returned 25 items in this feed is a whopping 1.5 MiB:&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/MisterGoodcat/_______________image_2.png"&gt;&lt;img style="border: 0px; background-image: none; margin: 0px auto; padding-left: 0px; padding-right: 0px; display: block; float: none; padding-top: 0px;" title="image" alt="image" src="http://www.silverlightshow.net/Storage/Users/MisterGoodcat/________________image_thumb.png" width="175" height="26" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Obviously that amount of data is unsuitable to be transferred to a mobile device frequently, where people often are using slow connections or even worse, have to pay for the transferred data byte-by-byte. It was clear that we needed to introduce a whole lot of optimization and improvements to make this work. Fortunately, we had already reckoned this situation and collected a bunch of ideas during the design phase.&lt;/p&gt;&lt;h3&gt;Squashing the Content&lt;/h3&gt;&lt;p&gt;One of the particular details we quickly identified for optimization are the code snippets that are included with most of the articles on SilverlightShow. Authors can use &lt;a href="http://lvildosola.blogspot.de/2009/03/code-snippet-plugin-for-windows-live.html"&gt;a nice plug-in&lt;/a&gt; to Windows Live Writer to beautify the code they paste. Behind the scenes, the coloring and formatting of the code is achieved by applying CSS styles to it. This can tremendously increase the size of the HTML necessary to display the code. For example, this small snippet of code (147 characters) taken from a recent article&amp;hellip;&lt;/p&gt;&lt;div id="codeSnippetWrapper" class="csharpcode-wrapper"&gt;&lt;div id="codeSnippet" class="csharpcode"&gt;&lt;pre class="alt"&gt;&lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; button1_Click(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, RoutedEventArgs e)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;    MyBeep myBeep = &lt;span class="kwrd"&gt;new&lt;/span&gt; MyBeep();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;    myBeep.PlaySound(BeepTypes.Information);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&amp;hellip; is turned into a block of &lt;strong&gt;3313 characters&lt;/strong&gt; in the RSS feed. In addition to the CSS styling information, the required encoding of HTML entities also adds quite a lot to this size. This means that we see a size increase of factor 22 here just for the added benefit of having colored code snippets. Stripping this formatting from the content when it is requested by the phone was a natural consequence. We still have some code formatting in the app (like using a fixed-size font), but without the syntax highlighting. This was one of the areas that required some work on the existing services. A newly added parameter for the feed generator solved this problem nicely. You can see the result using the following url:&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/FeedGenerator.ashx?type=Article&amp;amp;stripCodeFormatting=true"&gt;http://www.silverlightshow.net/FeedGenerator.ashx?type=Article&lt;br /&gt;&amp;amp;stripCodeFormatting=true&lt;/a&gt;&lt;/p&gt;&lt;p&gt;This change alone shrinks the size of the feed by approximately two thirds, depending on the actual content and the percentage of code in the current set of articles. At the moment, the new size is ~625 KiB:&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/MisterGoodcat/____________image_4.png"&gt;&lt;img style="border: 0px; background-image: none; margin: 0px auto; padding-left: 0px; padding-right: 0px; display: block; float: none; padding-top: 0px;" title="image" alt="image" src="http://www.silverlightshow.net/Storage/Users/MisterGoodcat/_____________image_thumb_1.png" width="167" height="21" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;The content on the phone after that looks similar to this&amp;hellip;&lt;/p&gt;&lt;pre style="padding: 10px; background-color: #555555; font-family: 'courier new', consolas; color: #ffffff;"&gt;private void button1_Click(object sender, RoutedEventArgs e){    MyBeep myBeep = new MyBeep();    myBeep.PlaySound(BeepTypes.Information);}&lt;/pre&gt;&lt;p&gt;&amp;hellip; and only requires 118 additional characters &lt;em&gt;per document, &lt;/em&gt;and these are generated on the device itself (more on that later).&lt;/p&gt;&lt;p&gt;In addition to this, we also reduced the maximum number of articles returned to the phone from 25 to 10, as we felt that this is sufficient for the mobile device where you are more interested in being notified about new content than reading the archives. This of course also reduces the total size a lot.&lt;/p&gt;&lt;h4&gt;Parsing HTML&lt;/h4&gt;&lt;p&gt;A side note on stripping the code tags and CSS from the original content: this actually is a very interesting topic that we unfortunately do not have the time and space to cover in more detail here. Real-world HTML often does not follow the strict rules of normal XML content; especially when you're working with WSIWYG editors, and when multiple authors are responsible for a merged final output, the result might look significantly different from what you would expect. In most cases, trying to treat HTML as XML, and assuming that it follows the same strict rules is a dangerous thing to do. Therefore, I generally recommend against the usual approaches people attempt to follow when they work with that kind of data. In particular, &lt;strong&gt;do not&lt;/strong&gt;:&lt;/p&gt;&lt;ul&gt;    &lt;li&gt;Use regular expressions&lt;/li&gt;    &lt;li&gt;Use string replacement&lt;/li&gt;    &lt;li&gt;Use XML readers or documents&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;All of these fail quickly with faulty HTML, and are not flexible enough to handle the situations you &lt;em&gt;will&lt;/em&gt; come across, with reasonable effort. So what is the alternative here? There are some projects out there that have put quite some work into creating more tolerant parsers for HTML that are capable of handling malformed tags and content better than probably any custom solution you (and I) would be able to create within the limits of a small phone project. One of these projects is the &lt;a href="http://htmlagilitypack.codeplex.com/"&gt;Html Agility Pack&lt;/a&gt; hosted on CodePlex. It has built-in support for Windows Phone and not only helped us strip the code formatting from the articles, but also to improve some other details of the content, like dealing with multi-column layouts and turn it into something that is more suitable for the small phone screen.&lt;/p&gt;&lt;p&gt;If you are ever in the situation where you need to parse HTML, I recommend you take a look at this or similar projects to make your life easier, instead of trying to reinvent the wheel.&lt;/p&gt;&lt;h3&gt;Local Caching&lt;/h3&gt;&lt;p&gt;Another important feature of the SilverlightShow app is that we do not pull all the RSS items from the feeds whenever you hit the refresh button or start the app on your device. Instead, we locally store the items and only fetch those that we haven't retrieved in the past yet. To achieve this, another small extension of the existing service was implemented that allows you to restrict the returned data by date, by appending an "after" parameter to the url:&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/FeedGenerator.ashx?type=Article&amp;amp;stripCodeFormatting=true&amp;amp;after=2012-04-03%2014:57:57Z"&gt;http://www.silverlightshow.net/FeedGenerator.ashx?type=Article&lt;br /&gt;&amp;amp;stripCodeFormatting=true&lt;br /&gt;&amp;amp;after=2012-04-03%2014:57:57Z&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Retrieving a single new article then results in a really small transferred size, depending of course on the actual article content. At the moment, retrieving only the newest article for example only requires transmitting 15.428 bytes.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/MisterGoodcat/__________image_6.png"&gt;&lt;img style="border: 0px; background-image: none; margin: 0px auto; padding-left: 0px; padding-right: 0px; display: block; float: none; padding-top: 0px;" title="image" alt="image" src="http://www.silverlightshow.net/Storage/Users/MisterGoodcat/___________image_thumb_2.png" width="160" height="21" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;This means that after the initial download of the full articles list, successive downloads will be much faster.&lt;/p&gt;&lt;h3&gt;Mother of Optimization: Dynamic Data Compression&lt;/h3&gt;&lt;p&gt;Surprisingly few people know about the possibility to compress dynamic content on the fly in IIS. By default this feature is disabled, and you may even have to add it manually using the "Turn Windows features on or off" or server roles dialog of the operating system:&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/MisterGoodcat/__________image_8.png"&gt;&lt;img style="border: 0px; background-image: none; margin: 0px auto; padding-left: 0px; padding-right: 0px; display: block; float: none; padding-top: 0px;" title="image" alt="image" src="http://www.silverlightshow.net/Storage/Users/MisterGoodcat/__________image_thumb_3.png" width="429" height="362" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;This is a feature that comes virtually at no cost for normal application developers. In my experience, it also has little to no impact on existing clients and applications, as you are able to configure its details per application, and clients explicitly have to opt-in to make use of it (meaning if they don't support it, turning it on shouldn't break anything for existing clients). It does have some implications for your server however, because obviously it needs to compress the content it delivers on the fly now, which increases CPU load; if you're in doubt, talk to your system administrator or provider.&lt;/p&gt;&lt;p&gt;Unfortunately, Windows Phone devs do not fall into the "normal application developers" category; even the most recent version of the SDK does not have built-in support for compressed content, which means the available networking classes do not explicitly opt-in to the feature and also do not do the decompression for you transparently. The benefit you get from implementing this manually however is tremendous for text-based content (like RSS feeds), so it's something you should always consider. As often, some people have done most of the work for you already. Morten Nielsen for example has created &lt;a href="http://www.sharpgis.net/post/2012/01/23/Overwriting-the-default-WebRequest-used-by-WebClient.aspx"&gt;an implementation of this&lt;/a&gt; that you can use with just a few lines of code, and the package also is conveniently available &lt;a href="http://www.nuget.org/packages/SharpGIS.GZipWebClient"&gt;on NuGet&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;I've used a very similar technique in all of my Windows Phone development that required downloading text-based content; for the SilverlightShow app, the code looks like this:&lt;/p&gt;&lt;div id="codeSnippetWrapper" class="csharpcode-wrapper"&gt;&lt;div id="codeSnippet" class="csharpcode"&gt;&lt;pre class="alt"&gt;var request = WebRequest.CreateHttp(uri);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;&lt;span class="rem"&gt;// opt-in to compressed content&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;request.Headers[HttpRequestHeader.AcceptEncoding] = &lt;span class="str"&gt;"gzip"&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;var ar = request.BeginGetResponse(GetResponse_Callback, feedResult);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;&lt;span class="rem"&gt;// ...&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; (var response = feedResult.Request.EndGetResponse(ar))&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;  &lt;span class="kwrd"&gt;using&lt;/span&gt; (var stream = response.GetResponseStream())&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;  {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;    &lt;span class="rem"&gt;// decide what to do&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;    Stream decodedStream;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;    &lt;span class="kwrd"&gt;if&lt;/span&gt; (response.Headers[HttpRequestHeader.ContentEncoding] == &lt;span class="str"&gt;"gzip"&lt;/span&gt;)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;    {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;      decodedStream = &lt;span class="kwrd"&gt;new&lt;/span&gt; GZipStream(stream, CompressionMode.Decompress);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;    }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;    &lt;span class="kwrd"&gt;else&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;    {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;      &lt;span class="rem"&gt;// simply use the original&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;      decodedStream = stream;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;    }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;    &lt;span class="rem"&gt;// ...&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alt"&gt;  }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre class="alteven"&gt;} &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;Here, "GZipStream" is my own custom implementation similar to what Morten has developed himself. The savings are tremendous. The original feed that currently has 1,591,787 bytes, without any of the other phone optimizations applied, is reduced to a size of 302,537 bytes:&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/MisterGoodcat/_______image_10.png"&gt;&lt;img style="border: 0px; background-image: none; margin: 0px auto; padding-left: 0px; padding-right: 0px; display: block; float: none; padding-top: 0px;" title="image" alt="image" src="http://www.silverlightshow.net/Storage/Users/MisterGoodcat/________image_thumb_4.png" width="167" height="23" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;h2&gt;Final Comparison&lt;/h2&gt;&lt;p&gt;Let's take a final look at the before and after situation for the articles RSS feed with all the optimizations in place:&lt;/p&gt;&lt;table border="1" cellspacing="0" cellpadding="2" width="643"&gt;    &lt;tbody&gt;        &lt;tr&gt;            &lt;td valign="top" style="width: 179px;"&gt;&amp;nbsp;&lt;/td&gt;            &lt;td valign="top" style="width: 207px;"&gt;&lt;strong&gt;Original RSS&lt;/strong&gt;&lt;/td&gt;            &lt;td valign="top" style="width: 209px;"&gt;&lt;strong&gt;Optimized for the phone + gzipped&lt;/strong&gt;&lt;/td&gt;            &lt;td valign="top" style="width: 46px;"&gt;            &lt;p style="text-align: center;"&gt;&lt;strong&gt;Saved&lt;/strong&gt;&lt;/p&gt;            &lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;            &lt;td valign="top" style="width: 179px;"&gt;&lt;strong&gt;Retrieving the full list (25/10)&lt;/strong&gt;&lt;/td&gt;            &lt;td valign="top" style="width: 207px;"&gt;            &lt;p style="margin-right: 0px;" dir="ltr"&gt;1,591,787 bytes&lt;/p&gt;            &lt;/td&gt;            &lt;td valign="top" style="width: 209px;"&gt;91,399 bytes&lt;/td&gt;            &lt;td valign="top" style="width: 46px;"&gt;            &lt;p style="text-align: center;"&gt;&lt;span style="color: #ff0000;"&gt;94%&lt;/span&gt;&lt;/p&gt;            &lt;/td&gt;        &lt;/tr&gt;        &lt;tr&gt;            &lt;td valign="top" style="width: 179px;"&gt;&lt;strong&gt;Update (1 new item)&lt;/strong&gt;&lt;/td&gt;            &lt;td valign="top" style="width: 207px;"&gt;            &lt;p style="margin-right: 0px;" dir="ltr"&gt;1,591,787 bytes&lt;/p&gt;            &lt;/td&gt;            &lt;td valign="top" style="width: 209px;"&gt;~5,000 &amp;ndash; 15,000 bytes&lt;/td&gt;            &lt;td valign="top" style="width: 46px;"&gt;            &lt;p style="text-align: center;"&gt;&lt;span style="color: #ff0000;"&gt;&amp;gt;99%&lt;/span&gt;&lt;/p&gt;            &lt;/td&gt;        &lt;/tr&gt;    &lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;This is a very reasonable amount of data to handle for the phone. Also please remember that we are only looking at the article feed here. All the other feeds we're using in the app (news, events etc.) are much smaller in their nature anyway, but have the same optimizations applied. This is one of the reasons why the app works well even with not so fast internet connections, and updating or refreshing the list typically only takes a few seconds, at the most.&lt;/p&gt;&lt;p&gt;Now that we have the possibility to pull content into the app, and also optimized the amount of data that has to be transferred for this, what do we do with that content? It's all HTML formatted text, images, and tables &amp;ndash; we need to find a way to nicely display that content to the user. This topic will be covered in the next part of the series.&lt;/p&gt;</description>      <link>http://www.silverlightshow.net/items/Creating-the-SilverlightShow-Windows-Phone-App-part-2.aspx</link>      <author>editorial@silverlightshow.net (Peter Kuhn )</author>      <comments>http://www.silverlightshow.net/items/Creating-the-SilverlightShow-Windows-Phone-App-part-2.aspx#comments</comments>      <guid isPermaLink="true">http://www.silverlightshow.net/items/Creating-the-SilverlightShow-Windows-Phone-App-part-2.aspx</guid>      <pubDate>Wed, 11 Apr 2012 11:43:00 GMT</pubDate>    </item>    <item>      <title>Metro app development hidden gem: anonymous type binding</title>      <category>developer</category>      <category>expression</category>      <category>silverlight</category>      <category>tech stuff</category>      <category>windows</category>      <category>xaml</category>      <link>http://feeds.timheuer.com/~r/timheuer/~3/I4Oa_9-ejI4/anonymous-type-binding-metro-style-app.aspx</link>      <description>&lt;p&gt;Just a little post to point out a hidden gem if you are a .NET developer creating a Metro style app: you can bind to anonymous types.  This came up in a discussion with a customer today that I was having and, frankly, I never tried it until then because my mind was back in Silverlight where this isn’t possible.  There may not be a tone of cases where this is valuable for you, but knowing it is there may help.&lt;/p&gt;  &lt;p&gt;Let’s assume I have a basic class Person:&lt;/p&gt;  &lt;div id="codeSnippetWrapper" style="cursor: text; font-size: 8pt; border-top: silver 1px solid; font-family: 'Courier New', courier, monospace; border-right: silver 1px solid; width: 97.5%; border-bottom: silver 1px solid; overflow: auto; padding-bottom: 4px; direction: ltr; text-align: left; padding-top: 4px; padding-left: 4px; margin: 20px 0px 10px; border-left: silver 1px solid; line-height: 12pt; padding-right: 4px; background-color: #f4f4f4"&gt;   &lt;div id="codeSnippet" style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;     &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum1" style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; Person&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum2" style="color: #606060"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum3" style="color: #606060"&gt;   3:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; Age { get; set; }&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum4" style="color: #606060"&gt;   4:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; FirstName { get; set; }&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum5" style="color: #606060"&gt;   5:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; Gender { get; set; }&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum6" style="color: #606060"&gt;   6:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;And in my application I have a list of that Person type that I somehow received.  In this example, I’m just hard-coding it right now. &lt;/p&gt;&lt;div id="codeSnippetWrapper" style="cursor: text; font-size: 8pt; border-top: silver 1px solid; font-family: 'Courier New', courier, monospace; border-right: silver 1px solid; width: 97.5%; border-bottom: silver 1px solid; overflow: auto; padding-bottom: 4px; direction: ltr; text-align: left; padding-top: 4px; padding-left: 4px; margin: 20px 0px 10px; border-left: silver 1px solid; line-height: 12pt; padding-right: 4px; background-color: #f4f4f4"&gt;  &lt;div id="codeSnippet" style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum1" style="color: #606060"&gt;   1:&lt;/span&gt; List&amp;lt;Person&amp;gt; people = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; List&amp;lt;Person&amp;gt;();&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum2" style="color: #606060"&gt;   2:&lt;/span&gt; people.Add(&lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Person() { Age = 38, FirstName = &lt;span style="color: #006080"&gt;"Tim"&lt;/span&gt;, Gender = &lt;span style="color: #006080"&gt;"Male"&lt;/span&gt; });&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum3" style="color: #606060"&gt;   3:&lt;/span&gt; people.Add(&lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Person() { Age = 9, FirstName = &lt;span style="color: #006080"&gt;"Zoe"&lt;/span&gt;, Gender = &lt;span style="color: #006080"&gt;"Female"&lt;/span&gt; });&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum4" style="color: #606060"&gt;   4:&lt;/span&gt; people.Add(&lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Person() { Age = 5, FirstName = &lt;span style="color: #006080"&gt;"Zane"&lt;/span&gt;, Gender = &lt;span style="color: #006080"&gt;"Male"&lt;/span&gt; });&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;I can then decide I want to bind to a ListView control which has a particular template:&lt;/p&gt;&lt;div id="codeSnippetWrapper" style="cursor: text; font-size: 8pt; border-top: silver 1px solid; font-family: 'Courier New', courier, monospace; border-right: silver 1px solid; width: 97.5%; border-bottom: silver 1px solid; overflow: auto; padding-bottom: 4px; direction: ltr; text-align: left; padding-top: 4px; padding-left: 4px; margin: 20px 0px 10px; border-left: silver 1px solid; line-height: 12pt; padding-right: 4px; background-color: #f4f4f4"&gt;  &lt;div id="codeSnippet" style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum1" style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ListView&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="PeopleList"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Width&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="500"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Height&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="300"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum2" style="color: #606060"&gt;   2:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ListView.ItemTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum3" style="color: #606060"&gt;   3:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;DataTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum4" style="color: #606060"&gt;   4:&lt;/span&gt;             &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;StackPanel&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Orientation&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Horizontal"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum5" style="color: #606060"&gt;   5:&lt;/span&gt;                 &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBlock&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="{Binding TheName}"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Margin&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="0,0,10,0"&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum6" style="color: #606060"&gt;   6:&lt;/span&gt;                 &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBlock&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="{Binding GuysAge}"&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum7" style="color: #606060"&gt;   7:&lt;/span&gt;             &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;StackPanel&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum8" style="color: #606060"&gt;   8:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;DataTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum9" style="color: #606060"&gt;   9:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ListView.ItemTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum10" style="color: #606060"&gt;  10:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ListView&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;Notice that I’m binding to properties (TheName and GuysAge) that don’t exist on my Person class?  In my code, I can then create a LINQ query to filter out only the “dudes” from my list and bind that result:&lt;/p&gt;&lt;div id="codeSnippetWrapper" style="cursor: text; font-size: 8pt; border-top: silver 1px solid; font-family: 'Courier New', courier, monospace; border-right: silver 1px solid; width: 97.5%; border-bottom: silver 1px solid; overflow: auto; padding-bottom: 4px; direction: ltr; text-align: left; padding-top: 4px; padding-left: 4px; margin: 20px 0px 10px; border-left: silver 1px solid; line-height: 12pt; padding-right: 4px; background-color: #f4f4f4"&gt;  &lt;div id="codeSnippet" style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum1" style="color: #606060"&gt;   1:&lt;/span&gt; var onlyGuys = from g &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; people&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum2" style="color: #606060"&gt;   2:&lt;/span&gt;                &lt;span style="color: #0000ff"&gt;where&lt;/span&gt; g.Gender == &lt;span style="color: #006080"&gt;"Male"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum3" style="color: #606060"&gt;   3:&lt;/span&gt;                orderby g.FirstName descending&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum4" style="color: #606060"&gt;   4:&lt;/span&gt;                select &lt;span style="color: #0000ff"&gt;new&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum5" style="color: #606060"&gt;   5:&lt;/span&gt;                {&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum6" style="color: #606060"&gt;   6:&lt;/span&gt;                    GuysAge = g.Age,&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum7" style="color: #606060"&gt;   7:&lt;/span&gt;                    TheName = g.FirstName,&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum8" style="color: #606060"&gt;   8:&lt;/span&gt;                    Gender = &lt;span style="color: #006080"&gt;"Dude"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum9" style="color: #606060"&gt;   9:&lt;/span&gt;                };&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum10" style="color: #606060"&gt;  10:&lt;/span&gt;  &lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum11" style="color: #606060"&gt;  11:&lt;/span&gt; PeopleList.ItemsSource = onlyGuys;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;The result is that my ListView now shows 2 people in the list.  Nice.&lt;/p&gt;&lt;h2&gt;Get in the real world&lt;/h2&gt;&lt;p&gt;Now I would probably agree that since you already have a strongly-typed class this is probably not the use case here.  It certainly might be helpful, but you already have a class (and in this example, one that you completely control so you could shape it to be what you really need).  What about those times you don’t have a class or you don’t own the type coming back?  JSON ring a bell?  Using the sample JSON response (I’m not focusing on how to retrieve data here just how to bind to it) from Twitter APIs, we can demonstrate how this might be more helpful.  Here’s the Twitter JSON data I’m referring to in this example: &lt;a href="https://dev.twitter.com/docs/api/1/get/statuses/mentions"&gt;Twitter Mentions API&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;My app wants to retrieve and bind to Twitter data but I don’t really want to have a “TwitterResponse” data type that I have to serialize in/out in my code.  The mention data is an array of mentions.  For the sake of simplicity I’ve basically put my JSON string in a file rather than confuse this sample in how to work with Twitter.  My code looks like this (assume that ‘data’ is the resulting Twitter mentions JSON string:&lt;/p&gt;&lt;div id="codeSnippetWrapper" style="cursor: text; font-size: 8pt; border-top: silver 1px solid; font-family: 'Courier New', courier, monospace; border-right: silver 1px solid; width: 97.5%; border-bottom: silver 1px solid; overflow: auto; padding-bottom: 4px; direction: ltr; text-align: left; padding-top: 4px; padding-left: 4px; margin: 20px 0px 10px; border-left: silver 1px solid; line-height: 12pt; padding-right: 4px; background-color: #f4f4f4"&gt;  &lt;div id="codeSnippet" style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum1" style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #008000"&gt;// parse the data into a JsonArray object&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum2" style="color: #606060"&gt;   2:&lt;/span&gt; var mentions = JsonArray.Parse(data);&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum3" style="color: #606060"&gt;   3:&lt;/span&gt;  &lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum4" style="color: #606060"&gt;   4:&lt;/span&gt; &lt;span style="color: #008000"&gt;// build the query out of the mentions&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum5" style="color: #606060"&gt;   5:&lt;/span&gt; var qry = from m &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; mentions&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum6" style="color: #606060"&gt;   6:&lt;/span&gt;           select &lt;span style="color: #0000ff"&gt;new&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum7" style="color: #606060"&gt;   7:&lt;/span&gt;           {&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum8" style="color: #606060"&gt;   8:&lt;/span&gt;               MentionText = m.GetObject()[&lt;span style="color: #006080"&gt;"text"&lt;/span&gt;].GetString(),&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum9" style="color: #606060"&gt;   9:&lt;/span&gt;               FromUser = m.GetObject()[&lt;span style="color: #006080"&gt;"user"&lt;/span&gt;].GetObject()[&lt;span style="color: #006080"&gt;"screen_name"&lt;/span&gt;].GetString(),&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum10" style="color: #606060"&gt;  10:&lt;/span&gt;               ProfilePic = m.GetObject()[&lt;span style="color: #006080"&gt;"user"&lt;/span&gt;].GetObject()[&lt;span style="color: #006080"&gt;"profile_image_url"&lt;/span&gt;].GetString()&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum11" style="color: #606060"&gt;  11:&lt;/span&gt;           };&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum12" style="color: #606060"&gt;  12:&lt;/span&gt;  &lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum13" style="color: #606060"&gt;  13:&lt;/span&gt; MentionData.ItemsSource = qry;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;Notice the LINQ query for creating a “new” type that I will bind to my ListView.  In my XAML I have a simple DataTemplate to demonstrate:&lt;/p&gt;&lt;div id="codeSnippetWrapper" style="cursor: text; font-size: 8pt; border-top: silver 1px solid; font-family: 'Courier New', courier, monospace; border-right: silver 1px solid; width: 97.5%; border-bottom: silver 1px solid; overflow: auto; padding-bottom: 4px; direction: ltr; text-align: left; padding-top: 4px; padding-left: 4px; margin: 20px 0px 10px; border-left: silver 1px solid; line-height: 12pt; padding-right: 4px; background-color: #f4f4f4"&gt;  &lt;div id="codeSnippet" style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum1" style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ListView&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="MentionData"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Width&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="500"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Height&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="300"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum2" style="color: #606060"&gt;   2:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ListView.ItemTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum3" style="color: #606060"&gt;   3:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;DataTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum4" style="color: #606060"&gt;   4:&lt;/span&gt;             &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;StackPanel&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum5" style="color: #606060"&gt;   5:&lt;/span&gt;                 &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBlock&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="{Binding FromUser}"&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum6" style="color: #606060"&gt;   6:&lt;/span&gt;                 &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBlock&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="{Binding MentionText}"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;TextWrapping&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Wrap"&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum7" style="color: #606060"&gt;   7:&lt;/span&gt;             &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;StackPanel&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum8" style="color: #606060"&gt;   8:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;DataTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum9" style="color: #606060"&gt;   9:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ListView.ItemTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum10" style="color: #606060"&gt;  10:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ListView&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;The result is me being able to create a LINQ query and create a new anonymous type and directly bind to it.&lt;/p&gt;&lt;p&gt;Voila!  Perhaps you already discovered this little gem and are using it.  It is a welcome addition to the data binding story for Metro style app development with XAML and .NET!  Of course the same benefit can be had for XML data using XLINQ queries, so while this example is for JSON data, really any source data applies…it is all about that new anonymous type you create!&lt;/p&gt;&lt;p&gt;Hope this helps!&lt;/p&gt;&lt;div id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:86164c5e-72f1-4846-afc7-26051fe8cdfc" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"&gt;&lt;span class="tags"&gt;tags: &lt;a href="http://timheuer.com/blog/Tags/linq/default.aspx" rel="tag"&gt;linq&lt;/a&gt;, &lt;a href="http://timheuer.com/blog/Tags/metro/default.aspx" rel="tag"&gt;metro&lt;/a&gt;, &lt;a href="http://timheuer.com/blog/Tags/win8/default.aspx" rel="tag"&gt;win8&lt;/a&gt;, &lt;a href="http://timheuer.com/blog/Tags/xaml/default.aspx" rel="tag"&gt;xaml&lt;/a&gt;, &lt;a href="http://timheuer.com/blog/Tags/windows+8/default.aspx" rel="tag"&gt;windows 8&lt;/a&gt;, &lt;a href="http://timheuer.com/blog/Tags/anonymous/default.aspx" rel="tag"&gt;anonymous&lt;/a&gt;, &lt;a href="http://timheuer.com/blog/Tags/databinding/default.aspx" rel="tag"&gt;databinding&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="wlWriterHeaderFooter" style="margin:0px; padding:0px 0px 0px 0px;"&gt;&lt;hr /&gt;&lt;div class="cc-license"&gt;This work is licensed under a &lt;a href="http://creativecommons.org/licenses/by/3.0/"&gt;Creative Commons Attribution By license.&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;img src="http://timheuer.com/blog/aggbug/14835.aspx" width="1" height="1" /&gt;&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/-pA7caVeGo7M-DaRb1OJX1i4JBo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-pA7caVeGo7M-DaRb1OJX1i4JBo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/-pA7caVeGo7M-DaRb1OJX1i4JBo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-pA7caVeGo7M-DaRb1OJX1i4JBo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/timheuer/~4/I4Oa_9-ejI4" height="1" width="1"/&gt;</description>      <creator xmlns="http://purl.org/dc/elements/1.1/">Tim Heuer</creator>      <guid isPermaLink="false">http://timheuer.com/blog/archive/2012/04/10/anonymous-type-binding-metro-style-app.aspx</guid>      <pubDate>Tue, 10 Apr 2012 15:38:12 GMT</pubDate>      <comments>http://timheuer.com/blog/archive/2012/04/10/anonymous-type-binding-metro-style-app.aspx#feedback</comments>      <comments xmlns="http://purl.org/rss/1.0/modules/slash/">10</comments>      <commentRss xmlns="http://wellformedweb.org/CommentAPI/">http://timheuer.com/blog/comments/commentRss/14835.aspx</commentRss>      <ping xmlns="http://madskills.com/public/xml/rss/module/trackback/">http://timheuer.com/blog/services/trackbacks/14835.aspx</ping>      <origLink xmlns="http://rssnamespace.org/feedburner/ext/1.0">http://timheuer.com/blog/archive/2012/04/10/anonymous-type-binding-metro-style-app.aspx</origLink>    </item>    <item>      <title>Stung by Azure Data Transfer fees</title>      <category>azure</category>      <category>developer</category>      <category>silverlight</category>      <category>tech stuff</category>      <category>windows</category>      <category>xaml</category>      <link>http://feeds.timheuer.com/~r/timheuer/~3/56zgwvKzjfA/sql-azure-data-transfer-billing-fees.aspx</link>      <description>&lt;p&gt;I should have known better honestly.  I’ve had &lt;a href="http://timheuer.com/blog/archive/2010/02/08/tracking-cloud-storage-usage-with-s3stat-amazon-s3-azure.aspx"&gt;one strike with cloud billing catching me by surprise&lt;/a&gt; and I’m not sure why I’m shocked it happened again.  This time, however, I thought I really did plan it out, pay attention to things and asked what I thought were the right questions.  Unfortunately I didn’t get the full answers.  This time I was stung by my shiny new &lt;a href="http://timheuer.com/blog/archive/2012/02/20/migrating-existing-sql-server-to-sql-azure.aspx"&gt;SQL Azure service choice&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;strong&gt;&lt;font color="#ff0000"&gt;UPDATE 12-APR-2012&lt;/font&gt;:&lt;/strong&gt; Based on comments I've received I feel the need to clarify that I'm not bashing Azure or cloud services in general here.  I don't think anywhere I indicated Azure was a crap product or that I hated it at all.  In fact, I indicated I was &lt;strong&gt;completely happy&lt;/strong&gt; with the service offering.  My frustration was *only* with the fact that the pricing was unclear to me based on how I researched it...that is all and nothing more.  As many have pointed out, cloud services like Azure are extremely important in the marketplace and the ability to scale real-time with minimal effort is an exceptional feature.  &lt;strong&gt;*FOR ME*&lt;/strong&gt; I currently don't have those needs so I couldn't justify the charges beyond what I had planned...that is all, nothing more.  My experience with SQL Azure was a positive one as a product.  Quick setup, familiar tools to manage, worry-free database management, great admin interface and a reliable data storage solution.  My architecture, however, just didn't prove ideal currently with my site not being in Azure as well.  When VM roles come out of beta I will be sure to evaluate moving sites there and plan better.&lt;/em&gt;&lt;/p&gt;&lt;p&gt;A while back I heard about the change in price for some Windows Azure services and the one that piqued my interest was the SQL Azure.  At the time it hit me right as I needed to move around some of my hosting aspects of my site.  The lure of the $5/month SQL Azure database (as long as it was &amp;lt; 100MB) was appealing to me.  The SQL server aspect of my site has always been a management headache for me as I don’t want to have to worry about growing logs, etc.&lt;/p&gt;&lt;h2&gt;Stung by marketing&lt;/h2&gt;&lt;p&gt;I followed the announcements to the &lt;a href="http://www.windowsazure.com"&gt;http://www.windowsazure.com&lt;/a&gt; site and read the descriptions of the services.  I was immediately convinced of the value and heck, it was a service from my company so why shouldn’t I give it a try and support it?  When I began to set it up, however, there were questions being asked during setup and I started to get concerned.  I asked around about if this $5 fee was really the only fee.  I didn’t want to get surprises by things like compute time.  Perhaps I wasn’t asking specific enough questions, but all answers I got was that signs pointed to &lt;em&gt;yes, that would be my only fee&lt;/em&gt;.&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: As of this writing yes I am a Microsoft employee, but this is my own opinion and I realize that peoples’ expectations and results vary.  This is only my experience.  I’m not only an employee but also a customer of Microsoft services and in this instance a full paying customer.  No internal benefits are used in my personal Azure hosting accounts.&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;Yesterday I learned that wasn’t the case.  I received my first Azure billing statement and it was way more than I expected.  Yes my $5 database was there as expected, but also was suddenly “Data Transfer” charges of $55.&lt;/p&gt;&lt;h2&gt;Trying to make sense of billing&lt;/h2&gt;&lt;p&gt;I immediately tried to make sense of this billing.  I immediately remembered that I had created a storage account as well for a quick test and perhaps I forgot to disable/delete that service.  I logged into the management portal and saw that my storage account was properly deleted and nowhere to be seen.  But how to make sense of these charges from the past week then?  Luckily Azure provides detail usage download data so I grabbed that.  The CSV file I download did indeed provide some detail…perhaps too much as some of it I couldn’t discern, namely the one piece that I had hoped would help me: Resource ID.  This ID was a GUID that I thought pointed to a service that I used.  It did not, or at least that GUID was nowhere to be seen on my Azure management portal.&lt;/p&gt;&lt;p&gt;I contacted the billing support immediately to help.  I was able to talk with a human fairly quickly which was a plus.  The gentleman explained to me that I had a lot of outgoing data leaving the Azure data centers and that was the source of the costs.  He asked if I knew if anything was connecting to my SQL Azure instance externally.  Well, duh, yes it was my site!  He went on to explain that this constitutes “Data Transfer” and I’m billed at a per GB rate for any data that leaves the Azure data center.  &lt;/p&gt;&lt;p&gt;I took a deep breath and asked where this was documented in my SQL Azure sign-up process.  We walked through the site together and he agreed that it wasn’t clear.  After being put on hold for a while, I was assured I would receive a credit for the misunderstanding.  Unfortunately for Azure, the damage was done and they lost a customer.&lt;/p&gt;&lt;h2&gt;Where the failure occurred&lt;/h2&gt;&lt;p&gt;For me the failure was twofold: me for not fully understanding terms and Azure for not fully explaining them in context.  I say “in context” because that was the key piece that was missing in my registration of my account.  Let me explain the flow I took (as I sent this same piece of internal feedback today as well) as a customer once I heard the announcement about the SQL Azure pricing changes:&lt;/p&gt;&lt;ul&gt;    &lt;li&gt;I received notice of updated SQL Azure pricing&lt;/li&gt;    &lt;li&gt;I visited the site &lt;a href="http://www.windowsazure.com"&gt;http://www.windowsazure.com&lt;/a&gt; for more information&lt;/li&gt;    &lt;li&gt;I clicked the top-level “PRICING” link provided as that was my fear&lt;/li&gt;    &lt;li&gt;I was presented with a fancy graphical calculator.  I moved the slider up to 100MB and confirmed the pricing on the side (no asterisks or anything)&lt;/li&gt;    &lt;li&gt;I notice a “Learn more about pricing, billing and metering” link underneath the calculator and click it to learn more&lt;/li&gt;    &lt;li&gt;I’m presented with a section of 10 different options all presented at the same level giving the appearance as unique services.&lt;/li&gt;    &lt;li&gt;I choose the Database one and again read through and confirm the charge for the 100MB database option.&lt;/li&gt;    &lt;li&gt;I click the “More about databases” link to double-verify and am presented with another detailed description of the billing&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Not once during that process was &lt;strong&gt;context&lt;/strong&gt; provided.  Not at any of the steps above (3 different pricing screens) was there context that additional fees could also apply to any given service.  Data transfer, in fact, doesn’t even describe itself very well.  As I was assured in asking folks involved in Azure about my concern on pricing, this “Data Transfer” wasn’t brought up at all.  I’m not sure why at all it is listed along side services and almost presented as a separate service as it appears &lt;strong&gt;all Azure services are subject to data transfer fees&lt;/strong&gt;.  This is not made clear during sign up nor marketing of the pricing for each service.  SQL Azure should clearly state that the fees are database *plus* any additional fees resulting from data transfer.  Heck Amazon does this with S3 which also makes it so confusing to anticipate the cost of billing there as well…but at least it is presented that I need to factor that into my calculation.&lt;/p&gt;&lt;h2&gt;I’m to blame, so why am I whining&lt;/h2&gt;&lt;p&gt;I said I’m to blame as well for not understanding better what I’m getting into.  It is unfortunate because I really did like the service and felt an assurance of more reliability with my database then I had before.  The management portal was great and the uptime and log management was something I didn’t have to think about anymore.  &lt;/p&gt;&lt;p&gt;So why, you might ask, am I complaining about a service fee for something that was providing me value?  &lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; You may ask why I didn’t just move my site within Azure as well so that no data would be leaving the data centers.  This is a fair question, but unfortunately my site won’t run on any Azure hosting services and additionally I manage a few sites on a single server so it is cost prohibitive to have multiple Azure hosting instances for me right now.&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;Well it is simple.  I’m not made of money.  This blog has no accounting department or annual budget and such, I have to be smart about even the smallest cost.  I already have sunk costs into the server that hosts this site as well as a few others.  A $5/month database fee was nothing and justifiable easily with the value I was getting and the minor additional cost.  $50 (and growing) just wasn’t justifiable to me.  It was already at the same cost as my dedicated server and just no longer made sense for my scenario here.  In this instance I’m the “little guy” and need to think like one.  Perhaps cloud services are not for me.&lt;/p&gt;&lt;h2&gt;Summary&lt;/h2&gt;&lt;p&gt;So what did I learn?  Well, I really need to understand bandwidth and transfer data better for the sites I have.  Unfortunately this isn’t totally predictable for me and as such if I can’t predict the cost then it isn’t something that I should be using.  If you are considering these types of services regardless of if they are from Azure or Amazon (or whomever) you need to really plan out not only the service but &lt;strong&gt;how&lt;/strong&gt; it will be used.  Don’t be lured by those shiny cost calculators that let you use sliders and show you awesome pricing but don’t help you estimate (or alert you) to that some of those sliders should be linked together.&lt;/p&gt;&lt;p&gt;I think Azure (and other similar services) have real customer value…there is no doubt in that.  For me, however, it just isn’t the time right now.  The services, based on my configuration needs, just don’t make sense.  Had I had a clearer picture of this when signing up, I wouldn’t have been in this situation of frustration.  Choose your services wisely and understand your total usage of them.  For me it currently doesn’t make sense and I’m moving back to a SQL Express account on my server.  Yes I’ll have to manage it a bit more, but my costs will be known and predictable.&lt;/p&gt;&lt;p&gt;Hope this helps.&lt;/p&gt;&lt;div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:d3f75367-dd63-4bea-9e5d-55c2d4168746" style="margin: 0px; padding: 0px; float: none; display: inline;"&gt;&lt;span class="tags"&gt;tags: &lt;a rel="tag" href="http://timheuer.com/blog/Tags/azure/default.aspx"&gt;azure&lt;/a&gt;, &lt;a rel="tag" href="http://timheuer.com/blog/Tags/cloud/default.aspx"&gt;cloud&lt;/a&gt;, &lt;a rel="tag" href="http://timheuer.com/blog/Tags/s3/default.aspx"&gt;s3&lt;/a&gt;, &lt;a rel="tag" href="http://timheuer.com/blog/Tags/amazon/default.aspx"&gt;amazon&lt;/a&gt;, &lt;a rel="tag" href="http://timheuer.com/blog/Tags/sql/default.aspx"&gt;sql&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="wlWriterHeaderFooter" style="margin: 0px; padding: 0px;"&gt;&lt;hr /&gt;&lt;div class="cc-license"&gt;This work is licensed under a &lt;a href="http://creativecommons.org/licenses/by/3.0/"&gt;Creative Commons Attribution By license.&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;img src="http://timheuer.com/blog/aggbug/14834.aspx" width="1" height="1" /&gt;&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/BKQiXRGZJ5ymOxoukPwNMFW14qQ/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/BKQiXRGZJ5ymOxoukPwNMFW14qQ/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/BKQiXRGZJ5ymOxoukPwNMFW14qQ/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/BKQiXRGZJ5ymOxoukPwNMFW14qQ/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/timheuer/~4/56zgwvKzjfA" height="1" width="1"/&gt;</description>      <creator xmlns="http://purl.org/dc/elements/1.1/">Tim Heuer</creator>      <guid isPermaLink="false">http://timheuer.com/blog/archive/2012/04/09/sql-azure-data-transfer-billing-fees.aspx</guid>      <pubDate>Tue, 10 Apr 2012 05:46:38 GMT</pubDate>      <comments>http://timheuer.com/blog/archive/2012/04/09/sql-azure-data-transfer-billing-fees.aspx#feedback</comments>      <comments xmlns="http://purl.org/rss/1.0/modules/slash/">28</comments>      <commentRss xmlns="http://wellformedweb.org/CommentAPI/">http://timheuer.com/blog/comments/commentRss/14834.aspx</commentRss>      <ping xmlns="http://madskills.com/public/xml/rss/module/trackback/">http://timheuer.com/blog/services/trackbacks/14834.aspx</ping>      <origLink xmlns="http://rssnamespace.org/feedburner/ext/1.0">http://timheuer.com/blog/archive/2012/04/09/sql-azure-data-transfer-billing-fees.aspx</origLink>    </item>    <item>      <title>Windows 8 and the future of XAML: Part 4: Contracts in WinRT/Windows 8</title>      <description>&lt;table width="20"&gt;    &lt;tbody&gt;        &lt;tr&gt;            &lt;td&gt;            &lt;div class="fb-like" data-show-faces="true" data-send="false" data-href="http://www.silverlightshow.net/items/Windows-8-and-the-future-of-XAML-Part-4-Contracts-in-WinRT-Windows-8.aspx" data-font="segoe ui" data-layout="button_count"&gt;&lt;/div&gt;            &lt;/td&gt;            &lt;td&gt;&lt;a href="https://twitter.com/share" class="twitter-share-button" data-via="silverlightshow" data-counturl="http://www.silverlightshow.net/items/Windows-8-and-the-future-of-XAML-Part-4-Contracts-in-WinRT-Windows-8.aspx" data-count="horizontal" data-text="Reading @gillcleeren's article '#Windows8 &amp;amp; the future of #XAML: Part 4: Contracts in #WinRT/#Win8" data-url="http://slshow.net/IGTnGR"&gt;Tweet&lt;/a&gt;&lt;/td&gt;            &lt;td&gt;&lt;g:plusone size="medium" href="http://www.silverlightshow.net/items/Windows-8-and-the-future-of-XAML-Part-4-Contracts-in-WinRT-Windows-8.aspx"&gt;&lt;/g:plusone&gt;            &lt;/td&gt;            &lt;td&gt;            &lt;/td&gt;        &lt;/tr&gt;    &lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;In the previous article of this series, we wrote our first lines of code for WinRT. The main message was that although WinRT is a new API, we can still use our familiar languages to create Metro style applications. We have used the XAML/C# combination, but it&amp;rsquo;s perfectly possible to use XAML/VB or XAML/C++ as well. We&amp;rsquo;ll be using more of the API in the coming articles but in this article, we&amp;rsquo;ll focus on some specifics around contracts, more specifically, the Search contract. Contracts enable Metro applications to communicate with each other or with Windows itself without there being a hard reference in place.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Sources/SearchTest.zip"&gt;The code for this article is available here.&lt;/a&gt;&lt;/p&gt;&lt;h2&gt;Contracts: what are they&lt;/h2&gt;&lt;p&gt;You are probably familiar with the term and meaning of a contract. It&amp;rsquo;s basically an agreement between two parties where they agree on some mutual aspect.&lt;/p&gt;&lt;div style="border: 1px solid #dddddd; padding-bottom: 5px; background-color: #f3f3f3; margin-top: 5px; padding-left: 10px; width: 200px; float: right; margin-left: 10px; margin-right: 5px; padding-top: 5px;"&gt;&lt;h3&gt;Don't miss...&lt;/h3&gt;&lt;ul style="list-style-type: circle; margin: 0px; padding-left: 20px; font-size: 12px;"&gt;    &lt;li style="padding-bottom: 5px;"&gt;&lt;a href="http://www.silverlightshow.net/video/Recording-of-Contracts-in-Win8-Webinar.aspx"&gt;Recording of Gill's webinar: Contracts and Charms in Windows 8&lt;/a&gt; &lt;/li&gt;    &lt;li style="padding-bottom: 5px;"&gt;&lt;a href="http://www.silverlightshow.net/items/Using-the-Live-SDK-in-Windows-8-XAML-C-Metro-Applications.aspx"&gt;Article: Using the Live SDK in Windows 8 XAML/C# Metro Applications&lt;/a&gt; &lt;/li&gt;    &lt;li style="padding-bottom: 5px;"&gt;&lt;a href="http://www.silverlightshow.net/ebooks/win8_odata.aspx"&gt;Ebook: Windows 8 XAML Metro Apps with OData&lt;/a&gt; &lt;/li&gt;&lt;/ul&gt;&lt;p style="padding-bottom: 5px; text-align: center;"&gt;&lt;a href="http://www.silverlightshow.net/ebooks/win8_odata.aspx" target="_self"&gt;&lt;img style="width: 107px; height: 150px;" alt="Ebook: Windows 8 XAML Metro Apps with OData" src="http://www.silverlightshow.net/Storage/Ebooks/win8_odata.png" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="http://www.silverlightshow.net/ebooks.aspx"&gt;All SilverlightShow Ebooks&lt;/a&gt;&amp;nbsp;&lt;img alt="" src="http://www.silverlightshow.net/Storage/arrow-content.jpg" /&gt;&lt;/p&gt;&lt;/div&gt;When you use an interface, you&amp;rsquo;re using a software contract: your interface defines a contract that classes implementing this interface need to oblige to. If they don&amp;rsquo;t, they are breaking the contract, hence the functionality is not guaranteed.&lt;p&gt;Windows 8 defines contracts as well. Like with other contracts, they are a way of making sure that the users of the contract will oblige certain rules. In the case of Windows 8, the participants for the contract are the apps: some contracts take place between two applications, mediated by Windows itself, others are between an app and Windows.&lt;/p&gt;&lt;p&gt;Windows 8 defines quite a few contracts. The most important ones are the search contract, the share contract, the settings contract and the App-To-App picker contract. There are more contracts available, but when you start with implementing these in your application, you&amp;rsquo;ll definitely be adding a good experience to your app. For the other contracts, head over to &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/hh464906.aspx"&gt;this page&lt;/a&gt; on MSDN.&lt;/p&gt;&lt;p&gt;Now that we have a basic understanding of what a contract is, let&amp;rsquo;s take a look at how the end-user will experience these contracts. We&amp;rsquo;ll start our exploration by looking at the search contract.&lt;/p&gt;&lt;h4&gt;The Search contract from the end-user perspective&lt;/h4&gt;&lt;p&gt;Searching for information is very important in today&amp;rsquo;s world. We are constantly searching on the web but also locally on our machine/device. During a regular day, I often enter a search query in my Outlook search bar (thank God it still likes searching over 15GB of mails&amp;hellip;) or I enter a short string as search query in my start menu. Quite often, I (and countless of users worldwide) rely on search to quickly find the information we need on our machine without remembering where we put it in the first place. The same thing happens when I need to find something in my control panel: when I look for the administrative tools, I don&amp;rsquo;t start clicking my way to them. Instead, I enter a query and find them, probably faster than when I would have started navigating.&lt;/p&gt;&lt;p&gt;Windows 8 is built around apps. These apps have a lot of information available as well. This information is by default reachable by opening the app and then searching from within the app.&lt;/p&gt;&lt;p&gt;In Windows 8, Microsoft has built in an integrated way of searching. When we enter a search query when we are in the Metro environment, Windows will by default search for apps, settings and files as can be seen on the image below. Note that this search is conducted from within Windows itself (you&amp;rsquo;ll see why this is important in just a second).&lt;/p&gt;&lt;p&gt;&lt;img style="border: 0px; display: inline;" title="clip_image001" alt="clip_image001" src="http://www.silverlightshow.net/Storage/Users/gillcleeren/clip_image001_e3cf4571-fe38-4a46-882f-96bf02a50570.png" width="395" height="346" /&gt;&lt;/p&gt;&lt;p&gt;When we select any of the top 3 options, we can see that the list of results is being shown. Here we see results for apps.&lt;/p&gt;&lt;p&gt;&lt;img style="border: 0px; display: inline;" title="clip_image003" alt="clip_image003" src="http://www.silverlightshow.net/Storage/Users/gillcleeren/clip_image003_b7d514a7-46d1-4b82-8d7e-f8c46358227f.jpg" width="609" height="151" /&gt;&lt;/p&gt;&lt;p&gt;Below we see results for files being shown.&lt;/p&gt;&lt;p&gt;&lt;img style="border: 0px; display: inline;" title="clip_image005" alt="clip_image005" src="http://www.silverlightshow.net/Storage/Users/gillcleeren/clip_image005_885b333c-804f-4470-9410-f29762e657a5.jpg" width="609" height="274" /&gt;&lt;/p&gt;&lt;p&gt;Down at the bottom of the search pane, we see a list of apps. This list is composed out of all the apps that have implemented the search contract. To do so, they have made it clear through a declaration (we&amp;rsquo;ll see what exactly is a declaration later in this article) that they can be searched from within Windows. When selecting an app (here we have used the Store app), the app will open and we are immediately transported to the search results page. Below, you can see the Store app showing search results. The app was activated through search. &lt;/p&gt;&lt;p&gt;&lt;img style="border: 0px; display: inline;" title="clip_image007" alt="clip_image007" src="http://www.silverlightshow.net/Storage/Users/gillcleeren/clip_image007_66728430-4097-4312-94db-6fe744abd5cf.jpg" width="608" height="170" /&gt;&lt;/p&gt;&lt;p&gt;With this app open, we can search again. Notice now that at the top, we are searching within the app. Searching is made consistent all throughout Windows. The active app can now send query suggestions and result suggestions. Query suggestions are returned by the running application to help the end user in finding what he&amp;rsquo;s probably looking for. Result suggestions are more specific in that they also contain an icon of the search result. Both of these can be implemented through code inside your application.&lt;/p&gt;&lt;p&gt;&lt;img style="border: 0px; display: inline;" title="clip_image008" alt="clip_image008" src="http://www.silverlightshow.net/Storage/Users/gillcleeren/clip_image008_ad71a94f-26b8-490d-9258-f816e61ed40e.png" width="335" height="410" /&gt;&lt;/p&gt;&lt;p&gt;Below you can see result suggestions.&lt;/p&gt;&lt;p&gt;&lt;img style="border: 0px; display: inline;" title="clip_image009" alt="clip_image009" src="http://www.silverlightshow.net/Storage/Users/gillcleeren/clip_image009_e7c93ed0-5982-4048-a73b-679046f000f3.png" width="339" height="259" /&gt;&lt;/p&gt;&lt;p&gt;Let&amp;rsquo;s now take a look at how we can build an app that implements the search contract.&lt;/p&gt;&lt;h2&gt;The Search contract from the developer perspective&lt;/h2&gt;&lt;p&gt;If we think of the possible ways of searching we just saw above, we can see the following items to be implemented by the developer to make his application implement the search contract:&lt;/p&gt;&lt;ul&gt;    &lt;li&gt;Declare that the application can be search through a declaration&lt;/li&gt;    &lt;li&gt;Write code that reacts to the application being activated ( while it wasn&amp;rsquo;t running) for search and show the results of that search query&lt;/li&gt;    &lt;li&gt;Write code to accept a search query while it was already running&lt;/li&gt;    &lt;li&gt;Send search suggestions and query suggestions to Windows to be shown in the search pane while it&amp;rsquo;s running&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;We&amp;rsquo;ll now build a sample application that implements the search contract in full in the steps below. Create a new Windows 8 Metro style application and name it SearchTest.&lt;/p&gt;&lt;h3&gt;Adding the declaration for search&lt;/h3&gt;&lt;p&gt;Metro style apps are using a specific way of letting Windows know about their intentions and capabilities once installed on a user&amp;rsquo;s device.&lt;/p&gt;&lt;p&gt;By adding one or more capabilities, they are saying that they need to use a specific API for them to run properly on the system. For example, when an application needs to use the webcam, the developer needs to check the Webcam capability. This will then be shown in the Windows store so that the end user can decide on not using the application. Also, while running, the capabilities are checked by the runtime broker. &lt;/p&gt;&lt;p&gt;A declaration is different. It&amp;rsquo;s a way for the application to say to Windows that it will take part in some operations or contracts. One of the possible declarations is search. By enabling the search declaration, Windows will show your application in the list of possible search targets. We&amp;rsquo;ll see other declarations being used later in this article series.&lt;/p&gt;&lt;p&gt;We can enable the declaration in 2 ways. To do things manually, go to the manifest editor by double clicking on the Package.appxmanifest. In the Declarations tab, check Search as shown below.&lt;/p&gt;&lt;p&gt;&lt;img style="border: 0px; display: inline;" title="clip_image011" alt="clip_image011" src="http://www.silverlightshow.net/Storage/Users/gillcleeren/clip_image011_bd4666af-b22c-4957-a154-4edf51a260eb.jpg" width="608" height="345" /&gt;&lt;/p&gt;&lt;p&gt;A better way that will save us quite some work is adding a Search contract to the application. To do so, in the Add new item dialog, select Search contract. Files are being updated and added as well as the declaration being enabled for you.&lt;/p&gt;&lt;p&gt;&lt;img style="border: 0px; display: inline;" title="clip_image013" alt="clip_image013" src="http://www.silverlightshow.net/Storage/Users/gillcleeren/clip_image013_f0a39c95-2da0-49ac-8e77-873b93c46552.jpg" width="608" height="245" /&gt;&lt;/p&gt;&lt;p&gt;To test things out, let&amp;rsquo;s run the application now. When selecting the Search charm on the right, the Search pane pops up. Notice that it&amp;rsquo;s now scoped to search the current running application. &lt;/p&gt;&lt;p&gt;&lt;img style="border: 0px; display: inline;" title="clip_image014" alt="clip_image014" src="http://www.silverlightshow.net/Storage/Users/gillcleeren/clip_image014_d8680082-a9e4-4106-af5d-446a1c27e98f.png" width="359" height="347" /&gt;&lt;/p&gt;&lt;p&gt;Also, when searching from within Windows, the application is now shown in the list.&lt;/p&gt;&lt;p&gt;&lt;img style="border: 0px; display: inline;" title="clip_image015" alt="clip_image015" src="http://www.silverlightshow.net/Storage/Users/gillcleeren/clip_image015_74274a83-d9b8-4d3f-bba6-7d115416fcec.png" width="351" height="431" /&gt;&lt;/p&gt;&lt;p&gt;Both cases of searching don&amp;rsquo;t work yet (which is quite logical since we haven&amp;rsquo;t implemented searching yet). Let&amp;rsquo;s work on that!&lt;/p&gt;&lt;h3&gt;React to search activation&lt;/h3&gt;&lt;p&gt;Another things that&amp;rsquo;s done automatically by the Search contract template, is adding code in the OnSearchActivated() in the App.xaml.cs. Before we look at the code, a word on activation.&lt;/p&gt;&lt;p&gt;A Metro application in Windows 8 can be &amp;ldquo;started&amp;rdquo; in several ways. The most normal way is starting the app by tapping/clicking the tile. This triggers the OnLaunched() to be called in the App.xaml.cs. When the app isn&amp;rsquo;t running though and the user selects the app as the target for his/her search query, the application also executes the OnSearchActivated(). Effectively, the application gets activated for search. Through this event handler, the search query entered by the user is also passed in via the SearchActivatedEventArgs instance. This way, we know what the user wanted to find in our application. The code generated by the template is shown below.&lt;/p&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;div style="padding: 0px; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; text-align: left;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span style="color: #0000ff;"&gt;protected&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;override&lt;/span&gt; voidOnSearchActivated(Windows.ApplicationModel.Activation.SearchActivatedEventArgsargs)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;    SearchTest.MainSearch.Activate(args.QueryText);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;    &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;    &lt;span style="color: #008000;"&gt;//TODO: Move the following code to OnLaunched to speed up searches when your&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;    &lt;span style="color: #008000;"&gt;//       application is already running:&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;    &lt;span style="color: #008000;"&gt;//Windows.ApplicationModel.Search.SearchPane.GetForCurrentView().QuerySubmitted+=&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;    &lt;span style="color: #008000;"&gt;//(sender,queryArgs)=&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;    &lt;span style="color: #008000;"&gt;//{&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;    &lt;span style="color: #008000;"&gt;//    SearchTest.MainSearch.Activate(queryArgs.QueryText);&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;    &lt;span style="color: #008000;"&gt;//};&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;In the first line of the code, what happens is that MainSearch.Activate() event is called. This is code, generated in the MainSearch.xaml.cs (I called my search result page MainSearch here, you can give it any name of course) sets an instance of the MainSearch page through navigation of the application frame as the content of the application. This way, when the application is activated for search, the search results page is navigated to. If we start the application now again, go to Metro, enter a search query and target our application, the application activates and automatically goes to the search result page as you can see below.&lt;/p&gt;&lt;p&gt;&lt;img style="border: 0px; display: inline;" title="clip_image017" alt="clip_image017" src="http://www.silverlightshow.net/Storage/Users/gillcleeren/clip_image017_4e25a8ed-baba-4ad3-b7aa-c6ebf392170c.jpg" width="609" height="202" /&gt;&lt;/p&gt;&lt;p&gt;In the commented-out code, we see that VS11 is pointing us to the next topic: reacting to queries being submitted with the application running.&lt;/p&gt;&lt;h3&gt;Reacting to submitting queries&lt;/h3&gt;&lt;p&gt;When the application is running as the main foreground application (that does not include running in snap mode), the user can search by using the search charm the current application. To do so, we as developers need to subscribe to the QuerySubmitted() event. In the constructor of the BlankPage.xaml.cs, we can do so using the code below.&lt;/p&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;div style="padding: 0px; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; text-align: left;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span style="color: #0000ff;"&gt;private&lt;/span&gt; SearchPanesearchPane;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; BlankPage()&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;    &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.InitializeComponent();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;    &lt;span style="color: #008000;"&gt;//Get SearchPane object&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;    &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.searchPane=SearchPane.GetForCurrentView();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;    &lt;span style="color: #008000;"&gt;//Register for SearchPaneQuerySubmitted event&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;    &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.searchPane.QuerySubmitted+=searchPane_QuerySubmitted;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;When we run the application now and hit search (the search is of course scoped to the application since it has the search declaration), the entered query is returned to our application. We are automatically redirected to the event handler of the QuerySubmitted event. In there, we can get hold of the value through the SearchPaneQuerySubmittedEventArgs instance that is passed in, as shown below.&lt;/p&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;div style="padding: 0px; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; text-align: left;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; searchPane_QuerySubmitted(SearchPanesender,SearchPaneQuerySubmittedEventArgsargs)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;    SearchResultTextBlock.Text=&lt;span style="color: #006080;"&gt;"You've searched for: "&lt;/span&gt; + args.QueryText;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;Of course, in a real-life application, we can write code to perform a search (perhaps by calling a service) and then redirect the user to the search results page.&lt;/p&gt;&lt;h5&gt;Sending query suggestions&lt;/h5&gt;&lt;p&gt;An application that is running as the main application in the foreground can send query and result suggestions to Windows. Windows will show a maximum of 5. Note that by default, Windows will also show a search history. This comes for free; we don&amp;rsquo;t have to develop anything for this. Let&amp;rsquo;s see how we can make search suggestions work.&lt;/p&gt;&lt;p&gt;The first thing we need to do is registering for the SuggestionRequested event coming in. This event will be raised by Windows when the user starts typing in the search box. &lt;/p&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;div style="padding: 0px; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; text-align: left;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.searchPane.SuggestionsRequested += searchPane_SuggestionsRequested;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;When the event is effectively raised, we need to send suggestions. Just like with queries, the results can come from a service. In this sample code, we have hard-coded the list of possible suggestions. In the SearchPageSuggestionsRequestedEventArgs instance, we add our suggestions to the SearchSuggestionCollection. This list is then shown by Windows. Every time the user types something, this code is again executed. Therefore, be cautious what you place in there!&lt;/p&gt;&lt;div id="codeSnippetWrapper"&gt;&lt;div style="padding: 0px; line-height: 12pt; background-color: #f4f4f4; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; text-align: left;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;&lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; searchPane_SuggestionsRequested(SearchPane sender, SearchPaneSuggestionsRequestedEventArgs args)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;    &lt;span style="color: #0000ff;"&gt;string&lt;/span&gt;[] suggestions={&lt;span style="color: #006080;"&gt;"AAA"&lt;/span&gt;,&lt;span style="color: #006080;"&gt;"AAABBB"&lt;/span&gt;,&lt;span style="color: #006080;"&gt;"AAACCC"&lt;/span&gt;,&lt;span style="color: #006080;"&gt;"AAADDD"&lt;/span&gt;,&lt;span style="color: #006080;"&gt;"EEE"&lt;/span&gt;,&lt;span style="color: #006080;"&gt;"FFF"&lt;/span&gt;,&lt;span style="color: #006080;"&gt;"GGG"&lt;/span&gt;,&lt;span style="color: #006080;"&gt;"HHH"&lt;/span&gt;,&lt;span style="color: #006080;"&gt;"III"&lt;/span&gt;,&lt;span style="color: #006080;"&gt;"JJJ"&lt;/span&gt;,&lt;span style="color: #006080;"&gt;"KKK"&lt;/span&gt;,&lt;span style="color: #006080;"&gt;"LLL"&lt;/span&gt;,&lt;span style="color: #006080;"&gt;"MMM"&lt;/span&gt;,&lt;span style="color: #006080;"&gt;"NNN"&lt;/span&gt;,&lt;span style="color: #006080;"&gt;"OOO"&lt;/span&gt;,&lt;span style="color: #006080;"&gt;"PPP"&lt;/span&gt;,&lt;span style="color: #006080;"&gt;"QQQ"&lt;/span&gt;};&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;    &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;    &lt;span style="color: #0000ff;"&gt;foreach&lt;/span&gt;(&lt;span style="color: #0000ff;"&gt;string&lt;/span&gt; suggestion &lt;span style="color: #0000ff;"&gt;in&lt;/span&gt; suggestions)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;    {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;        &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt;(suggestion.StartsWith(args.QueryText, StringComparison.CurrentCultureIgnoreCase))&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;        {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;            args.Request.SearchSuggestionCollection.AppendQuerySuggestion(suggestion);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;        }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;        &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt;(args.Request.SearchSuggestionCollection.Size &amp;gt;= 5)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;        {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;            &lt;span style="color: #0000ff;"&gt;break&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;        }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;    }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none;"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;Below we can see the result of the search suggestions being sent by our application.&lt;/p&gt;&lt;p&gt;&lt;img style="border: 0px; display: inline;" title="clip_image018" alt="clip_image018" src="http://www.silverlightshow.net/Storage/Users/gillcleeren/clip_image018_0b3793d4-dcac-42d1-a76e-dbcf6028f8ee.png" width="354" height="359" /&gt;&lt;/p&gt;&lt;p&gt;We have successfully implemented the Search contract in our application.&lt;/p&gt;&lt;h2&gt;Summary&lt;/h2&gt;&lt;p&gt;Implementing the right contracts in your application is vital to its success. The user will come to expect that applications work as prescribed by the OS. In this sample, we saw how we could use WinRT code to implement the search contract in our applications. In the next article, we&amp;rsquo;ll see how to implement the share contract.&lt;/p&gt;&lt;h2&gt;About the author&lt;/h2&gt;&lt;p&gt;Gill Cleeren is Microsoft Regional Director (&lt;a href="http://www.theregion.com/" target="_blank"&gt;www.theregion.com&lt;/a&gt;), Silverlight MVP (former ASP.NET MVP) and Telerik MVP. He lives in Belgium where he works as .NET architect at Ordina (http://www.ordina.be/). Passionate about .NET, he&amp;rsquo;s always playing with the newest bits. In his role as Regional Director, Gill has given many sessions, webcasts and trainings on new as well as existing technologies, such as Silverlight, ASP.NET and WPF at conferences including TechEd Berlin 2010, TechDays Belgium &amp;ndash; Switzerland - Sweden, DevDays NL, NDC Oslo Norway, SQL Server Saturday Switserland, Spring Conference UK, Silverlight Roadshow in Sweden, Telerik RoadShow UK&amp;hellip; He&amp;rsquo;s also the author of many articles in various developer magazines and for SilverlightShow.net and he organizes the yearly Community Day event in Belgium. He also leads Visug (&lt;a href="http://www.visug.be/" target="_blank"&gt;www.visug.be&lt;/a&gt;), the largest .NET user group in Belgium. Gill recently published his first book: &amp;ldquo;Silverlight 4 Data and Services Cookbook&amp;rdquo; (Packt Publishing). His second book, Silverlight 5 Data and Services Cookbook will be released early 2012. You can find his blog at &lt;a href="http://www.snowball.be/" target="_blank"&gt;www.snowball.be&lt;/a&gt;. &lt;/p&gt;&lt;p&gt;Twitter: @gillcleeren &lt;/p&gt;</description>      <link>http://www.silverlightshow.net/items/Windows-8-and-the-future-of-XAML-Part-4-Contracts-in-WinRT-Windows-8.aspx</link>      <author>editorial@silverlightshow.net (Gill Cleeren )</author>      <comments>http://www.silverlightshow.net/items/Windows-8-and-the-future-of-XAML-Part-4-Contracts-in-WinRT-Windows-8.aspx#comments</comments>      <guid isPermaLink="true">http://www.silverlightshow.net/items/Windows-8-and-the-future-of-XAML-Part-4-Contracts-in-WinRT-Windows-8.aspx</guid>      <pubDate>Tue, 10 Apr 2012 00:40:05 GMT</pubDate>    </item>    <item>      <title>Yet Another Podcast #63–Windows 8 with Shawn Wildermuth</title>      <link>http://feedproxy.google.com/~r/JesseLiberty-SilverlightGeek/~3/C92WgJfCSHU/</link>      <comments>http://jesseliberty.com/2012/04/09/yet-another-podcast-63windows-8-with-shawn-wildermuth/#comments</comments>      <pubDate>Mon, 09 Apr 2012 18:52:27 +0000</pubDate>      <creator xmlns="http://purl.org/dc/elements/1.1/">Jesse Liberty</creator>      <category><![CDATA[Essentials]]></category>      <category><![CDATA[HTML5]]></category>      <category><![CDATA[JavaScript]]></category>      <category><![CDATA[Observations]]></category>      <category><![CDATA[Patterns & Skills]]></category>      <category><![CDATA[Podcast]]></category>      <category><![CDATA[Windows 8]]></category>      <category><![CDATA[YapCast]]></category>      <guid isPermaLink="false">http://jesseliberty.com/?p=5242</guid>      <encoded xmlns="http://purl.org/rss/1.0/modules/content/"><![CDATA[Talking with Shawn Wildermuth about Windows 8 Development. Shawn Wildermuth is a nine-time Microsoft MVP (Data), member of the INETA Speaker&#8217;s Bureau and an author of seven books and dozens of articles on software development. Shawn is involved with Microsoft &#8230; Continue reading &#8594;<br/><br/>For the complete article and hyperlinks, please visit my blog at http://JesseLiberty.com<div class="feedflare"><a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=C92WgJfCSHU:OQDLeccExT8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=C92WgJfCSHU:OQDLeccExT8:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=C92WgJfCSHU:OQDLeccExT8:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?i=C92WgJfCSHU:OQDLeccExT8:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=C92WgJfCSHU:OQDLeccExT8:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?i=C92WgJfCSHU:OQDLeccExT8:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=C92WgJfCSHU:OQDLeccExT8:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?i=C92WgJfCSHU:OQDLeccExT8:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=C92WgJfCSHU:OQDLeccExT8:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?d=qj6IDK7rITs" border="0"></img></a></div><img src="http://feeds.feedburner.com/~r/JesseLiberty-SilverlightGeek/~4/C92WgJfCSHU" height="1" width="1"/>]]></encoded>      <commentRss xmlns="http://wellformedweb.org/CommentAPI/">http://jesseliberty.com/2012/04/09/yet-another-podcast-63windows-8-with-shawn-wildermuth/feed/</commentRss>      <comments xmlns="http://purl.org/rss/1.0/modules/slash/">1</comments>      <enclosure url="http://jesseliberty.com/wp-content/media/Show63.mp3" length="30662920" type="audio/mpeg" />      <origLink xmlns="http://rssnamespace.org/feedburner/ext/1.0">http://jesseliberty.com/2012/04/09/yet-another-podcast-63windows-8-with-shawn-wildermuth/</origLink>    </item>    <item>      <title>Interview with Braulio Diez on the new book 'Mastering LOB Development for Silverlight 5: A Case Study in Action' (by Packt Publishing)</title>      <description>&lt;p&gt;&lt;em&gt;&lt;a href="http://www.silverlightshow.net/book/Mastering-LOB-Development-for-Silverlight-5.aspx"&gt;&lt;img style="border:0px;  border-image: initial; background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; float: right;" title="lob_book" alt="lob_book" src="http://www.silverlightshow.net/Storage/Users/SilverlightShow/lob_book_3.png" width="176" height="209" /&gt;&lt;/a&gt;In this short SilverlightShow interview we talk with Braulio Diez who is a co-author of the recently released e/book &amp;lsquo;&lt;a href="http://www.silverlightshow.net/book/Mastering-LOB-Development-for-Silverlight-5.aspx"&gt;Mastering LOB Development for Silverlight 5: A Case Study in Action&lt;/a&gt;&amp;rsquo;. Thanks to &lt;a href="http://ads.silverlightshow.net/a.aspx?ZoneID=59&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=16437" target="_blank"&gt;&lt;img alt="" src="http://ads.silverlightshow.net/a.aspx?ZoneID=59&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=16437" width="0" height="0" style="border-width: 0px;border-style: solid;" /&gt;Packt Publishing&lt;/a&gt;, SilverlightShow readers may now purchase this book with a 27% discount using discount code &lt;strong&gt;dssvl2&lt;/strong&gt;! Enjoy!&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;SilverlightShow: &lt;/strong&gt;Hi Braulio! We have recently announced your new book &amp;lsquo;&lt;strong&gt;Mastering LOB Development for Silverlight 5&amp;rsquo; &lt;/strong&gt;on &lt;a href="http://www.silverlightshow.net/books.aspx"&gt;SilverlightShow Book Shelf&lt;/a&gt;, and it already got an unusually high number of visits. Following this interest, and thanks to &lt;a href="http://ads.silverlightshow.net/a.aspx?ZoneID=59&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=16437" target="_blank"&gt;&lt;img alt="" src="http://ads.silverlightshow.net/a.aspx?ZoneID=59&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=16437" width="0" height="0" style="border-width: 0px;border-style: solid;" /&gt;Packt Publishing&lt;/a&gt;, we also published &lt;strong&gt;a free chapter from the book&lt;/strong&gt; (&lt;a href="http://www.silverlightshow.net/items/Mastering-LOB-Development-for-Silverlight-5-Out-of-Browser-OOB-Applications-.aspx"&gt;read here&lt;/a&gt;). What do you think is the reason for this interest?&lt;/p&gt;&lt;p&gt;&lt;strong&gt;BD: &lt;/strong&gt;Developing LOB applications using Silverlight is a perfect match, it allows you to develop at high speed level and base your applications on a robust architecture. This book is focused on this hot topic, we have applied on it lessons learned from real world experience.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;SilverlightShow: &lt;/strong&gt;Which parts of the book have you authored, and what would you name as the top/most interesting concepts covered in those? &lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;BD: &lt;/strong&gt;I have authored the following parts: Architecture, RIA Services, OOB and Security. The parts I like the best from this book, is the &amp;ldquo;real&amp;rdquo; life approach to RIA Services, how to manage unhandled errors, and the Architecture part (MVVM + MEF + MVVM Light toolkit).&lt;/p&gt;&lt;p&gt;&lt;strong&gt;SilverlightShow:&lt;/strong&gt; Which do you think are the top 3 reasons for using Silverlight 5 for LOB applications?&lt;/p&gt;&lt;p&gt;&lt;strong&gt;BD: &lt;/strong&gt;Avoid the browser versioning hell, take advantage of using C# on the client side, and separation of concerns + unit testing.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;SilverlightShow: &lt;/strong&gt;Does Silverlight 5 lack something to become a perfect technology for LOB?&lt;/p&gt;&lt;p&gt;&lt;strong&gt;BD: &lt;/strong&gt;Does not work in an iPad or iPhone :)&lt;/p&gt;&lt;p&gt;&lt;strong&gt;SilverlightShow: &lt;/strong&gt;There have been a lot of discussions on the future of Silverlight. What does Windows 8 mean for the future of Silverlight, and how will Win8 affect the development of LOB apps with Silverlight? &lt;/p&gt;&lt;p&gt;&lt;strong&gt;BD: &lt;/strong&gt;Silverlight will have its place inside a desktop, if a tablet / mobile edition of the app is needed, we can take advantage of XAML + &lt;span style="font-size: 12pt; color: #cc0000; font-family: 'times new roman', serif;"&gt;&lt;/span&gt;C#&amp;nbsp;in WinRT.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;SilverlightShow: &lt;/strong&gt;Finally, why should someone get this book, rather than try to find coverage of the same topics on the Internet?&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;We have tried to cover in this book and end to end guide, based on real world experience, to quickly allow developers start implementing Silverlight LOB applications, it contains a complete LOB case study build gradually from start to finish throughout each chapter.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Thanks Braulio! Hope Silverlight developers will truly appreciate this book!&lt;/strong&gt;&lt;/p&gt;</description>      <link>http://www.silverlightshow.net/items/Interview-with-Braulio-Diez-on-the-new-book-Mastering-LOB-Development-for-Silverlight-5-A-Case-Study-in-Action-by-Packt-Publishing.aspx</link>      <author>editorial@silverlightshow.net (Silverlight Show )</author>      <comments>http://www.silverlightshow.net/items/Interview-with-Braulio-Diez-on-the-new-book-Mastering-LOB-Development-for-Silverlight-5-A-Case-Study-in-Action-by-Packt-Publishing.aspx#comments</comments>      <guid isPermaLink="true">http://www.silverlightshow.net/items/Interview-with-Braulio-Diez-on-the-new-book-Mastering-LOB-Development-for-Silverlight-5-A-Case-Study-in-Action-by-Packt-Publishing.aspx</guid>      <pubDate>Mon, 09 Apr 2012 12:00:00 GMT</pubDate>    </item>    <item>      <title>Activating the Nokia Lumia 900 Windows Phone</title>      <link>http://feeds.johnpapa.net/~r/JohnPapa/~3/WU3ZPZm7i6U/activating-the-nokia-lumia-900-windows-phone</link>      <description>&lt;p&gt;I received my Nokia Lumia 900 today and was very excited to open it. I had 3 goals for today:&lt;/p&gt; &lt;p&gt;1) activate it&lt;/p&gt; &lt;p&gt;2) make sure my unlimited data plan was still in place&lt;/p&gt; &lt;p&gt;3) get my apps to the new phone&lt;/p&gt; &lt;p&gt;I accomplished 1 and 2 and I am currently working on 3. I’ll be doing an &lt;a href="http://jpapa.me/lumia900unbox"&gt;unboxing post shortly after this here&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;&lt;em&gt;Disclaimer: this review is purely about the ordering, activation and setup process. So this is entirely on ATT … I’ll be reviewing the phone and the OS in a later hands on post.&lt;/em&gt;&lt;/p&gt; &lt;p&gt;&lt;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="DSC_2041" border="0" alt="DSC_2041" src="http://johnpapa.net/Media/Default/Windows-Live-Writer/Nokia-Lumia-900-Unboxing_107C9/DSC_2041_thumb.jpg" width="210" height="328"&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Don’t forget the Micro SIM&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Make sure you have a micro sim card before activating. If you went from a Samsung focus, like I did, then this will be key.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Activation&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;This took me about 30 minutes. I tried in vain for 15 minutes online to activate the phone. Eventually, I called Premier Support at 1-866-499-8008 and they had me turn both phones off, call me back on my wife’s cell phone, and then they activated the Lumia 900. In all, it was 30 minutes form when I opened the box and not a great experience, but it certainly could have been much worse. That it did not work online and that the guy kept putting me on hold without explaining anything was not good. But 30 minutes is not terrible. So I give this activation process a generous&amp;nbsp; 7/10.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Data Plan&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;I formerly had an unlimited data plan on my Samsung Focus. ATT no longer offers that plan. When I ordered the Lumia I made sure that they would put this plan back on my Lumia when I got it. They made a note of it and after 2.5 hours on a Sunday, I felt better about it. Then when I got my phone today I called the number they instructed me to call and they put the unlimited plan back on my phone. I’m very happy that honored their promise and despite the time on the phone, I give this a 8/10. They have me the impression that they will only be doing this for customers who have had the unlimited plan for a long time. Obviously, they are trying to phase it out completely.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Apps&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;I wish the apps would go to the Zune software so when I reconnect to my PC it would just resync them on the new phone. Or with Windows Live it would be great if it noticed the apps were not there, and asked me if I wanted them to be downloaded and installed. Alas, that’s not reality. I had to go through the marketplace and try to find all the apps I had before and install them 1 at a time. The good news is that they queue them up so I can tell it to go install 50 apps. The bad news is that this process really needs to be much simpler and less user involved. Overall, a 5/10 rating for me.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Overall Activation Process&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;It took a lot of time on the phone beforehand and during the activation and setup process, which really was not fun. I’d rather be spending that time with my family. In the end, it all works, so I am happy … but I give the activation and setup process 6/10 overall simply for the many hours of effort that I had to put into it Sunday and today.&lt;/p&gt;&lt;div class="feedflare"&gt;&lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=WU3ZPZm7i6U:zQdhbjvCiuw:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?i=WU3ZPZm7i6U:zQdhbjvCiuw:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=WU3ZPZm7i6U:zQdhbjvCiuw:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?i=WU3ZPZm7i6U:zQdhbjvCiuw:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=WU3ZPZm7i6U:zQdhbjvCiuw:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=WU3ZPZm7i6U:zQdhbjvCiuw:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JohnPapa/~4/WU3ZPZm7i6U" height="1" width="1"/&gt;</description>      <pubDate>Fri, 06 Apr 2012 23:27:20 GMT</pubDate>      <guid isPermaLink="false">http://johnpapa.net:80/activating-the-nokia-lumia-900-windows-phone</guid>      <origLink xmlns="http://rssnamespace.org/feedburner/ext/1.0">http://johnpapa.net:80/activating-the-nokia-lumia-900-windows-phone</origLink>    </item>    <item>      <title>Nokia Lumia 900 Windows Phone Unboxing</title>      <link>http://feeds.johnpapa.net/~r/JohnPapa/~3/-YGk1GH34O4/nokia-lumia-900-windows-phone-unboxing</link>      <description>&lt;p&gt;I just activated my Nokia Lumia 900 running the latest Windows Phone OS. I purchased the cyan colored Lumia … or blue to me &lt;img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://johnpapa.net/Media/Default/Windows-Live-Writer/Nokia-Lumia-900-Unboxing_10BF4/wlEmoticon-smile_2.png"&gt; I’ll post a thorough review later after I get more hands on time with it, but this post is all about first impressions. In short … WOW!&lt;/p&gt; &lt;p&gt;&lt;a href="http://johnpapa.net/Media/Default/Windows-Live-Writer/Nokia-Lumia-900-Unboxing_10BF4/a_2.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="a" border="0" alt="a" src="http://johnpapa.net/Media/Default/Windows-Live-Writer/Nokia-Lumia-900-Unboxing_10BF4/a_thumb.jpg" width="463" height="788"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;em&gt;Tip: Click on the photos for the full size versions. &lt;/em&gt;&lt;/p&gt; &lt;p&gt;If you want to see &lt;a href="http://johnpapa.net/activating-the-nokia-lumia-900-windows-phone"&gt;my activation process experience, you can check it out here&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;It arrived on time, as promised from ATT Wireless, via FedEx. Here is the phone inside the box and then a closeup of the box itself (with my number blocked out).&lt;/p&gt; &lt;p&gt;&lt;a href="http://johnpapa.net/Media/Default/Windows-Live-Writer/Nokia-Lumia-900-Unboxing_10BF4/DSC_2040.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="DSC_2040" border="0" alt="DSC_2040" src="http://johnpapa.net/Media/Default/Windows-Live-Writer/Nokia-Lumia-900-Unboxing_10BF4/DSC_2040_thumb.jpg" width="244" height="165"&gt;&lt;/a&gt;&amp;nbsp;&lt;a href="http://johnpapa.net/Media/Default/Windows-Live-Writer/Nokia-Lumia-900-Unboxing_10BF4/image_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://johnpapa.net/Media/Default/Windows-Live-Writer/Nokia-Lumia-900-Unboxing_10BF4/image_thumb.png" width="244" height="165"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;When I opened the Lumia box, I found a subtle reminder not to text and drive. How’d they know?&lt;/p&gt;   &lt;p&gt;&lt;a href="http://johnpapa.net/Media/Default/Windows-Live-Writer/Nokia-Lumia-900-Unboxing_10BF4/DSC_2042.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="DSC_2042" border="0" alt="DSC_2042" src="http://johnpapa.net/Media/Default/Windows-Live-Writer/Nokia-Lumia-900-Unboxing_10BF4/DSC_2042_thumb.jpg" width="244" height="165"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Here are the contents of the box laid out on the table. Notice that they sent a funky looking plug and USB cable, that looks oddly familiar. &lt;img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-winkingsmile" alt="Winking smile" src="http://johnpapa.net/Media/Default/Windows-Live-Writer/Nokia-Lumia-900-Unboxing_10BF4/wlEmoticon-winkingsmile_2.png"&gt; There is also a SIM card door key, that is needed to open the door for the sim card. My device came with a sim card already punched out and installed, which was nice. I was upgrading a Samsung Focus (first edition) to the Lumia on the same phone number. But the sim card is a different size, so they sent a new one and installed it for me. &lt;/p&gt; &lt;p&gt;&lt;a href="http://johnpapa.net/Media/Default/Windows-Live-Writer/Nokia-Lumia-900-Unboxing_10BF4/DSC_2043.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="DSC_2043" border="0" alt="DSC_2043" src="http://johnpapa.net/Media/Default/Windows-Live-Writer/Nokia-Lumia-900-Unboxing_10BF4/DSC_2043_thumb.jpg" width="210" height="328"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Here is the Lumia 900 cyan from the powered off state all the way through setup&amp;nbsp; and then its initial powered on state. Took about 8 seconds for the first boot to setup, then just a short bit to entered the setup information.&lt;/p&gt; &lt;p&gt;&lt;a href="http://johnpapa.net/Media/Default/Windows-Live-Writer/Nokia-Lumia-900-Unboxing_10BF4/DSC_2046.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="DSC_2046" border="0" alt="DSC_2046" src="http://johnpapa.net/Media/Default/Windows-Live-Writer/Nokia-Lumia-900-Unboxing_10BF4/DSC_2046_thumb.jpg" width="165" height="244"&gt;&lt;/a&gt;&lt;a href="http://johnpapa.net/Media/Default/Windows-Live-Writer/Nokia-Lumia-900-Unboxing_10BF4/DSC_2045.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="DSC_2045" border="0" alt="DSC_2045" src="http://johnpapa.net/Media/Default/Windows-Live-Writer/Nokia-Lumia-900-Unboxing_10BF4/DSC_2045_thumb.jpg" width="165" height="244"&gt;&lt;/a&gt;&lt;a href="http://johnpapa.net/Media/Default/Windows-Live-Writer/Nokia-Lumia-900-Unboxing_10BF4/DSC_2047.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="DSC_2047" border="0" alt="DSC_2047" src="http://johnpapa.net/Media/Default/Windows-Live-Writer/Nokia-Lumia-900-Unboxing_10BF4/DSC_2047_thumb.jpg" width="165" height="244"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://johnpapa.net/Media/Default/Windows-Live-Writer/Nokia-Lumia-900-Unboxing_10BF4/DSC_2049.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="DSC_2049" border="0" alt="DSC_2049" src="http://johnpapa.net/Media/Default/Windows-Live-Writer/Nokia-Lumia-900-Unboxing_10BF4/DSC_2049_thumb.jpg" width="165" height="244"&gt;&lt;/a&gt;&lt;a href="http://johnpapa.net/Media/Default/Windows-Live-Writer/Nokia-Lumia-900-Unboxing_10BF4/DSC_2051.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="DSC_2051" border="0" alt="DSC_2051" src="http://johnpapa.net/Media/Default/Windows-Live-Writer/Nokia-Lumia-900-Unboxing_10BF4/DSC_2051_thumb.jpg" width="165" height="244"&gt;&lt;/a&gt;&lt;a href="http://johnpapa.net/Media/Default/Windows-Live-Writer/Nokia-Lumia-900-Unboxing_10BF4/DSC_2052.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="DSC_2052" border="0" alt="DSC_2052" src="http://johnpapa.net/Media/Default/Windows-Live-Writer/Nokia-Lumia-900-Unboxing_10BF4/DSC_2052_thumb.jpg" width="165" height="244"&gt;&lt;/a&gt;&lt;/p&gt;     &lt;p&gt;I had to skip the Windows Live setup because I could not get activated right away. Once I was activated, all was well though. &lt;/p&gt; &lt;p&gt;I set up WiFi first and hooked up gmail, twitter (using Rowi from the marketplace), Facebook, and Windows Live. Took about 1 minute to get these going … so I was very happy with that.&lt;/p&gt; &lt;p&gt;The screen is awesome. Its bigger than the Samsung Focus and the colors just pop. You can see here the Lumia 900 is larger than the Samsung Focus, but only by a little bit. It appears (and feels) slightly thinner than the Focus too. &lt;/p&gt; &lt;p&gt;&lt;a href="http://johnpapa.net/Media/Default/Windows-Live-Writer/Nokia-Lumia-900-Unboxing_10BF4/DSC_2053.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="DSC_2053" border="0" alt="DSC_2053" src="http://johnpapa.net/Media/Default/Windows-Live-Writer/Nokia-Lumia-900-Unboxing_10BF4/DSC_2053_thumb.jpg" width="244" height="165"&gt;&lt;/a&gt;&lt;a href="http://johnpapa.net/Media/Default/Windows-Live-Writer/Nokia-Lumia-900-Unboxing_10BF4/DSC_2054.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="DSC_2054" border="0" alt="DSC_2054" src="http://johnpapa.net/Media/Default/Windows-Live-Writer/Nokia-Lumia-900-Unboxing_10BF4/DSC_2054_thumb.jpg" width="244" height="165"&gt;&lt;/a&gt;&lt;a href="http://johnpapa.net/Media/Default/Windows-Live-Writer/Nokia-Lumia-900-Unboxing_10BF4/DSC_2055.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="DSC_2055" border="0" alt="DSC_2055" src="http://johnpapa.net/Media/Default/Windows-Live-Writer/Nokia-Lumia-900-Unboxing_10BF4/DSC_2055_thumb.jpg" width="244" height="165"&gt;&lt;/a&gt;&lt;a href="http://johnpapa.net/Media/Default/Windows-Live-Writer/Nokia-Lumia-900-Unboxing_10BF4/DSC_2056.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="DSC_2056" border="0" alt="DSC_2056" src="http://johnpapa.net/Media/Default/Windows-Live-Writer/Nokia-Lumia-900-Unboxing_10BF4/DSC_2056_thumb.jpg" width="244" height="165"&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;It looks great, feels great in my hand (heavier than the Focus, but less toy like), and so far is very fast. I’ll reserve judgment on the final review for when I have time to do more hands on with it. But out of the gate, I was very impressed with the device!&lt;/p&gt;&lt;div class="feedflare"&gt;&lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=-YGk1GH34O4:n5sS9oAi6DU:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?i=-YGk1GH34O4:n5sS9oAi6DU:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=-YGk1GH34O4:n5sS9oAi6DU:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?i=-YGk1GH34O4:n5sS9oAi6DU:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=-YGk1GH34O4:n5sS9oAi6DU:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=-YGk1GH34O4:n5sS9oAi6DU:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JohnPapa/~4/-YGk1GH34O4" height="1" width="1"/&gt;</description>      <pubDate>Fri, 06 Apr 2012 23:26:34 GMT</pubDate>      <guid isPermaLink="false">http://johnpapa.net:80/nokia-lumia-900-windows-phone-unboxing</guid>      <origLink xmlns="http://rssnamespace.org/feedburner/ext/1.0">http://johnpapa.net:80/nokia-lumia-900-windows-phone-unboxing</origLink>    </item>    <item>      <title>Yet Another Podcast #62–Joe Stagner</title>      <link>http://feedproxy.google.com/~r/JesseLiberty-SilverlightGeek/~3/c_i_McKbK1Y/</link>      <comments>http://jesseliberty.com/2012/04/04/yet-another-podcast-62joe-stagner/#comments</comments>      <pubDate>Wed, 04 Apr 2012 15:39:20 +0000</pubDate>      <creator xmlns="http://purl.org/dc/elements/1.1/">Jesse Liberty</creator>      <category><![CDATA[Community]]></category>      <category><![CDATA[HTML5]]></category>      <category><![CDATA[JavaScript]]></category>      <category><![CDATA[Open Source]]></category>      <category><![CDATA[Podcast]]></category>      <category><![CDATA[YapCast]]></category>      <guid isPermaLink="false">http://jesseliberty.com/?p=5236</guid>      <encoded xmlns="http://purl.org/rss/1.0/modules/content/"><![CDATA[Talking with Joe Stagner about Mozilla and open source software and the open source culture. Joe’s Blog Joe on Twitter: @MisfitGeek Mozilla Apps Documentation Mozilla Hacks Blog Mozilla Marketplace App Submission Page Boot-to-Gecko Personal/Browser ID &#160; Listen &#124; Yet Another &#8230;...<br/><br/>For the complete article and hyperlinks, please visit my blog at http://JesseLiberty.com<div class="feedflare"><a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=c_i_McKbK1Y:UBLy2YAM6I0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=c_i_McKbK1Y:UBLy2YAM6I0:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=c_i_McKbK1Y:UBLy2YAM6I0:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?i=c_i_McKbK1Y:UBLy2YAM6I0:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=c_i_McKbK1Y:UBLy2YAM6I0:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?i=c_i_McKbK1Y:UBLy2YAM6I0:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=c_i_McKbK1Y:UBLy2YAM6I0:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?i=c_i_McKbK1Y:UBLy2YAM6I0:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=c_i_McKbK1Y:UBLy2YAM6I0:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?d=qj6IDK7rITs" border="0"></img></a></div><img src="http://feeds.feedburner.com/~r/JesseLiberty-SilverlightGeek/~4/c_i_McKbK1Y" height="1" width="1"/>]]></encoded>      <commentRss xmlns="http://wellformedweb.org/CommentAPI/">http://jesseliberty.com/2012/04/04/yet-another-podcast-62joe-stagner/feed/</commentRss>      <comments xmlns="http://purl.org/rss/1.0/modules/slash/">0</comments>      <enclosure url="http://jesseliberty.com/wp-content/media/Show62.mp3" length="26136759" type="audio/mpeg" />      <origLink xmlns="http://rssnamespace.org/feedburner/ext/1.0">http://jesseliberty.com/2012/04/04/yet-another-podcast-62joe-stagner/</origLink>    </item>    <item>      <title>Learn About External Templates with KnockoutJS</title>      <link>http://feeds.johnpapa.net/~r/JohnPapa/~3/deNLqIl8i4g/learn-about-external-templates-with-knockoutjs</link>      <description>&lt;p&gt;Templating is a killer feature of many technologies that helps reduce code and make it more manageable and adaptable. &lt;a href="http://www.knockoutjs.com"&gt;Knockout.js&lt;/a&gt; has a native template engine (or you can tie in a custom templating engine), but often I like to go a bit further and load my templates from external files. In this month’s &lt;a href="http://jpapa.me/HebUzm"&gt;Papa’s Perspective column in Visual Studio Magazine I cover the Knockout.js External Template Engine&lt;/a&gt; and how it makes using external templates with Knockout.js a breeze. Check it out.&lt;/p&gt; &lt;p&gt;&lt;a href="http://twitter.com/ifandelse"&gt;Jim Cowart&lt;/a&gt; wrote this library, pushed it to &lt;a href="https://github.com/ifandelse/Knockout.js-External-Template-Engine"&gt;github&lt;/a&gt;, and created a &lt;a href="http://nuget.org/packages/Knockout.js_External_Template_Engine/"&gt;NuGet package&lt;/a&gt; for it, so there’s no reason not to use it &lt;img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://johnpapa.net/Media/Default/Windows-Live-Writer/External-Templates-with-KnockoutJS_7A44/wlEmoticon-smile_2.png"&gt;. Just search for “Knockout” and you will find it in NuGet. &lt;a href="http://jpapa.me/komvvm"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto; padding-top: 0px" title="ko ps" border="0" alt="ko ps" src="http://johnpapa.net/Media/Default/Windows-Live-Writer/External-Templates-with-KnockoutJS_7A44/ko%20ps_3.png" width="504" height="81"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;I talk more Jim’s templating library and several ways to use templates with Knockout in my in depth Knockout course at &lt;a href="http://www.pluralsight.com"&gt;Pluralsight&lt;/a&gt;. So if you want to learn more, check out &lt;a href="http://jpapa.me/komvvm"&gt;Building HTML5 and JavaScript Apps with MVVM and Knockout&lt;/a&gt;.&lt;/p&gt;&lt;div class="feedflare"&gt;&lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=deNLqIl8i4g:Z5xdCm36n5I:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?i=deNLqIl8i4g:Z5xdCm36n5I:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=deNLqIl8i4g:Z5xdCm36n5I:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?i=deNLqIl8i4g:Z5xdCm36n5I:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=deNLqIl8i4g:Z5xdCm36n5I:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=deNLqIl8i4g:Z5xdCm36n5I:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JohnPapa/~4/deNLqIl8i4g" height="1" width="1"/&gt;</description>      <pubDate>Wed, 04 Apr 2012 13:13:42 GMT</pubDate>      <guid isPermaLink="false">http://johnpapa.net:80/learn-about-external-templates-with-knockoutjs</guid>      <origLink xmlns="http://rssnamespace.org/feedburner/ext/1.0">http://johnpapa.net:80/learn-about-external-templates-with-knockoutjs</origLink>    </item>    <item>      <title>Windows 8 Metro: Create your apps with simplicity in mind</title>      <description>&lt;table width="20"&gt;    &lt;tbody&gt;        &lt;tr&gt;            &lt;td&gt;            &lt;div class="fb-like" data-show-faces="true" data-send="false" data-href="http://www.silverlightshow.net/items/Windows-8-Metro-Create-your-apps-with-simplicity-in-mind.aspx" data-font="segoe ui" data-layout="button_count"&gt;&lt;/div&gt;            &lt;/td&gt;            &lt;td&gt;&lt;a href="https://twitter.com/share" class="twitter-share-button" data-via="silverlightshow" data-counturl="http://www.silverlightshow.net/items/Windows-8-Metro-Create-your-apps-with-simplicity-in-mind.aspx" data-count="horizontal" data-text="Read @aboschin's article '#Windows8 Metro: Create your apps w/ simplicity in mind' #win8 #win8dev" data-url="http://slshow.net/HdHYOX"&gt;Tweet&lt;/a&gt;&lt;/td&gt;            &lt;td&gt;&lt;g:plusone size="medium" href="http://www.silverlightshow.net/items/Windows-8-Metro-Create-your-apps-with-simplicity-in-mind.aspx"&gt;&lt;/g:plusone&gt;            &lt;/td&gt;            &lt;td&gt;            &lt;/td&gt;        &lt;/tr&gt;    &lt;/tbody&gt;&lt;/table&gt;&lt;p style="text-align: justify;"&gt;In the recent days an epocal change is becoming evident. If you tried to download the new Windows 8 Consumer Preview, available for free on Microsoft website, you know what I mean. The change, that is greatly focused on a new user experience, is driven by the growing power of portable devices that are becoming prevalent on common desktop and laptops. Up to the day before today, tablet PCs, smartphones, and generically speaking touch-enabled devices was expensive and not effective, but they are now something that common people start to take in serious consideration from the effectiveness perspective and also from the economical point of view.&lt;/p&gt;&lt;div style="border:1px solid #dddddd;border-image: initial; padding-bottom: 5px; background-color: #f3f3f3; margin-top: 5px; padding-left: 10px; width: 200px; float: right; margin-left: 10px; margin-right: 5px; padding-top: 5px;"&gt;&lt;h3&gt;Don't miss...&lt;/h3&gt;&lt;ul style="list-style-type: circle; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 20px; font-size: 12px;"&gt;    &lt;li style="padding-bottom: 5px;"&gt;&lt;a href="http://www.silverlightshow.net/Webinars.aspx"&gt;Our two Win 8 webinars on April 24 and May 17&lt;/a&gt; &lt;/li&gt;    &lt;li style="padding-bottom: 5px;"&gt;&lt;a href="http://www.silverlightshow.net/items/Windows-8-and-the-future-of-XAML-Part-1-An-overview-of-the-Windows-8-platform.aspx"&gt;The article series: Windows 8 and the future of XAML&lt;/a&gt; &lt;/li&gt;    &lt;li style="padding-bottom: 5px;"&gt;&lt;a href="http://www.silverlightshow.net/ebooks/wp7.aspx"&gt;Ebook by A. Boschin: Introduction to Windows Phone 7&lt;/a&gt; &lt;/li&gt;&lt;/ul&gt;&lt;p style="padding-bottom: 5px; text-align: center;"&gt;&lt;a href="http://www.silverlightshow.net/ebooks/wp7.aspx" target="_self"&gt;&lt;img style="width: 70px; height: 99px;" alt="Ebook by A. Boschin: Introduction to Windows Phone 7" src="http://www.silverlightshow.net/Storage/Ebooks/wp7_ebook_thumb.png" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="http://www.silverlightshow.net/ebooks.aspx"&gt;All SilverlightShow Ebooks&lt;/a&gt;&amp;nbsp;&lt;img alt="" src="http://www.silverlightshow.net/Storage/arrow-content.jpg" /&gt;&lt;/p&gt;&lt;/div&gt;&lt;p style="text-align: justify;"&gt;As said, this change is mostly focused on a new user experience due to the fact that there is a shift of the attention from the business software to the consumer market. Never like today the wide availability of consumer application have been important and this, joined with the new touch paradigm requires a completely new set of rules to design the experience and the interaction of the user with your software.&lt;/p&gt;&lt;p style="text-align: justify;"&gt;Starting with this article, I aim to begin a new series based on my evolving experience with the new Windows 8 Metro Applications. As few people knows I have a graphical background that lives side by side with my programmer soul. During this series I would like to discover most of the wonderful tools behind Metro applications but in this article I would like to briefly switch off my programmer side to take in serious consideration the design aspects behind Metro.&lt;/p&gt;&lt;h3&gt;The art of remove instead of add&lt;/h3&gt;&lt;p style="text-align: justify;"&gt;&lt;img style="background-image: none; margin-top: 7px; margin-right: 0px; margin-bottom: 0px; margin-left: 20px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; float: right;        border-width: 0px;border-style: solid;" title="Antoine de Saint-Exup&amp;eacute;ry" alt="Antoine de Saint-Exup&amp;eacute;ry" src="http://www.silverlightshow.net/Storage/Users/AndreaBoschin/20080925_saintexupery_3.jpg" width="139" height="167" /&gt;&lt;a href="http://en.wikipedia.org/wiki/Antoine_de_Saint-Exup%C3%A9ry" target="_blank"&gt;Antoine de Saint-Exup&amp;eacute;ry&lt;/a&gt;, a french writer and aviator lived in early 1900, one day pronounced a famous sentence: "&lt;em&gt;Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.&lt;/em&gt;". There is a deep truth behind these words and I know very few people that is able to embrace this concept when he is working on a project, no matter if he is drawing a furniture item or designing the user interface of the latest application.&lt;/p&gt;&lt;p style="text-align: justify;"&gt;Focusing on the software industry, what commonly happens is that a series of features are put togheter, they becomes a software with a complex user interface and most of the times the end-user is unable to use all these powerful features because they are hidden by the complexity or in the worst case they are simply unuseful. Have you ever asked yourself if all the features of your software are fully understand and used by your customers? I did this exercise and the result is mostly disappointing.&lt;/p&gt;&lt;p style="text-align: justify;"&gt;So, probably the "art of remove instead of add" is something you have to carefully evaluate. Generally speaking this does not apply only to the user interface of your next application, but it has to deeply permeate it with a careful evaluation on each single feature to understand if it is really useful and if it can be part of the whole. The question you have to ask yourself is simple: is it really useful? And the hard part is being brave considering unuseful something that people usually think as required.&lt;/p&gt;&lt;p style="text-align: justify;"&gt;As an example, think at an advanced search form, with lot of fields each one dedicated to the filtering of a specific property. You can search for the title, the abstract, the creation date and (why not?) for the deletion date, for the author, for the contributors, for the collection to which the item is part, etc... Omitting that a similar form can't be subject of an effective functional test, I guess that probably the end-user, after a moment of confusion, will write a word in the title field and then, pressing "Search", he will be unable to find what is searching for. &lt;/p&gt;&lt;p style="text-align: justify;"&gt;Google embraced simplicity and converted this complex form in a single field. Behind this field there is a complex syntax and logic, made of operators and of algorithms to effectively search, but people usually write one or two words in the textbox and it find what they need in the first ten results. Simple but not trivial. Embracing simplicity does not mean being trivial. It only mean to have the ability of hide the complication. &lt;/p&gt;&lt;p style="text-align: justify;"&gt;Watching to the consumer market, the simplicity become a must. The reason is that if your customer is a business company he will patiently call your helpline to ask you a question, but if the customer is a consumer he will simply delete your app to select another that does exactly what he need. To me, this is the main reason because, with the proposal of Windows Phone 7 and now with Windows 8, Microsoft worked on a series of guidelines that aim to become the standard of a new user experience language, a language that prefers the simplicity. Behind the "Metro Guidelines" there are a number of"pillars" that easily explain the way to the zen of the usability.&lt;/p&gt;&lt;h3&gt;The pillars of Metro Style&lt;/h3&gt;&lt;p style="text-align: justify;"&gt;Embracing a new style in designing an applications may be very hard, primarily because we are used to write our code leaving the aspect of the user interface to a set of "standard" components that leverage an user experience coming from ages ago. Few years ago Microsoft already tried to introduce a new way to design interfaces without a clear success, with WPF and Silverlight. I still remember the moan from people that just discovered the absence of a datagrid control in the Windows Presentation Foundation.&lt;/p&gt;&lt;p style="text-align: justify;"&gt;The proposition in leaving controls like the datagrid out of the games was a clear indication to people to search for a completely new user experience but unfortunately this call falled on a dry ground. The reason is to search in the absence of a proper guideline able to drive people to seamless change the feel about user experience.&lt;/p&gt;&lt;p style="text-align: justify;"&gt;With Windows Phone and now with Windows 8, Microsoft changes the strategy, proposing a slim set of rules called "Metro Design Principles". These guidelines are based on five pillars that can easily drive in embracing the change. Here is these pillars in my personal order of priority:&lt;/p&gt;&lt;h4&gt;Be authentically digital&lt;/h4&gt;&lt;p style="text-align: justify;"&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/AndreaBoschin/image_10.png"&gt;&lt;img style="border:0px;  border-image: initial; background-image: none; margin-top: 0px; margin-right: 14px; margin-bottom: 0px; margin-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; float: left;" title="image" alt="image" src="http://www.silverlightshow.net/Storage/Users/AndreaBoschin/image_thumb_4.png" width="290" height="232" /&gt;&lt;/a&gt;The first, and to me most significative pillar of Metro, is to be Authentically Digital. To understand the meaning of this sentence you have to recall the look and feel of applications in Windows, and of a number of websites still existing on the net. The problem is that you have to finally recognize the digital nature of the screen surface and this must only drive to the removal of every type of &lt;a href="http://medialoot.com/blog/skeuomorphic-design/" target="_blank"&gt;skeuomorphic design&lt;/a&gt;. Under this strange term is hidden a number of tecniques used to render the feel of materials, embossing, light effect and whatever else that imitate the real world. iOS devices like the iPad make a deep use of skeuomorphism and this pose them on the very opposite side of the Metro guidelines. The direction instead it to remove every kind of chrome in favor of content to valorize is together with the empty space between parts. Just remember the sentence from &lt;a href="http://en.wikipedia.org/wiki/Antoine_de_Saint-Exup%C3%A9ry" target="_blank"&gt;Antoine de Saint-Exup&amp;eacute;ry&lt;/a&gt; an recognize the emptiness as a value that isolate and point out your content.&lt;/p&gt;&lt;h4&gt;Do more with less&lt;/h4&gt;&lt;p style="text-align: justify;"&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/AndreaBoschin/image_6.png"&gt;&lt;img style="border:0px;  border-image: initial; background-image: none; margin-top: 5px; margin-right: 0px; margin-bottom: 0px; margin-left: 15px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; float: right;" title="image" alt="image" src="http://www.silverlightshow.net/Storage/Users/AndreaBoschin/image_thumb_2.png" width="266" height="213" /&gt;&lt;/a&gt;If being digital is the most important pillar, doing more with less is probably the most difficult to achieve, and nothing more that removing instead of add may be the way to this pillar. I think it is important to stop yourself every time you decide to add something to your application and, instead, brainstorming to understand if the same feature cannot be added slightly changing something that still exists. This is to me the essence of doing more with less, having the ability of regroup your features in a way that remove the need of additional graphic elements. But please avoid to add strange semantic to the gestures of the user, just for the reason of omitting an element in the interface.&lt;/p&gt;&lt;h5 style="text-align: justify;"&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/AndreaBoschin/image_8.png"&gt;&lt;img style="border:0px;  border-image: initial; background-image: none; margin-top: 0px; margin-right: 14px; margin-bottom: 0px; margin-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; float: left;" title="image" alt="image" src="http://www.silverlightshow.net/Storage/Users/AndreaBoschin/image_thumb_3.png" width="161" height="471" /&gt;&lt;/a&gt;&lt;/h5&gt;&lt;h4&gt;Be fast and fluid&lt;/h4&gt;&lt;p style="text-align: justify;"&gt;Often, the key to make more with less is being fast. Having a number of elements on the screen, can be easily exchanged with having few elements if you can navigate through the application fastly and fluidly. Being fast make your screen larger and Metro offers a number of controls that leverage the use of fingers to improve fluidity without neglect the use of mouse. Thanks to these control it is really easy to create amazing interfaces, expand the size of the screen and adapt your content to the target resolution. Also you can use a set of transitions that helps to join together fluidly the various parts of your application.&lt;/p&gt;&lt;h4&gt;Show pride in craftsmanship&lt;/h4&gt;&lt;p style="text-align: justify;"&gt;I admit it take long to really understand what this means, but finally I've got the point. It simply states that your app must be polished and complete in every single feature. Complete does not only mean "working" but you have to care about details. The right margin, a perfect size for your fonts, a polished palette, a subtle animation to give the right feedback to the user. Every single aspect of the user interface contributes to the overall quality. &lt;/p&gt;&lt;h4&gt;Win as one.&lt;/h4&gt;&lt;p style="text-align: justify;"&gt;And finally, you have to be aware that your app live into an ecosystem. Thanks to a number of interfaces, a Metro application can easily share, search and pick, taking advantage of other applications and providing services to others. It is important you implement these interfaces to give an additional gear to your work.&lt;/p&gt;&lt;h4&gt;Don't be afraid of emptiness&lt;/h4&gt;&lt;p&gt;I know, lot of people when is about to create a user interface ask himself: what can I do to fill this hole? The problem isn't the hole per se, but probably its positions, the disposition of elements on the screen. Make things bigger, use the right color and positions and the hole easily becomes space. Your eye needs it at a degree you may be surprised.&lt;/p&gt;&lt;p&gt;I hope I've touched you curiosity with this long article and now you can experiment the new Metro principles by yourself. From the next time I will return to my programmer role to explore the beautiful features behind Metro.&lt;/p&gt;</description>      <link>http://www.silverlightshow.net/items/Windows-8-Metro-Create-your-apps-with-simplicity-in-mind.aspx</link>      <author>editorial@silverlightshow.net (Andrea Boschin  )</author>      <comments>http://www.silverlightshow.net/items/Windows-8-Metro-Create-your-apps-with-simplicity-in-mind.aspx#comments</comments>      <guid isPermaLink="true">http://www.silverlightshow.net/items/Windows-8-Metro-Create-your-apps-with-simplicity-in-mind.aspx</guid>      <pubDate>Wed, 04 Apr 2012 01:30:13 GMT</pubDate>    </item>    <item>      <title>Mastering LOB Development for Silverlight 5: Out of Browser (OOB) Applications</title>      <description>&lt;div style="border:1px solid #dddddd;border-image: initial; padding-bottom: 5px; background-color: #f3f3f3; margin-top: 5px; padding-left: 10px; margin-left: 10px; padding-top: 5px;"&gt;&lt;p&gt;This is a free chapter of the book "&lt;a href="http://www.silverlightshow.net/book/Mastering-LOB-Development-for-Silverlight-5.aspx"&gt;Mastering LOB Development for Silverlight 5: A Case Study in Action&lt;/a&gt;".&lt;br /&gt;Thanks to &lt;a href="http://ads.silverlightshow.net/a.aspx?ZoneID=59&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=16437" target="_blank"&gt;&lt;img alt="" src="http://ads.silverlightshow.net/a.aspx?ZoneID=59&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=16437" width="0" height="0" style="border-width: 0px;border-style: solid;" /&gt;Packt Publishing&lt;/a&gt;, SilverlightShow readers may now &lt;strong&gt;purchase this book with a 27% discount using discount code &lt;em&gt;dssvl2&lt;/em&gt;&lt;/strong&gt;! Enjoy!&lt;/p&gt;&lt;/div&gt;&lt;p&gt;LOB (Line of Business) applications executing within a web browser are fine, but if we think from the perspective of a final user, it is not the option that they would choose first. This is due to the fact that:&lt;/p&gt;&lt;ul&gt;    &lt;li&gt;Having a desktop application is easy. It can be directly accessed by double-clicking so that it is launched quickly. &lt;/li&gt;    &lt;li&gt;Most of the time, it is necessary to leave Silverlight sandbox application. This happens, for example, when we need to access the filesystem, or with a special hardware via COM (such as an ATM). &lt;/li&gt;    &lt;li&gt;It is also crucial that, when executing an application, it allows us to work offline. &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Similarly, from the point of view of the user, there are certain restrictions which are normally not well accepted, even though they are 100 percent desktop (namely WPF). It would be great to have the possibility of eliminating them:&lt;/p&gt;&lt;ul&gt;    &lt;li&gt;Installing a desktop application can carry problems, depending on the OS and installation details. It would be fantastic if they could run under a standard, which is independent from those details. &lt;/li&gt;    &lt;li&gt;In order to update a version already installed, it must be uninstalled and installed again. Wouldn't it be preferable that the application itself detected if there is a new version and updated automatically (even though this process is not dramatic)? &lt;/li&gt;    &lt;li&gt;Usually, desktop applications only work on a particular OS (that is, Windows). We would love to execute it in different platforms (for example, Mac). &lt;/li&gt;    &lt;li&gt;A desktop application normally has quite relaxed permissions. Hence, we dream of an application having restricted access to the hardware and software of our machine. It would only have permissions if allowed. &lt;/li&gt;    &lt;li&gt;A desktop application needs a given version of the .NET Framework installed on the machine. &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;In this chapter, you will learn how to install and execute our applications as Out of Browser (OOB), work with elevated permissions in and out of the browser, support cross domain calls, and work with the WebBrowser control.&lt;/p&gt;&lt;h2&gt;Out of Browser (OOB)&lt;/h2&gt;&lt;p&gt;Out of Browser (OOB) applications are executed out of the web browser, or that is the impression they give.&lt;/p&gt;&lt;p&gt;Regarding the final user, an OOB application is similar to a desktop application; the user installs it, gets a direct access icon to it, and when executed, it runs under a standard window, as shown in the following screenshot. It can even be uninstalled through the Control Panel.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/SilverlightShow/3548EN_06_01_OOB_2.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;        border-width: 0px;border-style: solid;" title="3548EN_06_01_OOB" alt="3548EN_06_01_OOB" src="http://www.silverlightshow.net/Storage/Users/SilverlightShow/3548EN_06_01_OOB_thumb.png" width="561" height="392" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;From the point of view of the Software Developer, an OOB application still runs under a hidden browser, that is, it is a Silverlight application with the same features as an application running under a browser.&lt;/p&gt;&lt;p&gt;Until the arrival of Silverlight 5, the main difference with an application executing in the browser was the fact that it could work with trusted permissions and perform operations, which the sandbox normally does not allow (accessing the filesystem, executing commands via COM+, and so on).&lt;/p&gt;&lt;h2&gt;Executing an application in OOB mode&lt;/h2&gt;&lt;p&gt;Allowing a Silverlight application to be executed as an OOB is very easy. We just need to tick a checkbox in the project settings. Let's see how to do it.&lt;/p&gt;&lt;p&gt;First, create a new Silverlight application called 01_Simple_OOB_App. In the MainPage, a text block must be added displaying the message Simple OOB App. When you execute it, it will look as a standard in-browser application, as shown in the following screenshot:&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/SilverlightShow/3548EN_06_02_OOB_2.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;        border-width: 0px;border-style: solid;" title="3548EN_06_02_OOB" alt="3548EN_06_02_OOB" src="http://www.silverlightshow.net/Storage/Users/SilverlightShow/3548EN_06_02_OOB_thumb.png" width="468" height="163" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;In order to enable OOB mode, follow these steps:&lt;/p&gt;&lt;p&gt;1. Right-click on the Silverlight project root. When the context menu is displayed, click on Properties:&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/SilverlightShow/3548EN_06_03_OOB_2.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;        border-width: 0px;border-style: solid;" title="3548EN_06_03_OOB" alt="3548EN_06_03_OOB" src="http://www.silverlightshow.net/Storage/Users/SilverlightShow/3548EN_06_03_OOB_thumb.png" width="425" height="102" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;2. Select the Silverlight tab and tick the checkbox with the message Enable running application out of the browser:&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/SilverlightShow/3548EN_06_04_OOB_2.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;        border-width: 0px;border-style: solid;" title="3548EN_06_04_OOB" alt="3548EN_06_04_OOB" src="http://www.silverlightshow.net/Storage/Users/SilverlightShow/3548EN_06_04_OOB_thumb.png" width="590" height="292" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;3. When executing the application, it still runs in the browser but, if we right-click on it, there will be a new option Install 01_Simple_OOB Application onto this computer&amp;hellip; in the context menu, as shown in the following screenshot:&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/SilverlightShow/3548EN_06_05_OOB_2.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;        border-width: 0px;border-style: solid;" title="3548EN_06_05_OOB" alt="3548EN_06_05_OOB" src="http://www.silverlightshow.net/Storage/Users/SilverlightShow/3548EN_06_05_OOB_thumb.png" width="434" height="140" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;4. If we click on that option, we get a message prompt asking to install the app, as shown in the following screenshot:&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/SilverlightShow/3548EN_06_06_OOB_2.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;        border-width: 0px;border-style: solid;" title="3548EN_06_06_OOB" alt="3548EN_06_06_OOB" src="http://www.silverlightshow.net/Storage/Users/SilverlightShow/3548EN_06_06_OOB_thumb.png" width="433" height="190" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;5. Once we click OK, the application is installed and ready to be used as OOB.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/SilverlightShow/3548EN_06_07_OOB_2.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;        border-width: 0px;border-style: solid;" title="3548EN_06_07_OOB" alt="3548EN_06_07_OOB" src="http://www.silverlightshow.net/Storage/Users/SilverlightShow/3548EN_06_07_OOB_thumb.png" width="441" height="259" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;It is great to use apps as a final user, but what happens with developers? In case we want to debug our OOB application, will we have to install it every time we run the environment? Of course not. In the project properties (Context menu | Properties), the Debug tab allows us to choose that the application starts up straight in OOB mode (the Silverlight project will have to be chosen as a start-up project):&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/SilverlightShow/3548EN_06_08_OOB_2.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;        border-width: 0px;border-style: solid;" title="3548EN_06_08_OOB" alt="3548EN_06_08_OOB" src="http://www.silverlightshow.net/Storage/Users/SilverlightShow/3548EN_06_08_OOB_thumb.png" width="590" height="314" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;h2&gt;Enhancing the experience&amp;mdash;tooling up and updating&lt;/h2&gt;&lt;p&gt;As we have already seen, enabling the OOB mode in our application is something quite straightforward. Nevertheless, the following doubts may have arisen:&lt;/p&gt;&lt;ul&gt;    &lt;li&gt;In some cases, I want to know if my application is running in normal or OOB mode to, for instance, show one UI or another. How can I do that? &lt;/li&gt;    &lt;li&gt;How can I know if the application is already installed? &lt;/li&gt;    &lt;li&gt;When installing from a not very intuitive contextual menu, is there any way to display our own UI in order to allow the user to install the application? &lt;/li&gt;    &lt;li&gt;How do I uninstall an OOB application? &lt;/li&gt;    &lt;li&gt;I would like to let the users install my application from a CD, eliminating the need to be connected to the Web. Is that possible? &lt;/li&gt;    &lt;li&gt;When a new version of my application is uploaded to the production server, is there any way to detect updates and install new versions automatically? &lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;In-browser/OOB detection&lt;/h3&gt;&lt;p&gt;Sometimes, the UI we want to show differs depending on whether the application is executing in the browser or as an OOB application. It may also happen that, when it is in-browser, we only want to display a button to install it.&lt;/p&gt;&lt;p&gt;In order to know the mode we are working with, Silverlight offers a function on the level of the application called IsRunningOutOfBrowser, which returns true or false depending on whether the application is executing in OOB mode or not.&lt;/p&gt;&lt;p&gt;To see how it works, let's go back to the previous example, TestOOB, and indicate whether the application is executing in OOB mode or not in the TextBlock we use in the main page. It can be done using the following steps:&lt;/p&gt;&lt;p&gt;1. Open the project previously created (Simple_OOB_Application).&lt;/p&gt;&lt;p&gt;2. Add an ID to the TextBlock of the main page (it will be named tbStatus):&lt;/p&gt;&lt;div style="border:1px solid silver;border-image: initial; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin-top: 20px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow-x: auto; overflow-y: auto; cursor: text; padding-top: 4px; text-align: left;" id="codeSnippetWrapper"&gt;&lt;div style="padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;     text-align: left;border-style: none;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&amp;lt;Grid x:Name=&lt;span style="color: #006080;"&gt;"LayoutRoot"&lt;/span&gt; Background=&lt;span style="color: #006080;"&gt;"White"&lt;/span&gt;&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&amp;lt;TextBlock x:Name=&lt;span style="color: #006080;"&gt;"tbStatus"&lt;/span&gt; Text=&lt;span style="color: #006080;"&gt;"Simple OOB App"&lt;/span&gt; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;FontSize=&lt;span style="color: #006080;"&gt;"16"&lt;/span&gt;/&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&amp;lt;/Grid&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;3. In the constructor of the page, check the value of the application variable IsRunningOutOfBrowser, which will display one of two messages depending on the state.&lt;/p&gt;&lt;div style="border:1px solid silver;border-image: initial; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin-top: 20px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow-x: auto; overflow-y: auto; cursor: text; padding-top: 4px; text-align: left;" id="codeSnippetWrapper"&gt;&lt;div style="padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;     text-align: left;border-style: none;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; MainPage()&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    InitializeComponent();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (App.Current.IsRunningOutOfBrowser == &lt;span style="color: #0000ff;"&gt;true&lt;/span&gt;)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;        tbStatus.Text = &lt;span style="color: #006080;"&gt;"I'm running out of browser"&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    &lt;span style="color: #0000ff;"&gt;else&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;        tbStatus.Text = &lt;span style="color: #006080;"&gt;"I'm running in browser"&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;4. Therefore, in case we are executing in OOB mode, the following message will be displayed:&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/SilverlightShow/3548EN_06_09_OOB_2.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;        border-width: 0px;border-style: solid;" title="3548EN_06_09_OOB" alt="3548EN_06_09_OOB" src="http://www.silverlightshow.net/Storage/Users/SilverlightShow/3548EN_06_09_OOB_thumb.png" width="374" height="146" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;h3&gt;Detecting the application installed&lt;/h3&gt;&lt;p&gt;Another common scenario arises when the application is being executed in the browser and we need to know if it has already been installed as OOB. For instance, a common example of this is when we want to display a message asking the user whether to install the application or not. We can make use of the application variable InstallState, which returns a type enumerated with one of the following values: NotInstalled, Installed, Installing, or InstallFailed.&lt;/p&gt;&lt;p&gt;Thus, in the sample application that has been created, it could be checked whether the application is installed or not in the following way:&lt;/p&gt;&lt;div style="border:1px solid silver;border-image: initial; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin-top: 20px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow-x: auto; overflow-y: auto; cursor: text; padding-top: 4px; text-align: left;" id="codeSnippetWrapper"&gt;&lt;div style="padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;     text-align: left;border-style: none;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; MainPage()&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    InitializeComponent();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (App.Current.InstallState == InstallState.Installed)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;        tbStatus.Text = &lt;span style="color: #006080;"&gt;"Application Installed"&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    &lt;span style="color: #0000ff;"&gt;else&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;        tbStatus.Text = &lt;span style="color: #006080;"&gt;"Application not installed"&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;h3&gt;Installing the custom interface&lt;/h3&gt;&lt;p&gt;As mentioned previously, installing the application from the contextual menu of our Silverlight application was not intuitive at all. Perhaps it could be possible to place a button so that the user could begin the installation. Up to what point can we customize the installation process of our Silverlight application? Silverlight allows us to launch the installation process by code, as long as it comes from a user petition (such as a click on a button). The dialog which asks if we want to install the application cannot be customized.&lt;/p&gt;&lt;p&gt;To install the application, the method Install of Application must be called. Let's add this functionality to our basic sample:&lt;/p&gt;&lt;p&gt;1. Add a button to the main window:&lt;/p&gt;&lt;div style="border:1px solid silver;border-image: initial; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin-top: 20px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow-x: auto; overflow-y: auto; cursor: text; padding-top: 4px; text-align: left;" id="codeSnippetWrapper"&gt;&lt;div style="padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;     text-align: left;border-style: none;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&amp;lt;Grid x:Name=&lt;span style="color: #006080;"&gt;"LayoutRoot"&lt;/span&gt; Background=&lt;span style="color: #006080;"&gt;"White"&lt;/span&gt;&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&amp;lt;TextBlock x:Name=&lt;span style="color: #006080;"&gt;"tbStatus"&lt;/span&gt; Text=&lt;span style="color: #006080;"&gt;"Simple OOB App"&lt;/span&gt; FontSize=&lt;span style="color: #006080;"&gt;"16"&lt;/span&gt;/&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&amp;lt;Button Content=&lt;span style="color: #006080;"&gt;"Install"&lt;/span&gt; Height=&lt;span style="color: #006080;"&gt;"23"&lt;/span&gt; HorizontalAlignment=&lt;span style="color: #006080;"&gt;"Left"&lt;/span&gt; Margin=&lt;span style="color: #006080;"&gt;"142,55,0,0"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;Name=&lt;span style="color: #006080;"&gt;"button1"&lt;/span&gt; VerticalAlignment=&lt;span style="color: #006080;"&gt;"Top"&lt;/span&gt; Width=&lt;span style="color: #006080;"&gt;"75"&lt;/span&gt; /&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&amp;lt;/Grid&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;2. Subscribe to the Click event:&lt;/p&gt;&lt;div style="border:1px solid silver;border-image: initial; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin-top: 20px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow-x: auto; overflow-y: auto; cursor: text; padding-top: 4px; text-align: left;" id="codeSnippetWrapper"&gt;&lt;div style="padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;     text-align: left;border-style: none;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&amp;lt;Button Content=&lt;span style="color: #006080;"&gt;"Install"&lt;/span&gt; Height=&lt;span style="color: #006080;"&gt;"23"&lt;/span&gt; HorizontalAlignment=&lt;span style="color: #006080;"&gt;"Left"&lt;/span&gt; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;Margin=&lt;span style="color: #006080;"&gt;"142,55,0,0"&lt;/span&gt; Name=&lt;span style="color: #006080;"&gt;"button1"&lt;/span&gt; VerticalAlignment=&lt;span style="color: #006080;"&gt;"Top"&lt;/span&gt; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;Width=&lt;span style="color: #006080;"&gt;"75"&lt;/span&gt; Click=&lt;span style="color: #006080;"&gt;"button1_Click"&lt;/span&gt; /&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;3. Check if the application has already been installed in the handler of the button and add the call to Install:&lt;/p&gt;&lt;div style="border:1px solid silver;border-image: initial; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin-top: 20px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow-x: auto; overflow-y: auto; cursor: text; padding-top: 4px; text-align: left;" id="codeSnippetWrapper"&gt;&lt;div style="padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;     text-align: left;border-style: none;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span style="color: #0000ff;"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; button1_Click(&lt;span style="color: #0000ff;"&gt;object&lt;/span&gt; sender, RoutedEventArgs e)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (Application.Current.InstallState == InstallState.NotInstalled)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;        Application.Current.Install();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    &lt;span style="color: #0000ff;"&gt;else&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;        MessageBox.Show(&lt;span style="color: #006080;"&gt;"Application already installed"&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;4. Execute the application. When you click on the new button, the dialog box asking you if you want to install the application will be displayed, as shown in the following screenshot:&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/SilverlightShow/3548EN_06_10_OOB_2.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;        border-width: 0px;border-style: solid;" title="3548EN_06_10_OOB" alt="3548EN_06_10_OOB" src="http://www.silverlightshow.net/Storage/Users/SilverlightShow/3548EN_06_10_OOB_thumb.png" width="492" height="374" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;h3&gt;Uninstalling an OOB application&lt;/h3&gt;&lt;p&gt;To uninstall a Silverlight application, the user can choose among several options:&lt;/p&gt;&lt;ul&gt;    &lt;li&gt;They can right-click on the application and, in the contextual menu, choose the Remove this application&amp;hellip; option, as shown in the following screenshot: &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href="http://www.silverlightshow.net/Storage/Users/SilverlightShow/3548EN_06_11_OOB_2.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;        border-width: 0px;border-style: solid;" title="3548EN_06_11_OOB" alt="3548EN_06_11_OOB" src="http://www.silverlightshow.net/Storage/Users/SilverlightShow/3548EN_06_11_OOB_thumb.png" width="324" height="169" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;ul&gt;    &lt;li&gt;It can be uninstalled right from the Windows Control Panel: &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;a href="http://www.silverlightshow.net/Storage/Users/SilverlightShow/3548EN_06_12_OOB_2.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;        border-width: 0px;border-style: solid;" title="3548EN_06_12_OOB" alt="3548EN_06_12_OOB" src="http://www.silverlightshow.net/Storage/Users/SilverlightShow/3548EN_06_12_OOB_thumb.png" width="544" height="347" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;The customization of the installation is an improvement that is pending to be added to Silverlight.&lt;/p&gt;&lt;h3&gt;Offline installation&lt;/h3&gt;&lt;p&gt;Sometimes, we face scenarios where it is necessary for the user to be able to install the application from a CD, or that an administrator can make an implementation. This scenario is not ideal for Silverlight applications (normally, the user downloads them from a URL, either intranet or extranet and, moreover, benefits from automatic updates).&lt;/p&gt;&lt;p&gt;If you face this situation, you may wonder whether it is more convenient to orient development to WPF-Click once, or use the method explained by Tim Heuer in his blog: Installing Silverlight Offline (&lt;a href="http://timheuer.com/blog/archive/2008/09/29/install-silverlight-2-rc0-offline.aspx"&gt;http://timheuer.com/blog/archive/2008/09/29/install-silverlight-2-rc0-offline.aspx&lt;/a&gt;).&lt;/p&gt;&lt;p&gt;Even though this method allows us to install our OOB application in a silent mode,&lt;br /&gt;it has certain limitations:&lt;/p&gt;&lt;ul&gt;    &lt;li&gt;If the user does not have the Silverlight plug-in installed, they will need to be connected to the Internet to download it from the Microsoft website &lt;/li&gt;    &lt;li&gt;The installation in silent mode is not valid for trusted OOB applications &lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;Updates&lt;/h3&gt;&lt;p&gt;OOB applications are installed on our own machine, which means there are a lot of advantages, such as fast boot, offline work mode, and so on. Nonetheless, what happens if we upload an update to the server? Is there a way to update our local application? Of course there is. What's more? It is possible in an easy and powerful way. Let's see it in action:&lt;/p&gt;&lt;p&gt;In the app.cs file, subscribe to the event named CheckAndDownloadUpdateCompleted and, later, make the asynchronous petition to check if there is a new update and, if so, download it automatically. The following is the source code:&lt;/p&gt;&lt;div style="border:1px solid silver;border-image: initial; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin-top: 20px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow-x: auto; overflow-y: auto; cursor: text; padding-top: 4px; text-align: left;" id="codeSnippetWrapper"&gt;&lt;div style="padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;     text-align: left;border-style: none;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span style="color: #0000ff;"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; Application_Startup(&lt;span style="color: #0000ff;"&gt;object&lt;/span&gt; sender, StartupEventArgs e)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    CheckAndDownloadUpdateCompleted += &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; CheckAndDownloadUpdateCompletedEventHandle&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    r(Application_CheckAndDownloadUpdateCompleted);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    CheckAndDownloadUpdateAsync();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    (&amp;hellip;)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span style="color: #0000ff;"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; Application_CheckAndDownloadUpdateCompleted(&lt;span style="color: #0000ff;"&gt;object&lt;/span&gt; sender, CheckAndDownloadUpdateCompletedEventArgs e)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    MessageBox.Show(&lt;span style="color: #006080;"&gt;"Application updated, please restart."&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;table border="0" cellspacing="0" cellpadding="0"&gt;    &lt;tbody&gt;        &lt;tr&gt;            &lt;td style="width: 20px;"&gt;&amp;nbsp;&lt;/td&gt;            &lt;td style="width: 46px;"&gt;&amp;nbsp;&lt;/td&gt;            &lt;td style="width: 316px;"&gt;            &lt;/p&gt;            &lt;p&gt;            &lt;/p&gt;            &lt;p&gt;Updates will work as long as our XAP is not in a file that needs security.&lt;/p&gt;            &lt;p&gt;            &lt;/p&gt;            &lt;p&gt;            &lt;/p&gt;            &lt;p&gt;&lt;/td&gt;            &lt;td style="width: 20px;"&gt;&amp;nbsp;&lt;/td&gt;        &lt;/tr&gt;    &lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;&lt;h2&gt;Offline work&lt;/h2&gt;&lt;p&gt;An advantage of working with OOB applications is that, once they have been installed, it is not necessary to have an Internet connection to execute them (they are downloaded locally). What does this mean? It is possible to implement an offline work method for our applications, which permits, for example, that a user on a flight can work with the application and, later, when they have an Internet connection, they can synchronize the data with the server.&lt;/p&gt;&lt;p&gt;To work offline, it is necessary to have a repository to store reference data, as well as changes or new creations. If our Silverlight applications normally work within a sandbox and we do not have access to the HDD of the local machine, what can we make use of? In such cases, we have two options: either requiring elevated permissions for our application to execute (this will be dealt with later) or making use of the Silverlight Isolated Storage.&lt;/p&gt;&lt;p&gt;Isolated Storage is a virtual filesystem that allows a Silverlight application to store data in an invisible folder in the machine. By default, a Silverlight application can use 2 MB of storage. Isolated Storage is a 10 MB OOB application, but the user can&lt;br /&gt;be asked to increase the quota.&lt;/p&gt;&lt;p&gt;Let's see a simple sample of how to read and write data in the Isolated Storage. This example is available in the online material on &lt;a href="http://bit.ly/5gEwuM"&gt;http://bit.ly/5gEwuM&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;You can create a file in the Isolated Storage using the following code:&lt;/p&gt;&lt;div style="border:1px solid silver;border-image: initial; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin-top: 20px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow-x: auto; overflow-y: auto; cursor: text; padding-top: 4px; text-align: left;" id="codeSnippetWrapper"&gt;&lt;div style="padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;     text-align: left;border-style: none;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span style="color: #0000ff;"&gt;using&lt;/span&gt; System.IO.IsolatedStorage;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span style="color: #0000ff;"&gt;using&lt;/span&gt; System.IO;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;(&amp;hellip;)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span style="color: #0000ff;"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; WriteContentToIsoStorage(&lt;span style="color: #0000ff;"&gt;string&lt;/span&gt; content, &lt;span style="color: #0000ff;"&gt;string&lt;/span&gt; filename)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    &lt;span style="color: #0000ff;"&gt;using&lt;/span&gt; (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForApplication())&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;        &lt;span style="color: #0000ff;"&gt;using&lt;/span&gt; (IsolatedStorageFileStream isfs = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; IsolatedStorageFileStream(filename, FileMode.Create, isf))&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;        {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;            &lt;span style="color: #0000ff;"&gt;using&lt;/span&gt; (StreamWriter sw = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; StreamWriter(isfs))&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;            {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;                sw.Write(content);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;                sw.Close();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;            }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;        }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;You can read the information using the following code:&lt;/p&gt;&lt;div style="border:1px solid silver;border-image: initial; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin-top: 20px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow-x: auto; overflow-y: auto; cursor: text; padding-top: 4px; text-align: left;" id="codeSnippetWrapper"&gt;&lt;div style="padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;     text-align: left;border-style: none;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span style="color: #0000ff;"&gt;using&lt;/span&gt; System.IO.IsolatedStorage;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span style="color: #0000ff;"&gt;using&lt;/span&gt; System.IO;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;(&amp;hellip;)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span style="color: #0000ff;"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;string&lt;/span&gt; LoadContentFromIsoStorage(&lt;span style="color: #0000ff;"&gt;string&lt;/span&gt; filename)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    &lt;span style="color: #0000ff;"&gt;string&lt;/span&gt; data = String.Empty;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    &lt;span style="color: #0000ff;"&gt;using&lt;/span&gt; (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForApplication())&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;        &lt;span style="color: #0000ff;"&gt;using&lt;/span&gt; (IsolatedStorageFileStream isfs = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; IsolatedStorageFileStream(filename, FileMode.Open, isf))&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;        {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;            &lt;span style="color: #0000ff;"&gt;using&lt;/span&gt; (StreamReader sr = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; StreamReader(isfs))&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;            {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;                &lt;span style="color: #0000ff;"&gt;string&lt;/span&gt; lineOfData = String.Empty;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;                &lt;span style="color: #0000ff;"&gt;while&lt;/span&gt; ((lineOfData = sr.ReadLine()) != &lt;span style="color: #0000ff;"&gt;null&lt;/span&gt;)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;                data += lineOfData;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;            }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;        }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    &lt;span style="color: #0000ff;"&gt;return&lt;/span&gt; data;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;table border="0" cellspacing="0" cellpadding="0"&gt;    &lt;tbody&gt;        &lt;tr&gt;            &lt;td style="width: 20px;"&gt;&amp;nbsp;&lt;/td&gt;            &lt;td style="width: 46px;"&gt;&amp;nbsp;&lt;/td&gt;            &lt;td style="width: 317px;"&gt;            &lt;/p&gt;            &lt;p&gt;            &lt;/p&gt;            &lt;p&gt;To continue learning how this works, you can follow this link: http://bit.ly/qkY9UM.&lt;/p&gt;            &lt;p&gt;            &lt;/p&gt;            &lt;p&gt;            &lt;/p&gt;            &lt;p&gt;&lt;/td&gt;            &lt;td style="width: 21px;"&gt;&amp;nbsp;&lt;/td&gt;        &lt;/tr&gt;    &lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;&lt;h3&gt;How it works&lt;/h3&gt;&lt;p&gt;Normally, when data have to be obtained or updated, we communicate with the server via a web service to get or modify this information.&lt;/p&gt;&lt;p&gt;To avoid this connection, we can do the following: first, get the most commonly read data and store them in a cache; second, the user creates his/her own entries, which are stored in the local repository (Isolated Storage). Once the user has an Internet connection again, offline data is sent to be synchronised in the repository.&lt;/p&gt;&lt;p&gt;Offline work is not as easy as it may sound. Another book could be written only on this! If you want further information about this, we can recommend the following session by Steve Lasker, Offline Microsoft Silverlight Applications (&lt;a href="http://bit.ly/ltIxNt"&gt;http://bit.ly/ltIxNt&lt;/a&gt;).&lt;/p&gt;&lt;h2&gt;Breaking the sandbox&amp;mdash;trusted applications&lt;/h2&gt;&lt;p&gt;Up to now, we have seen how an OOB Silverlight application runs within a sandbox. That is to say, its access to certain resources is limited or restricted. What happens if we need to perform operations that the sandbox has restricted due to safety reasons? To solve this issue, there are applications with elevated permissions:&lt;/p&gt;&lt;ul&gt;    &lt;li&gt;A trusted OOB application is a program the user trusts (similar to when a desktop application is installed on our machine). &lt;/li&gt;    &lt;li&gt;Its XAP file is signed with a certificate, which ensures its trustworthy origin. &lt;/li&gt;    &lt;li&gt;It has elevated permissions, which makes it possible, for example, to make calls to COM components, P/Invoke calls, or access the local filesystem. &lt;/li&gt;    &lt;li&gt;For the application to be installed/executed, it needs the express authorization of the user. &lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;Enabling trusted mode&lt;/h3&gt;&lt;p&gt;How can an OOB application be enabled to require elevated permissions? To configure a Silverlight program that already exists, follow these steps:&lt;/p&gt;&lt;p&gt;1. Go to the Properties tab of the Silverlight Project (contextual menu of the project, Silverlight | Properties) and click on the button Out-of-Browser Settings&amp;hellip;:&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/SilverlightShow/3548EN_06_13_OOB_2.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;        border-width: 0px;border-style: solid;" title="3548EN_06_13_OOB" alt="3548EN_06_13_OOB" src="http://www.silverlightshow.net/Storage/Users/SilverlightShow/3548EN_06_13_OOB_thumb.png" width="481" height="324" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;2. A dialog is displayed, where the option Require elevated trust when running outside the browser must be checked, as shown in the following screenshot:&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/SilverlightShow/3548EN_06_14_OOB_2.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;        border-width: 0px;border-style: solid;" title="3548EN_06_14_OOB" alt="3548EN_06_14_OOB" src="http://www.silverlightshow.net/Storage/Users/SilverlightShow/3548EN_06_14_OOB_thumb.png" width="394" height="504" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;After these steps, our application will be enabled as OOB trusted. However, if a user tries to install it, they will receive a warning indicating the source that published the application cannot be trusted. To eliminate this message, we will have to use our enterprise's certificate or acquire a new one (we can buy one or, if it is an intranet, our IT administrator can generate a new one). This operation can be performed from the Signing tab in the project's properties (right-click on Silverlight project | Properties | Signing).&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/SilverlightShow/3548EN_06_15_OOB_2.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;        border-width: 0px;border-style: solid;" title="3548EN_06_15_OOB" alt="3548EN_06_15_OOB" src="http://www.silverlightshow.net/Storage/Users/SilverlightShow/3548EN_06_15_OOB_thumb.png" width="518" height="171" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;h4&gt;Advantages of trusted applications&lt;/h4&gt;&lt;ul&gt;    &lt;li&gt;Now we have our trusted application, which has the following additional advantages: &lt;/li&gt;    &lt;li&gt;We can access the filesystem of the machine (from the Silverlight 5 version). &lt;/li&gt;    &lt;li&gt;We can make calls to COM components. We can read or write to the registry (only current user entry), call other executable files, and so on. &lt;/li&gt;    &lt;li&gt;It is possible to make P/Invoke calls. &lt;/li&gt;    &lt;li&gt;We can make petitions to a URL, even if they are cross domain. It is not necessary that the server has a cross-domain policy enabled. &lt;/li&gt;    &lt;li&gt;It is possible to integrate a WebBrowser control in our application. That is, we can display HTML in our Silverlight application and interact with it. &lt;/li&gt;    &lt;li&gt;Real windows can be created. Normally, when new windows are created in a Silverlight application, they are a fantasy; that is to say, they are not physical windows, but they are displayed within the main one. If our application is trusted (only SL version 5), we can create floating windows and, for instance, they can be displayed on several monitors. &lt;/li&gt;&lt;/ul&gt;&lt;h4&gt;Accessing files&lt;/h4&gt;&lt;p&gt;Our trusted application has access to the local filesystem (if it is Silverlight 5; in case it is Silverlight 4, it can only access folders, such as My Documents and via COM calls it's possible to gain additional access). The operations on System.IO, which previously returned safety errors, will now be executed flawlessly.&lt;/p&gt;&lt;p&gt;As a sample, let's see how the content of the Program Files file can be listed in our trusted Silverlight application:&lt;/p&gt;&lt;div style="border:1px solid silver;border-image: initial; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin-top: 20px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow-x: auto; overflow-y: auto; cursor: text; padding-top: 4px; text-align: left;" id="codeSnippetWrapper"&gt;&lt;div style="padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;     text-align: left;border-style: none;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;class&lt;/span&gt; ViewModel&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    &lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; ObservableCollection&amp;lt;&lt;span style="color: #0000ff;"&gt;string&lt;/span&gt;&amp;gt; DirNames { get; set; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    &lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; ViewModel()&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;        DirNames = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; ObservableCollection&amp;lt;&lt;span style="color: #0000ff;"&gt;string&lt;/span&gt;&amp;gt;();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;        &lt;span style="color: #008000;"&gt;// Let's try to enumerate the directories that are&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;        &lt;span style="color: #008000;"&gt;// under Program Files, this operation would throw an&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;        &lt;span style="color: #008000;"&gt;// exception if the application is not a trusted one.&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;        DirectoryInfo di = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; DirectoryInfo(&lt;span style="color: #006080;"&gt;"C:\\Program Files"&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;        &lt;span style="color: #0000ff;"&gt;foreach&lt;/span&gt; (var info &lt;span style="color: #0000ff;"&gt;in&lt;/span&gt; di.EnumerateDirectories())&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;        {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;            DirNames.Add(info.FullName);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;        }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;h4&gt;Making calls to COM+&lt;/h4&gt;&lt;p&gt;We can make calls to COM components, which open plenty of doors, such as reading and (partially) writing on the registry, communicating with devices, launching apps, and even using Excel Automation.&lt;/p&gt;&lt;p&gt;However, the main disadvantage of this approach is that it only works in Windows. So if our application needs to run in Mac, this code must be isolated and will not offer this functionality for that platform.&lt;table border="0" cellspacing="0" cellpadding="0"&gt;    &lt;tbody&gt;        &lt;tr&gt;            &lt;td style="width: 20px;"&gt;&amp;nbsp;&lt;/td&gt;            &lt;td style="width: 46px;"&gt;&amp;nbsp;&lt;/td&gt;            &lt;td style="width: 366px;"&gt;            &lt;/p&gt;            &lt;p&gt;            &lt;/p&gt;            &lt;p&gt;If you need to detect under which OS a Silverlight application is running, you can use Environment.OSVersion.&lt;/p&gt;            &lt;p&gt;            &lt;/p&gt;            &lt;p&gt;            &lt;/p&gt;            &lt;p&gt;&lt;/td&gt;            &lt;td style="width: 21px;"&gt;&amp;nbsp;&lt;/td&gt;        &lt;/tr&gt;    &lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;&lt;p&gt;Let's see a couple of examples of how to make these calls.&lt;/p&gt;&lt;h5&gt;Writing an entry on the registry&lt;/h5&gt;&lt;p&gt;In order to do so, create a new Silverlight Application project and tick the checkboxes (Enable Running application out of the browser, Out-of-Browser Settings | Require elevated trust when running outside the browser).&lt;/p&gt;&lt;p&gt;Add the reference to the Microsoft.CSharp DLL (Add Reference | .NET | Microsoft.CSharp):&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/SilverlightShow/3548EN_06_16_OOB_2.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;        border-width: 0px;border-style: solid;" title="3548EN_06_16_OOB" alt="3548EN_06_16_OOB" src="http://www.silverlightshow.net/Storage/Users/SilverlightShow/3548EN_06_16_OOB_thumb.png" width="471" height="399" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Make sure this DLL and System.Core are referenced:&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/SilverlightShow/3548EN_06_17_OOB_2.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;        border-width: 0px;border-style: solid;" title="3548EN_06_17_OOB" alt="3548EN_06_17_OOB" src="http://www.silverlightshow.net/Storage/Users/SilverlightShow/3548EN_06_17_OOB_thumb.png" width="275" height="327" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;You can write the entry on the registry using the following code:&lt;/p&gt;&lt;div style="border:1px solid silver;border-image: initial; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin-top: 20px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow-x: auto; overflow-y: auto; cursor: text; padding-top: 4px; text-align: left;" id="codeSnippetWrapper"&gt;&lt;div style="padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;     text-align: left;border-style: none;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span style="color: #0000ff;"&gt;using&lt;/span&gt; System.Runtime.InteropServices.Automation;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;(&amp;hellip;)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span style="color: #0000ff;"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; button1_Click(&lt;span style="color: #0000ff;"&gt;object&lt;/span&gt; sender, RoutedEventArgs e)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    &lt;span style="color: #0000ff;"&gt;using&lt;/span&gt; (dynamic shell = AutomationFactory.CreateObject(&lt;span style="color: #006080;"&gt;"WScript.Shell"&lt;/span&gt;))&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;        shell.RegWrite(&lt;span style="color: #006080;"&gt;@"HKCU\Software\MyTest"&lt;/span&gt;, &lt;span style="color: #006080;"&gt;""&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;The result is as shown in the following screenshot:&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/SilverlightShow/3548EN_06_18_OOB_2.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;        border-width: 0px;border-style: solid;" title="3548EN_06_18_OOB" alt="3548EN_06_18_OOB" src="http://www.silverlightshow.net/Storage/Users/SilverlightShow/3548EN_06_18_OOB_thumb.png" width="472" height="270" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;h5&gt;Executing notepad from our application&lt;/h5&gt;&lt;p&gt;Another interesting feature is the ability of launching other applications from our trusted application. In the following code we will launch a Notepad.&lt;/p&gt;&lt;div style="border:1px solid silver;border-image: initial; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin-top: 20px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow-x: auto; overflow-y: auto; cursor: text; padding-top: 4px; text-align: left;" id="codeSnippetWrapper"&gt;&lt;div style="padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;     text-align: left;border-style: none;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span style="color: #0000ff;"&gt;using&lt;/span&gt; System.Runtime.InteropServices.Automation;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;(&amp;hellip;)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span style="color: #0000ff;"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; button1_Click(&lt;span style="color: #0000ff;"&gt;object&lt;/span&gt; sender, RoutedEventArgs e)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;        dynamic cmd = AutomationFactory.CreateObject(&lt;span style="color: #006080;"&gt;"WScript.Shell"&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;        cmd.Run(&lt;span style="color: #006080;"&gt;@"c:\Windows\notepad.exe"&lt;/span&gt;, 1, &lt;span style="color: #0000ff;"&gt;true&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;h4&gt;P/Invoke&lt;/h4&gt;&lt;p&gt;As an innovation, Silverlight 5 includes call support via P/Invoke. Platform Invocation Services allows managed code to call unmanaged functions that are implemented in a DLL. This is only allowed for full-trust applications.&lt;/p&gt;&lt;p&gt;Let's see how this works by creating a sample, which calls a kernel32.dll method reproducing system beeps. Follow the steps mentioned next:&lt;/p&gt;&lt;p&gt;1. Create a new Silverlight project (application) and configure it to be an OOB application with trusted permissions.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/SilverlightShow/3548EN_06_19_OOB_2.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;        border-width: 0px;border-style: solid;" title="3548EN_06_19_OOB" alt="3548EN_06_19_OOB" src="http://www.silverlightshow.net/Storage/Users/SilverlightShow/3548EN_06_19_OOB_thumb.png" width="487" height="627" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;2. Add a new class (by means of Add New Class) called MyBeep. Implement the Beep method of the Kernel 32 DLL.&lt;/p&gt;&lt;div style="border:1px solid silver;border-image: initial; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin-top: 20px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow-x: auto; overflow-y: auto; cursor: text; padding-top: 4px; text-align: left;" id="codeSnippetWrapper"&gt;&lt;div style="padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;     text-align: left;border-style: none;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span style="color: #0000ff;"&gt;using&lt;/span&gt; System.Runtime.InteropServices;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;class&lt;/span&gt; MyBeep&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;        [DllImport(&lt;span style="color: #006080;"&gt;"User32.dll"&lt;/span&gt;)]&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;        &lt;span style="color: #0000ff;"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;static&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;extern&lt;/span&gt; Boolean MessageBeep(UInt32 beepType);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;        &lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; PlaySound(BeepTypes type)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;        {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;            &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (!MessageBeep((UInt32)type))&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;            {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;                &lt;span style="color: #0000ff;"&gt;throw&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; Exception(&lt;span style="color: #006080;"&gt;"Beep failed!"&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;            }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;        }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;enum&lt;/span&gt; BeepTypes : &lt;span style="color: #0000ff;"&gt;uint&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    Ok = 0x00000000,&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    Error = 0x00000010,&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    Warning = 0x00000030,&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    Information = 0x00000040&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;static&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;class&lt;/span&gt; BeepTypeExtensions&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    &lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;static&lt;/span&gt; BeepTypes AsBeepTypeEnum(&lt;span style="color: #0000ff;"&gt;this&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;string&lt;/span&gt; beepType)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;        BeepTypes beepTypeEnum;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;        &lt;span style="color: #0000ff;"&gt;return&lt;/span&gt; Enum.TryParse(beepType,&lt;span style="color: #0000ff;"&gt;true&lt;/span&gt;,&lt;span style="color: #0000ff;"&gt;out&lt;/span&gt; beepTypeEnum)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;        ? beepTypeEnum&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;        : BeepTypes.Error;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;3. In the main page (mainpage.xaml), add a button to be bound to the Click event as follows:&lt;/p&gt;&lt;div style="border:1px solid silver;border-image: initial; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin-top: 20px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow-x: auto; overflow-y: auto; cursor: text; padding-top: 4px; text-align: left;" id="codeSnippetWrapper"&gt;&lt;div style="padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;     text-align: left;border-style: none;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&amp;lt;Button Content=&lt;span style="color: #006080;"&gt;"Beep !!"&lt;/span&gt; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;Click=&lt;span style="color: #006080;"&gt;"button1_Click"&lt;/span&gt; /&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;4. In the Code-Behind (MainPage.cs), make the call to the method defined in the MyBeep class.&lt;/p&gt;&lt;div style="border:1px solid silver;border-image: initial; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin-top: 20px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow-x: auto; overflow-y: auto; cursor: text; padding-top: 4px; text-align: left;" id="codeSnippetWrapper"&gt;&lt;div style="padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;     text-align: left;border-style: none;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span style="color: #0000ff;"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; button1_Click(&lt;span style="color: #0000ff;"&gt;object&lt;/span&gt; sender, RoutedEventArgs e)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    MyBeep myBeep = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; MyBeep();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    myBeep.PlaySound(BeepTypes.Information);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;&lt;table border="0" cellspacing="0" cellpadding="0"&gt;    &lt;tbody&gt;        &lt;tr&gt;            &lt;td style="width: 20px;"&gt;&amp;nbsp;&lt;/td&gt;            &lt;td style="width: 46px;"&gt;&amp;nbsp;&lt;/td&gt;            &lt;td style="width: 343px;"&gt;            &lt;/p&gt;            &lt;p&gt;            &lt;/p&gt;            &lt;p&gt;If an exception appears when executing the action, check the application settings and make sure that it is running in OOB trusted mode.&lt;/p&gt;            &lt;p&gt;            &lt;/p&gt;            &lt;p&gt;            &lt;/p&gt;            &lt;p&gt;&lt;/td&gt;            &lt;td style="width: 21px;"&gt;&amp;nbsp;&lt;/td&gt;        &lt;/tr&gt;    &lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;&lt;h4&gt;Cross-domain calls&lt;/h4&gt;&lt;p&gt;When executing our Silverlight application within the sandbox, we can make calls to services, or ask for resources, which are in our domain. However, if we try to access resources in a different domain (namely a feed of Apple's film trailers) this call can return an error since, due to safety reasons, these calls are restricted unless the web service authorizes them explicitly. The following are the solutions we have within sandbox:&lt;/p&gt;&lt;ul&gt;    &lt;li&gt;The server may have an XML file with the cross-domain policy indicating we have access to these resources. It can be checked by launching a query to the Apple feed and using the Fiddler packages sniffer. We will then realize if this server exposes a cross-domain policy. &lt;/li&gt;    &lt;li&gt;It is possible to implement a service in our server acting as a proxy. The bad thing about this approach is that we overload the server and the response to the client is slower. &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;If our application is executed as trusted, this restriction does not exist. We can make the petition to a cross domain without having the cross-domain policy enabled. For instance, we can make a query to the Apple feed to check new cinema openings.&lt;/p&gt;&lt;div style="border:1px solid silver;border-image: initial; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin-top: 20px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow-x: auto; overflow-y: auto; cursor: text; padding-top: 4px; text-align: left;" id="codeSnippetWrapper"&gt;&lt;div style="padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;     text-align: left;border-style: none;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span style="color: #0000ff;"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; button1_Click(&lt;span style="color: #0000ff;"&gt;object&lt;/span&gt; sender, RoutedEventArgs e)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    WebClient wc = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; WebClient();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    wc.DownloadStringCompleted += &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; DownloadStringCompletedEventHandler(wc_DownloadStringCompleted);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    wc.DownloadStringAsync(&lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; Uri(&lt;span style="color: #006080;"&gt;"http://www.apple.com/trailers/home/xml/current.xml"&lt;/span&gt;, UriKind.Absolute));&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; wc_DownloadStringCompleted(&lt;span style="color: #0000ff;"&gt;object&lt;/span&gt; sender, DownloadStringCompletedEventArgs e)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    MessageBox.Show(e.Result);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;h4&gt;WebBrowser control&lt;/h4&gt;&lt;p&gt;Another interesting control we can only use in trusted OOB applications is the WebBrowser control. This allows us to view HTML pages within our Silverlight application. Besides, if the page is in the same domain, we can even interact with it via Silverlight | JavaScript.&lt;/p&gt;&lt;h5&gt;How it works&lt;/h5&gt;&lt;p&gt;Let's check how this control works by creating a simple example:&lt;/p&gt;&lt;p&gt;1. Create a new Silverlight project (application) and configure it so that it is executed as an OOB application with trusted permissions.&lt;/p&gt;&lt;p&gt;2. In the XAML, add the namespace System.Windows.Controls and instantiate the control:&lt;/p&gt;&lt;div style="border:1px solid silver;border-image: initial; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin-top: 20px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow-x: auto; overflow-y: auto; cursor: text; padding-top: 4px; text-align: left;" id="codeSnippetWrapper"&gt;&lt;div style="padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;     text-align: left;border-style: none;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&amp;lt;UserControl x:Class=&lt;span style="color: #006080;"&gt;"WebBrowser.MainPage"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    xmlns=&lt;span style="color: #006080;"&gt;"http://schemas.microsoft.com/winfx/2006/xaml/presentation"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    xmlns:x=&lt;span style="color: #006080;"&gt;"http://schemas.microsoft.com/winfx/2006/xaml"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    xmlns:d=&lt;span style="color: #006080;"&gt;"http://schemas.microsoft.com/expression/blend/2008"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    xmlns:mc=&lt;span style="color: #006080;"&gt;"http://schemas.openxmlformats.org/&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;        markup-compatibility/2006"&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    xmlns:controls=&lt;span style="color: #006080;"&gt;"clr-namespace:System.Windows.Controls;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;        assembly=System.Windows"&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;mc:Ignorable=&lt;span style="color: #006080;"&gt;"d"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;d:DesignHeight=&lt;span style="color: #006080;"&gt;"300"&lt;/span&gt; d:DesignWidth=&lt;span style="color: #006080;"&gt;"400"&lt;/span&gt;&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&amp;nbsp;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&amp;lt;Grid x:Name=&lt;span style="color: #006080;"&gt;"LayoutRoot"&lt;/span&gt; Background=&lt;span style="color: #006080;"&gt;"White"&lt;/span&gt;&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&amp;lt;controls:WebBrowser Source=&lt;span style="color: #006080;"&gt;"http://www.bing.com"&lt;/span&gt;/&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&amp;lt;/Grid&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&amp;lt;/UserControl&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;3. The result we obtain is shown in the following screenshot:&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/SilverlightShow/3548EN_06_20_OOB_2.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;        border-width: 0px;border-style: solid;" title="3548EN_06_20_OOB" alt="3548EN_06_20_OOB" src="http://www.silverlightshow.net/Storage/Users/SilverlightShow/3548EN_06_20_OOB_thumb.png" width="655" height="515" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Limitations to take into account:&lt;/p&gt;&lt;ul&gt;    &lt;li&gt;Control is placed on top of the ZOrder. In case we want to show a ChildWindow, for example, this will not be visible at first. To give it visibility, we need to create a rectangle using a WebBrowser Brush, make a static picture to the WebBrowser Control content and, when the dialog box is shown, hide the WebBrowser showing our rectangle. &lt;/li&gt;    &lt;li&gt;For safety reasons, we cannot capture the moment when the user navigates from one page to another; neither can we make JavaScript calls from Silverlight if the page belongs to a different domain. &lt;/li&gt;    &lt;li&gt;It is a heavy control, so it is not a good idea to create and destroy it dynamically quite often. &lt;/li&gt;&lt;/ul&gt;&lt;h4&gt;Real windows&lt;/h4&gt;&lt;p&gt;Another advantage of trusted OOB applications is the fact that they can show physical windows.&lt;/p&gt;&lt;p&gt;At the moment, these windows are not modal in Silverlight 5. The following is how it works:&lt;/p&gt;&lt;p&gt;1. Create a Windows object and assign the content property of this control to&lt;br /&gt;a given UserControl.&lt;/p&gt;&lt;p&gt;2. Then, we see how this sort of window can be displayed:&lt;/p&gt;&lt;div style="border:1px solid silver;border-image: initial; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin-top: 20px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow-x: auto; overflow-y: auto; cursor: text; padding-top: 4px; text-align: left;" id="codeSnippetWrapper"&gt;&lt;div style="padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;     text-align: left;border-style: none;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span style="color: #0000ff;"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; button1_Click(&lt;span style="color: #0000ff;"&gt;object&lt;/span&gt; sender, RoutedEventArgs e)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;{&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    Window wnd = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; Window();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    wnd.Width = 500;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    wnd.Height = 350;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    wnd.Title = &lt;span style="color: #006080;"&gt;"This is a test window"&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    &lt;span style="color: #008000;"&gt;//We indicate here a custom user control to display in the&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    &lt;span style="color: #008000;"&gt;//new window&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    wnd.Content = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; MyControl();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;    wnd.Visibility = Visibility.Visible;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;3. The result is shown in the following screenshot:&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/SilverlightShow/3548EN_06_21_OOB_2.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;        border-width: 0px;border-style: solid;" title="3548EN_06_21_OOB" alt="3548EN_06_21_OOB" src="http://www.silverlightshow.net/Storage/Users/SilverlightShow/3548EN_06_21_OOB_thumb.png" width="677" height="363" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;h2&gt;In-browser trusted applications&lt;/h2&gt;&lt;p&gt;Having trusted applications, which are executed as if they were desktop applications, is a powerful and interesting idea, but what happens if we need to have elevated permissions for applications running in the browser? For instance, a bank's intranet.&lt;/p&gt;&lt;p&gt;Silverlight 5 incorporates in-browser trusted applications, whose main features are as follows:&lt;/p&gt;&lt;ul&gt;    &lt;li&gt;It is a specific functionality for enterprise applications. &lt;/li&gt;    &lt;li&gt;The administrator controls which applications can be executed via    &lt;br /&gt;    group policy. &lt;/li&gt;    &lt;li&gt;The user is not asked and neither is the application installed. It is marked    &lt;br /&gt;    as valid, so it will be executed by the administrator. &lt;/li&gt;    &lt;li&gt;It can be integrated as part of an HTML website, without the need to give elevated permissions to the entire site. &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;On the other hand, the doubt arises, when developing, shall we create our own test certificate? The answer is no. If we execute from localhost, the restriction is not applied.&lt;/p&gt;&lt;p&gt;Thus, in the example that was previously implemented (getting the content of C:\Program Files), we only need to select the properties of our Silverlight project (right-click on Silverlight | Properties) and select the option Require elevated trust when running in-browser, as shown in the following screenshot:&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/SilverlightShow/3548EN_06_22_OOB_2.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;        border-width: 0px;border-style: solid;" title="3548EN_06_22_OOB" alt="3548EN_06_22_OOB" src="http://www.silverlightshow.net/Storage/Users/SilverlightShow/3548EN_06_22_OOB_thumb.png" width="487" height="441" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;When executing the application, it can be seen running flawlessly within the browser.&lt;/p&gt;&lt;p&gt;As we pointed out earlier, if the application in production is displayed, it will fail as it is not executed from localhost. The following are the necessary steps to avoid it:&lt;/p&gt;&lt;ul&gt;    &lt;li&gt;The XAP file has to be signed with a certificate (this can be seen in depth in Chapter 11, Security). &lt;/li&gt;    &lt;li&gt;The network administrator has to specify a setting for the trusted in-browser applications to be executed in all machines. Particularly, the flag of the registry entry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Silverlight\AllowElevatedTrustAppsInBrowser must have the value of 1. &lt;/li&gt;    &lt;li&gt;The network administrator has to add the certificate in which the XAP has been signed with as a trusted certificate (CurrentUser\Trusted Publishers). &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;For more information about the display process, please visit the link &lt;a href="http://bit.ly/kKbdpl"&gt;http://bit.ly/kKbdpl&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&lt;table border="0" cellspacing="0" cellpadding="0"&gt;    &lt;tbody&gt;        &lt;tr&gt;            &lt;td style="width: 20px;"&gt;&amp;nbsp;&lt;/td&gt;            &lt;td style="width: 46px;"&gt;&amp;nbsp;&lt;/td&gt;            &lt;td style="width: 322px;"&gt;            &lt;/p&gt;            &lt;p&gt;            &lt;/p&gt;            &lt;p&gt;In order to know if the application is running with elevated permissions, check the flag Application.Current.HasElevatedPermissions.&lt;/p&gt;            &lt;p&gt;            &lt;/p&gt;            &lt;p&gt;            &lt;/p&gt;            &lt;p&gt;&lt;/td&gt;            &lt;td style="width: 21px;"&gt;&amp;nbsp;&lt;/td&gt;        &lt;/tr&gt;    &lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;&lt;h2&gt;LOB application case study: applying what we have learned&lt;/h2&gt;&lt;p&gt;As final users, one of the disadvantages of using web applications is the fact that we have to remember URLs, open the browser, and so on. Isn't it easier to double-click on a desktop icon and run an application? That is what has been added to our booking application:&lt;/p&gt;&lt;ul&gt;    &lt;li&gt;We detect whether it is running or not within the browser &lt;/li&gt;    &lt;li&gt;If so, an option is shown to install the application as OOB &lt;/li&gt;    &lt;li&gt;Then, we install the application as OOB &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Thus, when executing the application within the browser, a new option is added in the navigation menu, as shown in the following screenshot:&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/SilverlightShow/3548EN_06_23_OOB_2.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;        border-width: 0px;border-style: solid;" title="3548EN_06_23_OOB" alt="3548EN_06_23_OOB" src="http://www.silverlightshow.net/Storage/Users/SilverlightShow/3548EN_06_23_OOB_thumb.png" width="233" height="89" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;When clicking the Install button, the confirmation dialog appears and the application gets installed (then, go to the desktop icon and execute it).&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/SilverlightShow/3548EN_06_24_OOB_2.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;        border-width: 0px;border-style: solid;" title="3548EN_06_24_OOB" alt="3548EN_06_24_OOB" src="http://www.silverlightshow.net/Storage/Users/SilverlightShow/3548EN_06_24_OOB_thumb.png" width="389" height="171" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;It is necessary to bear in mind that the application item has been customized. This can be set up in the project properties, Out-of-Browser Settings.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/SilverlightShow/3548EN_06_25_OOB_2.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;        border-width: 0px;border-style: solid;" title="3548EN_06_25_OOB" alt="3548EN_06_25_OOB" src="http://www.silverlightshow.net/Storage/Users/SilverlightShow/3548EN_06_25_OOB_thumb.png" width="496" height="639" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;h2&gt;Summary&lt;/h2&gt;&lt;p&gt;The capabilities offered by Out of Browser (OOB) applications are amazing. If we also add the possibility of elevating permission (in-browser and OOB trusted), the result is a light web application that can be almost as powerful and functional as a desktop application. Remember this chapter when a client indicates non-standard requirements of a web application (such as the integration of the application in an ATM, accessing the local filesystem, and so on). Anyway, before accepting, make the possible concept tests and ensure the functionality is covered.&lt;/p&gt;&lt;h3&gt;Additional resources&lt;/h3&gt;&lt;p&gt;If you need to dive deeper into any of the features presented in this chapter, you can check the following links:&lt;/p&gt;&lt;ul&gt;    &lt;li&gt;How far can I get using COM+? This post by Justin Angels summarizes it nicely at &lt;a href="http://bit.ly/4Ama4H"&gt;http://bit.ly/4Ama4H&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;In-browser http://bit.ly/kKbdpl and settings &lt;a href="http://bit.ly/oKFbzG"&gt;http://bit.ly/oKFbzG&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;P/Invoke, how does it work? &lt;a href="http://bit.ly/r2DTQF"&gt;http://bit.ly/r2DTQF&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;P/Invoke and Silverlight, an excellent introduction by Vikram Pendse &lt;a href="http://bit.ly/qI3XhN"&gt;http://bit.ly/qI3XhN&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;How to create physical windows, by Pete Brown &lt;a href="http://bit.ly/gZ4w7S"&gt;http://bit.ly/gZ4w7S&lt;/a&gt; &lt;/li&gt;&lt;/ul&gt;</description>      <link>http://www.silverlightshow.net/items/Mastering-LOB-Development-for-Silverlight-5-Out-of-Browser-OOB-Applications-.aspx</link>      <author>editorial@silverlightshow.net (Silverlight Show )</author>      <comments>http://www.silverlightshow.net/items/Mastering-LOB-Development-for-Silverlight-5-Out-of-Browser-OOB-Applications-.aspx#comments</comments>      <guid isPermaLink="true">http://www.silverlightshow.net/items/Mastering-LOB-Development-for-Silverlight-5-Out-of-Browser-OOB-Applications-.aspx</guid>      <pubDate>Tue, 03 Apr 2012 14:57:57 GMT</pubDate>    </item>    <item>      <title>Fundamentals of Windows 8 XAML/C# Metro Style Apps</title>      <link>http://feeds.johnpapa.net/~r/JohnPapa/~3/xzVcuSsFs94/fundamentals-of-windows-8-xaml-c-metro-style-apps</link>      <description>&lt;p&gt;&lt;a href="http://weblogs.asp.net/blogs/dwahlin/image_26380E21.png"&gt;&lt;img title="image" border="0" alt="image" src="http://weblogs.asp.net/blogs/dwahlin/image_thumb_1A361DED.png" width="240" height="56"&gt;&lt;/a&gt;  &lt;p&gt;This is a Windows 8 XAML/C# Fundamentals presentation I gave at the Spring 2012 &lt;a href="http://devconnections.com/"&gt;DevConnections&lt;/a&gt; conference in Las Vegas. It covers some of the key topics you need to know to get started building Windows 8 XAML Metro apps including styling, animations, invoking the Windows Runtime (WinRT), the intrinsic controls, and more that will help prepare you to develop Windows 8 Metro style apps. &lt;/p&gt; &lt;p&gt;You can view my other sessions from DevConnections and Orlando Code Camp here:  &lt;ul&gt; &lt;li&gt;&lt;a href="http://johnpapa.net/9-jquery-samples"&gt;jQuery Fundamentals workshop&lt;/a&gt;  &lt;li&gt;&lt;a href="http://johnpapa.net/jsrender-fundamentals-templating-for-html5-applications"&gt;JsRender Fundamentals: Templating for HTML5 Applications&lt;/a&gt;  &lt;li&gt;&lt;a href="http://johnpapa.net/fundamentals-of-windows-8-xaml-c-metro-style-apps"&gt;Fundamentals of Windows 8 XAML/C# Metro Style Apps&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;View more of my presentations &lt;a href="http://speakerdeck.com/u/johnpapa"&gt;here&lt;/a&gt;.   &lt;script src="http://speakerdeck.com/embed/4f7a5951829b3f0022006423.js"&gt;&lt;/script&gt;   &lt;p&gt;Sample code shown in the presentation can be &lt;a href="http://johnpapa.net/files/downloads/win8cpdemos.zip"&gt;found here&lt;/a&gt;. A large number of samples are available in the Windows 8 SDK which can be &lt;a href="http://jpapa.me/win8cpsdk"&gt;found here&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;If you like this you can check out the &lt;a href="http://jpapa.me/Win8IntroPS"&gt;Windows 8 Fundamentals course&lt;/a&gt; &lt;a href="http://weblogs.asp.net/dwahlin"&gt;Dan Wahlin&lt;/a&gt; and I co-authored for &lt;a href="http://www.pluralsight.com"&gt;Pluralsight&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;&lt;a href="http://jpapa.me/Win8IntroPS"&gt;&lt;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="win8 ps" border="0" alt="win8 ps" src="http://johnpapa.net/Media/Default/Windows-Live-Writer/Getting-Started-Building-Windows-8-XAMLC_12F1D/win8%20ps_3.png" width="1458" height="240"&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;&lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=xzVcuSsFs94:EGPEQy0GWmQ:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?i=xzVcuSsFs94:EGPEQy0GWmQ:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=xzVcuSsFs94:EGPEQy0GWmQ:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?i=xzVcuSsFs94:EGPEQy0GWmQ:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=xzVcuSsFs94:EGPEQy0GWmQ:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=xzVcuSsFs94:EGPEQy0GWmQ:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JohnPapa/~4/xzVcuSsFs94" height="1" width="1"/&gt;</description>      <pubDate>Tue, 03 Apr 2012 04:15:56 GMT</pubDate>      <guid isPermaLink="false">http://johnpapa.net:80/fundamentals-of-windows-8-xaml-c-metro-style-apps</guid>      <origLink xmlns="http://rssnamespace.org/feedburner/ext/1.0">http://johnpapa.net:80/fundamentals-of-windows-8-xaml-c-metro-style-apps</origLink>    </item>    <item>      <title>Whirlwind Tour of Building HTML5 and JavaScript Apps with MVVM and Knockout</title>      <link>http://feeds.johnpapa.net/~r/JohnPapa/~3/5eHnoM_xgyo/whirlwind-tour-of-hellip-building-html5-and-javascript-apps-with-mvvm-and-knockout</link>      <description>&lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;This is the Whirlwind Tour of Building HTML5 and JavaScript Apps with MVVM and Knockout presentation I gave at the Spring 2012 &lt;a href="http://devconnections.com/"&gt;DevConnections&lt;/a&gt; conference in Las Vegas and in Orlando Code Camp (both last week). It covers some of the key topics you need to know to build web applications using the MVVM pattern with JavaScript and jQuery that consume json data, use json objects in Javascript, use declarative binding, using KnockoutJS.&lt;/p&gt; &lt;p&gt;You can view my other sessions from DevConnections and Orlando Code Camp here:  &lt;ul&gt; &lt;li&gt;&lt;a href="http://johnpapa.net/9-jquery-samples"&gt;jQuery Fundamentals workshop&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://johnpapa.net/jsrender-fundamentals-templating-for-html5-applications"&gt;JsRender Fundamentals: Templating for HTML5 Applications&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://johnpapa.net/fundamentals-of-windows-8-xaml-c-metro-style-apps"&gt;Fundamentals of Windows 8 XAML/C# Metro Style Apps&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;span id="preserve511c0a850afb4249ad61dd1eceb15e7a" class="wlWriterPreserve"&gt;&lt;span id="preserve9621b158bd774617b1b98430e912ed34" class="wlWriterPreserve"&gt;&lt;script src="http://speakerdeck.com/embed/4f7a5c3c6fbefe0022008ce1.js"&gt;&lt;/script&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;View more of my presentations &lt;a href="http://speakerdeck.com/u/johnpapa"&gt;here&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;The demo code can be downloaded &lt;a href="http://archive.msdn.microsoft.com/mag201202Client"&gt;from here&lt;/a&gt; and &lt;a href="http://archive.msdn.microsoft.com/mag201203ClientInsight"&gt;here&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;If you are interested in KnockoutJS, you’ll want to check out my course for &lt;a href="http://www.pluralsight.net"&gt;Pluralsight&lt;/a&gt; which &lt;a href="http://jpapa.me/komvvm"&gt;covers KnockoutJS in depth.&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://jpapa.me/komvvm"&gt;&lt;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="ko ps" border="0" alt="ko ps" src="http://johnpapa.net/Media/Default/Windows-Live-Writer/bbe49adbff7e_140DD/ko%20ps_3.png" width="1095" height="188"&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;&lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=5eHnoM_xgyo:urK5ozZssko:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?i=5eHnoM_xgyo:urK5ozZssko:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=5eHnoM_xgyo:urK5ozZssko:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?i=5eHnoM_xgyo:urK5ozZssko:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=5eHnoM_xgyo:urK5ozZssko:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=5eHnoM_xgyo:urK5ozZssko:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JohnPapa/~4/5eHnoM_xgyo" height="1" width="1"/&gt;</description>      <pubDate>Tue, 03 Apr 2012 04:14:48 GMT</pubDate>      <guid isPermaLink="false">http://johnpapa.net:80/whirlwind-tour-of-hellip-building-html5-and-javascript-apps-with-mvvm-and-knockout</guid>      <origLink xmlns="http://rssnamespace.org/feedburner/ext/1.0">http://johnpapa.net:80/whirlwind-tour-of-hellip-building-html5-and-javascript-apps-with-mvvm-and-knockout</origLink>    </item>    <item>      <title>JsRender Fundamentals: Templating for HTML5 Applications</title>      <link>http://feeds.johnpapa.net/~r/JohnPapa/~3/-EcstKkoRSE/jsrender-fundamentals-templating-for-html5-applications</link>      <description>&lt;p&gt;&amp;nbsp; &lt;p&gt;This is a JsRender Fundamentals presentation I gave at the Spring 2012 &lt;a href="http://devconnections.com/"&gt;DevConnections&lt;/a&gt; conference in Las Vegas. It covers some of the key topics you need to know to build web applications with JsRender. Learn how JsRender brings a new templating library to HTML5 development that has a code-less tag syntax, high performance, no dependency on jQuery nor a DOM, supports creating custom functions, and uses pure string-based rendering. &lt;/p&gt; &lt;p&gt;You can view my other sessions from DevConnections and Orlando Code Camp here:  &lt;ul&gt; &lt;li&gt;&lt;a href="http://johnpapa.net/9-jquery-samples"&gt;jQuery Fundamentals workshop&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://johnpapa.net/whirlwind-tour-of-hellip-building-html5-and-javascript-apps-with-mvvm-and-knockout"&gt;Whirlwind Tour of Building HTML5 and JavaScript Apps with MVVM and Knockout&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://johnpapa.net/fundamentals-of-windows-8-xaml-c-metro-style-apps"&gt;Fundamentals of Windows 8 XAML/C# Metro Style Apps&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span id="preserve511c0a850afb4249ad61dd1eceb15e7a" class="wlWriterPreserve"&gt;&lt;script src="http://speakerdeck.com/embed/4f7a5e416fbefe00220090f6.js"&gt;&lt;/script&gt;&lt;/span&gt; &lt;p&gt;View more of my presentations &lt;a href="http://speakerdeck.com/u/johnpapa"&gt;here&lt;/a&gt;.  &lt;p&gt;The demo code can be downloaded &lt;a href="http://archive.msdn.microsoft.com/mag201204Insight"&gt;from here&lt;/a&gt;.  &lt;p&gt;If you are interested in &lt;a href="https://github.com/BorisMoore/jsrender"&gt;JsRender&lt;/a&gt;, you’ll want to check out my upcoming course for &lt;a href="http://www.pluralsight.net"&gt;Pluralsight&lt;/a&gt; (May 2012) which will cover JsRender in depth.&lt;div class="feedflare"&gt;&lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=-EcstKkoRSE:X0oPVFZ74i4:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?i=-EcstKkoRSE:X0oPVFZ74i4:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=-EcstKkoRSE:X0oPVFZ74i4:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?i=-EcstKkoRSE:X0oPVFZ74i4:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=-EcstKkoRSE:X0oPVFZ74i4:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=-EcstKkoRSE:X0oPVFZ74i4:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JohnPapa/~4/-EcstKkoRSE" height="1" width="1"/&gt;</description>      <pubDate>Tue, 03 Apr 2012 04:14:30 GMT</pubDate>      <guid isPermaLink="false">http://johnpapa.net:80/jsrender-fundamentals-templating-for-html5-applications</guid>      <origLink xmlns="http://rssnamespace.org/feedburner/ext/1.0">http://johnpapa.net:80/jsrender-fundamentals-templating-for-html5-applications</origLink>    </item>    <item>      <title>9 jQuery Samples</title>      <link>http://feeds.johnpapa.net/~r/JohnPapa/~3/hY0buRPXnSg/9-jquery-samples</link>      <description>&lt;p&gt;These are the jsfiddle samples that &lt;a href="http://weblogs.asp.net/dwahlin"&gt;Dan Wahlin&lt;/a&gt; and I covered in our jQuery Fundamentals workshop at &lt;a href="http://www.devconnections.com"&gt;DevConnections&lt;/a&gt; last week. These were samples we wrote on the fly in &lt;a href="http://jsfiddle.net"&gt;http://jsfiddle.net&lt;/a&gt; and wanted to share. Enjoy!  &lt;p&gt;Additional jQuery samples covering selectors, DOM manipulation, Ajax techniques, as well as sample applications can be &lt;a href="http://dl.dropbox.com/u/6037348/jQuerySamples.zip"&gt;found here&lt;/a&gt;. &lt;p&gt;You can view my other sessions from DevConnections and Orlando Code Camp here: &lt;ul&gt; &lt;li&gt;&lt;a href="http://johnpapa.net/whirlwind-tour-of-hellip-building-html5-and-javascript-apps-with-mvvm-and-knockout"&gt;Whirlwind Tour of Building HTML5 and JavaScript Apps with MVVM and Knockout&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://johnpapa.net/jsrender-fundamentals-templating-for-html5-applications"&gt;JsRender Fundamentals: Templating for HTML5 Applications&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://johnpapa.net/fundamentals-of-windows-8-xaml-c-metro-style-apps"&gt;Fundamentals of Windows 8 XAML/C# Metro Style Apps&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;View more of my presentations &lt;a href="http://speakerdeck.com/u/johnpapa"&gt;here&lt;/a&gt;. &lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;h4&gt;Using the Data Function&lt;/h4&gt;&lt;iframe style="width: 100%; height: 300px" src="http://jsfiddle.net/dwahlin/pLSvV/1/embedded/" frameborder="0" allowfullscreen="allowfullscreen"&gt;&lt;/iframe&gt; &lt;h4&gt;&amp;nbsp;&lt;/h4&gt; &lt;h4&gt;Using Object Literals with jQuery&lt;/h4&gt;&lt;iframe style="width: 100%; height: 300px" src="http://jsfiddle.net/dwahlin/DUU9p/2/embedded/" frameborder="0" allowfullscreen="allowfullscreen"&gt;&lt;/iframe&gt; &lt;h4&gt;&amp;nbsp;&lt;/h4&gt; &lt;h4&gt;Using jQuery each() with string concatenation&lt;/h4&gt;&lt;iframe style="width: 100%; height: 141px" src="http://jsfiddle.net/dwahlin/bbwZr/3/embedded/" frameborder="0" allowfullscreen="allowfullscreen"&gt;&lt;/iframe&gt; &lt;h4&gt;&amp;nbsp;&lt;/h4&gt; &lt;h4&gt;Using on() to handle child events&lt;/h4&gt;&lt;iframe style="width: 100%; height: 260px" src="http://jsfiddle.net/dwahlin/nCLy6/4/embedded/" frameborder="0" allowfullscreen="allowfullscreen"&gt;&lt;/iframe&gt; &lt;h4&gt;&amp;nbsp;&lt;/h4&gt; &lt;h4&gt;jQuery - hover&lt;/h4&gt;&lt;iframe style="width: 100%; height: 180px" src="http://jsfiddle.net/johnpapa/XLWGb/embedded/" frameborder="0" allowfullscreen="allowfullscreen"&gt;&lt;/iframe&gt; &lt;h4&gt;&amp;nbsp;&lt;/h4&gt; &lt;h4&gt;jQuery - event handling variations&lt;/h4&gt;&lt;iframe style="width: 100%; height: 300px" src="http://jsfiddle.net/johnpapa/rCXnj/embedded/" frameborder="0" allowfullscreen="allowfullscreen"&gt;&lt;/iframe&gt; &lt;h4&gt;&amp;nbsp;&lt;/h4&gt; &lt;h4&gt;jQuery - Twitter (bind, append, appendTo, each, fadeOut, $.getJSON, callback, success, error, complete)r&lt;/h4&gt;&lt;iframe style="width: 100%; height: 300px" src="http://jsfiddle.net/johnpapa/YS3u4/embedded/" frameborder="0" allowfullscreen="allowfullscreen"&gt;&lt;/iframe&gt; &lt;h4&gt;&amp;nbsp;&lt;/h4&gt; &lt;h4&gt;jQuery - attr vs prop&lt;/h4&gt;&lt;iframe style="width: 100%; height: 300px" src="http://jsfiddle.net/johnpapa/kPL8w/embedded/" frameborder="0" allowfullscreen="allowfullscreen"&gt;&lt;/iframe&gt; &lt;h4&gt;&amp;nbsp;&lt;/h4&gt; &lt;h4&gt;jQuery - Simple selectors&lt;/h4&gt;&lt;iframe style="width: 100%; height: 128px" src="http://jsfiddle.net/johnpapa/Q7kbT/embedded/" frameborder="0" allowfullscreen="allowfullscreen"&gt;&lt;/iframe&gt;&lt;div class="feedflare"&gt;&lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=hY0buRPXnSg:vNsjpxcw-x8:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?i=hY0buRPXnSg:vNsjpxcw-x8:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=hY0buRPXnSg:vNsjpxcw-x8:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?i=hY0buRPXnSg:vNsjpxcw-x8:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=hY0buRPXnSg:vNsjpxcw-x8:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=hY0buRPXnSg:vNsjpxcw-x8:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JohnPapa/~4/hY0buRPXnSg" height="1" width="1"/&gt;</description>      <pubDate>Tue, 03 Apr 2012 04:13:12 GMT</pubDate>      <guid isPermaLink="false">http://johnpapa.net:80/9-jquery-samples</guid>      <origLink xmlns="http://rssnamespace.org/feedburner/ext/1.0">http://johnpapa.net:80/9-jquery-samples</origLink>    </item>    <item>      <title>Redesigning my blog for adaptive layout</title>      <category>developer</category>      <category>blogging</category>      <category>expression</category>      <category>web</category>      <category>tech stuff</category>      <category>silverlight</category>      <link>http://feeds.timheuer.com/~r/timheuer/~3/0doDFsWOuJg/redesign-your-site-with-bootstrap.aspx</link>      <description>&lt;p&gt;My &lt;a href="http://timheuer.com/blog/archive/2009/02/09/my-blogger-toolbox-tools-for-blogging.aspx"&gt;blog runs on Subtext&lt;/a&gt; which has a pretty good skinning model (albeit a tad outdated) and allows you to customize whatever you want.  I’ve had my own custom theme since 2009.  I figured I was due for an update.  I was further strengthened by a post from &lt;a href="http://twitter.com/jongalloway"&gt;Jon Galloway&lt;/a&gt; last week.&lt;/p&gt;  &lt;blockquote class="twitter-tweet tw-align-center"&gt;   &lt;p&gt;There wasn't a vote, but if there was: I don't like narrow, fixed width web designs. Use media queries, scale intelligently on widescreen.&lt;/p&gt; — Jon Galloway (@jongalloway) &lt;a href="https://twitter.com/jongalloway/status/185837607815614465" data-datetime="2012-03-30T21:15:13+00:00"&gt;March 30, 2012&lt;/a&gt;&lt;/blockquote&gt;  &lt;p&gt;Now when I saw this I figured it was another nudge.  I did also have some time this weekend without any distractions so I took it as an opportunity to do some ‘work’ on this here blog.  Now a while back I was inspired by what &lt;a href="http://www.hanselman.com/blog/HireAndPayADesignerAndBeHappy.aspx"&gt;Scott Hanselman had done on his site with a designer&lt;/a&gt;.  I reached out to a few designers that I admired, but frankly never heard back :-(.  I figured that was okay as I wasn’t in a position to really pay what I know it is worth for a good designer.  So I went looking for things on the web that I could do myself.  I did want some subtle design tweaks to represent some things I’m currently passionate about.&lt;/p&gt;  &lt;h2&gt;Bootstrap your CSS&lt;/h2&gt;  &lt;p&gt;After some digging I saw a ton of pointers to &lt;a href="http://twitter.github.com/bootstrap"&gt;Bootstrap&lt;/a&gt;.  This is an Open Source Javascript/CSS library that sets your site up for styling success and layout goodness.  The documentation was some of the better docs I’ve seen for a library.  Each aspect of the library/styles where in the docs that I could visually see, interact with and see the code that produced the behavior.  I liked what I saw and went to work.&lt;/p&gt;  &lt;p&gt;&lt;img style="float: none; margin-left: auto; display: block; margin-right: auto" src="http://storage2.timheuer.com/bootstrap.png" /&gt;&lt;/p&gt;  &lt;p&gt;When I got all the styles configured (using the basic setup from Bootstrap) I went to work on some of my own minor tweaks.  One of the things I really liked is the &lt;a href="http://twitter.github.com/bootstrap/scaffolding.html#responsive"&gt;responsive layout options&lt;/a&gt;, not only for the grid but also for different screen sizes.  By adding a simple class I can specify certain aspects that shouldn’t be displayed when viewing the site on a tablet or phone.  There were other cool responsive options for this such as the main menu will switch to a drop-down approach when on a smaller device.  Using &lt;a href="http://getfirebug.com/"&gt;Firebug&lt;/a&gt;, IE F12 tools and real devices I was able to get the precise tweaks that I wanted.  Here’s what my site looks like on an iPhone as an example:&lt;/p&gt;  &lt;p&gt;&lt;img title="timheuer.com on an iPhone" style="float: none; margin-left: auto; display: block; margin-right: auto" alt="timheuer.com on an iPhone" src="http://storage2.timheuer.com/iphonenewsite.png" width="320" height="480" /&gt;&lt;/p&gt;  &lt;p&gt;Notice the menu at the top is gone but replaced with a little icon (which is a drop-down).  Also notice the sidebar area is no longer visible (it is on the bottom of the site in this device view).  I like this subtle configuration that was really easy to do with just adding a class name to the area I wanted to collapse.&lt;/p&gt;  &lt;p&gt;The other thing I wanted was to implement my primary navigation links in a little-more-than-text style.  I used the CSS sprite method by creating a single image that I would then define styles that used clips within that image to pull out the right area.  Here is the image in entirety:&lt;/p&gt;  &lt;p&gt;&lt;img style="float: none; margin-left: auto; display: block; background-color: black; margin-right: auto" src="http://timheuer.com/blog/skins/2012/img/navbarglyphs.png" /&gt;&lt;/p&gt;  &lt;p&gt;Notice how the normal and hover states are the same image.  &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: I put this on a black background so you can see them but it is actually a transparent background so the theme’s background shows through.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;What I do then is just define a style for the &amp;lt;a&amp;gt; tag like:&lt;/p&gt;  &lt;div id="codeSnippetWrapper" style="cursor: text; font-size: 8pt; border-top: silver 1px solid; font-family: 'Courier New', courier, monospace; border-right: silver 1px solid; width: 97.5%; border-bottom: silver 1px solid; overflow: auto; padding-bottom: 4px; direction: ltr; text-align: left; padding-top: 4px; padding-left: 4px; margin: 20px 0px 10px; border-left: silver 1px solid; line-height: 12pt; padding-right: 4px; background-color: #f4f4f4"&gt;   &lt;div id="codeSnippet" style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;     &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum1" style="color: #606060"&gt;   1:&lt;/span&gt; #follow {&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum2" style="color: #606060"&gt;   2:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;background-image&lt;/span&gt;: url("navbarglyphs&lt;span style="color: #cc6633"&gt;.png&lt;/span&gt;");&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum3" style="color: #606060"&gt;   3:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;background-position&lt;/span&gt;: &lt;span style="color: #006080"&gt;-195px 0px;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum4" style="color: #606060"&gt;   4:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum5" style="color: #606060"&gt;   5:&lt;/span&gt;  &lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum6" style="color: #606060"&gt;   6:&lt;/span&gt; #follow:hover {&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum7" style="color: #606060"&gt;   7:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;background-image&lt;/span&gt;: url("navbarglyphs&lt;span style="color: #cc6633"&gt;.png&lt;/span&gt;");&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum8" style="color: #606060"&gt;   8:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;background-position&lt;/span&gt;: -195px &lt;span style="color: #006080"&gt;-70px;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum9" style="color: #606060"&gt;   9:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;Now I was having a bit of difficulty with this because I was misunderstanding the background-position value in CSS.  A quick set of second eyes with &lt;a href="http://twitter.com/ShawnWildermuth"&gt;Shawn Wildermuth&lt;/a&gt; (who is doing a bunch of &lt;a href="http://wildermuth.com/2012/3/24/Modern_Web_Development_-_Part_8"&gt;HTML dev posts right now&lt;/a&gt;) helped me realize my math was wrong and I needed to use the negative value instead of what I was using.  Once that forehead-slap moment was done, I was set.  &lt;/p&gt;&lt;p&gt;I still have a few tweaks to go (need to re-work the comments sections but didn’t have the time to think about a design more) but I’m happy with the quick re-design.  It is very simple for sure, but I like it.  I tried on a few different screen sizes and I think I have met Jon’s challenge to adapt to the available space for the screen.  If you are working with a new site and aren’t a CSS/JS guru I highly recommend looking at Bootstrap as a solid starting point for your efforts.&lt;/p&gt;&lt;div id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:319b683d-7587-4742-a525-11a13e0b0e9d" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"&gt;&lt;span class="tags"&gt;tags: &lt;a href="http://timheuer.com/blog/Tags/css/default.aspx" rel="tag"&gt;css&lt;/a&gt;, &lt;a href="http://timheuer.com/blog/Tags/html5/default.aspx" rel="tag"&gt;html5&lt;/a&gt;, &lt;a href="http://timheuer.com/blog/Tags/js/default.aspx" rel="tag"&gt;js&lt;/a&gt;, &lt;a href="http://timheuer.com/blog/Tags/subtext/default.aspx" rel="tag"&gt;subtext&lt;/a&gt;, &lt;a href="http://timheuer.com/blog/Tags/web/default.aspx" rel="tag"&gt;web&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="wlWriterHeaderFooter" style="margin:0px; padding:0px 0px 0px 0px;"&gt;&lt;hr /&gt;&lt;div class="cc-license"&gt;This work is licensed under a &lt;a href="http://creativecommons.org/licenses/by/3.0/"&gt;Creative Commons Attribution By license.&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;img src="http://timheuer.com/blog/aggbug/14833.aspx" width="1" height="1" /&gt;&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/thaXZYjl2PDgvCyN4fP_6XSqKCE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/thaXZYjl2PDgvCyN4fP_6XSqKCE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/thaXZYjl2PDgvCyN4fP_6XSqKCE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/thaXZYjl2PDgvCyN4fP_6XSqKCE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/timheuer/~4/0doDFsWOuJg" height="1" width="1"/&gt;</description>      <creator xmlns="http://purl.org/dc/elements/1.1/">Tim Heuer</creator>      <guid isPermaLink="false">http://timheuer.com/blog/archive/2012/04/01/redesign-your-site-with-bootstrap.aspx</guid>      <pubDate>Mon, 02 Apr 2012 06:08:07 GMT</pubDate>      <comments>http://timheuer.com/blog/archive/2012/04/01/redesign-your-site-with-bootstrap.aspx#feedback</comments>      <comments xmlns="http://purl.org/rss/1.0/modules/slash/">6</comments>      <commentRss xmlns="http://wellformedweb.org/CommentAPI/">http://timheuer.com/blog/comments/commentRss/14833.aspx</commentRss>      <ping xmlns="http://madskills.com/public/xml/rss/module/trackback/">http://timheuer.com/blog/services/trackbacks/14833.aspx</ping>      <origLink xmlns="http://rssnamespace.org/feedburner/ext/1.0">http://timheuer.com/blog/archive/2012/04/01/redesign-your-site-with-bootstrap.aspx</origLink>    </item>    <item>      <title>3 Quick JavaScript Tips for .NET Developers</title>      <link>http://feeds.johnpapa.net/~r/JohnPapa/~3/AObhwiEDU-Y/3-quick-javascript-tips-for-.net-developers</link>      <description>&lt;p&gt;Yesterday at the &lt;a href="http://devconnections.com/home.aspx"&gt;DevConnections&lt;/a&gt; event I had to make an emergency speaking appearance for a speaker who became suddenly ill. Luckily that talk was a topic I know well (JavaScript intro for .NET developers), I was available, and I didn’t freak out &lt;img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://johnpapa.net/Media/Default/Windows-Live-Writer/3-Quick-JavaScript-Tips_A886/wlEmoticon-smile_2.png"&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;I grabbed the speaker’s deck and used it as a guideline, but I spent the majority of the time in &lt;a href="http://jsfiddle.net"&gt;jsfiddle.net&lt;/a&gt; writing examples. The audience was really interactive and grasped the basics pretty quickly. The topics that we spent the most amount of time discussing as a group where regarding namespaces, functions and objects. So I thought I might include 3 of the examples here on my blog.&lt;/p&gt; &lt;h4&gt;Namespacing&lt;/h4&gt; &lt;p&gt;Namespacing is an important (and easy) way to make sure your objects do not collide with other javascript libraries. There are many ways to handle namespacing, but the way I like to start with is dead simple. This example shows that all variables hang off the ‘my’ namespace. I like using ‘my’ because its short and sweet.&lt;/p&gt;&lt;iframe style="width: 100%; height: 300px" src="http://jsfiddle.net/johnpapa/t6TBv/embedded/" frameborder="0" allowfullscreen="allowfullscreen"&gt;&lt;/iframe&gt; &lt;h4&gt;Creating an Object Literal&lt;/h4&gt; &lt;p&gt;Objects can be created in a variety of ways. But the most common you will see in demos is the object literal. The reason? Its short and sweet. Objects can be created simply by setting a variable equal to an open and close curly brace pair, as shown below. Then add properties as needed. I often use this syntax for simple objects (not a lot of logic, mostly properties and a few methods). &lt;/p&gt; &lt;p&gt;The ‘this’ keyword does work with the object literal, though once you get into nesting functions it can get unwieldy unless you manage ‘this’. That’s often when I use one of a few techniques such as setting ‘this’ (at a place where you know what ‘this’ represents for certain) to a variable called self. But I’ll hit that topic in a later post.&lt;/p&gt; &lt;p&gt;I most often use object literals for passing arguments to functions &lt;/p&gt; &lt;p&gt;&lt;iframe style="width: 100%; height: 300px" src="http://jsfiddle.net/johnpapa/XNPH9/embedded/" frameborder="0" allowfullscreen="allowfullscreen"&gt;&lt;/iframe&gt;&lt;/p&gt; &lt;h4&gt;Creating an Object from a Function&lt;/h4&gt; &lt;p&gt;You can also create objects through functions. While I prefer using a pattern such as the Revealing Module pattern for this, the simplest way to create an object from a function is shown below. Note that use of ‘self’ in here to represent ‘this’. It may not be needed in all cases but it’s a good habit to get into that has saved me many times. A friend of mine actually uses the word ’me’ instead of self … says its twice as fast &lt;img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://johnpapa.net/Media/Default/Windows-Live-Writer/3-Quick-JavaScript-Tips_A886/wlEmoticon-smile_2.png"&gt;&lt;/p&gt; &lt;p&gt;&lt;iframe style="width: 100%; height: 300px" src="http://jsfiddle.net/johnpapa/uZMfH/embedded/" frameborder="0" allowfullscreen="allowfullscreen"&gt;&lt;/iframe&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;&lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=AObhwiEDU-Y:37K_NTohusI:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?i=AObhwiEDU-Y:37K_NTohusI:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=AObhwiEDU-Y:37K_NTohusI:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?i=AObhwiEDU-Y:37K_NTohusI:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=AObhwiEDU-Y:37K_NTohusI:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=AObhwiEDU-Y:37K_NTohusI:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JohnPapa/~4/AObhwiEDU-Y" height="1" width="1"/&gt;</description>      <pubDate>Fri, 30 Mar 2012 16:16:15 GMT</pubDate>      <guid isPermaLink="false">http://johnpapa.net:80/3-quick-javascript-tips-for-.net-developers</guid>      <origLink xmlns="http://rssnamespace.org/feedburner/ext/1.0">http://johnpapa.net:80/3-quick-javascript-tips-for-.net-developers</origLink>    </item>    <item>      <title>Released: New Version of Expression Blend for Silverlight 5</title>      <author>Pete Brown	</author>      <link>http://10rem.net/blog/2012/03/29/released-new-version-of-expression-blend-for-silverlight-5</link>      <pubDate>Thu, 29 Mar 2012 18:32:38 GMT</pubDate>      <guid>http://10rem.net/blog/2012/03/29/released-new-version-of-expression-blend-for-silverlight-5</guid>      <description>&lt;p&gt;You may have noticed that your current copy of Expression Blendfor Silverlight 5 expires in the next day or two. A new version ofExpression Blend Preview for Silverlight 5 is now out. &lt;ahref="http://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;amp;id=9503" target="_blank"&gt;Get it here&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;This new version has the all important go-live license, and alsoextends the expiration date to June 20, 2013 (over a year fromnow)..&lt;/p&gt;&lt;p&gt;More information on the &lt;ahref="http://blendinsider.com/version-expression-blend-4/updated-microsoft-expression-blend-preview-for-silverlight-5-2012-03-29/" target="_blank"&gt;Expression Blend Team Blog&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/x0y0giz_t68kixH6I25uTDAGNLA/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/x0y0giz_t68kixH6I25uTDAGNLA/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/x0y0giz_t68kixH6I25uTDAGNLA/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/x0y0giz_t68kixH6I25uTDAGNLA/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/PeteBrown-Silverlight/~4/nE75v_H25WI" height="1" width="1"/&gt;</description>    </item>    <item>      <title>XAML Tip: Setting Attached Properties from Code</title>      <author>Pete Brown	</author>      <link>http://10rem.net/blog/2012/03/29/xaml-tip-setting-attached-properties-from-code</link>      <pubDate>Thu, 29 Mar 2012 17:36:39 GMT</pubDate>      <guid>http://10rem.net/blog/2012/03/29/xaml-tip-setting-attached-properties-from-code</guid>      <description>&lt;p&gt;Recently, &lt;ahref="http://10rem.net/blog/2011/09/02/silverlight-5-and-wpf-4-opentype-support#comments" target="_blank"&gt;a reader asked&lt;/a&gt; how they should go aboutsetting the Typography properties from code-behind.&lt;/p&gt;&lt;p&gt;The original question was about Silverlight, but the approachworks in WPF, Windows 8 and more.&lt;/p&gt;&lt;p&gt;Given the following markup:&lt;/p&gt;&lt;pre class="brush: xml;"&gt;&amp;lt;StackPanel&amp;gt;&lt;br /&gt;    &amp;lt;TextBlock x:Name="OriginalText"&lt;br /&gt;               FontSize="72"&lt;br /&gt;               FontFamily="Gabriola"&lt;br /&gt;               Text="Hello World!" /&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;TextBlock x:Name="ExampleText"&lt;br /&gt;               FontSize="72"&lt;br /&gt;               FontFamily="Gabriola"&lt;br /&gt;               Text="Hello World!" /&amp;gt;&lt;br /&gt;&amp;lt;/StackPanel&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;You can set an &lt;ahref="http://msdn.microsoft.com/en-us/library/ms749011.aspx"target="_blank"&gt;attached property&lt;/a&gt; such as&lt;strong&gt;Typography.StylisticSet5&lt;/strong&gt; by using the&lt;strong&gt;SetValue&lt;/strong&gt; method like this:&lt;/p&gt;&lt;pre class="brush: csharp;"&gt;private void SetTextOptions()&lt;br /&gt;{&lt;br /&gt;    ExampleText.SetValue(Typography.StylisticSet5Property, true);&lt;br /&gt;}&lt;/pre&gt;&lt;p&gt;The &lt;strong&gt;SetValue&lt;/strong&gt; method comes from the&lt;strong&gt;DependencyObject&lt;/strong&gt; base class.&lt;strong&gt;Typography.StylisticSet5Property&lt;/strong&gt; is the name of adependency property - an attached property in this case. This couldeasily have been the &lt;strong&gt;Canvas.Left&lt;/strong&gt; property, the&lt;strong&gt;Grid.Row&lt;/strong&gt; property or any number of other attachedproperties. The resulting display looks like this:&lt;/p&gt;&lt;p&gt;&lt;ahref="http://10rem.net/media/84198/Windows-Live-Writer_XAML-Tip-Setting-Attached-Properties-fro_BBAD_image_2.png" target="_blank"&gt;&lt;img src="http://10rem.net/media/84203/Windows-Live-Writer_XAML-Tip-Setting-Attached-Properties-fro_BBAD_image_thumb.png" width="257" height="166" alt="image" border="0" style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Note how the second TextBlock has had the stylistic set appliedto it.&lt;/p&gt;&lt;p&gt;This approach used the &lt;strong&gt;SetValue&lt;/strong&gt; method of thedependency object. There's also another way:&lt;/p&gt;&lt;pre class="brush: csharp;"&gt;private void SetTextOptions()&lt;br /&gt;{&lt;br /&gt;    Typography.SetStylisticSet5(ExampleText, true);&lt;br /&gt;}&lt;/pre&gt;&lt;p&gt;This version uses the &lt;strong&gt;Set[dpname]&lt;/strong&gt; method of theclass which owns the property. Use the most convenient method. Bothare equivalent.&lt;/p&gt;&lt;p&gt;I also cover dependency properties and attached properties inboth of my &lt;a href="http://manning.com/pbrown2/"target="_blank"&gt;Silverlight books&lt;/a&gt;, as well as in my upcomingWindows 8 XAML book.&lt;/p&gt;&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/dy73cfO371nscvM4Pj68-Oanu6c/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/dy73cfO371nscvM4Pj68-Oanu6c/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/dy73cfO371nscvM4Pj68-Oanu6c/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/dy73cfO371nscvM4Pj68-Oanu6c/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/PeteBrown-Silverlight/~4/ZVum9U8aOzI" height="1" width="1"/&gt;</description>    </item>    <item>      <title>Tip: Binding an Image element’s Source property to a Uri in WinRT XAML</title>      <author>Pete Brown	</author>      <link>http://10rem.net/blog/2012/03/27/tip-binding-an-image-elements-source-property-to-a-uri-in-winrt-xaml</link>      <pubDate>Tue, 27 Mar 2012 19:00:23 GMT</pubDate>      <guid>http://10rem.net/blog/2012/03/27/tip-binding-an-image-elements-source-property-to-a-uri-in-winrt-xaml</guid>      <description>&lt;p&gt;Over the years, I've conditioned myself to use the Uri classwhen surfacing web URLs in my application. Early versions ofSilverlight couldn't bind an image source directly to an instanceof a Uri because they lacked an appropriate type converter; theusual workaround was to change the property to a string type.&lt;/p&gt;&lt;p&gt;Subsequent versions Silverlight added that capability and theconverter. For example. Given an instance of the following modelclass as the data context:&lt;/p&gt;&lt;pre class="brush: csharp;"&gt;public class Tweet&lt;br /&gt;{&lt;br /&gt;    public string Message { get; set; }&lt;br /&gt;    public Uri Image { get; set; }&lt;br /&gt;}&lt;/pre&gt;&lt;p&gt;In Silverlight, you can bind in XAML like this:&lt;/p&gt;&lt;pre class="brush: xml;"&gt;&lt;br /&gt;&amp;lt;Image Source="{Binding Image}" /&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;In the current version of Windows 8/WinRT XAML, you can't bindimage sources directly to Uris, but there's a nice way to do it byusing property element syntax and and a BitmapImage class. It'smore verbose, but may be just the ticket if you need to bind toUris and not strings, and can't change, or don't want to change,your [view]model.&lt;/p&gt;&lt;pre class="brush: xml;"&gt;&amp;lt;Image&amp;gt;&lt;br /&gt;    &amp;lt;Image.Source&amp;gt;&lt;br /&gt;        &amp;lt;BitmapImage UriSource="{Binding Image}" /&amp;gt;&lt;br /&gt;    &amp;lt;/Image.Source&amp;gt;&lt;br /&gt;&amp;lt;/Image&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;The team is aware of this difference, and have it in theirbacklog of things to prioritize for future revs. In case you'resharing markup or anything between WinRT XAML and Silverlight, it'sgood to know this more verbose approach works in both.&lt;/p&gt;&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/_mku3Emzu_MMYk2zznjAK2lFEWI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_mku3Emzu_MMYk2zznjAK2lFEWI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/_mku3Emzu_MMYk2zznjAK2lFEWI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_mku3Emzu_MMYk2zznjAK2lFEWI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/PeteBrown-Silverlight/~4/us6EQfybP4s" height="1" width="1"/&gt;</description>    </item>    <item>      <title>Review of the ASUS ZenBook UX31E</title>      <link>http://feeds.johnpapa.net/~r/JohnPapa/~3/b1lcRNahaGk/review-of-the-asus-zenbook-ux31e</link>      <description>&lt;p&gt;I’ve been using my &lt;a href="http://www.amazon.com/dp/B005SY32Q2/?t=johnpanet-20"&gt;ASUS ZenBook UX31E&lt;/a&gt; out and about for blogging, surfing, coding, and presentations for about 5 weeks now. A lot of people have commented on it with the common theme of it being a slick looking, eye catching, lightweight machine. I agree that its got the looks. The ZenBook is pretty snappy too for a i5 with 4GB of RAM and has done a very good job during presentations. When I wrote about &lt;a href="http://johnpapa.net/asusux31eunboxing"&gt;my unboxing experience&lt;/a&gt;, I was originally bothered by the keyboard (it’s just not as fluent as Lenovo or even Vaio keyboards) and the overly “washed out” screen.&amp;nbsp; Ultimately, I found some very good uses for the UX31E. It’s fair to note that these machines sell for around $1000 depending on varying features. So when evaluating my options I try to keep in mind that value for the cost. In this review I broke down my experiences by how I used the ZenBook.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;a href="http://johnpapa.net/Media/Default/Windows-Live-Writer/5-Weeks-Later-with-the-ASUS-ZenBook-UX31_7B93/WP_000530_2.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="WP_000530" border="0" alt="WP_000530" src="http://johnpapa.net/Media/Default/Windows-Live-Writer/5-Weeks-Later-with-the-ASUS-ZenBook-UX31_7B93/WP_000530_thumb.jpg" width="244" height="184"&gt;&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;But first, just as a reminder…&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;Disclosure of Material Connection: I received one or more of the products or services mentioned above for free in the hope that I would mention it on my blog. Regardless, I only recommend products or services I use personally and believe my readers will enjoy. I am disclosing this in accordance with the &lt;a href="http://www.access.gpo.gov/nara/cfr/waisidx_03/16cfr255_03.html"&gt;Federal Trade Commission’s 16 CFR, Part 255: “Guides Concerning the Use of Endorsements and Testimonials in Advertising.”&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;strong&gt;Power&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;If a PC can’t handle the load, I instantly toss it aside. So did the ZenBook hold its own with my daily use? Simply put, the ZenBook handled all of my requests admirably. I suspect that the i5 and SSD had a lot to do with this as the 4GB of RAM is certainly not a lot. It handled lightweight tasks like surfing the web, blogging with Live Writer, managing email, editing photos, and playing games on the internet (that was my daughter) quite well. When I installed Visual Studio 2010 on the ZenBook I expected some bigger lags but I was pleasantly surprised in how fast it loaded and built projects. Is it as fast as my i7, 8GB RAM machines, no … but its also half the cost. Overall, I the ZenBook was fast and powerful enough for me. &lt;/p&gt; &lt;p&gt;&lt;strong&gt;Writing Code&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;I do a lot of coding, writing demos, and tinkering on the side with Visual Studio. The ZenBook had no problems keeping up with me and I was happy to code along with it. My biggest concerns were that I never quite got used to the keyboard. Maybe I’m picky, but I just didn’t get used to the feel of the keyboard and often had to go back and correct typos more often than usual. This was a problem for me when coding because my mind takes me in many directions, very quickly, and having to go back really took me out of any rhythm I could get into. I am used to nice expensive keyboards that are very responsive. Maybe I am too used to them, because my most common issue was I “missed” keys (did not press hard enough). Ultimately, because of this hurdle I could not overcome, for writing code in long blocks of time I just was not as productive with the ZenBook.&lt;/p&gt; &lt;p&gt;&lt;img alt="WP_000440" src="http://johnpapa.net/Media/Default/Windows-Live-Writer/fdb3e10cd2a6_109A1/WP_000440_thumb.jpg"&gt;&lt;/p&gt; &lt;p&gt;It’s worth noting that the screen does appear to be a little washed out, too. I played with the contrast quite a bit as I kept thinking that maybe it was turned up too high. I could never get it to be as sharp and colorful as I had hoped. This wasn’t a killer, but it certainly wasn’t a plus either when sitting down to write code for long periods.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Presentations&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;I took the ZenBook to several presentations and it simply excelled. First, its lightweight at less than 3 pounds so it was easy to carry around. The power supply is lightweight too, which is often a place that these tiny laptops manufacturers lack. The ZenBook also looks great, so when doing presentations I often got a lot of remarks about how nice it looked. It was certainly a topic of conversation with its shiny case. The fast start feature on the ZenBook was also great, so I could close the lid, carry it from room to room, and set back up in just a few minutes. The keyboard issues I mentioned previously did not bother me at all for this type of use as during presentations I am more deliberate about what I type. So overall, the UX31E is an ideal presentation laptop for me. The laptop comes in a nice looking case and also has a small ouch for the video out dongle.&lt;/p&gt; &lt;p&gt;&lt;a href="http://johnpapa.net/Media/Default/Windows-Live-Writer/5-Weeks-Later-with-the-ASUS-ZenBook-UX31_7B93/WP_000532_2.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="WP_000532" border="0" alt="WP_000532" src="http://johnpapa.net/Media/Default/Windows-Live-Writer/5-Weeks-Later-with-the-ASUS-ZenBook-UX31_7B93/WP_000532_thumb.jpg" width="244" height="184"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Family Use&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;My daughter loves this laptop. I let her use it for a day and not long after she was attached to it. We have several laptops and desktops in our house along with a Windows 8 tablet from Build and an iPad 2. but the kids enjoy the laptops because they can do so much more with them. My daughter gave the ZenBook a good test by writing stories in Word, surfing the web, playing games (HTML5 and Flash based), watching videos, and doing homework (sometimes). The ZenBook fared very well for all of these uses and my daughter simply loved it. In fact, I had to tear it away from her to write the review &lt;img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://johnpapa.net/Media/Default/Windows-Live-Writer/5-Weeks-Later-with-the-ASUS-ZenBook-UX31_7B93/wlEmoticon-smile_2.png"&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Sound&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;I normally don’t say anything about the sound on a computer,because frankly, I don’t often use a computer’s built in speakers for music or movies. Instead, I use nice headphones or a dedicated sound system. But for being a built in sound system, the ZenBook’s sound is exceptionally good. I was very happy with the quality of the sound coming from the UX31E and found myself using it more that I ever had with a laptop.&lt;/p&gt; &lt;p&gt;&lt;img alt="WP_000442" src="http://johnpapa.net/Media/Default/Windows-Live-Writer/fdb3e10cd2a6_109A1/WP_000442_thumb.jpg"&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;More on the Keyboard&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Interestingly, my daughter had the same problems with the keyboard early on, but got over them faster than I did. She no longer has any slow downs with the keyboard. I however, never got comfortable with the keyboard responsiveness. Keyboards are a personal taste, so I expect some will be fine with it and others will find the same issues I did.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Summary&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;The ultimate test for me is if I still use it after a month. So do I? Yes, I found the ZenBook to be very useful for travel and presentations, but not for long periods of day to day development. I did find a hidden gem though, as the ZenBook is ideal for my oldest daughter. In fact, my younger children all eye the laptop too. So it seems that its looks and weight (kids lugging it around the house) are very appealing to families. My kids are picky too, as they get frustrated when their apps are slow (Word, email, videos) or games won’t work. They had no such issues on the ZenBook.&lt;/p&gt; &lt;p&gt;The keyboard was a killer for me, but my family is happy about that since they now have a great laptop that they share. I’ll still use it for travel and presentations, but on all other days, its slated for my family’s use. I’ll follow up with a final conclusion in April, since I have a few more tests slated for the ZenBook.&lt;/p&gt;&lt;div class="feedflare"&gt;&lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=b1lcRNahaGk:QFYIrMEdJcw:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?i=b1lcRNahaGk:QFYIrMEdJcw:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=b1lcRNahaGk:QFYIrMEdJcw:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?i=b1lcRNahaGk:QFYIrMEdJcw:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=b1lcRNahaGk:QFYIrMEdJcw:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=b1lcRNahaGk:QFYIrMEdJcw:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JohnPapa/~4/b1lcRNahaGk" height="1" width="1"/&gt;</description>      <pubDate>Fri, 23 Mar 2012 13:47:04 GMT</pubDate>      <guid isPermaLink="false">http://johnpapa.net:80/review-of-the-asus-zenbook-ux31e</guid>      <origLink xmlns="http://rssnamespace.org/feedburner/ext/1.0">http://johnpapa.net:80/review-of-the-asus-zenbook-ux31e</origLink>    </item>    <item>      <guid isPermaLink="false">tag:blogger.com,1999:blog-8492016573075353132.post-5971612898835557336</guid>      <pubDate>Wed, 21 Mar 2012 19:08:00 +0000</pubDate>      <updated xmlns="http://www.w3.org/2005/Atom">2012-03-22T00:38:44.029+05:30</updated>      <title>The little Story of “I Unlock Joy” event by Microsoft and Pune User Group</title>      <description>&lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;This post is about recent “I Unlock Joy” event happened in Pune which was conducted by Microsoft and Pune User Group.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Little History :&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;I remember I got myself a HTC HD7 in early January 2011. I even did a big post here with fire saying “&lt;a href="http://pendsevikram.blogspot.in/2011/01/windows-phone-7-white-elephant-in-india.html" target="_blank"&gt;Its White Elephant&lt;/a&gt;” in India.When I saw Tweets,Photos and Mails by people in US who showing off their Windows Phones in early days of Windows Phone, Frankly I was very angry thinking why each and every thing comes to India when Entire US and Europe people about to throw that piece of technology and switch to its version next.I even had fight at various level to get a Test Device for me but my all attempts result was “Fail”, so finally I got HD7 for myself from local shop, by the time few of my friends from User Group ordered it via some online site and got their shipment before me.Neither me or my friends who ordered it online even before it was made available in India officially bothered about Money and what will happen to it. That time even Mango build was not available.&lt;/p&gt; &lt;p&gt;I was already going through lot of frustrating moments due to Silverlight and HTML5 issues around year back and thanks to Windows Phone, It pulled me back on track.Me,Mayur and few other folks from Community started talking about this device from last year.Frankly, early response was very low since most of the people was not having device and was not sure about future of Windows Phone since it was not made available in India. &lt;/p&gt; &lt;p&gt;&lt;strong&gt;First call on “&lt;a href="http://www.microsoft.com/india/developer/windowsphone/" target="_blank"&gt;I Unlock Joy&lt;/a&gt;” :&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;I remember that around October 2011,I was taking snaps of some Star Fishes near Tarkarli Beach in Sindhudurga and all of a sudden I got a call from Aviraj saying “You are in conference with Mayur Mahesh and Dhaval for upcoming Windows Phone event” ..I replied “What??..Microsoft is planning event on Windows Phone??”..Trust me call went for 5 minutes where each one just saying “what”, “when”,”ok lets see”,”keep us posted”.Then nothing happened on this till Mid December.&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-slib3-Di8z0/T2ompyXKpQI/AAAAAAAADPE/7kZz-qw9fvE/s1600-h/fishy%25255B10%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="fishy" border="0" alt="fishy" src="http://lh4.ggpht.com/-YD2UF3TEF8k/T2omrbY4P5I/AAAAAAAADPM/Fts9M6RZrMM/fishy_thumb%25255B8%25255D.jpg?imgmax=800" width="400" height="313"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Trust me..before this call..no one was sure about this event.Even we were not sure whether we will be able to host such event or not, Even for Microsoft, it was very first such event in India.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;The Plan :&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Earlier I was not happy with the event plan just because I misunderstood agenda and found it too much professional, I raise this concern to Mahesh (@maheshmitkari),Mayur (@mayur_tendulkar) and Aviraj (@aviraj111)saying “There are people in Pune, who don’t know what is Windows Phone,How it looks like or they have not even saw or touch that device and how they can build apps for that?”, Thanks to Aviraj Mayur and Mahesh who simplified it for me and told me that its from Hello World to Get Certify from Marketplace over span of 4 Full Days.So after that call on next weekend we started talking more about this event.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Wait..but will people come to this event by paying App Hub Fees?? :&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Humm..another 1 hour just went on this discussion,Frankly among our Team, only Mayur was aware of AppHub process since he had account and submitted one or two apps in Marketplace.He and Mahesh and Aviraj show confidence then with 50-50 mind I also said to myself..lets do it people will come ! So Aviraj then given inputs on I Unlock Joy and how it works (MS people really work hard for each of their things,that I re-realize again on that day).He also told about Prizes and how overall things should go if we as Pune User Group want to do it with Microsoft.&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-qEGUqlgFfRg/T2omtEjgnWI/AAAAAAAADPU/6mhjA-NTOVM/s1600-h/imgthink%25255B7%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="imgthink" border="0" alt="imgthink" src="http://lh4.ggpht.com/-YDTuTN4tt7k/T2omuYYQkwI/AAAAAAAADPc/AsLmAPSbGtY/imgthink_thumb%25255B5%25255D.jpg?imgmax=800" width="400" height="313"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Execution of Plan :&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Here comes our UG Manager Mahesh Mitkari, He drafted overall plan including Days of Trainings,Venue etc.Thanks to Microsoft, This time there was no “Mission :Find Venue” for us ! As usual my all time favorite question came for discussion “What about Food??..are we giving and not giving??” ..Suddenly Mahesh replied “Food later ! First think about event”..I said “Rest is Ok,but Food is equally important” ..Mayur said “If possible do it or people have to eat somewhere around the venue” ..Aviraj was on bit silent mode during this discussion since Budget for this was already allocated and now it was our turn to manage all in that amount.Finally with the years of experience Mahesh have in community, He managed the food for us. Since we took it up this event under support of MS, Content and Speaker for event was from Pune User Group. Mayur took the ownership of this speaking engagement and hence that pain part was already taken care.&amp;nbsp; &lt;/p&gt; &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-c8nFnEZBXus/T2omwjurq-I/AAAAAAAADPk/jNbH_EGREJk/s1600-h/HD7s%25255B7%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="HD7s" border="0" alt="HD7s" src="http://lh5.ggpht.com/-7r8PiJh4KJc/T2omyNMCoqI/AAAAAAAADPs/Rr3g1-gZZQE/HD7s_thumb%25255B5%25255D.jpg?imgmax=800" width="369" height="289"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Then there was lot of confusion about allowing “Individual”,”Students” and “Business” types of AppHub Account holders.But we decided that aim of this event is to “Empower individuals with great skills and great device”, so we decided to cut off Students and Companies and fixed our agenda accordingly.&lt;/p&gt; &lt;p&gt;Since this was very first event so we decided to keep the number of attendees equal with the capacity of hall or even less will do.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Registration Process and getting people to Venue : Mission Impossible &lt;/strong&gt;&lt;/p&gt; &lt;p&gt;We hosted a lovely Website using ASP.NET MVC + Cloud for this event using shiny logos and stuff.&lt;/p&gt; &lt;p&gt;For first week, there was not a single registration, all we had is test records entered by us for testing of that portal.Week went bad for us.No one turn to site for registration.We were almost feeling dead at that moment since it was January 1st week and we were about to kick off the event from end of January 2012, we paid for venue, book food counters, done all formalities with MS,ok but where are attendees??&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-e6E8tjzgpWs/T2om1Mh515I/AAAAAAAADP0/H2CgJaMcSeo/s1600-h/WP_000307%25255B8%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="WP_000307" border="0" alt="WP_000307" src="http://lh5.ggpht.com/-yJs9SDFQca0/T2om2hxksRI/AAAAAAAADP8/9H_7GTTGtS0/WP_000307_thumb%25255B5%25255D.jpg?imgmax=800" width="328" height="257"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Mahesh Me,Mayur and Aviraj come back to our old conclusion “Its paid event so people are not coming ..maybe?” since Pune User Group events are never paid.So how to solve this problem??&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Meetings Meetings..Calls Calls .. :&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;We decided to do quick analysis of this thing and jumped to a conclusion that it was not about spending money but we came to know about following concerns :&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Its Credit Card thing..is it safe?&lt;/li&gt; &lt;li&gt;Will they pull some extra money from Background?&lt;/li&gt; &lt;li&gt;Do they will come to know whether I am using illegal software?&lt;/li&gt; &lt;li&gt;I will seriously get Windows Phone if I build apps for I Unlock Joy?&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Ok ! we got our answers, the very first thing we did is added a big “FAQ” section on our site and made publicity of the same, we captured most common uncommon and unique Questions,As a result, in last week of Registration count went to almost 40+ and we closed registration.We are all set for First ever such event by any User Group in India..Get Set Go !&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-Fw5jIKznZoo/T2om4uQ7D2I/AAAAAAAADQE/Hyz05mN2Gb4/s1600-h/Four%25255B13%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="Four" border="0" alt="Four" src="http://lh6.ggpht.com/-DRLkMJ-sgBM/T2om6HoLriI/AAAAAAAADQM/Kt4gC_Rw1rY/Four_thumb%25255B9%25255D.jpg?imgmax=800" width="411" height="322"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Overall Event :&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Now the next tension on mind was, whether people will adopt the skills and able to build and submit apps or not,else again everything will go waste !&lt;/p&gt; &lt;p&gt;Kudos to Mayur Tendulkar and Amol Vaidya ( and me as a Backup Speaker with full support from MSPs Omkar,Sneha and Apporva) who carried out training successfully.4 Days were full of gyan and not like typical sessions happens around where speaker comes in drag drop things and execute. Some real code and real stuff happened here in Pune.Thanks to AKant (Abhishek Kant who was our Ex-MVP Lead and now Country Manager for Telerik in India) for his valuable time at Keynote session and giving Telerik Controls for free to all attendees there at event.&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-k7sJujQR9-8/T2om9hT4wDI/AAAAAAAADQU/qrFkZZe5e1o/s1600-h/IMG_0308%25255B8%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="IMG_0308" border="0" alt="IMG_0308" src="http://lh6.ggpht.com/-hzf6njIRZto/T2om-xnwYDI/AAAAAAAADQc/7-m-CwktJss/IMG_0308_thumb%25255B5%25255D.jpg?imgmax=800" width="340" height="266"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Very Special Thanks to Harish Vaidyanathan (@harishv ), Girish Joshi, Aditee Rele (@aditeerele ) and our big brother from Microsoft (@aviraj111), without these people it was impossible to unlock the joy !&lt;/p&gt; &lt;p&gt;&lt;strong&gt;What went wrong in this event :&lt;/strong&gt;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Shortage of Power Plugs and less power extensions at Venue on Day1, From Day 2 we fixed that by adding more plugs-extensions&lt;/li&gt; &lt;li&gt;Delay in distribution of Pen Drives, instead of day 1 people got that on day 4&lt;/li&gt; &lt;li&gt;Connectivity and WiFi was not available due to infra issues&lt;/li&gt; &lt;li&gt;1 Test Device out of 2 was not Mango, we updated that to Mango from Day 2&lt;/li&gt;&lt;/ul&gt;         &lt;p&gt;&lt;strong&gt;What people went home with :&lt;/strong&gt;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Some amazing knowledge about Windows Phone Application Development&lt;/li&gt; &lt;li&gt;Confidence to build Windows Phone Apps&lt;/li&gt; &lt;li&gt;Joy and Fun moment during all 4 Days and great device experience with Test Devices kept for them &lt;/li&gt; &lt;li&gt;Some even went away with Nokia Lumia 800&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-AL6P9CYCHLE/T2onBCBGUBI/AAAAAAAADQk/KSAJhSvdhTc/s1600-h/WP_000379%25255B12%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="WP_000379" border="0" alt="WP_000379" src="http://lh5.ggpht.com/-t4FrieJCsWw/T2onCv9ELOI/AAAAAAAADQo/ktpbeDBIRrE/WP_000379_thumb%25255B6%25255D.jpg?imgmax=800" width="363" height="284"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;What’s the outcome of all this 4 month story from October 2011 to January 2012 ? :&lt;/strong&gt;&lt;/p&gt; &lt;ul&gt; &lt;li&gt;Some 30+ Quality Apps already in Marketplace from this event&lt;/li&gt; &lt;li&gt;Around 45+ are due for Certification &lt;/li&gt; &lt;li&gt;Around 20+ new apps getting developed from people who already submitted apps&lt;/li&gt; &lt;li&gt;Me, Mahesh and Mayur declared officially from Microsoft as “Agents of Joy” and now visible on Microsoft’s I Unlock Joy Portal &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;a title="http://www.microsoft.com/india/developer/windowsphone/" href="http://www.microsoft.com/india/developer/windowsphone/"&gt;http://www.microsoft.com/india/developer/windowsphone/&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Click on “Agents of Joy” tile at the bottom !&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-G6mqIpc7cIY/T2onEZiYg2I/AAAAAAAADQ0/AIflH7uM-08/s1600-h/IUnlockJoy%25255B7%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="IUnlockJoy" border="0" alt="IUnlockJoy" src="http://lh5.ggpht.com/-QP5m5umjHHg/T2onFs04UhI/AAAAAAAADQ4/KQm1LzCy_EI/IUnlockJoy_thumb%25255B5%25255D.jpg?imgmax=800" width="402" height="253"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Final Day :&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;I Unlock Joy Members snap with Harish Vaidyanathan at Pune&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-nPm-r_GxA9k/T2onHwJCV_I/AAAAAAAADRE/soEiLJVqSk8/s1600-h/Team%25255B7%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="Team" border="0" alt="Team" src="http://lh5.ggpht.com/-AKNRwlQo0Tk/T2onJbbt-hI/AAAAAAAADRM/JdRvYdlzf9I/Team_thumb%25255B5%25255D.jpg?imgmax=800" width="446" height="349"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Conclusion :&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Its for the “Community” by the “Community” to build more better and better “Community”, so despite of all challenges we faced.The passion of working towards “Community” made all things easy.&lt;/p&gt; &lt;p&gt;There are so many things happen in those 4 months, so its difficult for me to put down all things here,still I tried my best to cover up the entire story.&lt;/p&gt; &lt;p&gt;I am proud that I am associated with such a wonderful community in Pune. Microsoft and Pune User Group Rocks !! &lt;/p&gt; &lt;p&gt;Thanks to all who are directly or indirectly involved in this activity, its difficult to take all names since its very big community effort.so thanks to all !&lt;/p&gt; &lt;p&gt;After this event, Girish Joshi from Microsoft asked Me and Mahesh to give a snap of ours and we given below snap :&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-nM1odbAhzw8/T2onMAEFllI/AAAAAAAADRU/ppCt0uzNaDs/s1600-h/people-with-ph2%25255B7%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="" border="0" alt="" src="http://lh6.ggpht.com/-OoMrMImSRFw/T2onOHFbpQI/AAAAAAAADRc/7d9OS97eurw/people-with-ph2_thumb%25255B5%25255D.png?imgmax=800" width="393" height="229"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Well ! There is again a Big story behind this photo which we took at midnight at Mahesh’s home..that story..well..some other time !&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Vikram.&lt;/strong&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8492016573075353132-5971612898835557336?l=pendsevikram.blogspot.com' alt='' /&gt;&lt;/div&gt;</description>      <link>http://pendsevikram.blogspot.com/2012/03/little-story-of-i-unlock-joy-event-by.html</link>      <author>noreply@blogger.com (Vikram Pendse)</author>      <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh4.ggpht.com/-YD2UF3TEF8k/T2omrbY4P5I/AAAAAAAADPM/Fts9M6RZrMM/s72-c/fishy_thumb%25255B8%25255D.jpg?imgmax=800" height="72" width="72" />      <total xmlns="http://purl.org/syndication/thread/1.0">1</total>    </item>    <item>      <title>Creating the SilverlightShow Windows Phone App: part 1</title>      <description>&lt;table width="20"&gt;    &lt;tbody&gt;        &lt;tr&gt;            &lt;td&gt;            &lt;div class="fb-like" data-show-faces="true" data-send="false" data-href="http://www.silverlightshow.net/items/Creating-the-SilverlightShow-Windows-Phone-App.aspx" data-font="segoe ui" data-layout="button_count"&gt;&lt;/div&gt;            &lt;/td&gt;            &lt;td&gt;&lt;a href="https://twitter.com/share" class="twitter-share-button" data-via="silverlightshow" data-counturl="http://www.silverlightshow.net/items/Creating-the-SilverlightShow-Windows-Phone-App.aspx" data-count="horizontal" data-text="Reading @Mister_Goodcat's article: Creating the SilverlightShow #WindowsPhone App: part 1 #wpdev" data-url="http://slshow.net/GCLG2S"&gt;Tweet&lt;/a&gt;&lt;/td&gt;            &lt;td&gt;&lt;g:plusone size="medium" href="http://www.silverlightshow.net/items/Creating-the-SilverlightShow-Windows-Phone-App.aspx"&gt;&lt;/g:plusone&gt;            &lt;/td&gt;            &lt;td&gt;            &lt;/td&gt;        &lt;/tr&gt;    &lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;At the end of February, the official SilverlightShow Windows Phone app has been accepted into the Marketplace. The app gives you access to some of the content of this website, including &lt;strong&gt;news&lt;/strong&gt;, &lt;strong&gt;articles &lt;/strong&gt;and &lt;strong&gt;events&lt;/strong&gt;, and is completely free for use (also ad-free!). Some of the convenience features include the possibility to&lt;strong&gt; create reminders for upcoming events and webinars directly on your phone&lt;/strong&gt;, to get &lt;strong&gt;notifications about new content in the form of live tiles&lt;/strong&gt;, and to maintain a local list of &lt;strong&gt;favorites &lt;/strong&gt;that allows you to permanently store items for later reading. If you haven&amp;rsquo;t checked out the app yet, you can find more details and a quick intro video &lt;a href="http://www.silverlightshow.net/video/SilverlightShow-WP7-App-Intro.aspx"&gt;here&lt;/a&gt;, or visit its Marketplace page &lt;a href="http://windowsphone.com/s?appid=aa47a1d4-3418-496d-862f-36eb1ec78f43"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;div style="border:1px solid #dddddd;border-image: initial; padding-bottom: 5px; background-color: #f3f3f3; margin-top: 5px; padding-left: 10px; width: 200px; float: right; margin-left: 10px; padding-top: 5px;"&gt;&lt;h3&gt;More resources...&lt;/h3&gt;&lt;ul style="list-style-type: circle; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 20px; font-size: 12px;"&gt;    &lt;li style="padding-bottom: 5px;"&gt;&lt;a href="http://www.silverlightshow.net/news/Webinar-Advanced-MVVM-for-Windows-Phone.aspx"&gt;Upcoming webinar by Peter Kuhn: Advanced MVVM for Windows Phone Developers&lt;/a&gt; &lt;/li&gt;    &lt;li style="padding-bottom: 5px;"&gt;&lt;a href="http://www.silverlightshow.net/video/Recording-of-Windows-Phone-Raw-Camera-Webinar.aspx"&gt;Recording of webinar by Peter Kuhn: Windows Phone Raw Camera Access&lt;/a&gt; &lt;/li&gt;    &lt;li style="padding-bottom: 5px;"&gt;&lt;a href="http://www.silverlightshow.net/ebooks/wp7_exam.aspx"&gt;Peter's ebook: Getting Ready for the Windows Phone 7 Exam 70-599&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style="padding-bottom: 5px; text-align: center;"&gt;&lt;a href="http://www.silverlightshow.net/ebooks/wp7_exam.aspx"&gt;&lt;img style="border-color: initial; border-image: initial; border-color: initial; width: 80px; height: 113px; border-color: initial;        border-width: 0px;border-style: solid;" alt="Getting Ready for the Windows Phone 7 Exam 70-599" src="http://www.silverlightshow.net/Storage/Ebooks/wp7_exam_cover.png" usemap="#rade_img_map_1291385581316" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="http://www.silverlightshow.net/ebooks.aspx"&gt;All SilverlightShow Ebooks&lt;/a&gt;&amp;nbsp;&lt;img alt="" src="http://www.silverlightshow.net/Storage/arrow-content.jpg" /&gt;&lt;/p&gt;&lt;/div&gt;&lt;p&gt;The creation of the app was an interesting experience, because unlike other phone projects I had worked on in the past, this one wasn&amp;rsquo;t a greenfield development. Obviously the SilverlightShow portal already existed, had a long-established production infrastructure and already a lot of existing content available. &amp;nbsp;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;During the course of developing the application, we thought it would be a nice idea to share some of the experiences with the SilverlightShow readers, because it is a nice example of discussing a real-world application, with real-world problems (and solutions :)). The idea of this mini-series of articles was born, where you will discover both details about the development process as well as some technical challenges we came across. &lt;strong&gt;This first part will deal with the process itself, so prepare for some more text and less code (read: no code) than usual.&lt;/strong&gt;&lt;/p&gt;&lt;h2&gt;Prerequisites&lt;/h2&gt;&lt;p&gt;With almost every piece of software you are developing, you usually (hopefully?) don&amp;rsquo;t start coding right away, but begin with some sort of requirements engineering, and then create the concept of your software. You may not be aware of the order and existence of these actions if you&amp;rsquo;re only a hobby programmer, or you may not be familiar with the formal terms and definitions, but even if you&amp;rsquo;re only creating a really small app, these steps are part of the development process in one form or the other. We can sum up these two elements by two simple questions:&lt;/p&gt;&lt;ul&gt;    &lt;li&gt;What is it our software is intended to do?&lt;/li&gt;    &lt;li&gt;How shall our software achieve this goal?&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;As I wrote, the details on how sophisticated you analyze these questions and the ways you maintain the results of this analysis is a direct result of several factors, like the development process you intend to use, your personal experience, external requirements, and the complexity of the project you&amp;rsquo;re taking on. Sometimes all this information may only exist in your head, in other situations it will result in huge documents being produced upfront.&lt;/p&gt;&lt;p&gt;When you&amp;rsquo;re developing an app based on an already existing eco system, there are additional steps you need to perform. In particular, you have to do an analysis of the existing infrastructure to see what parts you can make use of and integrate with your own development, &lt;em&gt;how&lt;/em&gt; you can achieve this, whether other parts require work or need to change, and what features you rely on are missing completely. Sometimes, the intended requirements of the result even depend on what&amp;rsquo;s possible to achieve with a reasonable amount of effort, taking the given system into consideration. This is how extending an existing system can be both good and evil: it may speed up your development when you&amp;rsquo;re able to reuse components that are already available, but it may also limit your possibilities, and even bring up whole new problems that you wouldn&amp;rsquo;t have to face if you started from scratch.&lt;/p&gt;&lt;h2&gt;The Existing Infrastructure&lt;/h2&gt;&lt;p&gt;Building an app for the SilverlightShow portal wasn&amp;rsquo;t any different in this. The web site obviously existed already, and a great variety of people, consisting of both the SilverlightShow staff as well as external authors, actively contributes to the content. To allow comfortable and easy editing, the SilverlightShow team has put a great amount of work into integrating the site nicely with WYSIWYG tools, especially Windows Live Writer. As a result, the content available on the site is maintained in a blog-like manner, and stored as rich content in a corresponding data store.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/MisterGoodcat/______________image_2.png"&gt;&lt;img style="border:0px;  border-image: initial; background-image: none; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; margin-right: auto; padding-top: 0px;" title="image" alt="image" src="http://www.silverlightshow.net/Storage/Users/MisterGoodcat/_______________image_thumb.png" width="418" height="203" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;On the consuming side of things, we have the web user interface you&amp;rsquo;re directly interacting with at the moment, but there are other options to access the content of the site which are optimized for machine/automated access. This includes several RSS feeds that can be consumed by special reader software, so you can access the site through your favorite client and presentation software. Some other areas of the site also offer specialized web services tailored for being accessed by Silverlight clients.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/MisterGoodcat/___________image_4.png"&gt;&lt;img style="border:0px;  border-image: initial; background-image: none; margin-top: 0px; margin-right: auto; margin-bottom: 0px; margin-left: auto; padding-left: 0px; padding-right: 0px; display: block; float: none; padding-top: 0px;" title="image" alt="image" src="http://www.silverlightshow.net/Storage/Users/MisterGoodcat/____________image_thumb_1.png" width="243" height="175" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Since both working with the site itself as well as the authoring of content is a well-known, proven process that has evolved and been established over a longer period of time, it was a logical consequence to put the Windows Phone app on top of this existing infrastructure, and introduce as little changes as possible to the existing system. This was one of the first and most central requirements established in the development process of the app.&lt;/p&gt;&lt;h2&gt;Requirements&lt;/h2&gt;&lt;p&gt;Starting with the above information, we established a set of features we wanted to see in the app. In particular, we wanted to expose the most popular content of the site (news, articles, events/webinars), and at the same time make sure that we blend in nicely with the phone platform, by implementing typical features the user would expect: notifications, reminders, and a Metro-style native experience.&lt;/p&gt;&lt;h2&gt;Concept&lt;/h2&gt;&lt;p&gt;If you carefully read through the requirements and the result of the infrastructure analysis listed above, then maybe you can see how a lot of this more or less determined fundamental parts of the concept and later implementation already. Let&amp;rsquo;s pick some of the more interesting details, all of which will be covered over the course of this mini-series:&lt;/p&gt;&lt;ul&gt;    &lt;li&gt;Like said, we wanted to make use of the existing system and introduce as little changes as possible. A logical consequence of this was that we would make use of the already existing rich content directly if possible, so both the web interface and phone app could work directly on the same data.&lt;/li&gt;    &lt;li&gt;Another logical step of this was to use the already existing RSS feeds to get access to that data, instead of creating a whole new solution that would exist in parallel (and require additional implementation and maintenance costs).&lt;/li&gt;    &lt;li&gt;Consequently, that same premise also affected features of the app you would not expect or think about at first. Take the notifications requirement, for example. Implementing a full-blown push notification solution would&amp;rsquo;ve required setting up quite some additional server infrastructure and server-side logic, something that we didn&amp;rsquo;t want to do. Eventually, this resulted in the decision to use a local background agent to add the notification features to the app.&lt;/li&gt;    &lt;li&gt;Since we wanted to create a nice and smooth Metro-style experience with the app, we ruled out alternate ways of creating such an accompanying app pretty quickly. For example, I have seen quite some &amp;ldquo;wrapper&amp;rdquo; apps in the Marketplace that are using a web browser control to display a mobile version of a web site &amp;ndash; simple, quick to set up, but in no way living up to the expectations of the SilverlightShow users and definitely not what we were looking for. We wanted to present a rich, familiar look and feel based on a native Silverlight implementation. And, after all, this is SilverlightShow.net, not WebBrowserControlWrapper.net :-).     &lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;Prototype&lt;/h2&gt;&lt;p&gt;In some areas, we weren&amp;rsquo;t sure whether it really would be possible to achieve good results in terms of performance and user experience by using the concept we created. This is a common problem when you&amp;rsquo;re developing software: sometimes the complexity is just too high, or the involved technology is not understood well enough or has too many dependencies to allow for a definite answer and final design just by thinking about it in theory. In these cases, the way you should probably take into consideration is to create a prototype. This is a small piece of software that takes on the most pressing aspects of your concept and delivers a proof that what you intend to do will work as expected, or can work by modifying some details of the concept or add tuning &amp;ndash; hence the naming &amp;ldquo;proof of concept&amp;rdquo;. &lt;/p&gt;&lt;p&gt;This is exactly what we did with some of the fundamental topics I have listed above. The small prototype allowed us to eliminate some mistakes in the concept that had slipped through, and to identify other issues we would be running into later on, which we now could plan for accordingly, early in the process. This very short phase of the development process helped enormously with clarifying some details and laying out the foundation and basic structure of the app.&lt;/p&gt;&lt;p&gt;By the way, the result of creating a prototype can also be that what you intended to do is not feasible &amp;ndash; you should not think of a situation like that as a defeat, but a huge success. Imagine the wasted effort if you discovered the dead end only months after starting development. It&amp;rsquo;s much better to return to the drawing board early.&lt;/p&gt;&lt;h2&gt;Implementation&lt;/h2&gt;&lt;p&gt;For a passionate developer, starting with the actual implementation is the most exciting moment during a development process like this, after having built up all the excitement during the previous phases. And if you have worked on some projects like that before, you know that during implementation you get to crack the real problems, low-level, that nobody anticipated when they wrote the specs. Even when you have used advanced techniques like prototyping you &lt;em&gt;will&lt;/em&gt; run into those pesky little details in your daily work that you hate, curse, and love to beat. So did we during the implementation phase of the app &amp;ndash; some of these details and experiences will be covered in the next part of the series, and it will become a lot more technical then.&lt;/p&gt;&lt;h2&gt;Conclusion&lt;/h2&gt;&lt;p&gt;I didn&amp;rsquo;t go into the details of specific techniques of requirements engineering, creating specifications or even the implementation process itself. This of course exceeds the scope of this article. But whether you&amp;rsquo;re using agile processes or classic approaches doesn&amp;rsquo;t matter. What I wanted to show you is that things you may know from your day job can also be applied to this much smaller scale of creating relatively simple phone apps, and that it in fact helps with being more effective. I hope you enjoyed this first part, and are looking forward to dive into some of the technical problems we were facing next time.&lt;/p&gt;</description>      <link>http://www.silverlightshow.net/items/Creating-the-SilverlightShow-Windows-Phone-App.aspx</link>      <author>editorial@silverlightshow.net (Peter Kuhn )</author>      <comments>http://www.silverlightshow.net/items/Creating-the-SilverlightShow-Windows-Phone-App.aspx#comments</comments>      <guid isPermaLink="true">http://www.silverlightshow.net/items/Creating-the-SilverlightShow-Windows-Phone-App.aspx</guid>      <pubDate>Wed, 21 Mar 2012 10:06:00 GMT</pubDate>    </item>    <item>      <title>Part 4: Developing for a multitude of clients: strategies for code reuse and keeping costs in check.</title>      <description>&lt;table width="20"&gt;    &lt;tbody&gt;        &lt;tr&gt;            &lt;td&gt;            &lt;div class="fb-like" data-show-faces="true" data-send="false" data-href="http://www.silverlightshow.net/items/Part-4-Developing-for-a-multitude-of-clients-strategies-for-code-reuse-and-keeping-costs-in-check.aspx" data-font="segoe ui" data-layout="button_count"&gt;&lt;/div&gt;            &lt;/td&gt;            &lt;td&gt;&lt;a href="https://twitter.com/share" class="twitter-share-button" data-via="silverlightshow" data-counturl="http://www.silverlightshow.net/items/Part-4-Developing-for-a-multitude-of-clients-strategies-for-code-reuse-and-keeping-costs-in-check.aspx" data-count="horizontal" data-text="Developing for a multitude of clients Part 4: Strategies for code reuse and keeping costs in check" data-url="http://slshow.net/GCpo2Y"&gt;Tweet&lt;/a&gt;&lt;/td&gt;            &lt;td&gt;&lt;g:plusone size="medium" href="http://www.silverlightshow.net/items/Part-4-Developing-for-a-multitude-of-clients-strategies-for-code-reuse-and-keeping-costs-in-check.aspx"&gt;&lt;/g:plusone&gt;            &lt;/td&gt;            &lt;td&gt;            &lt;/td&gt;        &lt;/tr&gt;    &lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;Welcome to the fourth part of this article series on strategies for designing your application for a multitude of different clients.&amp;nbsp; In the &lt;a href="http://www.silverlightshow.net/items/Developing-for-a-multitude-of-clients-strategies-for-code-reuse-and-keeping-costs-in-check.aspx" target="_blank"&gt;first part&lt;/a&gt;, we&amp;rsquo;ve looked into the &lt;strong&gt;business case &amp;amp; some general concerns&lt;/strong&gt;, and in the &lt;a href="http://www.silverlightshow.net/items/Developing-for-a-multitude-of-clients-strategies-for-code-reuse-and-keeping-costs-in-check-part-2.aspx" target="_blank"&gt;second part&lt;/a&gt;, we made a choice for a &lt;strong&gt;service layer: WCF RIA Services&lt;/strong&gt;.&amp;nbsp; In the &lt;a href="http://www.silverlightshow.net/items/Part-3-Developing-for-a-multitude-of-clients-strategies-for-code-reuse-and-keeping-costs-in-check.aspx" target="_blank"&gt;third part&lt;/a&gt;, we&amp;rsquo;ve seen how we can use &lt;strong&gt;MEF for on demand loading &amp;amp; code reuse&lt;/strong&gt; across different clients. &lt;/p&gt;&lt;div style="border:1px solid #dddddd;border-image: initial; padding-bottom: 5px; background-color: #f3f3f3; margin-top: 5px; padding-left: 10px; width: 200px; float: right; margin-left: 10px; padding-top: 5px;"&gt;&lt;h3&gt;More resources...&lt;/h3&gt;&lt;ul style="list-style-type: circle; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 20px; font-size: 12px;"&gt;    &lt;li style="padding-bottom: 5px;"&gt;&lt;a href="http://www.silverlightshow.net/items/WCF-RIA-Services-Part-1-Getting-Started.aspx"&gt;10-part Article Series: WCF RIA Services&lt;/a&gt; &lt;/li&gt;    &lt;li style="padding-bottom: 5px;"&gt;&lt;a href="http://www.silverlightshow.net/video/Part-2-of-the-Webinar-Metro-and-WinRT.aspx"&gt;Recent Webinar Recording: Metro and WinRT for the Silverlight/WPF Developer: Part 2&lt;/a&gt; &lt;/li&gt;    &lt;li style="padding-bottom: 5px;"&gt;&lt;a href="http://www.silverlightshow.net/ebooks/wcf_ria_collections.aspx"&gt;Kevin's ebook: Working with Collections in WCF RIA Services&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style="padding-bottom: 5px; text-align: center;"&gt;&lt;a href="http://www.silverlightshow.net/ebooks/wcf_ria_collections.aspx"&gt;&lt;img style="border:0px solid; border-image: initial;" alt="Working with Collections in WCF RIA Services: Ebook" src="http://www.silverlightshow.net/Storage/Ebooks/wcfriacoll_ebook_cover.png" usemap="#rade_img_map_1291385581316" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="http://www.silverlightshow.net/ebooks.aspx"&gt;All SilverlightShow Ebooks&lt;/a&gt;&amp;nbsp;&lt;img alt="" src="http://www.silverlightshow.net/Storage/arrow-content.jpg" /&gt;&lt;/p&gt;&lt;/div&gt;&lt;p&gt;However, I left out a few things in that article: loading the Views on demand (as it requires extensions to the Silverlight Navigation framework to navigate to Views in an assembly that&amp;rsquo;s loaded on demand), and loading multiple assemblies on demand (as we need an async component loader for that, to ensure we can load these assemblies at the same time instead of one by one).&amp;nbsp; This article will deal with these two concerns.&lt;/p&gt;&lt;p&gt;You can &lt;a href="http://www.silverlightshow.net/Storage/Sources/MultipleClientsPart4.zip"&gt;download the source code for this article here&lt;/a&gt; (you can log in to the demo application with &lt;strong&gt;pete.campbell@madmen.com / abc@123&lt;/strong&gt;).&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;Deciding what to load on demand&lt;/h3&gt;&lt;p&gt;First of all, we need to decide what exactly we want to load on demand, and what we&amp;rsquo;ll keep as a regular reference.&amp;nbsp; As you can see in the following screenshot, the main project requires quite a few assemblies:&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/KevinDockx/_______image_2.png"&gt;&lt;img style="border:0px;  border-image: initial; background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;" title="image" alt="image" src="http://www.silverlightshow.net/Storage/Users/KevinDockx/_______image_thumb.png" width="351" height="532" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;What will we load on demand, and what will we keep as reference? You could load almost anything on demand, if you're really set on diminishing the initial load of your application (the size of the XAP), however: I like to keep things a bit more realistic. Take, for example, an assembly like System.Windows.Interactivity. This one contains the classes used to enable commands on any event, like a command on the SelectionChanged event of a ListBox (as you can see throughout the application) - does it make sense to load this on demand?&lt;/p&gt;&lt;p&gt;Well, it depends. Some might say it does: after all, theoretically you could have a part of an application that never uses any of the classes from that assembly. And it does keep down the initial load. As an added bonus, it even allows your assembly to be cached automatically by the browser (have a look at the caching overview article for more information on this).&lt;/p&gt;&lt;p&gt;On the other hand: this might qualify as overkill. Does it really make sense to separate out an assembly that will be used by almost any module, like System.Windows.Interactivity? Or an assembly that will be used by each ViewModel, like the MVVM Light assemblies? I would argue it doesn't - a matter of "it's not because we can do this, that we should."&lt;/p&gt;&lt;p&gt;As a rule of thumb, I like to separate out the assemblies (/classes) that belong to specific modules and aren't used throughout the application. A model, used only by the Employee Opportunity module, would be something that's preferably loaded on demand. The authentication model, used regardless of who's using the application? Not so much. A self-created assembly containing commonly used code, or an existing assembly that contains classes used throughout the application (like System.Windows.Interactivity, or in our case: the MVVM Light-related assemblies), are typically assemblies I'd keep as a reference instead of loading on demand.&lt;/p&gt;&lt;p&gt;With this in mind, we can get going. And we'll immediately bump into 2 issues&amp;hellip;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;Loading a multitude of assemblies at startup.&lt;/h3&gt;&lt;p&gt;The first issue: we now have to load a multitude of assemblies when the application starts, and it's only after all these assemblies have been loaded that we can continue with our application execution (in this case: set the RootVisual to an instance of MainPage). The simplest way to solve this is to call the loading of the next assembly in the completed handler of the previous async call, and continue doing this until all the necessary assemblies have been loaded&amp;hellip; While this could be a valid approach with 2 or 3 assemblies, the code becomes very cluttered when we need to load more assemblies. Besides that, assemblies will be loaded one by one instead of in parallel - which is a shame, as the last option would result in faster application startup.&lt;/p&gt;&lt;p&gt;What we need is a way to execute multiple asynchronous calls, in parallel, and start another action after all these calls have completed.&lt;/p&gt;&lt;p&gt;Luckily, this can be done with a bit of custom coding. We'll create a helper class, ParallelAsyncProcessor, in Framework.Silverlight. An instance of this class is initialzed, after which we&amp;rsquo;ll add the actions to be executed by calling the AddToParallelQueue method.&amp;nbsp; To start executing them, we&amp;rsquo;ll call the StartParallelProcessing method, which will start executing them in parallel (as they're async calls). When an action completes, the action should be taken from the list of actions, and when all actions have been completed, another action, AllProcessesCompleted, will be executed.&amp;nbsp; This is typically where we&amp;rsquo;ll continue with the execution of the application.&lt;/p&gt;&lt;p&gt;The following code illustrates the helper class:&lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; ParallelAsyncProcesser{    &lt;span class="kwrd"&gt;public&lt;/span&gt; Action AllProcessesCompleted;    &lt;span class="kwrd"&gt;public&lt;/span&gt; Dictionary&amp;lt;&lt;span class="kwrd"&gt;object&lt;/span&gt;, Action&amp;gt; Processes;    &lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;int&lt;/span&gt; _numberOfActions = 0;    &lt;span class="kwrd"&gt;public&lt;/span&gt; ParallelAsyncProcesser()    {        Processes = &lt;span class="kwrd"&gt;new&lt;/span&gt; Dictionary&amp;lt;&lt;span class="kwrd"&gt;object&lt;/span&gt;, Action&amp;gt;();        _numberOfActions = 0;    }    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; StartParallelProcessing()    {        &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (var action &lt;span class="kwrd"&gt;in&lt;/span&gt; Processes.Values)        {            action.Invoke();        }    }    &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;    &lt;span class="rem"&gt;/// Add an action to the parallel queue&lt;/span&gt;    &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;    &lt;span class="rem"&gt;/// &amp;lt;param name="action"&amp;gt;The action to invoke&amp;lt;/param&amp;gt;&lt;/span&gt;    &lt;span class="rem"&gt;/// &amp;lt;param name="identifier"&amp;gt;An optional identifier.  Add this if you want to ensure &lt;/span&gt;    &lt;span class="rem"&gt;/// the correct action is removed from the queue.  &lt;/span&gt;    &lt;span class="rem"&gt;/// If not, the processer acts as a counter.&amp;lt;/param&amp;gt;&lt;/span&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; AddToParallelQueue(Action action, &lt;span class="kwrd"&gt;object&lt;/span&gt; identifier = &lt;span class="kwrd"&gt;null&lt;/span&gt;)    {        _numberOfActions++;        &lt;span class="kwrd"&gt;if&lt;/span&gt; (identifier == &lt;span class="kwrd"&gt;null&lt;/span&gt;)        {            Processes.Add(_numberOfActions, action);        }        &lt;span class="kwrd"&gt;else&lt;/span&gt;        {            Processes.Add(identifier, action);        }    }    &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;    &lt;span class="rem"&gt;/// Typically executed in the completed method of an async call&lt;/span&gt;    &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;    &lt;span class="rem"&gt;/// &amp;lt;param name="identifier"&amp;gt;When this is passed in, the correct action will be removed &lt;/span&gt;    &lt;span class="rem"&gt;/// from the internal dictionary.  &lt;/span&gt;    &lt;span class="rem"&gt;/// If not, any action will be removed.&amp;lt;/param&amp;gt;&lt;/span&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; ProcessComplete(&lt;span class="kwrd"&gt;object&lt;/span&gt; identifier = &lt;span class="kwrd"&gt;null&lt;/span&gt;)    {        _numberOfActions--;        &lt;span class="kwrd"&gt;if&lt;/span&gt; (identifier == &lt;span class="kwrd"&gt;null&lt;/span&gt;)        {            &lt;span class="rem"&gt;// remove any&lt;/span&gt;            Processes.Remove(Processes.Count);        }        &lt;span class="kwrd"&gt;else&lt;/span&gt;        {            Processes.Remove(identifier);        }        &lt;span class="rem"&gt;// invoke action on all processes complete&lt;/span&gt;        &lt;span class="kwrd"&gt;if&lt;/span&gt; (_numberOfActions == 0 &amp;amp;&amp;amp; AllProcessesCompleted != &lt;span class="kwrd"&gt;null&lt;/span&gt;)        {            AllProcessesCompleted.Invoke();        }    }}&lt;/pre&gt;&lt;style type="text/css"&gt;    .csharpcode, .csharpcode pre    {    font-size: small;    color: black;    font-family: consolas, "Courier New", courier, monospace;    background-color: #ffffff;    /*white-space: pre;*/    }    .csharpcode pre { margin: 0em; }    .csharpcode .rem { color: #008000; }    .csharpcode .kwrd { color: #0000ff; }    .csharpcode .str { color: #006080; }    .csharpcode .op { color: #0000c0; }    .csharpcode .preproc { color: #cc6633; }    .csharpcode .asp { background-color: #ffff00; }    .csharpcode .html { color: #800000; }    .csharpcode .attr { color: #ff0000; }    .csharpcode .alt    {    background-color: #f4f4f4;    width: 100%;    margin: 0em;    }    .csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;p&gt;To use this, we need to change our Application_Startup method a bit. We need a list of assemblies that have to be loaded (this list can vary depending on custom application logic, like the users' rights - if that's the case, these assemblies will of course have to be loaded after the user logs in instead of in the Application_Startup method). We run through this list, and add the DownloadAsync method to the list of actions that have to be executed. We also ensure actions are removed from the list by calling ProcessComplete in the completed handler.&lt;/p&gt;&lt;p&gt;Once the last action has been fully completed, the AllProcessesCompleted method will be executed. The method is executed automatically, and is used to set the RootVisual to a new instance of MainPage.&amp;nbsp; The code for this looks as such:&lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="rem"&gt;// create a list of external dependencies&lt;/span&gt;List&amp;lt;&lt;span class="kwrd"&gt;string&lt;/span&gt;&amp;gt; lstDependencies = &lt;span class="kwrd"&gt;new&lt;/span&gt; List&amp;lt;&lt;span class="kwrd"&gt;string&lt;/span&gt;&amp;gt;(){    &lt;span class="str"&gt;"SalesDashboard.Client.Model.dll"&lt;/span&gt;,    &lt;span class="str"&gt;"SalesDashboard.SL.Modules.EmpOpp.ViewModels.dll"&lt;/span&gt;,    &lt;span class="str"&gt;"SalesDashboard.SL.Modules.EmpOpp.Views.dll"&lt;/span&gt;};&lt;span class="rem"&gt;// instantiate a new aggregate catalag&lt;/span&gt;var catalog = &lt;span class="kwrd"&gt;new&lt;/span&gt; AggregateCatalog();&lt;span class="rem"&gt;// instantiate a new parallel async processer&lt;/span&gt;ParallelAsyncProcesser parallelAsyncProcesser = &lt;span class="kwrd"&gt;new&lt;/span&gt; ParallelAsyncProcesser();&lt;span class="kwrd"&gt;foreach&lt;/span&gt; (var dependency &lt;span class="kwrd"&gt;in&lt;/span&gt; lstDependencies){    &lt;span class="rem"&gt;// note:  pass in another variable instead of directly passing in the dependency string.&lt;/span&gt;    &lt;span class="rem"&gt;// This ensures this new value is used when executing the parallel processes instead &lt;/span&gt;    &lt;span class="rem"&gt;// of using the last passed-in string multiple times &lt;/span&gt;    var foo = dependency;    var catalogDep = &lt;span class="kwrd"&gt;new&lt;/span&gt; SuperDeploymentCatalog(foo);    catalog.Catalogs.Add(catalogDep);    EventHandler&amp;lt;AsyncCompletedEventArgs&amp;gt; handler = &lt;span class="kwrd"&gt;null&lt;/span&gt;;    handler = (s, a) =&amp;gt;        {            parallelAsyncProcesser.ProcessComplete(foo);            catalogDep.DownloadCompleted -= handler;        };     catalogDep.DownloadCompleted += handler;    parallelAsyncProcesser.AddToParallelQueue(() =&amp;gt; catalogDep.DownloadAsync(), foo);}parallelAsyncProcesser.AllProcessesCompleted += () =&amp;gt;    {        &lt;span class="rem"&gt;// dependencies have been loaded, init app startpage&lt;/span&gt;        &lt;span class="kwrd"&gt;this&lt;/span&gt;.RootVisual = &lt;span class="kwrd"&gt;new&lt;/span&gt; MainPage();    };&lt;span class="rem"&gt;// start fetching the dependencies, parallel instead of one by one&lt;/span&gt;parallelAsyncProcesser.StartParallelProcessing();&lt;/pre&gt;&lt;style type="text/css"&gt;    .csharpcode, .csharpcode pre    {    font-size: small;    color: black;    font-family: consolas, "Courier New", courier, monospace;    background-color: #ffffff;    /*white-space: pre;*/    }    .csharpcode pre { margin: 0em; }    .csharpcode .rem { color: #008000; }    .csharpcode .kwrd { color: #0000ff; }    .csharpcode .str { color: #006080; }    .csharpcode .op { color: #0000c0; }    .csharpcode .preproc { color: #cc6633; }    .csharpcode .asp { background-color: #ffff00; }    .csharpcode .html { color: #800000; }    .csharpcode .attr { color: #ff0000; }    .csharpcode .alt    {    background-color: #f4f4f4;    width: 100%;    margin: 0em;    }    .csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;p&gt;And like that, we can now load assemblies on demand, in parallel.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;Navigating to a View residing in an assembly that's been loaded on demand.&lt;/h3&gt;&lt;p&gt;The second issue we run into actually consists of 2 related issues.&lt;/p&gt;&lt;p&gt;First, some background information: we're using a View-first approach. This means View is initialized, and it is provided with a DataContext - the ViewModel - by another component (MEF, in this case - the View isn't responsible for initializing the ViewModel). To ensure the View is initialized, we simply place it on MainPage (for the header) or set it as source for the frame on the MainPage. I'll get into the second part immediately, as this has to do with another challenge, but solving the first problem might not be obvious either: after all, how are you going to place a View on a page if you haven't got a reference to the assembly containing the View? Obviously, your code simply won't compile.&lt;/p&gt;&lt;p&gt;Well, let's think back at why exactly we're loading assemblies on demand: it enables shorter initial loading times, makes it easier to roll out changes (you don't have to recompile your complete XAP), but in our case, the most important reason was: allowing reuse of code (the modules) &amp;amp; composability. So how can we reach our goal? It's actually pretty easy: we're going to add a reference to the assembly containing the Views, so we can add an instance of one to the MainPage, AND we're still going to load that assembly on demand. The trick is the "Copy local" value in your reference properties. If you put this on false, this assembly will not be packaged in the XAP (thus keeping your XAP smaller), and thus has to be loaded on demand.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/KevinDockx/_____image_4.png"&gt;&lt;img style="border:0px;  border-image: initial; background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;" title="image" alt="image" src="http://www.silverlightshow.net/Storage/Users/KevinDockx/_____image_thumb_1.png" width="433" height="138" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Note that we use the &amp;ldquo;Copy Local = false&amp;rdquo; technique extensively, especially in the assemblies we load on demand &amp;ndash; in fact, if you look at the project containing the Views we&amp;rsquo;ll load on-demand, you&amp;rsquo;ll notice that all the references are set to &amp;ldquo;Copy local = false&amp;rdquo;, as they all are either references in the main project, or loaded on-demand. &lt;/p&gt;&lt;p&gt;If we now build and run our application and look into the XAP, we'll notice it no longer contains the View assembly: this is now loaded when the application is launched. After that, MainPage is initialized, and the Header will be shown.&lt;/p&gt;&lt;p&gt;But we immediately run into another challenge, the second of our 2 view-related issues: we get an error on our Frame: apparently, it's not possible to navigate to a View in another assembly when that assembly is loaded on demand. Can we solve this?&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;Introducing: a custom Content Loader &amp;amp; View Factory&lt;/h3&gt;&lt;p&gt;In Silverlight 4, a new interface was introduced: INavigationContentLoader.&amp;nbsp; Going into the details of this would lead us too far for this article, but if you want, you can read about it &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.navigation.inavigationcontentloader(v=vs.95).aspx" target="_blank"&gt;on MSDN&lt;/a&gt; or in &lt;a href="http://www.silverlightshow.net/items/Authorization-in-Silverlight-part-1-Authorized-navigation.aspx" target="_blank"&gt;one of my previous articles on Authorized Navigation&lt;/a&gt; (where a custom implementation of this interface is used). By writing our own implementation of this, we can decide how exactly our Views should be loaded.&amp;nbsp; A few implementations and techniques using this interface already exist: David Poll &lt;a href="http://www.davidpoll.com/2010/02/01/on-demand-loading-of-assemblies-with-silverlight-navigation-revisited-for-silverlight-4-beta/" target="_blank"&gt;described one on his blog&lt;/a&gt;, and Pencho Popadiyn wrote &lt;a href="http://www.silverlightshow.net/items/Navigating-between-Pages-in-Different-Xaps-by-using-MEF.aspx" target="_blank"&gt;an article about it on Silverlight Show&lt;/a&gt;.&amp;nbsp; However, we&amp;rsquo;re not using MEF to export our Views: we&amp;rsquo;re already using MEF to set the DataContext of our Views to an instance of a certain ViewModel, which therefore makes it quite a hassle to export the Views as well &amp;ndash; they&amp;rsquo;re already dependent on importing a ViewModel from another plugged-in assembly.&amp;nbsp; So we&amp;rsquo;ll need another technique.&lt;/p&gt;&lt;p&gt;What we need is &amp;ldquo;something&amp;rdquo;, a component, to provide us with an instance of the View we need.&amp;nbsp; We need a component that &amp;ldquo;knows&amp;rdquo; about these views, so it can instantiate them with a bit of reflection, and can return them to the custom NavigationContentLoader.&amp;nbsp; So, in essence: we need a ViewFactory, which should reside in our View assembly, and which we can import using MEF in our NavigationContentLoader.&amp;nbsp; This ViewFactory instance is then used by the NavigationContentLoader to provide us with the View instance we need.&lt;/p&gt;&lt;p&gt;Let&amp;rsquo;s start with the ViewFactory:&lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;namespace&lt;/span&gt; Framework.Silverlight{    [Export(&lt;span class="kwrd"&gt;typeof&lt;/span&gt;(IViewFactory))]    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; ViewFactory : IViewFactory    {        &lt;span class="kwrd"&gt;public&lt;/span&gt; Page GetViewInstance(&lt;span class="kwrd"&gt;string&lt;/span&gt; className)        {            &lt;span class="kwrd"&gt;try&lt;/span&gt;            {                var instance = Activator.CreateInstance(Type.GetType(className));                &lt;span class="kwrd"&gt;return&lt;/span&gt; instance &lt;span class="kwrd"&gt;as&lt;/span&gt; Page;            }            &lt;span class="kwrd"&gt;catch&lt;/span&gt; (Exception ex)            {                &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;null&lt;/span&gt;;            }        }    }}&lt;/pre&gt;&lt;style type="text/css"&gt;    .csharpcode, .csharpcode pre    {    font-size: small;    color: black;    font-family: consolas, "Courier New", courier, monospace;    background-color: #ffffff;    /*white-space: pre;*/    }    .csharpcode pre { margin: 0em; }    .csharpcode .rem { color: #008000; }    .csharpcode .kwrd { color: #0000ff; }    .csharpcode .str { color: #006080; }    .csharpcode .op { color: #0000c0; }    .csharpcode .preproc { color: #cc6633; }    .csharpcode .asp { background-color: #ffff00; }    .csharpcode .html { color: #800000; }    .csharpcode .attr { color: #ff0000; }    .csharpcode .alt    {    background-color: #f4f4f4;    width: 100%;    margin: 0em;    }    .csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;p&gt;As you can see, this is pretty straightforward.&amp;nbsp; It expects a class name, and will return an instance of that class (a View), using some reflection, to whichever component we&amp;rsquo;re calling the ViewFactory from.&lt;/p&gt;&lt;p&gt;On to the custom content loader.&amp;nbsp; First, we import all instances of ViewFactory.&amp;nbsp; As we need to ensure our application can work with different assemblies containing Views, we need to use ImportMany.&amp;nbsp; &lt;/p&gt;&lt;pre class="csharpcode"&gt;[ImportMany(&lt;span class="kwrd"&gt;typeof&lt;/span&gt;(IViewFactory))]&lt;span class="kwrd"&gt;public&lt;/span&gt; List&amp;lt;IViewFactory&amp;gt; ViewFactories { get; set; }&lt;/pre&gt;&lt;style type="text/css"&gt;    .csharpcode, .csharpcode pre    {    font-size: small;    color: black;    font-family: consolas, "Courier New", courier, monospace;    background-color: #ffffff;    /*white-space: pre;*/    }    .csharpcode pre { margin: 0em; }    .csharpcode .rem { color: #008000; }    .csharpcode .kwrd { color: #0000ff; }    .csharpcode .str { color: #006080; }    .csharpcode .op { color: #0000c0; }    .csharpcode .preproc { color: #cc6633; }    .csharpcode .asp { background-color: #ffff00; }    .csharpcode .html { color: #800000; }    .csharpcode .attr { color: #ff0000; }    .csharpcode .alt    {    background-color: #f4f4f4;    width: 100%;    margin: 0em;    }    .csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;p&gt;In BeginLoad, we try to get an instance of a View back from one of the imported ViewFactory instances (note that this code is used to illustrate a technique &amp;ndash; for production-ready code, you&amp;rsquo;ll probably want to refine the way we fetch the class name some more). &lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; IAsyncResult BeginLoad(Uri targetUri, Uri currentUri,    AsyncCallback userCallback, &lt;span class="kwrd"&gt;object&lt;/span&gt; asyncState){        NavigationAsyncResult ar = &lt;span class="kwrd"&gt;new&lt;/span&gt; NavigationAsyncResult(userCallback, asyncState);    &lt;span class="kwrd"&gt;string&lt;/span&gt; fullUri = targetUri.ToString();    &lt;span class="kwrd"&gt;string&lt;/span&gt; className = (fullUri.Substring(1, fullUri.IndexOf(&lt;span class="str"&gt;';'&lt;/span&gt;) - 1) + &lt;span class="str"&gt;"."&lt;/span&gt; +     fullUri.Substring(fullUri.LastIndexOf(&lt;span class="str"&gt;"/"&lt;/span&gt;) + 1, fullUri.IndexOf(&lt;span class="str"&gt;".xaml"&lt;/span&gt;)     - fullUri.LastIndexOf(&lt;span class="str"&gt;"/"&lt;/span&gt;) - 1));    &lt;span class="rem"&gt;// use one of the the ViewFactories to load&lt;/span&gt;    &lt;span class="kwrd"&gt;foreach&lt;/span&gt; (var factory &lt;span class="kwrd"&gt;in&lt;/span&gt; ViewFactories)    {        Page page = factory.GetViewInstance(className);        &lt;span class="kwrd"&gt;if&lt;/span&gt; (page != &lt;span class="kwrd"&gt;null&lt;/span&gt;)        {            ar.Result = page;            ar.CompleteCall(&lt;span class="kwrd"&gt;false&lt;/span&gt;);            &lt;span class="kwrd"&gt;return&lt;/span&gt; ar;        }    }    &lt;span class="rem"&gt;// in case nothing is found...&lt;/span&gt;    &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; ArgumentException(&lt;span class="str"&gt;"No view found in any imported assembly with classname "&lt;/span&gt; + className);        &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;null&lt;/span&gt;;}&lt;/pre&gt;&lt;style type="text/css"&gt;    .csharpcode, .csharpcode pre    {    font-size: small;    color: black;    font-family: consolas, "Courier New", courier, monospace;    background-color: #ffffff;    /*white-space: pre;*/    }    .csharpcode pre { margin: 0em; }    .csharpcode .rem { color: #008000; }    .csharpcode .kwrd { color: #0000ff; }    .csharpcode .str { color: #006080; }    .csharpcode .op { color: #0000c0; }    .csharpcode .preproc { color: #cc6633; }    .csharpcode .asp { background-color: #ffff00; }    .csharpcode .html { color: #800000; }    .csharpcode .attr { color: #ff0000; }    .csharpcode .alt    {    background-color: #f4f4f4;    width: 100%;    margin: 0em;    }    .csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;p&gt;In EndLoad, we ensure our custom loader logic is used instead of the default loader:&lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; LoadResult EndLoad(IAsyncResult asyncResult){    &lt;span class="kwrd"&gt;if&lt;/span&gt; (asyncResult &lt;span class="kwrd"&gt;is&lt;/span&gt; NavigationAsyncResult)        &lt;span class="kwrd"&gt;return&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; LoadResult((asyncResult &lt;span class="kwrd"&gt;as&lt;/span&gt; NavigationAsyncResult).Result);    &lt;span class="kwrd"&gt;else&lt;/span&gt;        &lt;span class="kwrd"&gt;return&lt;/span&gt; _loader.EndLoad(asyncResult);}&lt;/pre&gt;&lt;style type="text/css"&gt;    .csharpcode, .csharpcode pre    {    font-size: small;    color: black;    font-family: consolas, "Courier New", courier, monospace;    background-color: #ffffff;    /*white-space: pre;*/    }    .csharpcode pre { margin: 0em; }    .csharpcode .rem { color: #008000; }    .csharpcode .kwrd { color: #0000ff; }    .csharpcode .str { color: #006080; }    .csharpcode .op { color: #0000c0; }    .csharpcode .preproc { color: #cc6633; }    .csharpcode .asp { background-color: #ffff00; }    .csharpcode .html { color: #800000; }    .csharpcode .attr { color: #ff0000; }    .csharpcode .alt    {    background-color: #f4f4f4;    width: 100%;    margin: 0em;    }    .csharpcode .lnum { color: #606060; }&lt;/style&gt;And that&amp;rsquo;s it!&amp;nbsp; Our custom content loader is ready.&amp;nbsp; All that&amp;rsquo;s left now is making sure it&amp;rsquo;s used, which we can do by adjusting our XAML code a little bit, as such:&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;sdk:Frame&lt;/span&gt; &lt;span class="attr"&gt;x:Name&lt;/span&gt;&lt;span class="kwrd"&gt;="mainFrame"&lt;/span&gt;           &lt;span class="attr"&gt;Background&lt;/span&gt;&lt;span class="kwrd"&gt;="Transparent"&lt;/span&gt;           &lt;span class="attr"&gt;JournalOwnership&lt;/span&gt;&lt;span class="kwrd"&gt;="Automatic"&lt;/span&gt;           &lt;span class="attr"&gt;BorderThickness&lt;/span&gt;&lt;span class="kwrd"&gt;="0"&lt;/span&gt;           &lt;span class="attr"&gt;Margin&lt;/span&gt;&lt;span class="kwrd"&gt;="50,0,50,0"&lt;/span&gt;           &lt;span class="attr"&gt;Source&lt;/span&gt;&lt;span class="kwrd"&gt;="/LoginView"&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;sdk:Frame.ContentLoader&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;fw:CustomXAPContentLoader&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;fw:CustomXAPContentLoader&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;sdk:Frame.ContentLoader&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;    &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;navigation:Frame.UriMapper&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;        &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;sdk:UriMapper&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;            &lt;span class="kwrd"&gt;&amp;lt;&lt;/span&gt;&lt;span class="html"&gt;sdk:UriMapping&lt;/span&gt; &lt;span class="attr"&gt;Uri&lt;/span&gt;&lt;span class="kwrd"&gt;="/{page}"&lt;/span&gt;                            &lt;span class="attr"&gt;MappedUri&lt;/span&gt;&lt;span class="kwrd"&gt;="/SalesDashboard.SL.Modules.EmpOpp.Views;component/{page}.xaml"&lt;/span&gt; &lt;span class="kwrd"&gt;/&amp;gt;&lt;/span&gt;        &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;sdk:UriMapper&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;    &lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;navigation:Frame.UriMapper&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="html"&gt;sdk:Frame&lt;/span&gt;&lt;span class="kwrd"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;style type="text/css"&gt;    .csharpcode, .csharpcode pre    {    font-size: small;    color: black;    font-family: consolas, "Courier New", courier, monospace;    background-color: #ffffff;    /*white-space: pre;*/    }    .csharpcode pre { margin: 0em; }    .csharpcode .rem { color: #008000; }    .csharpcode .kwrd { color: #0000ff; }    .csharpcode .str { color: #006080; }    .csharpcode .op { color: #0000c0; }    .csharpcode .preproc { color: #cc6633; }    .csharpcode .asp { background-color: #ffff00; }    .csharpcode .html { color: #800000; }    .csharpcode .attr { color: #ff0000; }    .csharpcode .alt    {    background-color: #f4f4f4;    width: 100%;    margin: 0em;    }    .csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;p&gt;We&amp;rsquo;ve now created a way to ensure our View assembly can be loaded on demand, and we can still navigate to these Views even though they reside in a different assembly, by extending the Navigation framework.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;Conclusion&lt;/h3&gt;&lt;p&gt;In this article, we've seen some best practices on how you can separate your app into different modules so this code can be reused. We've tackled a few issues, or rather: challenges that come with these techniques, by creating a custom loader queue, and extending the Silverlight Navigation framework in such a way that it allows navigating to View in assemblies that are loaded on demand. We've now got a truly composable application that can consist of various modules, each easily reusable by other client applications.&lt;/p&gt;&lt;p&gt;In the next part, we'll add another client to the equation and see how exactly we can reuse all the separated-out components from the last few articles: an Out of Browser Silverlight client.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;About the author&lt;/h3&gt;&lt;p&gt;Kevin Dockx lives in Belgium and works at RealDolmen, one of Belgium's biggest ICT companies, where he is a technical specialist/project leader on .NET web applications, mainly Silverlight, and a solution manager for Rich Applications (Silverlight, Windows Phone 7 Series, WPF, Surface, HTML5). His main focus lies on all things Silverlight, but he still keeps an eye on the new developments concerning other products from the Microsoft .NET (Web) Stack. As a Silverlight enthusiast, he's a regular speaker on various national and international events, like Microsoft Techdays in Belgium, Portugal &amp;amp; Finland, NDC2011, Community Day, ... Next to that, he also authored a best-selling Silverlight book, Packt Publishing's &lt;a href="https://www.packtpub.com/microsoft-silverlight-4-data-and-services-cookbook/book"&gt;Silverlight 4 Data and Services Cookbook&lt;/a&gt;, together with Gill Cleeren. His blog, which contains various tidbits on Silverlight, .NET, and the occasional rambling, can be found at &lt;a href="http://blog.kevindockx.com/"&gt;http://blog.kevindockx.com/&lt;/a&gt;, and you can contact him on Twitter via &lt;a href="http://twitter.com/#!/KevinDockx"&gt;@KevinDockx&lt;/a&gt;.&lt;/p&gt;</description>      <link>http://www.silverlightshow.net/items/Part-4-Developing-for-a-multitude-of-clients-strategies-for-code-reuse-and-keeping-costs-in-check.aspx</link>      <author>editorial@silverlightshow.net (Kevin Dockx )</author>      <comments>http://www.silverlightshow.net/items/Part-4-Developing-for-a-multitude-of-clients-strategies-for-code-reuse-and-keeping-costs-in-check.aspx#comments</comments>      <guid isPermaLink="true">http://www.silverlightshow.net/items/Part-4-Developing-for-a-multitude-of-clients-strategies-for-code-reuse-and-keeping-costs-in-check.aspx</guid>      <pubDate>Tue, 20 Mar 2012 06:50:00 GMT</pubDate>    </item>    <item>      <title>Using a ToggleButton in your XAML Metro style AppBar</title>      <category>developer</category>      <category>expression</category>      <category>tech stuff</category>      <category>silverlight</category>      <category>windows</category>      <category>xaml</category>      <link>http://feeds.timheuer.com/~r/timheuer/~3/K8HWrKk7-Qg/creating-a-metro-style-toggle-button-for-appbar.aspx</link>      <description>&lt;p&gt;If you’ve been playing around with the &lt;a href="http://preview.windows.com"&gt;Windows 8 Consumer Preview&lt;/a&gt; then hopefully you’ve seen the hundreds of samples provided and downloaded some apps form the store.  In a lot of those applications you’ll notice the common theme of the use of an AppBar…the command bar that shows when you swipe from the top or bottom of the screen.  You can also invoke the AppBar by right-clicking or using the &lt;a href="http://timheuer.com/blog/archive/2012/02/29/windows-8-keyboard-shortcuts.aspx"&gt;Windows 8 keyboard shortcut&lt;/a&gt; of Windows key + ‘z’ to bring it up as well.&lt;/p&gt;  &lt;p align="center"&gt;&lt;img title="Bing Maps AppBar" style="float: none; margin-left: auto; display: block; margin-right: auto" alt="Bing Maps AppBar" src="http://storage2.timheuer.com/bingappbar.png" /&gt;    &lt;br /&gt;&lt;em&gt;Picture of the AppBar in the Bing Maps application&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Most of the applications use the standard AppBar button concepts that clicking invokes some action for the app.  There may be times, however, where that button serves as a “toggle” to something in your app.  Using the Bing Maps app as an example, the “Show Traffic” command is actually a toggle command that, well, shows traffic.  You want to give your users some visual indication whether that toggle selection is on/off.  This can be accomplished in XAML by using 2 buttons and toggling their visibility, but that may be overkill for what you simple want to do.&lt;/p&gt;  &lt;p&gt;The Visual Studio project templates provide a set of styles for the AppBar for you, but more importantly a base style &lt;em&gt;AppBarButtonStyle&lt;/em&gt; that serves as the core design.  Altering this just slightly and you can have a &lt;em&gt;ToggleAppBarButtonStyle&lt;/em&gt; for your project.  Here’s the style for that base:&lt;/p&gt;  &lt;div id="codeSnippetWrapper" style="cursor: text; font-size: 8pt; border-top: silver 1px solid; font-family: 'Courier New', courier, monospace; border-right: silver 1px solid; width: 97.5%; border-bottom: silver 1px solid; overflow: auto; padding-bottom: 4px; direction: ltr; text-align: left; padding-top: 4px; padding-left: 4px; margin: 20px 0px 10px; border-left: silver 1px solid; line-height: 12pt; padding-right: 4px; background-color: #f4f4f4"&gt;   &lt;div id="codeSnippet" style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;     &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum1" style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Style&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Key&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="ToggleAppBarButtonStyle"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;TargetType&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="ToggleButton"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum2" style="color: #606060"&gt;   2:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Setter&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Property&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Foreground"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Value&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="{StaticResource AppBarItemForegroundBrush}"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum3" style="color: #606060"&gt;   3:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Setter&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Property&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="VerticalAlignment"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Value&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Stretch"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum4" style="color: #606060"&gt;   4:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Setter&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Property&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="FontFamily"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Value&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Segoe UI Symbol"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum5" style="color: #606060"&gt;   5:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Setter&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Property&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="FontWeight"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Value&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Normal"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum6" style="color: #606060"&gt;   6:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Setter&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Property&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="FontSize"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Value&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="21.333"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum7" style="color: #606060"&gt;   7:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Setter&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Property&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="AutomationProperties.ItemType"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Value&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="AppBar ToggleButton"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum8" style="color: #606060"&gt;   8:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Setter&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Property&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Template"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum9" style="color: #606060"&gt;   9:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Setter.Value&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum10" style="color: #606060"&gt;  10:&lt;/span&gt;             &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ControlTemplate&lt;/span&gt; &lt;span style="color: #ff0000"&gt;TargetType&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="ToggleButton"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum11" style="color: #606060"&gt;  11:&lt;/span&gt;                 &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Width&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="100"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Background&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Transparent"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum12" style="color: #606060"&gt;  12:&lt;/span&gt;                     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;StackPanel&lt;/span&gt; &lt;span style="color: #ff0000"&gt;VerticalAlignment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Top"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Margin&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="0,14,0,13"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum13" style="color: #606060"&gt;  13:&lt;/span&gt;                         &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Width&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="40"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Height&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="40"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Margin&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="0,0,0,5"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;HorizontalAlignment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Center"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum14" style="color: #606060"&gt;  14:&lt;/span&gt;                             &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBlock&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="BackgroundGlyph"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="&amp;amp;#xE0A8;"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;FontFamily&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Segoe UI Symbol"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;FontSize&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="53.333"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Margin&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="-4,-19,0,0"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Foreground&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="{StaticResource AppBarItemBackgroundBrush}"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum15" style="color: #606060"&gt;  15:&lt;/span&gt;                             &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBlock&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="BackgroundCheckedGlyph"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Visibility&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Collapsed"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="&amp;amp;#xE0A8;"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;FontFamily&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Segoe UI Symbol"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;FontSize&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="53.333"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Margin&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="-4,-19,0,0"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Foreground&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="{StaticResource AppBarItemForegroundBrush}"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum16" style="color: #606060"&gt;  16:&lt;/span&gt;                             &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBlock&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="OutlineGlyph"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="&amp;amp;#xE0A7;"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;FontFamily&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Segoe UI Symbol"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;FontSize&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="53.333"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Margin&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="-4,-19,0,0"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum17" style="color: #606060"&gt;  17:&lt;/span&gt;                             &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ContentPresenter&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Content"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;HorizontalAlignment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Center"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Margin&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="-1,-1,0,0"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;VerticalAlignment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Center"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum18" style="color: #606060"&gt;  18:&lt;/span&gt;                         &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum19" style="color: #606060"&gt;  19:&lt;/span&gt;                         &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBlock&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum20" style="color: #606060"&gt;  20:&lt;/span&gt;                         &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="TextLabel"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum21" style="color: #606060"&gt;  21:&lt;/span&gt;                         &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="{TemplateBinding AutomationProperties.Name}"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum22" style="color: #606060"&gt;  22:&lt;/span&gt;                         &lt;span style="color: #ff0000"&gt;Margin&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="0,0,2,0"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum23" style="color: #606060"&gt;  23:&lt;/span&gt;                         &lt;span style="color: #ff0000"&gt;FontSize&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="12"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum24" style="color: #606060"&gt;  24:&lt;/span&gt;                         &lt;span style="color: #ff0000"&gt;TextAlignment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Center"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum25" style="color: #606060"&gt;  25:&lt;/span&gt;                         &lt;span style="color: #ff0000"&gt;Width&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="88"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum26" style="color: #606060"&gt;  26:&lt;/span&gt;                         &lt;span style="color: #ff0000"&gt;MaxHeight&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="32"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum27" style="color: #606060"&gt;  27:&lt;/span&gt;                         &lt;span style="color: #ff0000"&gt;TextTrimming&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="WordEllipsis"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum28" style="color: #606060"&gt;  28:&lt;/span&gt;                         &lt;span style="color: #ff0000"&gt;Style&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="{StaticResource BasicTextStyle}"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum29" style="color: #606060"&gt;  29:&lt;/span&gt;                     &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;StackPanel&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum30" style="color: #606060"&gt;  30:&lt;/span&gt;                     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Rectangle&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum31" style="color: #606060"&gt;  31:&lt;/span&gt;                         &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="FocusVisualWhite"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum32" style="color: #606060"&gt;  32:&lt;/span&gt;                         &lt;span style="color: #ff0000"&gt;IsHitTestVisible&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="False"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum33" style="color: #606060"&gt;  33:&lt;/span&gt;                         &lt;span style="color: #ff0000"&gt;Stroke&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="{StaticResource FocusVisualWhiteStrokeBrush}"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum34" style="color: #606060"&gt;  34:&lt;/span&gt;                         &lt;span style="color: #ff0000"&gt;StrokeEndLineCap&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Square"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum35" style="color: #606060"&gt;  35:&lt;/span&gt;                         &lt;span style="color: #ff0000"&gt;StrokeDashArray&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="1,1"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum36" style="color: #606060"&gt;  36:&lt;/span&gt;                         &lt;span style="color: #ff0000"&gt;Opacity&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="0"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum37" style="color: #606060"&gt;  37:&lt;/span&gt;                         &lt;span style="color: #ff0000"&gt;StrokeDashOffset&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="1.5"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum38" style="color: #606060"&gt;  38:&lt;/span&gt;                     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Rectangle&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum39" style="color: #606060"&gt;  39:&lt;/span&gt;                         &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="FocusVisualBlack"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum40" style="color: #606060"&gt;  40:&lt;/span&gt;                         &lt;span style="color: #ff0000"&gt;IsHitTestVisible&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="False"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum41" style="color: #606060"&gt;  41:&lt;/span&gt;                         &lt;span style="color: #ff0000"&gt;Stroke&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="{StaticResource FocusVisualBlackStrokeBrush}"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum42" style="color: #606060"&gt;  42:&lt;/span&gt;                         &lt;span style="color: #ff0000"&gt;StrokeEndLineCap&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Square"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum43" style="color: #606060"&gt;  43:&lt;/span&gt;                         &lt;span style="color: #ff0000"&gt;StrokeDashArray&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="1,1"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum44" style="color: #606060"&gt;  44:&lt;/span&gt;                         &lt;span style="color: #ff0000"&gt;Opacity&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="0"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum45" style="color: #606060"&gt;  45:&lt;/span&gt;                         &lt;span style="color: #ff0000"&gt;StrokeDashOffset&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="0.5"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum46" style="color: #606060"&gt;  46:&lt;/span&gt;  &lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum47" style="color: #606060"&gt;  47:&lt;/span&gt;                     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;VisualStateManager.VisualStateGroups&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum48" style="color: #606060"&gt;  48:&lt;/span&gt;                         &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;VisualStateGroup&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="CommonStates"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum49" style="color: #606060"&gt;  49:&lt;/span&gt;                             &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;VisualState&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Normal"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum50" style="color: #606060"&gt;  50:&lt;/span&gt;                             &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;VisualState&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="PointerOver"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum51" style="color: #606060"&gt;  51:&lt;/span&gt;                                 &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Storyboard&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum52" style="color: #606060"&gt;  52:&lt;/span&gt;                                     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ObjectAnimationUsingKeyFrames&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Storyboard&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;TargetName&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="BackgroundGlyph"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Storyboard&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;TargetProperty&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Foreground"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum53" style="color: #606060"&gt;  53:&lt;/span&gt;                                         &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;DiscreteObjectKeyFrame&lt;/span&gt; &lt;span style="color: #ff0000"&gt;KeyTime&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="0"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Value&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="{StaticResource AppBarItemHoverBackgroundBrush}"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum54" style="color: #606060"&gt;  54:&lt;/span&gt;                                     &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ObjectAnimationUsingKeyFrames&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum55" style="color: #606060"&gt;  55:&lt;/span&gt;                                 &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Storyboard&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum56" style="color: #606060"&gt;  56:&lt;/span&gt;                             &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;VisualState&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum57" style="color: #606060"&gt;  57:&lt;/span&gt;                             &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;VisualState&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Pressed"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum58" style="color: #606060"&gt;  58:&lt;/span&gt;                                 &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Storyboard&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum59" style="color: #606060"&gt;  59:&lt;/span&gt;                                     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;DoubleAnimation&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum60" style="color: #606060"&gt;  60:&lt;/span&gt;                                     &lt;span style="color: #ff0000"&gt;Storyboard&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;TargetName&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="OutlineGlyph"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum61" style="color: #606060"&gt;  61:&lt;/span&gt;                                     &lt;span style="color: #ff0000"&gt;Storyboard&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;TargetProperty&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Opacity"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum62" style="color: #606060"&gt;  62:&lt;/span&gt;                                     &lt;span style="color: #ff0000"&gt;To&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="0"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum63" style="color: #606060"&gt;  63:&lt;/span&gt;                                     &lt;span style="color: #ff0000"&gt;Duration&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="0"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum64" style="color: #606060"&gt;  64:&lt;/span&gt;                                     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ObjectAnimationUsingKeyFrames&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Storyboard&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;TargetName&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="BackgroundGlyph"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Storyboard&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;TargetProperty&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Foreground"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum65" style="color: #606060"&gt;  65:&lt;/span&gt;                                         &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;DiscreteObjectKeyFrame&lt;/span&gt; &lt;span style="color: #ff0000"&gt;KeyTime&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="0"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Value&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="{StaticResource AppBarItemForegroundBrush}"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum66" style="color: #606060"&gt;  66:&lt;/span&gt;                                     &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ObjectAnimationUsingKeyFrames&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum67" style="color: #606060"&gt;  67:&lt;/span&gt;                                     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ObjectAnimationUsingKeyFrames&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Storyboard&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;TargetName&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Content"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Storyboard&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;TargetProperty&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Foreground"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum68" style="color: #606060"&gt;  68:&lt;/span&gt;                                         &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;DiscreteObjectKeyFrame&lt;/span&gt; &lt;span style="color: #ff0000"&gt;KeyTime&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="0"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Value&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="{StaticResource AppBarItemPressedForegroundBrush}"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum69" style="color: #606060"&gt;  69:&lt;/span&gt;                                     &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ObjectAnimationUsingKeyFrames&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum70" style="color: #606060"&gt;  70:&lt;/span&gt;                                 &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Storyboard&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum71" style="color: #606060"&gt;  71:&lt;/span&gt;                             &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;VisualState&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum72" style="color: #606060"&gt;  72:&lt;/span&gt;                             &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;VisualState&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Disabled"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum73" style="color: #606060"&gt;  73:&lt;/span&gt;                                 &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Storyboard&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum74" style="color: #606060"&gt;  74:&lt;/span&gt;                                     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ObjectAnimationUsingKeyFrames&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Storyboard&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;TargetName&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="OutlineGlyph"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Storyboard&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;TargetProperty&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Foreground"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum75" style="color: #606060"&gt;  75:&lt;/span&gt;                                         &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;DiscreteObjectKeyFrame&lt;/span&gt; &lt;span style="color: #ff0000"&gt;KeyTime&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="0"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Value&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="{StaticResource AppBarItemDisabledForegroundBrush}"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum76" style="color: #606060"&gt;  76:&lt;/span&gt;                                     &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ObjectAnimationUsingKeyFrames&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum77" style="color: #606060"&gt;  77:&lt;/span&gt;                                     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ObjectAnimationUsingKeyFrames&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Storyboard&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;TargetName&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Content"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Storyboard&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;TargetProperty&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Foreground"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum78" style="color: #606060"&gt;  78:&lt;/span&gt;                                         &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;DiscreteObjectKeyFrame&lt;/span&gt; &lt;span style="color: #ff0000"&gt;KeyTime&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="0"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Value&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="{StaticResource AppBarItemDisabledForegroundBrush}"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum79" style="color: #606060"&gt;  79:&lt;/span&gt;                                     &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ObjectAnimationUsingKeyFrames&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum80" style="color: #606060"&gt;  80:&lt;/span&gt;                                     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ObjectAnimationUsingKeyFrames&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Storyboard&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;TargetName&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="TextLabel"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Storyboard&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;TargetProperty&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Foreground"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum81" style="color: #606060"&gt;  81:&lt;/span&gt;                                         &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;DiscreteObjectKeyFrame&lt;/span&gt; &lt;span style="color: #ff0000"&gt;KeyTime&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="0"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Value&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="{StaticResource AppBarItemDisabledForegroundBrush}"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum82" style="color: #606060"&gt;  82:&lt;/span&gt;                                     &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ObjectAnimationUsingKeyFrames&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum83" style="color: #606060"&gt;  83:&lt;/span&gt;                                 &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Storyboard&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum84" style="color: #606060"&gt;  84:&lt;/span&gt;                             &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;VisualState&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum85" style="color: #606060"&gt;  85:&lt;/span&gt;                         &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;VisualStateGroup&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum86" style="color: #606060"&gt;  86:&lt;/span&gt;                         &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;VisualStateGroup&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="FocusStates"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum87" style="color: #606060"&gt;  87:&lt;/span&gt;                             &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;VisualState&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Focused"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum88" style="color: #606060"&gt;  88:&lt;/span&gt;                                 &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Storyboard&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum89" style="color: #606060"&gt;  89:&lt;/span&gt;                                     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;DoubleAnimation&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum90" style="color: #606060"&gt;  90:&lt;/span&gt;                                         &lt;span style="color: #ff0000"&gt;Storyboard&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;TargetName&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="FocusVisualWhite"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum91" style="color: #606060"&gt;  91:&lt;/span&gt;                                         &lt;span style="color: #ff0000"&gt;Storyboard&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;TargetProperty&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Opacity"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum92" style="color: #606060"&gt;  92:&lt;/span&gt;                                         &lt;span style="color: #ff0000"&gt;To&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="1"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum93" style="color: #606060"&gt;  93:&lt;/span&gt;                                         &lt;span style="color: #ff0000"&gt;Duration&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="0"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum94" style="color: #606060"&gt;  94:&lt;/span&gt;                                     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;DoubleAnimation&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum95" style="color: #606060"&gt;  95:&lt;/span&gt;                                         &lt;span style="color: #ff0000"&gt;Storyboard&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;TargetName&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="FocusVisualBlack"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum96" style="color: #606060"&gt;  96:&lt;/span&gt;                                         &lt;span style="color: #ff0000"&gt;Storyboard&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;TargetProperty&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Opacity"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum97" style="color: #606060"&gt;  97:&lt;/span&gt;                                         &lt;span style="color: #ff0000"&gt;To&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="1"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum98" style="color: #606060"&gt;  98:&lt;/span&gt;                                         &lt;span style="color: #ff0000"&gt;Duration&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="0"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum99" style="color: #606060"&gt;  99:&lt;/span&gt;                                 &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Storyboard&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum100" style="color: #606060"&gt; 100:&lt;/span&gt;                             &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;VisualState&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum101" style="color: #606060"&gt; 101:&lt;/span&gt;                             &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;VisualState&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Unfocused"&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum102" style="color: #606060"&gt; 102:&lt;/span&gt;                             &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;VisualState&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="PointerFocused"&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum103" style="color: #606060"&gt; 103:&lt;/span&gt;                         &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;VisualStateGroup&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum104" style="color: #606060"&gt; 104:&lt;/span&gt;                         &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;VisualStateGroup&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="CheckStates"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum105" style="color: #606060"&gt; 105:&lt;/span&gt;                             &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;VisualState&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Checked"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum106" style="color: #606060"&gt; 106:&lt;/span&gt;                                 &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Storyboard&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum107" style="color: #606060"&gt; 107:&lt;/span&gt;                                     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;DoubleAnimation&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum108" style="color: #606060"&gt; 108:&lt;/span&gt;                                     &lt;span style="color: #ff0000"&gt;Storyboard&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;TargetName&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="OutlineGlyph"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum109" style="color: #606060"&gt; 109:&lt;/span&gt;                                     &lt;span style="color: #ff0000"&gt;Storyboard&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;TargetProperty&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Opacity"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum110" style="color: #606060"&gt; 110:&lt;/span&gt;                                     &lt;span style="color: #ff0000"&gt;To&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="0"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum111" style="color: #606060"&gt; 111:&lt;/span&gt;                                     &lt;span style="color: #ff0000"&gt;Duration&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="0"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum112" style="color: #606060"&gt; 112:&lt;/span&gt;                                     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ObjectAnimationUsingKeyFrames&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Storyboard&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;TargetName&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="BackgroundGlyph"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Storyboard&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;TargetProperty&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Foreground"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum113" style="color: #606060"&gt; 113:&lt;/span&gt;                                         &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;DiscreteObjectKeyFrame&lt;/span&gt; &lt;span style="color: #ff0000"&gt;KeyTime&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="0"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Value&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="{StaticResource AppBarItemForegroundBrush}"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum114" style="color: #606060"&gt; 114:&lt;/span&gt;                                     &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ObjectAnimationUsingKeyFrames&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum115" style="color: #606060"&gt; 115:&lt;/span&gt;                                     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ObjectAnimationUsingKeyFrames&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Storyboard&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;TargetName&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="BackgroundCheckedGlyph"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Storyboard&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;TargetProperty&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Visibility"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum116" style="color: #606060"&gt; 116:&lt;/span&gt;                                         &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;DiscreteObjectKeyFrame&lt;/span&gt; &lt;span style="color: #ff0000"&gt;KeyTime&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="0"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Value&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Visible"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum117" style="color: #606060"&gt; 117:&lt;/span&gt;                                     &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ObjectAnimationUsingKeyFrames&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum118" style="color: #606060"&gt; 118:&lt;/span&gt;                                     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ObjectAnimationUsingKeyFrames&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Storyboard&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;TargetName&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Content"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Storyboard&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;TargetProperty&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Foreground"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum119" style="color: #606060"&gt; 119:&lt;/span&gt;                                         &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;DiscreteObjectKeyFrame&lt;/span&gt; &lt;span style="color: #ff0000"&gt;KeyTime&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="0"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Value&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="{StaticResource AppBarItemPressedForegroundBrush}"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum120" style="color: #606060"&gt; 120:&lt;/span&gt;                                     &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ObjectAnimationUsingKeyFrames&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum121" style="color: #606060"&gt; 121:&lt;/span&gt;                                 &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Storyboard&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum122" style="color: #606060"&gt; 122:&lt;/span&gt;                             &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;VisualState&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum123" style="color: #606060"&gt; 123:&lt;/span&gt;                             &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;VisualState&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Unchecked"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum124" style="color: #606060"&gt; 124:&lt;/span&gt;                             &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;VisualState&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Indeterminate"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum125" style="color: #606060"&gt; 125:&lt;/span&gt;                         &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;VisualStateGroup&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum126" style="color: #606060"&gt; 126:&lt;/span&gt;                     &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;VisualStateManager.VisualStateGroups&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum127" style="color: #606060"&gt; 127:&lt;/span&gt;                 &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum128" style="color: #606060"&gt; 128:&lt;/span&gt;             &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ControlTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum129" style="color: #606060"&gt; 129:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Setter.Value&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum130" style="color: #606060"&gt; 130:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Setter&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum131" style="color: #606060"&gt; 131:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Style&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;Now with that style we can have a simple style that shows a toggle on and off for the same button:&lt;/p&gt;&lt;div id="codeSnippetWrapper" style="cursor: text; font-size: 8pt; border-top: silver 1px solid; font-family: 'Courier New', courier, monospace; border-right: silver 1px solid; width: 97.5%; border-bottom: silver 1px solid; overflow: auto; padding-bottom: 4px; direction: ltr; text-align: left; padding-top: 4px; padding-left: 4px; margin: 20px 0px 10px; border-left: silver 1px solid; line-height: 12pt; padding-right: 4px; background-color: #f4f4f4"&gt;  &lt;div id="codeSnippet" style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum1" style="color: #606060"&gt;   1:&lt;/span&gt; ...&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum2" style="color: #606060"&gt;   2:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Page.BottomAppBar&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum3" style="color: #606060"&gt;   3:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;AppBar&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum4" style="color: #606060"&gt;   4:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ToggleButton&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Style&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="{StaticResource ToggleAppBarButtonStyle}"&lt;/span&gt; &lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum5" style="color: #606060"&gt;   5:&lt;/span&gt;                 &lt;span style="color: #ff0000"&gt;AutomationProperties&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Search"&lt;/span&gt; &lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum6" style="color: #606060"&gt;   6:&lt;/span&gt;                 &lt;span style="color: #ff0000"&gt;Content&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="&amp;amp;#xE11A;"&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum7" style="color: #606060"&gt;   7:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;AppBar&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum8" style="color: #606060"&gt;   8:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Page.BottomAppBar&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum9" style="color: #606060"&gt;   9:&lt;/span&gt; ...&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;The result would show:&lt;/p&gt;&lt;p&gt;&lt;img style="margin-left: 0px; display: inline; margin-right: 0px" src="http://storage2.timheuer.com/searchtoggleoff.png" /&gt; &lt;img style="margin-left: 0px; display: inline; margin-right: 0px" src="http://storage2.timheuer.com/searchtoggleon.png" /&gt;  &lt;br /&gt;&lt;em&gt;ToggleButtonAppBarStyle in off/on state&lt;/em&gt;&lt;/p&gt;&lt;p&gt;This way we exhibit all the same behaviors of the AppBarButtonStyle, but just applied to the ToggleButton element in XAML.  Now we could probably refactor both to have an even more derivative base style and use more BasedOn styling, but how it is currently structured we couldn’t have a ToggleButton based on a Button style.  But thanks to the style/template engine in XAML we can re-use a lot and serve our needs!&lt;/p&gt;&lt;p&gt;Notice that you can set the Content to be whatever you want.  Since my base style uses the Segoe UI Symbol font, I’m setting the unicode value for a glyph here for Search.  A set of some cool glyphs you can use can be found in my previous post on &lt;a href="http://timheuer.com/blog/archive/2012/03/05/visualizing-appbar-command-styles-windows-8.aspx"&gt;XAML AppBar button styles&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;You can get the ToggleAppBarButtonStyle from here: &lt;a title="https://gist.github.com/2131230" href="https://gist.github.com/2131230"&gt;https://gist.github.com/2131230&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Hope this helps!  &lt;/p&gt;&lt;div id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:765b4802-0aec-4a6b-bda5-c9d26b3bc518" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"&gt;&lt;span class="tags"&gt;tags: &lt;a href="http://timheuer.com/blog/Tags/windows+8/default.aspx" rel="tag"&gt;windows 8&lt;/a&gt;, &lt;a href="http://timheuer.com/blog/Tags/winrt/default.aspx" rel="tag"&gt;winrt&lt;/a&gt;, &lt;a href="http://timheuer.com/blog/Tags/xaml/default.aspx" rel="tag"&gt;xaml&lt;/a&gt;, &lt;a href="http://timheuer.com/blog/Tags/appbar/default.aspx" rel="tag"&gt;appbar&lt;/a&gt;, &lt;a href="http://timheuer.com/blog/Tags/win8/default.aspx" rel="tag"&gt;win8&lt;/a&gt;, &lt;a href="http://timheuer.com/blog/Tags/metro/default.aspx" rel="tag"&gt;metro&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="wlWriterHeaderFooter" style="margin:0px; padding:0px 0px 0px 0px;"&gt;&lt;hr /&gt;&lt;div class="cc-license"&gt;This work is licensed under a &lt;a href="http://creativecommons.org/licenses/by/3.0/"&gt;Creative Commons Attribution By license.&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;img src="http://timheuer.com/blog/aggbug/14831.aspx" width="1" height="1" /&gt;&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/uAeRCljPVYDNlQ72vpLdhG-nn24/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/uAeRCljPVYDNlQ72vpLdhG-nn24/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/uAeRCljPVYDNlQ72vpLdhG-nn24/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/uAeRCljPVYDNlQ72vpLdhG-nn24/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/timheuer/~4/K8HWrKk7-Qg" height="1" width="1"/&gt;</description>      <creator xmlns="http://purl.org/dc/elements/1.1/">Tim Heuer</creator>      <guid isPermaLink="false">http://timheuer.com/blog/archive/2012/03/19/creating-a-metro-style-toggle-button-for-appbar.aspx</guid>      <pubDate>Tue, 20 Mar 2012 04:08:15 GMT</pubDate>      <comments>http://timheuer.com/blog/archive/2012/03/19/creating-a-metro-style-toggle-button-for-appbar.aspx#feedback</comments>      <comments xmlns="http://purl.org/rss/1.0/modules/slash/">1</comments>      <commentRss xmlns="http://wellformedweb.org/CommentAPI/">http://timheuer.com/blog/comments/commentRss/14831.aspx</commentRss>      <ping xmlns="http://madskills.com/public/xml/rss/module/trackback/">http://timheuer.com/blog/services/trackbacks/14831.aspx</ping>      <origLink xmlns="http://rssnamespace.org/feedburner/ext/1.0">http://timheuer.com/blog/archive/2012/03/19/creating-a-metro-style-toggle-button-for-appbar.aspx</origLink>    </item>    <item>      <title>Yet Another Podcast #61–Agile Programming</title>      <link>http://feedproxy.google.com/~r/JesseLiberty-SilverlightGeek/~3/w4hsMBfKp5Q/</link>      <comments>http://jesseliberty.com/2012/03/14/yet-another-podcast-61agile-programming/#comments</comments>      <pubDate>Wed, 14 Mar 2012 21:51:21 +0000</pubDate>      <creator xmlns="http://purl.org/dc/elements/1.1/">Jesse Liberty</creator>      <category><![CDATA[Patterns & Skills]]></category>      <category><![CDATA[Podcast]]></category>      <category><![CDATA[TDD]]></category>      <category><![CDATA[Tools and Utilities]]></category>      <category><![CDATA[YapCast]]></category>      <guid isPermaLink="false">http://jesseliberty.com/?p=5231</guid>      <encoded xmlns="http://purl.org/rss/1.0/modules/content/"><![CDATA[Talking with Phil Japikse about Agile programming. An international speaker, Microsoft MVP, MCSD, CSM, and CSP, and a passionate member of the developer community, Phil Japikse has been working with .Net since the first betas, developing software for over 20 &#8230; Continue reading &#8594;<br/><br/>For the complete article and hyperlinks, please visit my blog at http://JesseLiberty.com<div class="feedflare"><a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=w4hsMBfKp5Q:CdwJOYBgBYs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=w4hsMBfKp5Q:CdwJOYBgBYs:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=w4hsMBfKp5Q:CdwJOYBgBYs:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?i=w4hsMBfKp5Q:CdwJOYBgBYs:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=w4hsMBfKp5Q:CdwJOYBgBYs:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?i=w4hsMBfKp5Q:CdwJOYBgBYs:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=w4hsMBfKp5Q:CdwJOYBgBYs:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?i=w4hsMBfKp5Q:CdwJOYBgBYs:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=w4hsMBfKp5Q:CdwJOYBgBYs:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?d=qj6IDK7rITs" border="0"></img></a></div><img src="http://feeds.feedburner.com/~r/JesseLiberty-SilverlightGeek/~4/w4hsMBfKp5Q" height="1" width="1"/>]]></encoded>      <commentRss xmlns="http://wellformedweb.org/CommentAPI/">http://jesseliberty.com/2012/03/14/yet-another-podcast-61agile-programming/feed/</commentRss>      <comments xmlns="http://purl.org/rss/1.0/modules/slash/">1</comments>      <enclosure url="http://jesseliberty.com/wp-content/media/Show61.mp3" length="43704542" type="audio/mpeg" />      <origLink xmlns="http://rssnamespace.org/feedburner/ext/1.0">http://jesseliberty.com/2012/03/14/yet-another-podcast-61agile-programming/</origLink>    </item>    <item>      <title>Consume JSON with Windows Phone: a seamless solution</title>      <description>&lt;table width="20"&gt;    &lt;tbody&gt;        &lt;tr&gt;            &lt;td&gt;            &lt;div class="fb-like" data-show-faces="true" data-send="false" data-href="http://www.silverlightshow.net/items/Consume-JSON-with-Windows-Phone-a-seamless-solution.aspx" data-font="segoe ui" data-layout="button_count"&gt;&lt;/div&gt;            &lt;/td&gt;            &lt;td&gt;&lt;a href="https://twitter.com/share" class="twitter-share-button" data-via="silverlightshow" data-counturl="http://www.silverlightshow.net/items/Consume-JSON-with-Windows-Phone-a-seamless-solution.aspx" data-count="horizontal" data-text="Read @aboschin's article 'Consume JSON with #WindowsPhone: a seamless solution' #wpdev" data-url="http://slshow.net/zRYgPP"&gt;Tweet&lt;/a&gt;&lt;/td&gt;            &lt;td&gt;&lt;g:plusone size="medium" href="http://www.silverlightshow.net/items/Consume-JSON-with-Windows-Phone-a-seamless-solution.aspx"&gt;&lt;/g:plusone&gt;            &lt;/td&gt;            &lt;td&gt;            &lt;/td&gt;        &lt;/tr&gt;    &lt;/tbody&gt;&lt;/table&gt;&lt;p style="text-align: justify;"&gt;One of the growing needs of these days, is the requirements of exposing services that are available to multiple platforms. This request come obviously from the increasing availability of a number of mobile platforms that is forcing companies to adopt strategies to decrease the complexity and use technologies that are able to respect the verb "write once and use everywhere". &lt;/p&gt;&lt;div style="border:1px solid #dddddd;width: 200px; padding-top: 5px; padding-bottom: 5px; padding-left: 10px; margin-top: 5px; margin-left: 10px; float: right; background-color: #f3f3f3; border-image: initial;"&gt;&lt;h3&gt;Don't miss...&lt;/h3&gt;&lt;ul style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 20px; font-size: 12px; list-style-type: circle;"&gt;    &lt;li style="padding-bottom: 5px;"&gt;&lt;a href="http://www.silverlightshow.net/video/Recording-of-Windows-Phone-Raw-Camera-Webinar.aspx"&gt;Recording of Webinar: Windows Phone Raw Camera Access&lt;/a&gt; &lt;/li&gt;    &lt;li style="padding-bottom: 5px;"&gt;&lt;a href="http://www.silverlightshow.net/items/Windows-Phone-7.1-Local-SQL-Database.aspx"&gt;8-part Article Series: Windows Phone 7.5&lt;/a&gt;&lt;/li&gt;    &lt;li style="padding-bottom: 5px;"&gt;&lt;a href="http://www.silverlightshow.net/ebooks/wp7_exam.aspx"&gt;The ebook 'Getting Ready for the Windows Phone Exam 70-599':&lt;/a&gt; &lt;/li&gt;&lt;/ul&gt;&lt;p style="padding-bottom: 5px; text-align: center;"&gt;&lt;a href="http://www.silverlightshow.net/ebooks/wp7_exam.aspx"&gt;&lt;img style="border:0px solid; width: 100px; height: 141px; border-image: initial;" alt="Getting Ready for the Windows Phone Exam 70-599" src="http://www.silverlightshow.net/Storage/Ebooks/wp7_exam_cover.png" /&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size: 13px;"&gt;($4.99)&lt;/span&gt;&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&lt;strong&gt;&lt;a href="http://www.silverlightshow.net/ebooks/wp7_exam.aspx"&gt;&lt;/a&gt;&lt;p style="font-size: 12px; text-align: center;"&gt;&lt;a href="http://www.silverlightshow.net/ebooks.aspx"&gt;All SilverlightShow Ebooks&lt;/a&gt;&amp;nbsp;&lt;img alt="" src="http://www.silverlightshow.net/Storage/arrow-content.jpg" /&gt;&lt;/p&gt;&lt;/strong&gt;&lt;/div&gt;&lt;p style="text-align: justify;"&gt;&lt;strong&gt;Javascript object notation&lt;/strong&gt; - or as everyone know for sure, JSON - is something that has emerged as the common denominator, when the need is to expose services and APIs that may be easily consumed by multiple platforms. JSON is a simple notation - born long before the birth of the today's mobile world - that is able to describe object instances with a javascript syntax. The primary feature of JSON is the compactness, that is better than any other text based serialization strategy and many times better than XML. JSON is made of a combination of curly and square braces, of comma, colon and quotes. Explaining the syntax of JSON is out of the scope of this article but here is a basic example of the notation:&lt;/p&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;     text-align: left;border-style: none;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt; { &lt;span style="color: #006080;"&gt;"FirstName"&lt;/span&gt; : &lt;span style="color: #006080;"&gt;"Andrea"&lt;/span&gt;, &lt;span style="color: #006080;"&gt;"LastName"&lt;/span&gt; : &lt;span style="color: #006080;"&gt;"Boschin"&lt;/span&gt;, &lt;span style="color: #006080;"&gt;"Age"&lt;/span&gt; : 43 }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="text-align: justify;"&gt;This notation, as you can easily understand, describes a Person instance that exposes FirstName, LastName and Age properties. JSON let you describe objects and arrays and it always remain compact in size. The reason of its popularity is not only about compactness, but comes from the fact that every platform, mobile or not, has a way to serialize and deserialize this smart notation.&lt;/p&gt;&lt;p style="text-align: justify;"&gt;Windows Phone is not different in this. Including the System.ServiceModel.Web.dll you have a DataContractJsonSerializer class that is able to perform the required conversion between JSON to plain objects and viceversa. But what about if you have to create a json service and consume it with Windows Phone? For us, developers that usually take advantage of great Visual Studio IDE, able to generate code on behalf of us, using a json service may be matter of give up of helpers and write all by hand.&lt;/p&gt;&lt;h4 style="text-align: justify;"&gt;Architect your service&lt;/h4&gt;&lt;p style="text-align: justify;"&gt;So let say you have the common need of expose a set of APIs from your website and obviously you want to create a native app for Windows Phone that have to consume these APIs. The requirement is to prepare the connection points to be ready to be consumed by other devices so you want to use JSON as output. &lt;/p&gt;&lt;p style="text-align: justify;"&gt;The first thing to do is configure your service. WCF is a good starting point because, thanks to the WebHttpBinding, you can write services, with the common constraints you already know and then configure an endpoint to accept calls made with json. The starting point, as usual is to create the contract:&lt;/p&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="border:1px solid silver;border-image: initial; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin-top: 20px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow-x: auto; overflow-y: auto; cursor: text; padding-top: 4px; text-align: left;" id="codeSnippetWrapper"&gt;&lt;div style="padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;     text-align: left;border-style: none;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt; [ServiceContract]&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt;   2:&lt;/span&gt; [ServiceKnownType(&lt;span style="color: #006080;"&gt;"GetKnownTypes"&lt;/span&gt;, &lt;span style="color: #0000ff;"&gt;typeof&lt;/span&gt;(KnownTypesProvider))]&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum3" style="color: #606060;"&gt;   3:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;interface&lt;/span&gt; ITestService&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum4" style="color: #606060;"&gt;   4:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum5" style="color: #606060;"&gt;   5:&lt;/span&gt;     [OperationContract]&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum6" style="color: #606060;"&gt;   6:&lt;/span&gt;     [WebInvoke(&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum7" style="color: #606060;"&gt;   7:&lt;/span&gt;         Method = &lt;span style="color: #006080;"&gt;"POST"&lt;/span&gt;,&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum8" style="color: #606060;"&gt;   8:&lt;/span&gt;         BodyStyle = WebMessageBodyStyle.Wrapped,&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum9" style="color: #606060;"&gt;   9:&lt;/span&gt;         RequestFormat = WebMessageFormat.Json,&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum10" style="color: #606060;"&gt;  10:&lt;/span&gt;         ResponseFormat = WebMessageFormat.Json)]&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum11" style="color: #606060;"&gt;  11:&lt;/span&gt;     Article GetArticleById(&lt;span style="color: #0000ff;"&gt;int&lt;/span&gt; id);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum12" style="color: #606060;"&gt;  12:&lt;/span&gt;     &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum13" style="color: #606060;"&gt;  13:&lt;/span&gt;     &lt;span style="color: #008000;"&gt;// add here other methods...&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum14" style="color: #606060;"&gt;  14:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="text-align: justify;"&gt;In this snippet there are two important details. The service contract is decorated with the ServiceKnownType attribute that is useful to instruct your service about the types you need to serialize and deserialize. This attribute indicate a type to be the source of the types WCF has to know. This class has to expose the "GetKnownTypes" method:&lt;/p&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="border:1px solid silver;border-image: initial; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin-top: 20px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow-x: auto; overflow-y: auto; cursor: text; padding-top: 4px; text-align: left;" id="codeSnippetWrapper"&gt;&lt;div style="padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;     text-align: left;border-style: none;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;static&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;class&lt;/span&gt; KnownTypesProvider&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum3" style="color: #606060;"&gt;   3:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;static&lt;/span&gt; IEnumerable&amp;lt;Type&amp;gt; GetKnownTypes(ICustomAttributeProvider provider)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum4" style="color: #606060;"&gt;   4:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum5" style="color: #606060;"&gt;   5:&lt;/span&gt;         &lt;span style="color: #0000ff;"&gt;yield&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;return&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;typeof&lt;/span&gt;(Article);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum6" style="color: #606060;"&gt;   6:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum7" style="color: #606060;"&gt;   7:&lt;/span&gt;         &lt;span style="color: #008000;"&gt;// yield here other types...&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum8" style="color: #606060;"&gt;   8:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum9" style="color: #606060;"&gt;   9:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="text-align: justify;"&gt;The code returns the Article type, but you have to add all other types that have to cross the service boundary, particularly if this type is not directly the return type of a method. &lt;/p&gt;&lt;p style="text-align: justify;"&gt;The other important thing to note is the WebInvoke attribute. This attribute, applied to the operations, determine the way the input and output will be serialized. In this sample I use WebMessageFormat.Json for both RequestFormat and ResponseFormat, meaning it will return and accept data formatted with json. Another important attribute is BodyStyle. Setting this argument as "Wrapped" means that we want WCF to encapsulate arguments in a envelope that describe the signature of the method. This wrapper contains the name of the method, and the name of the parameters. Here is an example ot the input and output of the above method:&lt;/p&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="border:1px solid silver;border-image: initial; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin-top: 20px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow-x: auto; overflow-y: auto; cursor: text; padding-top: 4px; text-align: left;" id="codeSnippetWrapper"&gt;&lt;div style="padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;     text-align: left;border-style: none;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt; &lt;span style="color: #008000;"&gt;// Signature&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt;   2:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum3" style="color: #606060;"&gt;   3:&lt;/span&gt; Article GetArticleById(&lt;span style="color: #0000ff;"&gt;int&lt;/span&gt; id);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum4" style="color: #606060;"&gt;   4:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum5" style="color: #606060;"&gt;   5:&lt;/span&gt; &lt;span style="color: #008000;"&gt;// Input Message&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum6" style="color: #606060;"&gt;   6:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum7" style="color: #606060;"&gt;   7:&lt;/span&gt; {&lt;span style="color: #006080;"&gt;"id"&lt;/span&gt;:27}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum8" style="color: #606060;"&gt;   8:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum9" style="color: #606060;"&gt;   9:&lt;/span&gt; &lt;span style="color: #008000;"&gt;// Output Message&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum10" style="color: #606060;"&gt;  10:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum11" style="color: #606060;"&gt;  11:&lt;/span&gt; {&lt;span style="color: #006080;"&gt;"GetArticleByIdResult"&lt;/span&gt;:{&lt;span style="color: #006080;"&gt;"Id"&lt;/span&gt;:27,&lt;span style="color: #006080;"&gt;"MediumVote"&lt;/span&gt;:0,&lt;span style="color: #006080;"&gt;"Title"&lt;/span&gt;:&lt;span style="color: #006080;"&gt;"test"&lt;/span&gt;,&lt;span style="color: #006080;"&gt;"VoteCount"&lt;/span&gt;:0}}&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="text-align: justify;"&gt;Once the contract has been prepared now you can implement all the methods you need. In the example attached to the article you will find all the needed code. The most important thing is the configuration of the service, in the Web.Config. This chunk of code specified the connection endpoint and some important details about the nature of the binding and transport:&lt;/p&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="border:1px solid silver;border-image: initial; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin-top: 20px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow-x: auto; overflow-y: auto; cursor: text; padding-top: 4px; text-align: left;" id="codeSnippetWrapper"&gt;&lt;div style="padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;     text-align: left;border-style: none;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;system.serviceModel&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt;   2:&lt;/span&gt;   &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum3" style="color: #606060;"&gt;   3:&lt;/span&gt;   &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;services&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum4" style="color: #606060;"&gt;   4:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;service&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;name&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="XPG.WindowsPhoneJson.Services.TestService"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum5" style="color: #606060;"&gt;   5:&lt;/span&gt;       &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;endpoint&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;address&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;=""&lt;/span&gt; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum6" style="color: #606060;"&gt;   6:&lt;/span&gt;                 &lt;span style="color: #ff0000;"&gt;binding&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="webHttpBinding"&lt;/span&gt; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum7" style="color: #606060;"&gt;   7:&lt;/span&gt;                 &lt;span style="color: #ff0000;"&gt;contract&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="XPG.WindowsPhoneJson.Services.ITestService"&lt;/span&gt; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum8" style="color: #606060;"&gt;   8:&lt;/span&gt;                 &lt;span style="color: #ff0000;"&gt;behaviorConfiguration&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="ITestService_WebHttp"&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum9" style="color: #606060;"&gt;   9:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;service&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum10" style="color: #606060;"&gt;  10:&lt;/span&gt;   &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;services&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum11" style="color: #606060;"&gt;  11:&lt;/span&gt;   &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum12" style="color: #606060;"&gt;  12:&lt;/span&gt;   &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;behaviors&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum13" style="color: #606060;"&gt;  13:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;endpointBehaviors&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum14" style="color: #606060;"&gt;  14:&lt;/span&gt;       &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;behavior&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;name&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="ITestService_WebHttp"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum15" style="color: #606060;"&gt;  15:&lt;/span&gt;         &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;webHttp&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum16" style="color: #606060;"&gt;  16:&lt;/span&gt;       &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;behavior&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum17" style="color: #606060;"&gt;  17:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;endpointBehaviors&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum18" style="color: #606060;"&gt;  18:&lt;/span&gt;   &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;behaviors&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum19" style="color: #606060;"&gt;  19:&lt;/span&gt;   &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum20" style="color: #606060;"&gt;  20:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;system.serviceModel&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="text-align: justify;"&gt;The keys of this configuration are the webHttpBinding assigned to the binding attribute and the &amp;lt;webHttp /&amp;gt; element. These two configurations enable our service to accept calls with simple POST and make the service completely interoperable with a number of platforms.&lt;/p&gt;&lt;h4 style="text-align: justify;"&gt;Architect your App&lt;/h4&gt;&lt;p style="text-align: justify;"&gt;Moving to the Windows Phone application, when all the methods of the services are implemented, you cannot simply generate a proxy as you do usually with services. To simplest way to consume the json service is to make POST calls using the WebClient class. This means write the json message, prepare the string to send to the service and then place the call. Then, when the service returns a value you have to make the deserialization. I really love to write code, but I do not like to write the same code lot of times to do always the same thing. So finally I put together a bunch of classes that simplify my work. &lt;/p&gt;&lt;p style="text-align: justify;"&gt;My solution is made of two classes: Channel is responsible of manage the communication between the client and server. It initializes the WebClient, sets the required headers and then send the message along the wire. Then, when the answer returns, it check for errors and cleanup the resources. On the other side the JsonSerializer use a DataContractJsonSerializer to prepare the message to send and read the returning answer:&lt;/p&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="border:1px solid silver;border-image: initial; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin-top: 20px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow-x: auto; overflow-y: auto; cursor: text; padding-top: 4px; text-align: left;" id="codeSnippetWrapper"&gt;&lt;div style="padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;     text-align: left;border-style: none;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; Call&amp;lt;K&amp;gt;(&lt;span style="color: #0000ff;"&gt;string&lt;/span&gt; method, &lt;span style="color: #0000ff;"&gt;object&lt;/span&gt; args, Action&amp;lt;K&amp;gt; success, Action&amp;lt;Exception&amp;gt; fail)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum3" style="color: #606060;"&gt;   3:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;string&lt;/span&gt; message = &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.Parser.Serialize(args);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum4" style="color: #606060;"&gt;   4:&lt;/span&gt;     Uri uriToCall = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; Uri(&lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.Uri.AbsoluteUri + &lt;span style="color: #006080;"&gt;"/"&lt;/span&gt; + method);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum5" style="color: #606060;"&gt;   5:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum6" style="color: #606060;"&gt;   6:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.Client.Headers[HttpRequestHeader.ContentType] = &lt;span style="color: #006080;"&gt;"application/json"&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum7" style="color: #606060;"&gt;   7:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum8" style="color: #606060;"&gt;   8:&lt;/span&gt;     UploadStringCompletedEventHandler handler = &lt;span style="color: #0000ff;"&gt;null&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum9" style="color: #606060;"&gt;   9:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum10" style="color: #606060;"&gt;  10:&lt;/span&gt;     handler = (s, e) =&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum11" style="color: #606060;"&gt;  11:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum12" style="color: #606060;"&gt;  12:&lt;/span&gt;         &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.Client.UploadStringCompleted -= handler;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum13" style="color: #606060;"&gt;  13:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum14" style="color: #606060;"&gt;  14:&lt;/span&gt;         &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (e.Error != &lt;span style="color: #0000ff;"&gt;null&lt;/span&gt;)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum15" style="color: #606060;"&gt;  15:&lt;/span&gt;             fail(e.Error);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum16" style="color: #606060;"&gt;  16:&lt;/span&gt;         &lt;span style="color: #0000ff;"&gt;else&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum17" style="color: #606060;"&gt;  17:&lt;/span&gt;         {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum18" style="color: #606060;"&gt;  18:&lt;/span&gt;             K result = &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.Parser.Deserialize&amp;lt;K&amp;gt;(method, e.Result);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum19" style="color: #606060;"&gt;  19:&lt;/span&gt;             success(result);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum20" style="color: #606060;"&gt;  20:&lt;/span&gt;         }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum21" style="color: #606060;"&gt;  21:&lt;/span&gt;     };&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum22" style="color: #606060;"&gt;  22:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum23" style="color: #606060;"&gt;  23:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.Client.UploadStringCompleted += handler;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum24" style="color: #606060;"&gt;  24:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.Client.UploadStringAsync(uriToCall, message);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum25" style="color: #606060;"&gt;  25:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="text-align: justify;"&gt;The above method, is from the Channel class. as you can see it accept a method name (the name of the service operation to call) and an args parameter. This argument, of type object, is used to easily pass the arguments using anonymous types. Then the method prepares the uri, attaching the method name to the base uri of the service. Finally it sets the application/json content-type and place the call. The JsonSerializer class collaborate with the Call method:&lt;/p&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="border:1px solid silver;border-image: initial; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin-top: 20px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow-x: auto; overflow-y: auto; cursor: text; padding-top: 4px; text-align: left;" id="codeSnippetWrapper"&gt;&lt;div style="padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;     text-align: left;border-style: none;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; T Deserialize&amp;lt;T&amp;gt;(&lt;span style="color: #0000ff;"&gt;string&lt;/span&gt; method, &lt;span style="color: #0000ff;"&gt;string&lt;/span&gt; message)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum3" style="color: #606060;"&gt;   3:&lt;/span&gt;     Match match = Regex.Match(message, &lt;span style="color: #006080;"&gt;@"{"&lt;/span&gt;&lt;span style="color: #006080;"&gt;""&lt;/span&gt; + method + &lt;span style="color: #006080;"&gt;@"Result"&lt;/span&gt;&lt;span style="color: #006080;"&gt;":(?&amp;lt;inner&amp;gt;.*)}"&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum4" style="color: #606060;"&gt;   4:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum5" style="color: #606060;"&gt;   5:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (match.Success)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum6" style="color: #606060;"&gt;   6:&lt;/span&gt;         &lt;span style="color: #0000ff;"&gt;return&lt;/span&gt; FromJson&amp;lt;T&amp;gt;(match.Groups[&lt;span style="color: #006080;"&gt;"inner"&lt;/span&gt;].Value);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum7" style="color: #606060;"&gt;   7:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum8" style="color: #606060;"&gt;   8:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;throw&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; FormatException(&lt;span style="color: #006080;"&gt;"Message format is not valid"&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum9" style="color: #606060;"&gt;   9:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum10" style="color: #606060;"&gt;  10:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum11" style="color: #606060;"&gt;  11:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;string&lt;/span&gt; Serialize(&lt;span style="color: #0000ff;"&gt;object&lt;/span&gt; args)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum12" style="color: #606060;"&gt;  12:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum13" style="color: #606060;"&gt;  13:&lt;/span&gt;     Type type = args.GetType();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum14" style="color: #606060;"&gt;  14:&lt;/span&gt;     StringBuilder builder = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; StringBuilder();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum15" style="color: #606060;"&gt;  15:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;bool&lt;/span&gt; isFirst = &lt;span style="color: #0000ff;"&gt;true&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum16" style="color: #606060;"&gt;  16:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum17" style="color: #606060;"&gt;  17:&lt;/span&gt;     builder.Append(&lt;span style="color: #006080;"&gt;"{"&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum18" style="color: #606060;"&gt;  18:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum19" style="color: #606060;"&gt;  19:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;foreach&lt;/span&gt; (PropertyInfo property &lt;span style="color: #0000ff;"&gt;in&lt;/span&gt; type.GetProperties(BindingFlags.Public | BindingFlags.Instance))&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum20" style="color: #606060;"&gt;  20:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum21" style="color: #606060;"&gt;  21:&lt;/span&gt;         &lt;span style="color: #0000ff;"&gt;object&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;value&lt;/span&gt; = property.GetValue(args, &lt;span style="color: #0000ff;"&gt;null&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum22" style="color: #606060;"&gt;  22:&lt;/span&gt;         &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (!isFirst) builder.Append(&lt;span style="color: #006080;"&gt;","&lt;/span&gt;); &lt;span style="color: #0000ff;"&gt;else&lt;/span&gt; isFirst = &lt;span style="color: #0000ff;"&gt;false&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum23" style="color: #606060;"&gt;  23:&lt;/span&gt;         builder.AppendFormat(&lt;span style="color: #006080;"&gt;"\"{0}\":{1}"&lt;/span&gt;, property.Name, &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.ToJson(&lt;span style="color: #0000ff;"&gt;value&lt;/span&gt;));&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum24" style="color: #606060;"&gt;  24:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum25" style="color: #606060;"&gt;  25:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum26" style="color: #606060;"&gt;  26:&lt;/span&gt;     builder.Append(&lt;span style="color: #006080;"&gt;"}"&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum27" style="color: #606060;"&gt;  27:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum28" style="color: #606060;"&gt;  28:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;return&lt;/span&gt; builder.ToString();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum29" style="color: #606060;"&gt;  29:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="text-align: justify;"&gt;The trick is done creating the right wrapping code. The DataContractJsonSerializer simple convert the object to json but it does not directly handles the wrapped format of the message for the json service. So, if in the Deserialize method I strip away the wrapper just before of passing the message to the DataContractJsonSerializer , in the Serialize method I read the properties of the args value and I add the wrap calling the DataContractJsonSerializer of each parameter. &lt;/p&gt;&lt;p style="text-align: justify;"&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/AndreaBoschin/image_5.png"&gt;&lt;img style="border:0px;  border-image: initial; background-image: none; margin-top: 6px; margin-right: 15px; margin-bottom: 0px; margin-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; float: left;" title="image" alt="image" src="http://www.silverlightshow.net/Storage/Users/AndreaBoschin/_image_thumb.png" width="276" height="261" /&gt;&lt;/a&gt;Unfortunately, the DataContractJsonSerializer needs to know the types that it has to serialize or deserialize. In a normal web service this problem is handled generating a copy ot the DataContracts on the client side, but her we have not a copy of these classes. So we have to manage add a copy of the data contracts to the client solution. This is done creating a link between the Windows Phone application project and the Service application project. In a real world example you shoud generate data contract in a specific assembly and then link these classes in another assembly, compiled for Windows Phone. &lt;/p&gt;&lt;p style="text-align: justify;"&gt;In the figure on the left side you see the solution where the Article and KnowTypesProvider class are defined in the server assembly and linked in the WP7 class library. The important thing to note is that the base namespace for both the classes is the same "XPG.WindowsPhoneJson.Entities" because I've removed the "WP7" part in the settings. After you linked the assemblies on the respective part (service and client) you can instruct the DataContractJsonSerializer to use them:&lt;/p&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="border:1px solid silver;border-image: initial; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin-top: 20px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow-x: auto; overflow-y: auto; cursor: text; padding-top: 4px; text-align: left;" id="codeSnippetWrapper"&gt;&lt;div style="padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;     text-align: left;border-style: none;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;static&lt;/span&gt; T FromJson&amp;lt;T&amp;gt;(&lt;span style="color: #0000ff;"&gt;string&lt;/span&gt; json)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum3" style="color: #606060;"&gt;   3:&lt;/span&gt;     DataContractJsonSerializer dcjs =&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum4" style="color: #606060;"&gt;   4:&lt;/span&gt;         &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; DataContractJsonSerializer(&lt;span style="color: #0000ff;"&gt;typeof&lt;/span&gt;(T), KnownTypesProvider.GetKnownTypes(&lt;span style="color: #0000ff;"&gt;null&lt;/span&gt;));&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum5" style="color: #606060;"&gt;   5:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum6" style="color: #606060;"&gt;   6:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;using&lt;/span&gt; (MemoryStream stream = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; MemoryStream(Encoding.UTF8.GetBytes(json)))&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum7" style="color: #606060;"&gt;   7:&lt;/span&gt;         &lt;span style="color: #0000ff;"&gt;return&lt;/span&gt; (T)dcjs.ReadObject(stream);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum8" style="color: #606060;"&gt;   8:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum9" style="color: #606060;"&gt;   9:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum10" style="color: #606060;"&gt;  10:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;string&lt;/span&gt; ToJson(&lt;span style="color: #0000ff;"&gt;object&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;value&lt;/span&gt;)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum11" style="color: #606060;"&gt;  11:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum12" style="color: #606060;"&gt;  12:&lt;/span&gt;     DataContractJsonSerializer dcjs =&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum13" style="color: #606060;"&gt;  13:&lt;/span&gt;         &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; DataContractJsonSerializer(&lt;span style="color: #0000ff;"&gt;value&lt;/span&gt;.GetType(), KnownTypesProvider.GetKnownTypes(&lt;span style="color: #0000ff;"&gt;null&lt;/span&gt;));&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum14" style="color: #606060;"&gt;  14:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum15" style="color: #606060;"&gt;  15:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;using&lt;/span&gt; (MemoryStream stream = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; MemoryStream())&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum16" style="color: #606060;"&gt;  16:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum17" style="color: #606060;"&gt;  17:&lt;/span&gt;         dcjs.WriteObject(stream, &lt;span style="color: #0000ff;"&gt;value&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum18" style="color: #606060;"&gt;  18:&lt;/span&gt;         &lt;span style="color: #0000ff;"&gt;return&lt;/span&gt; Encoding.UTF8.GetString(stream.ToArray(), 0, (&lt;span style="color: #0000ff;"&gt;int&lt;/span&gt;)stream.Length);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum19" style="color: #606060;"&gt;  19:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum20" style="color: #606060;"&gt;  20:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;h4 style="text-align: justify;"&gt;Write your own proxy&lt;/h4&gt;&lt;p style="text-align: justify;"&gt;When you generate code from a service endpoint, side by side with your datacontracts, you get the main wrapper for the service under the form of a class that is usually called proxy. It main scope is to create an abstraction of the service to provide a way to consume its methods seamless. Once the Channel class has been build, is become very easy to write a proxy for a json service. Thanks to the structure I've illustrated it is a matter of write a single line of code, in a method that serves as a way to make parameters more user friendly. Here is a simple service wrapper based on the Channel class:&lt;/p&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="border:1px solid silver;border-image: initial; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin-top: 20px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow-x: auto; overflow-y: auto; cursor: text; padding-top: 4px; text-align: left;" id="codeSnippetWrapper"&gt;&lt;div style="padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;     text-align: left;border-style: none;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;class&lt;/span&gt; TestService : Channel&amp;lt;JsonSerializer&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum3" style="color: #606060;"&gt;   3:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; TestService(Uri uri)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum4" style="color: #606060;"&gt;   4:&lt;/span&gt;         : &lt;span style="color: #0000ff;"&gt;base&lt;/span&gt;(uri)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum5" style="color: #606060;"&gt;   5:&lt;/span&gt;     { }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum6" style="color: #606060;"&gt;   6:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum7" style="color: #606060;"&gt;   7:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; GetArticleById(&lt;span style="color: #0000ff;"&gt;int&lt;/span&gt; id, Action&amp;lt;Article&amp;gt; success, Action&amp;lt;Exception&amp;gt; fail)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum8" style="color: #606060;"&gt;   8:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum9" style="color: #606060;"&gt;   9:&lt;/span&gt;         &lt;span style="color: #0000ff;"&gt;base&lt;/span&gt;.Call&amp;lt;Article&amp;gt;(MethodBase.GetCurrentMethod().Name, &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; { id }, success, fail);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum10" style="color: #606060;"&gt;  10:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum11" style="color: #606060;"&gt;  11:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum12" style="color: #606060;"&gt;  12:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; VoteArticle(&lt;span style="color: #0000ff;"&gt;int&lt;/span&gt; id, &lt;span style="color: #0000ff;"&gt;int&lt;/span&gt; vote, Action&amp;lt;&lt;span style="color: #0000ff;"&gt;int&lt;/span&gt;&amp;gt; success, Action&amp;lt;Exception&amp;gt; fail)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum13" style="color: #606060;"&gt;  13:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum14" style="color: #606060;"&gt;  14:&lt;/span&gt;         &lt;span style="color: #0000ff;"&gt;base&lt;/span&gt;.Call&amp;lt;&lt;span style="color: #0000ff;"&gt;int&lt;/span&gt;&amp;gt;(MethodBase.GetCurrentMethod().Name, &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; { id, vote }, success, fail);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum15" style="color: #606060;"&gt;  15:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum16" style="color: #606060;"&gt;  16:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum17" style="color: #606060;"&gt;  17:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; SaveArticle(Article article, Action success, Action&amp;lt;Exception&amp;gt; fail)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum18" style="color: #606060;"&gt;  18:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum19" style="color: #606060;"&gt;  19:&lt;/span&gt;         &lt;span style="color: #0000ff;"&gt;base&lt;/span&gt;.Call(MethodBase.GetCurrentMethod().Name, &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; { article }, success, fail);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum20" style="color: #606060;"&gt;  20:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum21" style="color: #606060;"&gt;  21:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style="text-align: justify;"&gt;Thanks to the call method you can write a method that is ready to the asynchronous nature of network calls made with windows phone. You can user the generic method when you need to return a value or the base implementation when the method returns void. The first parameter is the name of the method you want to call. If you respect the convention of calling the proxy method with the same name of the service method you can use the MethodBase.GetCurrentMethod() to retrieve the name of the method to call. &lt;/p&gt;&lt;p style="text-align: justify;"&gt;Finally it is important you also use the same name for method parameters. When you pass the arguments as an anonymous type, Visual Studio automatically create the properties with the same name as the parameter we pass. Internally the Call method scans these properties and add them to the service call with the right name.&lt;/p&gt;&lt;h4 style="text-align: justify;"&gt;Beat the competitors&lt;/h4&gt;&lt;p style="text-align: justify;"&gt;The proxy you have created in this brief article is highly reusable, but the same is true if you think at the output of the web service. This let you provide a service that is fully interoperable with all the platforms, but Windows Phone will beat other competitors in term of fast development, using the services in a seamless way. As a side note, please be sure that you can apply the same tecnique to provide a version of the proxy to Silverlight.&lt;/p&gt;&lt;p style="text-align: justify;"&gt;&lt;a href="http://www.silverlightshow.net/Storage/Sources/XPG.WindowsPhoneJson.zip"&gt;&lt;strong&gt;Download the source code&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;</description>      <link>http://www.silverlightshow.net/items/Consume-JSON-with-Windows-Phone-a-seamless-solution.aspx</link>      <author>editorial@silverlightshow.net (Andrea Boschin  )</author>      <comments>http://www.silverlightshow.net/items/Consume-JSON-with-Windows-Phone-a-seamless-solution.aspx#comments</comments>      <guid isPermaLink="true">http://www.silverlightshow.net/items/Consume-JSON-with-Windows-Phone-a-seamless-solution.aspx</guid>      <pubDate>Wed, 14 Mar 2012 10:47:00 GMT</pubDate>    </item>    <item>      <title>Free Online Event on KnockoutJS and MVVM</title>      <link>http://feeds.johnpapa.net/~r/JohnPapa/~3/fYmPeKuQqVc/free-online-event-on-knockoutjs-and-mvvm</link>      <description>&lt;p&gt;I published my &lt;a href="http://jpapa.me/komvvm"&gt;Knockout / JavaScript / MVVM course with Pluralsight&lt;/a&gt; last month and have been getting a lot of positive feedback … &lt;strong&gt;thanks&lt;/strong&gt;! I decided to do a free short presentation from the course and answer some questions online. And what better way to do that than on LIDNUG. So next Monday I’ll be presenting KnockoutJs and MVVM at LIDNUG …&amp;nbsp; y&lt;a href="http://lidnug-johnpapa2.eventbrite.com/"&gt;ou can register for the event online&lt;/a&gt;. Monday, March 19th 2012 from 1:00pm to 2:00pm ET&lt;/p&gt; &lt;p&gt;&lt;strong&gt;HTML/ JavaScript Apps with MVVM and KnockoutJS&lt;/strong&gt;&lt;/p&gt; &lt;blockquote&gt;Do you write a lot of HTML and JavaScript code to push and pull data? In this session John will demonstrate how to bind your data from JavaScript to your target controls in HTML writing less code, and gaining more power. See how to use objects in JavaScript, use declarative binding, integrate templates and control of flow, create custom bindings, and include jQuery UI following good separation patterns using KnockoutJS and MVVM.&lt;/blockquote&gt; &lt;p&gt;&amp;nbsp; &lt;p&gt;&lt;a href="http://lidnug-johnpapa2.eventbrite.com/"&gt;&lt;img alt="image" src="http://johnpapa.net/Media/Default/Windows-Live-Writer/e58a68b47406_CA7C/image_thumb_2.png" width="1024" height="593"&gt;&lt;/a&gt;&lt;div class="feedflare"&gt;&lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=fYmPeKuQqVc:7Psia3H9iAU:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?i=fYmPeKuQqVc:7Psia3H9iAU:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=fYmPeKuQqVc:7Psia3H9iAU:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?i=fYmPeKuQqVc:7Psia3H9iAU:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=fYmPeKuQqVc:7Psia3H9iAU:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=fYmPeKuQqVc:7Psia3H9iAU:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JohnPapa/~4/fYmPeKuQqVc" height="1" width="1"/&gt;</description>      <pubDate>Wed, 14 Mar 2012 01:52:21 GMT</pubDate>      <guid isPermaLink="false">http://johnpapa.net:80/free-online-event-on-knockoutjs-and-mvvm</guid>      <origLink xmlns="http://rssnamespace.org/feedburner/ext/1.0">http://johnpapa.net:80/free-online-event-on-knockoutjs-and-mvvm</origLink>    </item>    <item>      <title>More Resources for JavaScript Patterns</title>      <link>http://feeds.johnpapa.net/~r/JohnPapa/~3/0wXt8kLmaeg/more-resources-for-javascript-patterns</link>      <description>&lt;p&gt;In just a few weeks I’ll be at DevConnections in Las Vegas where I’ll be presenting on a few sessions such as JsRender/JsViews, KnockoutJS, and Windows 8 Metro apps with XAML, JavaScript Patterns. These will each be a whirlwind tour of those topics, which is about all you can do in an hour. I always tell folks that I am not trying to teach everything there is to know in 1 hour …. but rather I am showing what can be done and inspire you to continue down that path, if you so choose. &lt;/p&gt; &lt;p&gt;&lt;a href="http://www.pluralsight-training.net/microsoft/Courses/TableOfContents?courseName=structuring-javascript"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://johnpapa.net/Media/Default/Windows-Live-Writer/jQuery-and-Ajax-Workshop_12FD8/image_3.png" width="1049" height="220"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;For those of you who can’t make DevConnections, you’ll be glad to know that there is an excellent video training course on the JavaScript patterns by &lt;a href="http://weblogs.asp.net/dwahlin"&gt;Dan Wahlin&lt;/a&gt; at Pluralsight titled “&lt;a href="http://www.pluralsight-training.net/microsoft/Courses/TableOfContents?courseName=structuring-javascript"&gt;Structuring JavaScript&lt;/a&gt;”. Dan and I subscribe to many of the same philosophies on patterns. For example, you’ll see that Dan and I are co-presenting the JavaScript Patterns session at DevConnections and in my &lt;a href="http://jpapa.me/komvvm"&gt;KnockoutJS course for Pluralsight&lt;/a&gt;, I use the Revealing Module Pattern heavily. (Hey, I practice what I preach.) &lt;/p&gt; &lt;p&gt;For the most in depth coverage of the patterns and how to use them properly, you should definitely check out Dan’s course. It’s chocked full of great content such as:&lt;/p&gt; &lt;ol&gt; &lt;li&gt;&lt;strong&gt;Why do we Need JavaScript Patterns?&lt;/strong&gt;&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Prototype Pattern&lt;/strong&gt;&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Module Pattern&lt;/strong&gt;&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Revealing Module Pattern&lt;/strong&gt;&lt;/li&gt; &lt;li&gt;&lt;strong&gt;Revealing Prototype Pattern&lt;/strong&gt;&lt;/li&gt;&lt;/ol&gt; &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:b97010de-0410-4342-9576-2e64466ed1a0" class="wlWriterEditableSmartContent"&gt;&lt;div&gt;&lt;object width="448" height="252"&gt;&lt;param name="movie" value="http://www.youtube.com/v/t1B5TJQAKjM?hl=en&amp;amp;hd=1"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/t1B5TJQAKjM?hl=en&amp;amp;hd=1" type="application/x-shockwave-flash" width="448" height="252"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="feedflare"&gt;&lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=0wXt8kLmaeg:_k_JdpBhm1g:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?i=0wXt8kLmaeg:_k_JdpBhm1g:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=0wXt8kLmaeg:_k_JdpBhm1g:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?i=0wXt8kLmaeg:_k_JdpBhm1g:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=0wXt8kLmaeg:_k_JdpBhm1g:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=0wXt8kLmaeg:_k_JdpBhm1g:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JohnPapa/~4/0wXt8kLmaeg" height="1" width="1"/&gt;</description>      <pubDate>Wed, 14 Mar 2012 01:51:24 GMT</pubDate>      <guid isPermaLink="false">http://johnpapa.net:80/more-resources-for-javascript-patterns</guid>      <origLink xmlns="http://rssnamespace.org/feedburner/ext/1.0">http://johnpapa.net:80/more-resources-for-javascript-patterns</origLink>    </item>    <item>      <title>Silverlight and Sharepoint working together: event receivers in Silverlight</title>      <description>&lt;table width="20"&gt;    &lt;tbody&gt;        &lt;tr&gt;            &lt;td&gt;            &lt;div class="fb-like" data-show-faces="true" data-send="false" data-href="http://www.silverlightshow.net/items/Silverlight-and-Sharepoint-working-together-event-receivers-in-Silverlight.aspx" data-font="segoe ui" data-layout="button_count"&gt;&lt;/div&gt;            &lt;/td&gt;            &lt;td&gt;&lt;a href="https://twitter.com/share" class="twitter-share-button" data-via="silverlightshow" data-counturl="http://www.silverlightshow.net/items/Silverlight-and-Sharepoint-working-together-event-receivers-in-Silverlight.aspx" data-count="horizontal" data-text="Reading article: #Silverlight &amp;amp; #Sharepoint working together: event receivers in Silverlight" data-url="http://slshow.net/zD5k8c"&gt;Tweet&lt;/a&gt;&lt;/td&gt;            &lt;td&gt;&lt;g:plusone size="medium" href="http://www.silverlightshow.net/items/Silverlight-and-Sharepoint-working-together-event-receivers-in-Silverlight.aspx"&gt;&lt;/g:plusone&gt;            &lt;/td&gt;            &lt;td&gt;            &lt;/td&gt;        &lt;/tr&gt;    &lt;/tbody&gt;&lt;/table&gt;&lt;p style="text-align: justify;"&gt;In the previous articles of this series (see the panel &lt;strong&gt;From this series&lt;/strong&gt; on the right) we dealt with some introductory aspects such as how to integrate Silverlight into Sharepoint, then we built a Silverlight menu capable of interacting with a Sharepoint site as an example. Throughout this journey we have introduced some basic concepts of Sharepoint useful for Silverlight developers. &lt;/p&gt;&lt;div style="border:1px solid #dddddd;border-image: initial; padding-bottom: 5px; background-color: #f3f3f3; margin-top: 5px; padding-left: 10px; width: 200px; float: right; margin-left: 10px; padding-top: 5px;"&gt;&lt;h3&gt;Don't miss...&lt;/h3&gt;&lt;ul style="list-style-type: circle; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 20px; font-size: 12px;"&gt;    &lt;li style="padding-bottom: 5px;"&gt;&lt;a href="http://www.silverlightshow.net/items/Discover-Sharepoint-with-Silverlight.aspx"&gt;The article series: Discover Sharepoint with Silverlight&lt;/a&gt; &lt;/li&gt;    &lt;li style="padding-bottom: 5px;"&gt;&lt;a href="http://www.silverlightshow.net/items/Silverlight-and-Sharepoint-working-together-the-Silverlight-SharePoint-Web-Parts-part-1.aspx"&gt;The article series: Silverlight and Sharepoint working together&lt;/a&gt; &lt;/li&gt;    &lt;li style="padding-bottom: 5px;"&gt;&lt;a href="http://www.silverlightshow.net/ebooks/sharepoint.aspx"&gt;Ebook: Discover Sharepoint with Silverlight (also in MOBI and EPUB):&lt;/a&gt; &lt;/li&gt;&lt;/ul&gt;&lt;p style="padding-bottom: 5px; text-align: center;"&gt;&lt;a href="http://www.silverlightshow.net/ebooks/sharepoint.aspx"&gt;&lt;img style="border:0px solid; border-image: initial;" alt="Discover Sharepoint with Silverlight Ebook" src="http://www.silverlightshow.net/Storage/sharepoint_sml.png" usemap="#rade_img_map_1291385581316" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;strong&gt;&lt;span style="font-size: 13px;"&gt;($0.99)&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style="font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="http://www.silverlightshow.net/ebooks.aspx"&gt;All SilverlightShow Ebooks&lt;/a&gt;&amp;nbsp;&lt;img alt="" src="http://www.silverlightshow.net/Storage/arrow-content.jpg" /&gt;&lt;/p&gt;&lt;/div&gt;Now it's time to dig into it at full throttle facing more advanced concepts. In this article we will become familiar with the Sharepoint event receivers, a cool feature which allows the user to be notified about various events occurring inside a Sharepoint environment. An example is the possibility to receive the notification of an item added to a list. Unfortunately, the mechanism works at server side and that means that there is no &amp;ldquo;out of the box&amp;rdquo; possibility to use the feature directly in a Silverlight application.&lt;p style="text-align: justify;"&gt;Nevertheless, we will find a way to make the event receivers available in a Silverlight web part in order to give a new dimension of interactivity to a Sharepoint solution.&lt;/p&gt;&lt;p style="text-align: justify;"&gt;As an example we will create a small application to invite our colleagues to a coffee break and get a close to real time answer. This will involve the creation of a wcf service with a service contract for a Sharepoint solution and a service contract for a Silverlight web part. Both contracts are duplex service contracts. Now you may be like &amp;ldquo;all this mess for a silly application to get someone together for a coffee break?&amp;rdquo; In fact, it may sound useless but it is not. Event receivers are a great feature of Sharepoint and exporting them into a Silverlight web part opens a very interesting perspective.&lt;/p&gt;&lt;h3&gt;The &amp;ldquo;Coffee break&amp;rdquo; application&lt;/h3&gt;&lt;p style="text-align: justify;"&gt;Let&amp;rsquo;s suppose we want to create a small application running in a Sharepoint site (a kind of widget) to quickly organize a coffee break with colleagues. We want to be able to select a time and send an invitation to our user&amp;rsquo;s group. The other users should be notified quite immediately and they should be able to accept or turn down the invitation. Eventually we should be notified about all the confirmations received from our colleagues. All this without the need to refresh any page.&lt;/p&gt;&lt;p&gt;The images below sum it all up:&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/walterf/applicationsdr_2.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;        border-width: 0px;border-style: solid;" title="applicationsdr" alt="applicationsdr" src="http://www.silverlightshow.net/Storage/Users/walterf/applicationsdr_thumb.png" width="500" height="708" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;A &lt;strong&gt;video showing the application in action &lt;/strong&gt;is available &lt;a href="http://www.silverlightshow.net/video/Video-for-Coffee-Break-App.aspx" target="_blank"&gt;here&lt;/a&gt;.&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;The &lt;strong&gt;source code of the application&lt;/strong&gt; is available &lt;a href="http://www.silverlightshow.net/Storage/Sources/EventReceiverSilverlight.zip"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;The big picture&lt;/h3&gt;&lt;p style="text-align: justify;"&gt;In the introduction I gave some clues. I mentioned Sharepoint event receivers, a wcf service with duplex service contracts, a Sharepoint solution and a Silverlight web part. Let me put together the pieces of the mosaic starting with the event receivers. (As usual Sharepoint developers can skip this part)&lt;/p&gt;&lt;p style="text-align: justify;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="text-align: justify;"&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/walterf/__sharepoint_2010_icon_2.jpg"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;        border-width: 0px;border-style: solid;" title="sharepoint_2010_icon" alt="sharepoint_2010_icon" src="http://www.silverlightshow.net/Storage/Users/walterf/__sharepoint_2010_icon_thumb.jpg" width="64" height="63" /&gt;&lt;/a&gt;&lt;em&gt; Event receivers are a convenient way to get notifications about Sharepoint events. The trappable events most used are synthesized in the tables below:&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/walterf/ListEventsTable_4.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;        border-width: 0px;border-style: solid;" title="ListEventsTable" alt="ListEventsTable" src="http://www.silverlightshow.net/Storage/Users/walterf/ListEventsTable_thumb_1.png" width="686" height="154" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/walterf/ListItemsTable_2.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;        border-width: 0px;border-style: solid;" title="ListItemsTable" alt="ListItemsTable" src="http://www.silverlightshow.net/Storage/Users/walterf/ListItemsTable_thumb.png" width="857" height="167" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/walterf/WorkflowTable_2.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;        border-width: 0px;border-style: solid;" title="WorkflowTable" alt="WorkflowTable" src="http://www.silverlightshow.net/Storage/Users/walterf/WorkflowTable_thumb.png" width="473" height="128" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="text-align: justify;"&gt;&lt;em&gt;The nice thing is that you can create these event receivers from Visual Studio 2010 selecting the &amp;ldquo;Event receiver&amp;rdquo; template for a &amp;ldquo;new project&amp;rdquo; or for a &amp;ldquo;new item&amp;rdquo; of an existing project.&lt;/em&gt;&lt;/p&gt;&lt;p style="text-align: justify;"&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/walterf/NewProjectEV_2.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;        border-width: 0px;border-style: solid;" title="NewProjectEV" alt="NewProjectEV" src="http://www.silverlightshow.net/Storage/Users/walterf/NewProjectEV_thumb.png" width="644" height="449" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;The template lets you choose the type of event you want to trap and then creates the skeleton code for you&lt;/em&gt;.&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/walterf/NewProjectEV1_2.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;        border-width: 0px;border-style: solid;" title="NewProjectEV1" alt="NewProjectEV1" src="http://www.silverlightshow.net/Storage/Users/walterf/NewProjectEV1_thumb.png" width="603" height="479" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="text-align: justify;"&gt;Once clarified what the event receivers are, let&amp;rsquo;s move on and suppose you want to trap the events related to the built-in Sharepoint Calendar list. In fact, this list seems the ideal candidate where to store the &amp;ldquo;coffee break appointments&amp;rdquo;. So the idea is that when someone (user A) proposes a coffee break, he/she inserts a new item in this list. Then, &amp;ldquo;an item was added&amp;rdquo; event is fired and caught by the event receiver that we previously created in a web part. From here the web part should be able to redirect the notification to a Silverlight application.&lt;/p&gt;&lt;p style="text-align: justify;"&gt;Obviously the Silverlight application must be hosted in a Silverlight web part in order to be available in a Sharepoint page. &lt;/p&gt;&lt;p style="text-align: justify;"&gt;When the Silverlight app received the notification it should be able to display the information to the user B and allow him to express a positive feedback. If a positive feedback is given, the item in the Calendar list is updated causing the firing of a &amp;ldquo;an item was updated&amp;rdquo; event. Another event receiver pointed on this event should redirect the feedback to the client Silverlight app of user A.&lt;/p&gt;&lt;p style="text-align: justify;"&gt;So the key point is: who is in charge of transferring the signalling of events from the server code in the web part to the client code in the Silverlight application? &lt;/p&gt;&lt;p style="text-align: justify;"&gt;The answer is : a wcf Service that serves as a bridge. &lt;/p&gt;&lt;p style="text-align: justify;"&gt;Hopefully the following images will help to clarify this.&lt;/p&gt;&lt;p style="text-align: justify;"&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/walterf/BigPicture1_2.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;        border-width: 0px;border-style: solid;" title="BigPicture1" alt="BigPicture1" src="http://www.silverlightshow.net/Storage/Users/walterf/BigPicture1_thumb.png" width="700" height="417" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;h5&gt;Figure 1: How the &amp;ldquo;new coffee break event&amp;rdquo; is passed from the Silverlight of the user A to the Silverlight app of the user B&lt;/h5&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/walterf/BigPicture2_2.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;        border-width: 0px;border-style: solid;" title="BigPicture2" alt="BigPicture2" src="http://www.silverlightshow.net/Storage/Users/walterf/BigPicture2_thumb.png" width="700" height="432" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;h5&gt;Figure 2: How the &amp;ldquo;coffee break event confirmation&amp;rdquo; is passed from the Silverlight app of the user B to the Silverlight app of the user A&lt;/h5&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h4&gt;Note that the built-in Calendar list does not contain any field specifically dedicated to storing the participants of an event or their confirmations. So for this purpose I used the &amp;ldquo;Description&amp;rdquo; field of the Calendar. Basically, when user B in figure 2 confirms his will to take a coffee break with user A, he updates the &amp;ldquo;coffee break&amp;rdquo; item in the Calendar list by adding his confirmation in the Description field. &lt;/h4&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;A wcf service as a bridge&lt;/h3&gt;&lt;p style="text-align: justify;"&gt;In the previous paragraph we learned that the idea (behind the possibility to extend the event receivers to a client application) is to use an &amp;ldquo;ad hoch&amp;rdquo; wcf service. Furthermore, this wcf service should be able to manage a one-to-many relation when a new item in the Calendar is created and when an item is updated. The image below shows both cases:&lt;/p&gt;&lt;p style="text-align: justify;"&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/walterf/wcfService1_2.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;        border-width: 0px;border-style: solid;" title="wcfService1" alt="wcfService1" src="http://www.silverlightshow.net/Storage/Users/walterf/wcfService1_thumb.png" width="650" height="926" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;h5&gt;Figure 3: the wcf service manages a one-to-many relation&lt;/h5&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;In this way all the users of a group will receive a notification about a new coffee break proposal and a notification about the confirmations of one or more of them.&lt;/p&gt;&lt;p style="text-align: justify;"&gt;Previously we have also stated that all these notifications should appear without the need to refresh the Sharepoint page containing the Silverlight application. This means that the Silverlight application should implement some kind of polling to the wcf service or better, the wcf service should be able to &amp;ldquo;push&amp;rdquo; the data into the Silverlight application. You as Silverlight developers surely know that there are several ways to accomplish this. For the &amp;ldquo;coffee break&amp;rdquo; application I used HTTP Polling Duplex following the details explained in this excellent &lt;a href="http://weblogs.asp.net/dwahlin/archive/2011/02/06/syncing-data-with-a-server-using-silverlight-and-http-polling-duplex.aspx"&gt;article&lt;/a&gt;. Without going too much in detail (for further explanations you can download and look at the source code linked to this article), I added the following interfaces to the service: the first defines the methods that the client can call on the service:&lt;/p&gt;&lt;div style="border:1px solid silver;border-image: initial; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin-top: 20px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow-x: auto; overflow-y: auto; cursor: text; padding-top: 4px; text-align: left;" id="codeSnippetWrapper"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;" id="codeSnippet"&gt;[ServiceContract(Namespace = &lt;span style="color: #006080;"&gt;"Silverlight"&lt;/span&gt;, CallbackContract = &lt;span style="color: #0000ff;"&gt;typeof&lt;/span&gt;(ISPDataServiceCallback))]&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;interface&lt;/span&gt; ISPDataService&lt;br /&gt;    {&lt;br /&gt;        [OperationContract(IsOneWay = &lt;span style="color: #0000ff;"&gt;true&lt;/span&gt;)]&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; DataFromClient(SPData &lt;span style="color: #0000ff;"&gt;value&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;        [OperationContract(IsOneWay = &lt;span style="color: #0000ff;"&gt;true&lt;/span&gt;)]&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; DataFromSP(SPData &lt;span style="color: #0000ff;"&gt;value&lt;/span&gt;);&lt;br /&gt;    }&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style="text-align: justify;"&gt;As for the &lt;em&gt;DataFromSP(SPData value)&lt;/em&gt; method we will come back on this in a while. Instead, the &lt;em&gt;DataFromClient(SPData value)&lt;/em&gt; method is called by the Silverlight client application at the first start to be registered on the service. As you may remember, this is due to the fact that the service must ensure a relation &amp;ldquo;one to many&amp;rdquo; with the running clients. For this reason the service must keep track of each client available. &lt;/p&gt;&lt;p&gt;The registration is made by the client as follows:&lt;/p&gt;&lt;div style="border:1px solid silver;border-image: initial; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin-top: 20px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow-x: auto; overflow-y: auto; cursor: text; padding-top: 4px; text-align: left;" id="codeSnippetWrapper"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;" id="codeSnippet"&gt;&lt;span style="color: #008000;"&gt;// registration to the server&lt;/span&gt;&lt;br /&gt;     SPData regData = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; SPData();&lt;br /&gt;     regData.Event = events.client_reg;&lt;br /&gt;     regData.User = currentUser;&lt;br /&gt;     _Proxy.DataFromClientAsync(regData);&lt;br /&gt;}&lt;br /&gt;&amp;hellip;&lt;br /&gt;&lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; _Proxy_ReceiveSPDataReceived(&lt;span style="color: #0000ff;"&gt;object&lt;/span&gt; sender, ReceiveSPDataReceivedEventArgs e)&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (e.spData.Event == events.client_reg)&lt;br /&gt;            {&lt;br /&gt;                LogtxtBlock.Text = &lt;span style="color: #006080;"&gt;"Connection estabilished."&lt;/span&gt;;&lt;br /&gt;                AddBreakBtn.IsEnabled = &lt;span style="color: #0000ff;"&gt;true&lt;/span&gt;;&lt;br /&gt;            }&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;At the service level the &lt;em&gt;DataFromClient(SPData value)&lt;/em&gt; method is implemented as follows:&lt;/p&gt;&lt;div style="border:1px solid silver;border-image: initial; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin-top: 20px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow-x: auto; overflow-y: auto; cursor: text; padding-top: 4px; text-align: left;" id="codeSnippetWrapper"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;" id="codeSnippet"&gt;&lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; DataFromClient(SPData &lt;span style="color: #0000ff;"&gt;value&lt;/span&gt;)&lt;br /&gt;{&lt;br /&gt;    &lt;span style="color: #008000;"&gt;//Get client callback channel&lt;/span&gt;&lt;br /&gt;    var context = OperationContext.Current;&lt;br /&gt;    var sessionID = context.SessionId;&lt;br /&gt;    var currClient = context.GetCallbackChannel&amp;lt;ISPDataServiceCallback&amp;gt;();&lt;br /&gt;    context.Channel.Faulted += Disconnect;&lt;br /&gt;    context.Channel.Closed += Disconnect;&lt;br /&gt;&lt;br /&gt;    ISPDataServiceCallback client;&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (!_ClientCallbacks.TryGetValue(sessionID, &lt;span style="color: #0000ff;"&gt;out&lt;/span&gt; client))&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;lock&lt;/span&gt; (_Key)&lt;br /&gt;        {&lt;br /&gt;            _ClientCallbacks[sessionID] = currClient;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #008000;"&gt;// Get SPData&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (&lt;span style="color: #0000ff;"&gt;value&lt;/span&gt;.Event == events.client_reg)&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;value&lt;/span&gt;.ItemValue = &lt;span style="color: #006080;"&gt;"acknowledgment"&lt;/span&gt;;&lt;br /&gt;        currClient.ReceiveSPData(&lt;span style="color: #0000ff;"&gt;value&lt;/span&gt;);&lt;br /&gt;    }&lt;br /&gt;   &lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;p style="text-align: justify;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="text-align: justify;"&gt;For each new client a specific channel is reserved for future communications. Only in the event of a new registration an &amp;ldquo;acknowledgment&amp;rdquo; is sent back to the client as feedback that the communication channel has been established.&lt;/p&gt;&lt;p style="text-align: justify;"&gt;If you were careful you may have noticed that in the snippet of the code above there was a reference to a ISPDataServiceCallback interface. This interface defines the callback methods that the service can use to communicate with a client:&lt;/p&gt;&lt;div style="border:1px solid silver;border-image: initial; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin-top: 20px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow-x: auto; overflow-y: auto; cursor: text; padding-top: 4px; text-align: left;" id="codeSnippetWrapper"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;" id="codeSnippet"&gt;[ServiceContract]&lt;br /&gt;&lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;interface&lt;/span&gt; ISPDataServiceCallback&lt;br /&gt;{&lt;br /&gt;    [OperationContract(IsOneWay = &lt;span style="color: #0000ff;"&gt;true&lt;/span&gt;)]&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; ReceiveSPData(SPData spData);&lt;br /&gt;&lt;br /&gt;    [OperationContract(IsOneWay = &lt;span style="color: #0000ff;"&gt;true&lt;/span&gt;, AsyncPattern = &lt;span style="color: #0000ff;"&gt;true&lt;/span&gt;)]&lt;br /&gt;    IAsyncResult BeginReceiveSPData(SPData spData, AsyncCallback callback, &lt;span style="color: #0000ff;"&gt;object&lt;/span&gt; state);&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; EndReceiveSPData(IAsyncResult result);&lt;br /&gt;&lt;br /&gt;    [OperationContract(IsOneWay = &lt;span style="color: #0000ff;"&gt;true&lt;/span&gt;)]&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; DataFromSPCallback(&lt;span style="color: #0000ff;"&gt;string&lt;/span&gt; message);&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="text-align: justify;"&gt;Here you may notice the definition of the &lt;em&gt;ReceiveSPData(SPData spData)&lt;/em&gt; method used above to communicate to the client that the communication channel is ready.&lt;/p&gt;&lt;p style="text-align: justify;"&gt;Let's take a breath now and think: ok, we have seen how the client Silverlight app and the service can communicate but&amp;hellip; one more piece is missing. In what way does the event receiver communicate with the service and instruct it to redirect the information gathered to the client?&lt;/p&gt;&lt;p style="text-align: justify;"&gt;You can add another service endpoint and a new binding to the wcf service. Using the Microsoft Configuration Editor&amp;rdquo; in the &amp;ldquo;coffee break&amp;rdquo; application I added a new endpoint called &amp;ldquo;wsdual&amp;rdquo; and a binding of type &amp;ldquo;wsDualHttpBinding&amp;rdquo;. So I was able to use the same contract type used by the Silverlight application. &lt;/p&gt;&lt;p style="text-align: justify;"&gt;The &lt;em&gt;DataFromSP(SPData value)&lt;/em&gt; method included in the first interface (ISPDataService) that I put in a corner some paragraphs above is just the method used in the event receivers to transfer the notification about new/updated items in the Calendar list into the service.&lt;/p&gt;&lt;p style="text-align: justify;"&gt;The snippet below shows the method used by the event receivers:&lt;/p&gt;&lt;div style="border:1px solid silver;border-image: initial; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin-top: 20px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow-x: auto; overflow-y: auto; cursor: text; padding-top: 4px; text-align: left;" id="codeSnippetWrapper"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;" id="codeSnippet"&gt;&lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; SendSPDataToClient(events eventType, SPItemEventProperties properties, &lt;span style="color: #0000ff;"&gt;string&lt;/span&gt; userColumn)&lt;br /&gt;{&lt;br /&gt;    InitConnectionToWCF();&lt;br /&gt;&lt;br /&gt;    DateTime eventDate = (DateTime)properties.ListItem[&lt;span style="color: #006080;"&gt;"EventDate"&lt;/span&gt;];&lt;br /&gt;&lt;br /&gt;    SPData spdata = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; SPData();&lt;br /&gt;    spdata.Event = eventType;&lt;br /&gt;    spdata.ItemValue = eventDate.ToShortTimeString();&lt;br /&gt;    spdata.listName = properties.List.Title;&lt;br /&gt;    spdata.ItemID = properties.ListItemId.ToString();&lt;br /&gt;&lt;br /&gt;    SPFieldLookupValue userValues = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; SPFieldLookupValue(Convert.ToString(properties.ListItem[userColumn]));&lt;br /&gt;&lt;br /&gt;    spdata.User = userValues.LookupValue;&lt;br /&gt;    spdataService.DataFromSP(spdata);&lt;br /&gt;&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Once the service receives the notification, it sends the information directly to the clients as follows:&lt;/p&gt;&lt;div style="border:1px solid silver;border-image: initial; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin-top: 20px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow-x: auto; overflow-y: auto; cursor: text; padding-top: 4px; text-align: left;" id="codeSnippetWrapper"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;" id="codeSnippet"&gt;&lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; DataFromSP(SPData spData)&lt;br /&gt;{&lt;br /&gt;     SendSPDataToClient(spData);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; SendSPDataToClient(SPData spData)&lt;br /&gt;{&lt;br /&gt;      var cbs = _ClientCallbacks.Where(cb =&amp;gt; ((IContextChannel)cb.Value).State == CommunicationState.Opened);&lt;br /&gt;      &lt;span style="color: #0000ff;"&gt;for&lt;/span&gt; (&lt;span style="color: #0000ff;"&gt;int&lt;/span&gt; i = 0; i &amp;lt; cbs.Count(); i++)&lt;br /&gt;      {&lt;br /&gt;           var cb = cbs.ElementAt(i).Value;&lt;br /&gt;           &lt;span style="color: #0000ff;"&gt;try&lt;/span&gt;&lt;br /&gt;           {&lt;br /&gt;                cb.BeginReceiveSPData(spData, _ReceiveSPDataCompleted, cb);&lt;br /&gt;           }&lt;br /&gt;           &lt;span style="color: #0000ff;"&gt;catch&lt;/span&gt; (TimeoutException texp)&lt;br /&gt;           {&lt;br /&gt;                &lt;span style="color: #008000;"&gt;//Log timeout error                 &lt;/span&gt;&lt;br /&gt;           }&lt;br /&gt;           &lt;span style="color: #0000ff;"&gt;catch&lt;/span&gt; (CommunicationException cexp)&lt;br /&gt;           {&lt;br /&gt;                &lt;span style="color: #008000;"&gt;//Log communication error                 &lt;/span&gt;&lt;br /&gt;           }&lt;br /&gt;      }&lt;br /&gt;                        &lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;Insert/update items in the Sharepoint Calendar List from Silverlight&lt;/h3&gt;&lt;p style="text-align: justify;"&gt;If you have read my previous articles on this topic you should be familiar with the use of the Silverlight client object model. In the &amp;ldquo;coffee break&amp;rdquo; application the insert/update is carried out in a secondary thread in order to be able to use the synchronous &lt;em&gt;ExecuteQuery()&lt;/em&gt; method instead of the conventional &lt;em&gt;ExecuteQueryAsync()&lt;/em&gt;. There is no particular reason behind that, it is just another way. Here below the snippet of code that creates a new item:&lt;/p&gt;&lt;div style="border:1px solid silver;border-image: initial; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin-top: 20px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow-x: auto; overflow-y: auto; cursor: text; padding-top: 4px; text-align: left;" id="codeSnippetWrapper"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;" id="codeSnippet"&gt;&lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; InsertEventThreadFunc(&lt;span style="color: #0000ff;"&gt;object&lt;/span&gt; objData)&lt;br /&gt;{&lt;br /&gt;    ThreadData mthData = (ThreadData)objData;&lt;br /&gt;&lt;br /&gt;    List list = mthData.ThClientContext.Web.Lists.GetByTitle(mthData.ThSPData.listName);&lt;br /&gt;    ListItemCreationInformation itemCreateInfo = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; ListItemCreationInformation();&lt;br /&gt;&lt;br /&gt;    ListItem newEvent = list.AddItem(itemCreateInfo);&lt;br /&gt;    newEvent[&lt;span style="color: #006080;"&gt;"Title"&lt;/span&gt;] = &lt;span style="color: #006080;"&gt;"Coffee break for "&lt;/span&gt; + mthData.ThSPData.User;&lt;br /&gt;    newEvent[&lt;span style="color: #006080;"&gt;"EventDate"&lt;/span&gt;] = (DateTime)mthData.ThSPData.ItemValue;&lt;br /&gt;    newEvent[&lt;span style="color: #006080;"&gt;"EndDate"&lt;/span&gt;] = (DateTime)mthData.ThSPData.ItemValue;&lt;br /&gt;    newEvent.Update();&lt;br /&gt;&lt;br /&gt;    mthData.ThClientContext.Load(list, i =&amp;gt; i.Title);&lt;br /&gt;    &lt;br /&gt;    mthData.ThClientContext.ExecuteQuery(); &lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="text-align: justify;"&gt;And below the snippet that updates the item:&lt;/p&gt;&lt;div style="border:1px solid silver;border-image: initial; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin-top: 20px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow-x: auto; overflow-y: auto; cursor: text; padding-top: 4px; text-align: left;" id="codeSnippetWrapper"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;" id="codeSnippet"&gt;&lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; UpdateEventThreadFunc(&lt;span style="color: #0000ff;"&gt;object&lt;/span&gt; objData)&lt;br /&gt;{&lt;br /&gt;    ThreadData mthData = (ThreadData)objData;&lt;br /&gt;&lt;br /&gt;    List list = mthData.ThClientContext.Web.Lists.GetByTitle(mthData.ThSPData.listName);&lt;br /&gt;&lt;br /&gt;    CamlQuery camlQuery = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; CamlQuery();&lt;br /&gt;    &lt;br /&gt;    camlQuery.ViewXml =&lt;br /&gt;        &lt;span style="color: #006080;"&gt;@"&amp;lt;View&amp;gt;&lt;br /&gt;        &amp;lt;Query&amp;gt;&lt;br /&gt;          &amp;lt;Where&amp;gt;&lt;br /&gt;            &amp;lt;Eq&amp;gt;&lt;br /&gt;              &amp;lt;FieldRef Name='ID'/&amp;gt;&lt;br /&gt;              &amp;lt;Value Type='Counter'&amp;gt;"&lt;/span&gt; + mthData.ThSPData.ItemID + &lt;span style="color: #006080;"&gt;@"&amp;lt;/Value&amp;gt;&lt;br /&gt;            &amp;lt;/Eq&amp;gt;&lt;br /&gt;          &amp;lt;/Where&amp;gt;&lt;br /&gt;        &amp;lt;/Query&amp;gt;&lt;br /&gt;      &amp;lt;/View&amp;gt;"&lt;/span&gt;;&lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;    ListItemCollection listItems = list.GetItems(camlQuery);&lt;br /&gt;                &lt;br /&gt;    mthData.ThClientContext.Load(listItems,&lt;br /&gt;         items =&amp;gt; items.Include(item =&amp;gt; item[&lt;span style="color: #006080;"&gt;"Description"&lt;/span&gt;]));&lt;br /&gt;    &lt;br /&gt;    mthData.ThClientContext.ExecuteQuery();&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (listItems[0] != &lt;span style="color: #0000ff;"&gt;null&lt;/span&gt;)&lt;br /&gt;    {&lt;br /&gt;        listItems[0][&lt;span style="color: #006080;"&gt;"Description"&lt;/span&gt;] = listItems[0][&lt;span style="color: #006080;"&gt;"Description"&lt;/span&gt;] + &lt;span style="color: #006080;"&gt;" "&lt;/span&gt; + mthData.CurrentUser.Substring(mthData.CurrentUser.LastIndexOf(&lt;span style="color: #006080;"&gt;@"\") + 1) + "&lt;/span&gt; will join the coffee &lt;span style="color: #0000ff;"&gt;break&lt;/span&gt;!";&lt;br /&gt;        listItems[0].Update();&lt;br /&gt;        mthData.ThClientContext.ExecuteQuery();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;Summary&lt;/h3&gt;&lt;p style="text-align: justify;"&gt;In this article we have introduced another interesting feature of Sharepoint: the event receivers. Although this feature seems to be reserved to server side applications like classic Sharepoint web parts, we have explored a way to make it available for a Silverlight application embedded in a Sharepoint web part. The simple application that we have created, i.e. a widget to quickly organize a coffee break with colleagues, is able to transfer to the client code the notification of an item added/updated to the built-in Calendar list. To do that it uses an external wcf service that exposes a HTTP Polling Duplex binding to communicate with the Silverlight part and a WSDualHttp binding to communicate with the server code of the event receiver. This example opens interesting perspectives of interaction between Silverlight and Sharepoint. In one of the next articles we will try to apply this strategy to another big chapter of the Sharepoint world: the workflows. But now, I definitely need a coffee break.&lt;/p&gt;</description>      <link>http://www.silverlightshow.net/items/Silverlight-and-Sharepoint-working-together-event-receivers-in-Silverlight.aspx</link>      <author>editorial@silverlightshow.net (Walter Ferrari )</author>      <comments>http://www.silverlightshow.net/items/Silverlight-and-Sharepoint-working-together-event-receivers-in-Silverlight.aspx#comments</comments>      <guid isPermaLink="true">http://www.silverlightshow.net/items/Silverlight-and-Sharepoint-working-together-event-receivers-in-Silverlight.aspx</guid>      <pubDate>Tue, 13 Mar 2012 16:17:00 GMT</pubDate>    </item>    <item>      <title>Monetize your Metro style app with Microsoft AdCenter</title>      <category>developer</category>      <category>expression</category>      <category>silverlight</category>      <category>tech stuff</category>      <category>xaml</category>      <category>windows</category>      <link>http://feeds.timheuer.com/~r/timheuer/~3/EfoNsIaYp88/monetize-your-windows-metro-style-app-adcenter.aspx</link>      <description>&lt;p&gt;&lt;img title="Microsoft Advertising logo" style="float: left; display: inline" alt="Microsoft Advertising logo" align="left" src="http://storage2.timheuer.com/adCenterCommunity_Logo.png" /&gt;Today, the Microsoft Advertising team announced an update to their AdCenter SDK to include support for monetizing your Metro style apps.&lt;/p&gt;  &lt;p&gt;In a &lt;a href="http://community.microsoftadvertising.com/blogs/advertising/archive/2012/03/06/developers-microsoft-advertising-sdk-windows-metro-apps.aspx"&gt;blog post announcing the update&lt;/a&gt;, Ian notes that if you were using the previous SDK that there have been breaking changes and to use the updated SDK.  This update includes support for XAML applications and adding the ad units couldn’t be easier.  After installing their SDK (which was developed using the same distribution concepts in my post about &lt;strong&gt;&lt;a href="http://timheuer.com/blog/archive/2012/03/07/creating-custom-controls-for-metro-style-apps.aspx"&gt;creating a distributable custom control&lt;/a&gt;&lt;/strong&gt; previous post), you will be able to use &lt;em&gt;Add Reference&lt;/em&gt; in Visual Studio, navigate to the Windows/Extensions area and add the SDK.  After that it is as simple as adding the control in your project:&lt;/p&gt;  &lt;div id="codeSnippetWrapper" style="cursor: text; font-size: 8pt; border-top: silver 1px solid; font-family: 'Courier New', courier, monospace; border-right: silver 1px solid; width: 97.5%; border-bottom: silver 1px solid; overflow: auto; padding-bottom: 4px; direction: ltr; text-align: left; padding-top: 4px; padding-left: 4px; margin: 20px 0px 10px; border-left: silver 1px solid; line-height: 12pt; padding-right: 4px; background-color: #f4f4f4"&gt;   &lt;div id="codeSnippet" style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;     &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum1" style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Background&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="{StaticResource ApplicationPageBackgroundBrush}"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum2" style="color: #606060"&gt;   2:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Border&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Background&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Red"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;VerticalAlignment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Bottom"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum3" style="color: #606060"&gt;   3:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ads:AdControl&lt;/span&gt; &lt;span style="color: #ff0000"&gt;xmlns:ads&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="using:Microsoft.Advertising.WinRT.UI"&lt;/span&gt; &lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum4" style="color: #606060"&gt;   4:&lt;/span&gt;                        &lt;span style="color: #ff0000"&gt;VerticalAlignment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Bottom"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Width&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="728"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Height&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="90"&lt;/span&gt; &lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum5" style="color: #606060"&gt;   5:&lt;/span&gt;                        &lt;span style="color: #ff0000"&gt;AdUnitId&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="YOUR_AD_UNIT_ID"&lt;/span&gt; &lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum6" style="color: #606060"&gt;   6:&lt;/span&gt;                        &lt;span style="color: #ff0000"&gt;ApplicationId&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="YOUR_APPLICATION_ID"&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum7" style="color: #606060"&gt;   7:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Border&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum8" style="color: #606060"&gt;   8:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;Now you do, of course, have to have a pubCenter account and create the ad units beforehand in order for this to work, but that setup time didn’t take long at all.&lt;/p&gt;&lt;p&gt;You may have some time for your own ad units to be provisioned and start serving ads, but the ad team &lt;a href="http://msdn.microsoft.com/en-US/library/hh506361(v=msads.10).aspx"&gt;created some test values you can use&lt;/a&gt; to see how things all work.  Download the &lt;strong&gt;&lt;a href="http://go.microsoft.com/?linkid=9800248"&gt;Ads SDK&lt;/a&gt;&lt;/strong&gt; today!&lt;/p&gt;&lt;p&gt;Hope this helps!  &lt;/p&gt;&lt;div id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:bc350bbf-d63d-43d9-b0ac-979e32a9737e" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"&gt;&lt;span class="tags"&gt;tags: &lt;a href="http://timheuer.com/blog/Tags/adcenter/default.aspx" rel="tag"&gt;adcenter&lt;/a&gt;, &lt;a href="http://timheuer.com/blog/Tags/windows+8/default.aspx" rel="tag"&gt;windows 8&lt;/a&gt;, &lt;a href="http://timheuer.com/blog/Tags/metro/default.aspx" rel="tag"&gt;metro&lt;/a&gt;, &lt;a href="http://timheuer.com/blog/Tags/xaml/default.aspx" rel="tag"&gt;xaml&lt;/a&gt;, &lt;a href="http://timheuer.com/blog/Tags/winrt/default.aspx" rel="tag"&gt;winrt&lt;/a&gt;, &lt;a href="http://timheuer.com/blog/Tags/pubcenter/default.aspx" rel="tag"&gt;pubcenter&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="wlWriterHeaderFooter" style="margin:0px; padding:0px 0px 0px 0px;"&gt;&lt;hr /&gt;&lt;div class="cc-license"&gt;This work is licensed under a &lt;a href="http://creativecommons.org/licenses/by/3.0/"&gt;Creative Commons Attribution By license.&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;img src="http://timheuer.com/blog/aggbug/14830.aspx" width="1" height="1" /&gt;&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/g7LJPJiawC4UziLKJ-a7chzRIL8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/g7LJPJiawC4UziLKJ-a7chzRIL8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/g7LJPJiawC4UziLKJ-a7chzRIL8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/g7LJPJiawC4UziLKJ-a7chzRIL8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/timheuer/~4/EfoNsIaYp88" height="1" width="1"/&gt;</description>      <creator xmlns="http://purl.org/dc/elements/1.1/">Tim Heuer</creator>      <guid isPermaLink="false">http://timheuer.com/blog/archive/2012/03/08/monetize-your-windows-metro-style-app-adcenter.aspx</guid>      <pubDate>Thu, 08 Mar 2012 23:54:12 GMT</pubDate>      <comments>http://timheuer.com/blog/archive/2012/03/08/monetize-your-windows-metro-style-app-adcenter.aspx#feedback</comments>      <comments xmlns="http://purl.org/rss/1.0/modules/slash/">1</comments>      <commentRss xmlns="http://wellformedweb.org/CommentAPI/">http://timheuer.com/blog/comments/commentRss/14830.aspx</commentRss>      <ping xmlns="http://madskills.com/public/xml/rss/module/trackback/">http://timheuer.com/blog/services/trackbacks/14830.aspx</ping>      <origLink xmlns="http://rssnamespace.org/feedburner/ext/1.0">http://timheuer.com/blog/archive/2012/03/08/monetize-your-windows-metro-style-app-adcenter.aspx</origLink>    </item>    <item>      <guid isPermaLink="false">tag:blogger.com,1999:blog-8492016573075353132.post-3532249941682768432</guid>      <pubDate>Thu, 08 Mar 2012 18:41:00 +0000</pubDate>      <updated xmlns="http://www.w3.org/2005/Atom">2012-03-09T00:11:10.242+05:30</updated>      <title>Resolving Prohibited Applications 2.7.2 Issue in Windows Phone Application Certification Process</title>      <description>&lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;If you are building a Windows Phone Application especially which deals with Location based Services or Location related information share,then this blogpost might come to your help.&lt;/p&gt; &lt;p&gt;Recently,I submitted one Windows Phone Application titled as "&lt;a href="http://www.windowsphone.com/en-IN/apps/5303f653-b20c-4c09-83f0-436a03068266" target="_blank"&gt;LocateMe&lt;/a&gt;" to Microsoft Windows Phone Marketplace as a normal procedure of Marketplace of Microsoft, After 2-3 Days I got email as follows :&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-PAZyncOwWmY/T1j9ET5DOsI/AAAAAAAADMI/i95ZIw5DFEQ/s1600-h/certierr%25255B13%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="certierr" border="0" alt="certierr" src="http://lh4.ggpht.com/-C9jtDCsNRPg/T1j9F9V0EJI/AAAAAAAADMQ/750gpIyqA40/certierr_thumb%25255B11%25255D.jpg?imgmax=800" width="396" height="363"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;When I logged into AppHub account, I got one PDF file having detail description of above mail along with complete error details. When I saw that PDF, It was written like :&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-91nabyHWRCs/T1j9H3g4SzI/AAAAAAAADMY/Tu4ONgZtm58/s1600-h/police1%25255B13%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="police1" border="0" alt="police1" src="http://lh3.ggpht.com/-VqoOglTVKA8/T1j9JwnnFgI/AAAAAAAADMg/X7yfyskWSU0/police1_thumb%25255B9%25255D.jpg?imgmax=800" width="401" height="416"&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Since such kind of rejection is very new to me,For day or two I was wondering what to do and resolved so that my application can clear certification.Since comments was clear on the test result like this :&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-phTlgulhhDc/T1j9LEbPHFI/AAAAAAAADMo/UFkGjh_SSG8/s1600-h/police2%25255B14%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="police2" border="0" alt="police2" src="http://lh3.ggpht.com/-_wa3c3fQZsU/T1j9NLcyA0I/AAAAAAAADMw/4VuoDDMI_Qc/police2_thumb%25255B12%25255D.jpg?imgmax=800" width="466" height="81"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;One of my friend Mayur Tendulkar suggested that my application is using Location Service without User Consent or User's permission which indirectly crossing Privacy of the User of that application, In other way its like taking or using User's location without giving him any intimation or notification. This was the issue which my application was doing.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Solution :&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;I came across this &lt;a href="http://blog.jerrynixon.com/2012/02/wp7-sample-use-location-services-and.html" target="_blank"&gt;blogpost&lt;/a&gt; which exactly states the above problem, Solution suggested there is to create a Custom Page with On/Off Switch which can Enable or Disable Location which will be provided by User of the application.&lt;/p&gt; &lt;p&gt;Somehow I felt it as little extra work in terms of coding and navigation to user.So I given a try to a very simple solution and I am happy that it worked for me and my application came out of this Privacy issue and got certified. I just given a message box like this :&lt;/p&gt; &lt;p&gt;MessageBoxResult result = MessageBox.Show("For Tracking on Map you need to Enable Location,For More Information Read Privacy Statement,Are you sure you want to enable Tracking?", "LocateMe", MessageBoxButton.OKCancel);&lt;br&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (result == MessageBoxResult.OK)&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Turn On the Location&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Turn Off the Location&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;&lt;/p&gt; &lt;p&gt;This saved me from that extra step of navigating to Location Setup Page and Set Reset location and come back to application.This helped me to get consent of user to use Location on his/her device.This allows user to choose to Turn On or Off the location service and does not force the user anyway and does not disclose any location data of user anywhere.&lt;/p&gt; &lt;p&gt;To be on safer side, I added a Privacy Statement Page in Application Bar Menu so that User can know more about in what way and terms the User location which is his/her private data is getting used.This page looks like below :&lt;/p&gt; &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-8oGHFjqLnC0/T1j9O-rpsVI/AAAAAAAADM4/_yebDQp7AO0/s1600-h/loc3%25255B10%25255D.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="loc3" border="0" alt="loc3" src="http://lh5.ggpht.com/-sCQq42Xm2tY/T1j9Q7VV4yI/AAAAAAAADNA/wl9XmXlQi4Y/loc3_thumb%25255B8%25255D.jpg?imgmax=800" width="245" height="425"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;What I learn from this problem :&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Its not always mandatory to have a separate page just for turning On or Off the location but it can just be done by a message box since its all about giving notification to the user and asking his/her permission to use and or share his/her location in any way.&lt;/p&gt; &lt;p&gt;Since I didn't came across any valid or legal solution for this problem,hence I thought I should share my experience with you all, So in future any of you got into such problem, should not be a big issue for your application during the Certification Process of Microsoft Marketplace.&lt;/p&gt; &lt;p&gt;Although in terms of legal aspect, this is not a valid or legal solution which is full proof,however I will claim this only as "work around" to get ride of Prohibited Applications 2.7.2 Issue in Windows Phone Application Certification.If you want More information about 2.7.2 section,I encourage you to go through following MSDN Documentation available on this subject :&lt;/p&gt; &lt;p&gt;&lt;a title="http://msdn.microsoft.com/en-us/library/hh184841%28v=VS.92%29.aspx" href="http://msdn.microsoft.com/en-us/library/hh184841%28v=VS.92%29.aspx"&gt;http://msdn.microsoft.com/en-us/library/hh184841%28v=VS.92%29.aspx&lt;/a&gt;&lt;/p&gt; &lt;p&gt;With this, I conclude this post, The only intention of this post is to make you aware of this issue and not get lost anywhere like I got in initial go of my application development.This might help you to be extra careful while you are building your app especially location based.So make sure you keep these things in your mind and while building such kinds of apps, think from all aspects and build your own Privacy Statement or Policy according to need of your application.&lt;/p&gt; &lt;p&gt;Well, I recently submitted few apps and in my next post I am talking some interesting things happen last month in my town where me and my User Group friends conducted Windows Phone Training Program, till that time, Just check out my "&lt;a href="http://www.windowsphone.com/en-IN/apps/5303f653-b20c-4c09-83f0-436a03068266" target="_blank"&gt;LocateMe&lt;/a&gt;" app and let me know your feedback.Take care and see you soon.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Warning : Above post and solution given came out of my own experience and might not applicable as a general solution to all generic location based applications on Windows Phone Marketplace,Hence use this post as just a guideline and not as a final and/or Legal solution in any way.Only intention of this post is to create awareness about this&amp;nbsp; Prohibited Applications 2.7.2 Issue in Windows Phone Application Certification Process.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Vikram.&lt;/strong&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8492016573075353132-3532249941682768432?l=pendsevikram.blogspot.com' alt='' /&gt;&lt;/div&gt;</description>      <link>http://pendsevikram.blogspot.com/2012/03/resolving-prohibited-applications-272.html</link>      <author>noreply@blogger.com (Vikram Pendse)</author>      <media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh4.ggpht.com/-C9jtDCsNRPg/T1j9F9V0EJI/AAAAAAAADMQ/750gpIyqA40/s72-c/certierr_thumb%25255B11%25255D.jpg?imgmax=800" height="72" width="72" />      <total xmlns="http://purl.org/syndication/thread/1.0">0</total>    </item>    <item>      <title>Building a deployable custom control for XAML Metro style apps</title>      <category>developer</category>      <category>expression</category>      <category>silverlight</category>      <category>tech stuff</category>      <category>xaml</category>      <category>windows</category>      <link>http://feeds.timheuer.com/~r/timheuer/~3/HjRqwDAP5L4/creating-custom-controls-for-metro-style-apps.aspx</link>      <description>&lt;p&gt;At //build one of the surprising immediate things I heard about was folks wanting to build custom controls right away.  I knew that would happen, but not so quick on something so new (WinRT).  The XAML platform did not have good support for building custom controls in the Developer Preview but now that the &lt;a href="http://preview.windows.com"&gt;Consumer Preview for Windows 8&lt;/a&gt; and Visual Studio 11 Beta are out, there is much better support.  There are two key things when thinking about custom controls: 1) building it and 2) making it consumable by developers (even if those developers are your own company).  I’ll try to articulate the methods of both here.&lt;/p&gt;  &lt;h2&gt;Defining custom versus user control&lt;/h2&gt;  &lt;p&gt;There is usually some debate in the XAML community about the definition of a custom control.  For the purposes of this discussion I define a custom control as a control that provides a generic.xaml, can be styled/templated and is usually encapsulated in its own assembly which can then be distributed.  A custom control can &lt;em&gt;contain&lt;/em&gt; user controls, but generally speaking does not.  A typical user control scenario is one that lives within your project and not meant to be consumed by anyone outside your project.&lt;/p&gt;  &lt;p&gt;This definition is the same whether we are talking about C++, C# or Visual Basic.  Everything below applies to all languages.&lt;/p&gt;  &lt;h2&gt;Creating the custom control&lt;/h2&gt;  &lt;p&gt;The fundamentals of a custom control are that it is a class and it provides it’s own template/style.  This style/template definition usually lives in a file located at themes/generic.xaml.  This is the same pattern that has existed in other XAML implementations like WPF, Silverlight and Windows Phone.  The pattern is no different for Metro style apps in this regard.&lt;/p&gt;  &lt;p&gt;The creation of the most basic custom control is very simple.  A Windows SDK sample for &lt;a href="http://code.msdn.microsoft.com/windowsapps/XAML-user-and-custom-a8a9505e"&gt;XAML User and Custom Controls&lt;/a&gt; is available for you to download for the quick review and core concept.  My intent here is to take that a step further for the end-to-end implementation if I were a control vendor.  Let’s first create our control.  For our purposes we will create a control that shows an Image and allows you to specify some Text for the label.  The label, however, will be prepended with some text that comes from string resources.&lt;/p&gt;  &lt;p&gt;In Visual Studio we will create a class library project first.&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: You can create a C#/VB Class Library and keep it managed, or convert it to a WinRT component.  You may also create this in C++ using the WinRT Component project type.  Again, these concepts are the same, the syntax will be obviously slightly different for C++ and managed code.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Once you create the class library (I called mine SimpleCustomControl and deleted the initial Class1.cs file that was created), add an item to the project.  You can do this via right-clicking on the project and choosing add item.  You will be presented with a few options, but the important one is Templated Control.&lt;/p&gt;  &lt;p&gt;&lt;img title="Add Item dialog" style="float: none; margin-left: auto; display: block; margin-right: auto" alt="Add Item dialog" src="http://storage2.timheuer.com/cc-additem.png" /&gt;&lt;/p&gt;  &lt;p&gt;Watch was this does to your project as it will do 2 things:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Create a new class &lt;/li&gt;    &lt;li&gt;Add a Themes folder and place a &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.resourcedictionary.aspx"&gt;ResourceDictionary&lt;/a&gt; called generic.xaml in that folder &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;The themes/generic.xaml is very important if you use the &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.controls.control.defaultstylekey.aspx"&gt;DefaultStyleKey&lt;/a&gt; concept in your class.  This is very much a convention-based approach.  The contents of the class is very simple at this point, with the sole constructor and the DefaultStyleKey wired up:&lt;/p&gt;  &lt;div id="codeSnippetWrapper" style="cursor: text; font-size: 8pt; border-top: silver 1px solid; font-family: 'Courier New', courier, monospace; border-right: silver 1px solid; width: 97.5%; border-bottom: silver 1px solid; overflow: auto; padding-bottom: 4px; direction: ltr; text-align: left; padding-top: 4px; padding-left: 4px; margin: 20px 0px 10px; border-left: silver 1px solid; line-height: 12pt; padding-right: 4px; background-color: #f4f4f4"&gt;   &lt;div id="codeSnippet" style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;     &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum1" style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;namespace&lt;/span&gt; SimpleCustomControl&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum2" style="color: #606060"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum3" style="color: #606060"&gt;   3:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;sealed&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; LabeledImage : Control&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum4" style="color: #606060"&gt;   4:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum5" style="color: #606060"&gt;   5:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; LabeledImage()&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum6" style="color: #606060"&gt;   6:&lt;/span&gt;         {&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum7" style="color: #606060"&gt;   7:&lt;/span&gt;             &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.DefaultStyleKey = &lt;span style="color: #0000ff"&gt;typeof&lt;/span&gt;(LabeledImage);&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum8" style="color: #606060"&gt;   8:&lt;/span&gt;         }&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum9" style="color: #606060"&gt;   9:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum10" style="color: #606060"&gt;  10:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;This maps to the generic.xaml definition of our control.  Let’s modify our &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.controls.controltemplate.aspx"&gt;ControlTemplate&lt;/a&gt; in generic.xaml to be a little more than just a border:&lt;/p&gt;&lt;div id="codeSnippetWrapper" style="cursor: text; font-size: 8pt; border-top: silver 1px solid; font-family: 'Courier New', courier, monospace; border-right: silver 1px solid; width: 97.5%; border-bottom: silver 1px solid; overflow: auto; padding-bottom: 4px; direction: ltr; text-align: left; padding-top: 4px; padding-left: 4px; margin: 20px 0px 10px; border-left: silver 1px solid; line-height: 12pt; padding-right: 4px; background-color: #f4f4f4"&gt;  &lt;div id="codeSnippet" style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum1" style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Style&lt;/span&gt; &lt;span style="color: #ff0000"&gt;TargetType&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="local:LabeledImage"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum2" style="color: #606060"&gt;   2:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Setter&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Property&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Template"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum3" style="color: #606060"&gt;   3:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Setter.Value&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum4" style="color: #606060"&gt;   4:&lt;/span&gt;             &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ControlTemplate&lt;/span&gt; &lt;span style="color: #ff0000"&gt;TargetType&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="local:LabeledImage"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum5" style="color: #606060"&gt;   5:&lt;/span&gt;                 &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Border&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Background&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="LightBlue"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;BorderBrush&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Black"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;BorderThickness&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="2"&lt;/span&gt; &lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum6" style="color: #606060"&gt;   6:&lt;/span&gt;                         &lt;span style="color: #ff0000"&gt;HorizontalAlignment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Center"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Width&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="140"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Height&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="150"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum7" style="color: #606060"&gt;   7:&lt;/span&gt;                     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;StackPanel&lt;/span&gt; &lt;span style="color: #ff0000"&gt;HorizontalAlignment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Center"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum8" style="color: #606060"&gt;   8:&lt;/span&gt;                         &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Image&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Stretch&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Uniform"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Width&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="100"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Height&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="100"&lt;/span&gt; &lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum9" style="color: #606060"&gt;   9:&lt;/span&gt;                                &lt;span style="color: #ff0000"&gt;Source&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="{TemplateBinding ImagePath}"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Margin&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="5"&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum10" style="color: #606060"&gt;  10:&lt;/span&gt;                         &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBlock&lt;/span&gt; &lt;span style="color: #ff0000"&gt;TextAlignment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Center"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;FontFamily&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Segoe UI"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;FontWeight&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Light"&lt;/span&gt; &lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum11" style="color: #606060"&gt;  11:&lt;/span&gt;                                    &lt;span style="color: #ff0000"&gt;FontSize&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="26.667"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Foreground&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Black"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="LabelHeader"&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum12" style="color: #606060"&gt;  12:&lt;/span&gt;                         &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBlock&lt;/span&gt; &lt;span style="color: #ff0000"&gt;TextAlignment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Center"&lt;/span&gt; &lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum13" style="color: #606060"&gt;  13:&lt;/span&gt;                                    &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="{TemplateBinding Label}"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;FontFamily&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Seqoe UI"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;FontWeight&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Light"&lt;/span&gt; &lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum14" style="color: #606060"&gt;  14:&lt;/span&gt;                                    &lt;span style="color: #ff0000"&gt;FontSize&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="26.667"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Foreground&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Black"&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum15" style="color: #606060"&gt;  15:&lt;/span&gt;                     &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;StackPanel&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum16" style="color: #606060"&gt;  16:&lt;/span&gt;                 &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Border&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum17" style="color: #606060"&gt;  17:&lt;/span&gt;             &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ControlTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum18" style="color: #606060"&gt;  18:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Setter.Value&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum19" style="color: #606060"&gt;  19:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Setter&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum20" style="color: #606060"&gt;  20:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Style&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;Now we have a place for an Image, LabelHeader and a Label.  Notice that we have {&lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/Hh758288.aspx"&gt;TemplatBinding&lt;/a&gt;} statements there.  This is how the template binds (duh) to values provided to the control.  So our ControlTemplate is expecting these properties to exist on our control.  We will create these as &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.dependencyproperty.aspx"&gt;DependencyProperty&lt;/a&gt; types so we can use them in Binding, change notification, etc.  In Visual Studio we can make re-use out of the ‘propdp’ code snippet that exists for WPF.  It is slightly different in the last argument, but it will definitely save you a lot of typing.  We’ll create 2 DependencyProperties like this in our LabeledImage.cs file:&lt;/p&gt;&lt;div id="codeSnippetWrapper" style="cursor: text; font-size: 8pt; border-top: silver 1px solid; font-family: 'Courier New', courier, monospace; border-right: silver 1px solid; width: 97.5%; border-bottom: silver 1px solid; overflow: auto; padding-bottom: 4px; direction: ltr; text-align: left; padding-top: 4px; padding-left: 4px; margin: 20px 0px 10px; border-left: silver 1px solid; line-height: 12pt; padding-right: 4px; background-color: #f4f4f4"&gt;  &lt;div id="codeSnippet" style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum1" style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; ImageSource ImagePath&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum2" style="color: #606060"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum3" style="color: #606060"&gt;   3:&lt;/span&gt;     get { &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; (ImageSource)GetValue(ImagePathProperty); }&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum4" style="color: #606060"&gt;   4:&lt;/span&gt;     set { SetValue(ImagePathProperty, &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;); }&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum5" style="color: #606060"&gt;   5:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum6" style="color: #606060"&gt;   6:&lt;/span&gt;  &lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum7" style="color: #606060"&gt;   7:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; &lt;span style="color: #0000ff"&gt;readonly&lt;/span&gt; DependencyProperty ImagePathProperty =&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum8" style="color: #606060"&gt;   8:&lt;/span&gt;     DependencyProperty.Register(&lt;span style="color: #006080"&gt;"ImagePath"&lt;/span&gt;, &lt;span style="color: #0000ff"&gt;typeof&lt;/span&gt;(ImageSource), &lt;span style="color: #0000ff"&gt;typeof&lt;/span&gt;(LabeledImage), &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; PropertyMetadata(&lt;span style="color: #0000ff"&gt;null&lt;/span&gt;));&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum9" style="color: #606060"&gt;   9:&lt;/span&gt;  &lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum10" style="color: #606060"&gt;  10:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; Label&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum11" style="color: #606060"&gt;  11:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum12" style="color: #606060"&gt;  12:&lt;/span&gt;     get { &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; (&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;)GetValue(LabelProperty); }&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum13" style="color: #606060"&gt;  13:&lt;/span&gt;     set { SetValue(LabelProperty, &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;); }&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum14" style="color: #606060"&gt;  14:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum15" style="color: #606060"&gt;  15:&lt;/span&gt;  &lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum16" style="color: #606060"&gt;  16:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;static&lt;/span&gt; &lt;span style="color: #0000ff"&gt;readonly&lt;/span&gt; DependencyProperty LabelProperty =&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum17" style="color: #606060"&gt;  17:&lt;/span&gt;     DependencyProperty.Register(&lt;span style="color: #006080"&gt;"Label"&lt;/span&gt;, &lt;span style="color: #0000ff"&gt;typeof&lt;/span&gt;(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;), &lt;span style="color: #0000ff"&gt;typeof&lt;/span&gt;(LabeledImage), &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; PropertyMetadata(&lt;span style="color: #0000ff"&gt;null&lt;/span&gt;));&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;We also had that LabelHeader property.  This is going to be a value coming from a string resource that may be localized at some point.  In our library add a folder called “en” and then within that, using the Add Item dialog in VS, add a Resources.resw file.  Within that Resources.resw file add a name/value pair of name=&lt;em&gt;LabelHeader.Text&lt;/em&gt; and value=&lt;em&gt;This is an image of a…&lt;/em&gt; and you can save/close the file.&lt;/p&gt;&lt;p&gt;Now back to our class file we are going to set the value of our TextBlock by overriding our template rendering, grabbing a reference to that TextBlock and setting the value from our string resource.&lt;/p&gt;&lt;div id="codeSnippetWrapper" style="cursor: text; font-size: 8pt; border-top: silver 1px solid; font-family: 'Courier New', courier, monospace; border-right: silver 1px solid; width: 97.5%; border-bottom: silver 1px solid; overflow: auto; padding-bottom: 4px; direction: ltr; text-align: left; padding-top: 4px; padding-left: 4px; margin: 20px 0px 10px; border-left: silver 1px solid; line-height: 12pt; padding-right: 4px; background-color: #f4f4f4"&gt;  &lt;div id="codeSnippet" style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum1" style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;protected&lt;/span&gt; &lt;span style="color: #0000ff"&gt;override&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; OnApplyTemplate()&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum2" style="color: #606060"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum3" style="color: #606060"&gt;   3:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;base&lt;/span&gt;.OnApplyTemplate();&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum4" style="color: #606060"&gt;   4:&lt;/span&gt;  &lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum5" style="color: #606060"&gt;   5:&lt;/span&gt;     TextBlock tb = GetTemplateChild(&lt;span style="color: #006080"&gt;"LabelHeader"&lt;/span&gt;) &lt;span style="color: #0000ff"&gt;as&lt;/span&gt; TextBlock;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum6" style="color: #606060"&gt;   6:&lt;/span&gt;     tb.Text = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; ResourceLoader(&lt;span style="color: #006080"&gt;"SimpleCustomControl/Resources/LabelHeader"&lt;/span&gt;).GetString(&lt;span style="color: #006080"&gt;"Text"&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum7" style="color: #606060"&gt;   7:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;Now, I’m showing this way, because it is pretty verbose and there is an easier way…but you wouldn’t know it is easier unless you saw the harder way right?&lt;/p&gt;&lt;p&gt;First it is important to understand how these resources are indexed.  You’ll notice that I’m using a &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.resources.resourceloader.aspx"&gt;ResourceLoader&lt;/a&gt; class to map to what looks like {component}/{resw-file-name}/{property} which is effectively right.  When you create a resw file, at compile-time these get built into a PRI file.  This post isn’t about this whole resource loading process, but you should definitely understand this a bit.  Basically for a control creator perspective you need to understand that your string resources (and file-based resources) live in a &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.resources.core.resourcemap.aspx"&gt;ResourceMap&lt;/a&gt; that is the name of your component.&lt;/p&gt;&lt;blockquote&gt;  &lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: An easy way to look at this resource indexing is to use the makepri.exe tool installed with VS.  From a VS command prompt navigate to your build output and you should see a resources.pri file.  Call makepri.exe dump and you’ll get an XML representation of that file you can look at.  Knowing that structure is very helpful.&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;I said there was an easier way to get that string though.  First remove the OnApplyTemplate override completely…we don’t need it for this control anymore.  Now in generic.xaml change the x:Name=”LabelHeader” to the following:&lt;/p&gt;&lt;div id="codeSnippetWrapper" style="cursor: text; font-size: 8pt; border-top: silver 1px solid; font-family: 'Courier New', courier, monospace; border-right: silver 1px solid; width: 97.5%; border-bottom: silver 1px solid; overflow: auto; padding-bottom: 4px; direction: ltr; text-align: left; padding-top: 4px; padding-left: 4px; margin: 20px 0px 10px; border-left: silver 1px solid; line-height: 12pt; padding-right: 4px; background-color: #f4f4f4"&gt;  &lt;div id="codeSnippet" style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum1" style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Style&lt;/span&gt; &lt;span style="color: #ff0000"&gt;TargetType&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="local:LabeledImage"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum2" style="color: #606060"&gt;   2:&lt;/span&gt; ...&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum3" style="color: #606060"&gt;   3:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBlock&lt;/span&gt; &lt;span style="color: #ff0000"&gt;TextAlignment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Center"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;FontFamily&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Segoe UI"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;FontWeight&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Light"&lt;/span&gt; &lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum4" style="color: #606060"&gt;   4:&lt;/span&gt;                &lt;span style="color: #ff0000"&gt;FontSize&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="26.667"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Foreground&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Black"&lt;/span&gt; &lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum5" style="color: #606060"&gt;   5:&lt;/span&gt;                 &lt;span style="color: #ff0000"&gt;x:Uid&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="/SimpleCustomControl/Resources/LabelHeader"&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum6" style="color: #606060"&gt;   6:&lt;/span&gt; ...&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum7" style="color: #606060"&gt;   7:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Style&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;This will use the XAML parser way of getting the string resource (note the ResourceMap is still in the x:Uid value).  Using the ResourceMap prefix is necessary when using this method as a custom control vendor.&lt;/p&gt;&lt;p&gt;We are done.  Our control is complete.&lt;/p&gt;&lt;h2&gt;Consuming the control from an application&lt;/h2&gt;&lt;p&gt;We can quickly test our control by adding a new Metro style app to our project.  Once we do this, make that the startup project and add a project reference to our control library.  Then in the default page for our app (BlankPage or MainPage depending on your template choice), add an xmlns to the top and then consume the control:&lt;/p&gt;&lt;div id="codeSnippetWrapper" style="cursor: text; font-size: 8pt; border-top: silver 1px solid; font-family: 'Courier New', courier, monospace; border-right: silver 1px solid; width: 97.5%; border-bottom: silver 1px solid; overflow: auto; padding-bottom: 4px; direction: ltr; text-align: left; padding-top: 4px; padding-left: 4px; margin: 20px 0px 10px; border-left: silver 1px solid; line-height: 12pt; padding-right: 4px; background-color: #f4f4f4"&gt;  &lt;div id="codeSnippet" style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum1" style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Page&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum2" style="color: #606060"&gt;   2:&lt;/span&gt;     &lt;span style="color: #ff0000"&gt;x:Class&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Application1.BlankPage"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum3" style="color: #606060"&gt;   3:&lt;/span&gt;     &lt;span style="color: #ff0000"&gt;xmlns&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="http://schemas.microsoft.com/winfx/2006/xaml/presentation"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum4" style="color: #606060"&gt;   4:&lt;/span&gt;     &lt;span style="color: #ff0000"&gt;xmlns:x&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="http://schemas.microsoft.com/winfx/2006/xaml"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum5" style="color: #606060"&gt;   5:&lt;/span&gt;     &lt;span style="color: #ff0000"&gt;xmlns:local&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="using:Application1"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum6" style="color: #606060"&gt;   6:&lt;/span&gt;     &lt;span style="color: #ff0000"&gt;xmlns:d&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="http://schemas.microsoft.com/expression/blend/2008"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum7" style="color: #606060"&gt;   7:&lt;/span&gt;     &lt;span style="color: #ff0000"&gt;xmlns:mc&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="http://schemas.openxmlformats.org/markup-compatibility/2006"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum8" style="color: #606060"&gt;   8:&lt;/span&gt;     &lt;span style="color: #ff0000"&gt;xmlns:controls&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="using:SimpleCustomControl"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum9" style="color: #606060"&gt;   9:&lt;/span&gt;     &lt;span style="color: #ff0000"&gt;mc:Ignorable&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="d"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum10" style="color: #606060"&gt;  10:&lt;/span&gt;  &lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum11" style="color: #606060"&gt;  11:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Background&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="{StaticResource ApplicationPageBackgroundBrush}"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum12" style="color: #606060"&gt;  12:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;controls:LabeledImage&lt;/span&gt; &lt;span style="color: #ff0000"&gt;ImagePath&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Assets/110Orange.png"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Label&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Orange"&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum13" style="color: #606060"&gt;  13:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum14" style="color: #606060"&gt;  14:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Page&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;See how the ImagePath and Label are used here?  In more advanced scenarios we can bind values from our view model or other ways.  When rendered the control will show like this:&lt;/p&gt;&lt;p&gt;&lt;img title="Custom control rendered" style="float: none; margin-left: auto; display: block; margin-right: auto" alt="Custom control rendered" src="http://storage2.timheuer.com/cc-rendered.png" /&gt;&lt;/p&gt;&lt;p&gt;This is great…but also what we call a “project-to-project” (P2P) reference.  As a control vendor we want to distribute our control, not our source primarily.  So we need to package this up.  There are two ways you can do this.&lt;/p&gt;&lt;h2&gt;Package your control as an Extension SDK&lt;/h2&gt;&lt;p&gt;One of the new methods for distributing Metro style controls in VS11 is via Extension SDKs, also sometimes referred to as non-Framework SDKs.  Extension SDKs are machine-wide and available to all projects once installed.  They can be distributed via the Visual Studio gallery and using the VSIX mechanism…which allows for update notification in Visual Studio.  There are a few intricacies that you can configure your Extension SDK but for most it will get down to three things:&lt;/p&gt;&lt;ul&gt;  &lt;li&gt;Describing your SDK and what it supports &lt;/li&gt;  &lt;li&gt;Including the binary that projects need to reference &lt;/li&gt;  &lt;li&gt;Including any assets/files that the control relies on to render &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;In examining our sample above we have a few things that map to this:&lt;/p&gt;&lt;ul&gt;  &lt;li&gt;Describing – our sample is a C# custom control so it will only work with managed Metro style apps, we will need to describe this in our SDK &lt;/li&gt;  &lt;li&gt;Binary – we have one binary: SimpleCustomControl.dll &lt;/li&gt;  &lt;li&gt;Redistributables – we have a generic.xaml and a PRI file with our string resources &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The last part (redist) probably is making some existing XAML control developers scratch their heads.  &lt;em&gt;Why isn’t the generic.xaml embedded &lt;/em&gt;is what you are likely asking yourself.  In Metro style apps, XAML assets are not embedded but rather exist as “loose file” assets for your control.  This is why it is critical for getting the distribution model correct so that the runtime knows where to get the definitions for everything.&lt;/p&gt;&lt;blockquote&gt;  &lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: This is a default method.  You can, of course, use other techniques to get your assets into your binary either via string constants, other embedding techniques, etc.  In doing so, however, you will now be managing all those extractions yourself rather than being able to rely on the resource APIs for Metro style apps.&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;The first thing we want to do is understand the structure of an SDK.  These live in %ProgramFiles%\Microsoft SDKs\Windows\v8.0\Extension SDKs directory on disk.  Within there you will have your own folder, version and then the layout of your SDK, as described by your manifest.  Here is what our manifest (SDKManifest.xml) would look like for our control:&lt;/p&gt;&lt;div id="codeSnippetWrapper" style="cursor: text; font-size: 8pt; border-top: silver 1px solid; font-family: 'Courier New', courier, monospace; border-right: silver 1px solid; width: 97.5%; border-bottom: silver 1px solid; overflow: auto; padding-bottom: 4px; direction: ltr; text-align: left; padding-top: 4px; padding-left: 4px; margin: 20px 0px 10px; border-left: silver 1px solid; line-height: 12pt; padding-right: 4px; background-color: #f4f4f4"&gt;  &lt;div id="codeSnippet" style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum1" style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="color: #800000"&gt;xml&lt;/span&gt; &lt;span style="color: #ff0000"&gt;version&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="1.0"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;encoding&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="utf-8"&lt;/span&gt; ?&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum2" style="color: #606060"&gt;   2:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;FileList&lt;/span&gt; &lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum3" style="color: #606060"&gt;   3:&lt;/span&gt;   &lt;span style="color: #ff0000"&gt;DisplayName&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Simple Custom Control"&lt;/span&gt; &lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum4" style="color: #606060"&gt;   4:&lt;/span&gt;   &lt;span style="color: #ff0000"&gt;ProductFamilyName&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Simple Controls"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum5" style="color: #606060"&gt;   5:&lt;/span&gt;   &lt;span style="color: #ff0000"&gt;MinVSVersion&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="11.0"&lt;/span&gt; &lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum6" style="color: #606060"&gt;   6:&lt;/span&gt;   &lt;span style="color: #ff0000"&gt;MinToolsVersion&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="4.0"&lt;/span&gt; &lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum7" style="color: #606060"&gt;   7:&lt;/span&gt;   &lt;span style="color: #ff0000"&gt;CopyRedistToSubDirectory&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="SimpleCustomControl"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum8" style="color: #606060"&gt;   8:&lt;/span&gt;   &lt;span style="color: #ff0000"&gt;AppliesTo&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="WindowsAppContainer+WindowsXAML+Managed"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum10" style="color: #606060"&gt;  10:&lt;/span&gt;   &lt;span style="color: #ff0000"&gt;MoreInfo&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="http://timheuer.com/blog/"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum11" style="color: #606060"&gt;  11:&lt;/span&gt;   &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;File&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Reference&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="SimpleCustomControl.dll"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum12" style="color: #606060"&gt;  12:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ContainsControls&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;True&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ContainsControls&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum13" style="color: #606060"&gt;  13:&lt;/span&gt;   &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;File&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum14" style="color: #606060"&gt;  14:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;FileList&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;We are describing the display information as well as some key data:&lt;/p&gt;&lt;ul&gt;  &lt;li&gt;Display data – the title that will show up in Add Reference &lt;/li&gt;  &lt;li&gt;CopyRedistToSubdirectory – this would be the name of your component &lt;/li&gt;  &lt;li&gt;AppliesTo – what I support; in this I’m saying managed, XAML, Metro style apps &lt;/li&gt;  &lt;li&gt;&amp;lt;File&amp;gt; – these are the files that describe components in my SDK (not their loose assets) &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Now to create the structure.  When you build the DLL your output will give you this:&lt;/p&gt;&lt;p&gt;&lt;img title="Build output" style="float: none; margin-left: auto; display: block; margin-right: auto" alt="Build output" src="http://storage2.timheuer.com/cc-buildoutput.png" /&gt;&lt;/p&gt;&lt;p&gt;We need to create the following structure that will live under the Extension SDK folder listed above:&lt;/p&gt;&lt;p&gt;%ProgramFiles%\Microsoft SDKs\Windows\v8.0\Extension SDKs\&lt;/p&gt;&lt;p&gt;--SimpleCustomControl&lt;/p&gt;&lt;p&gt;----1.0&lt;/p&gt;&lt;p&gt;------SDKManifest.xml (the file above)&lt;/p&gt;&lt;p&gt;------References\CommonConfiguration\neutral\SimpleCustomControl.dll&lt;/p&gt;&lt;p&gt;------Redist\CommonConfiguration\neutral\SimpleCustomControl.pri&lt;/p&gt;&lt;p&gt;------Redist\CommonConfiguration\neutral\Themes\generic.xaml&lt;/p&gt;&lt;p&gt;Notice the References and Redist folders.  By placing these in that structure, the project will know what it needs to get type information (References) and then during running/deployment what it needs to package (Redist) and where it puts it (CopyRedistToSubdirectory).  Put this layout in the directory and then when you choose add reference on a project you will see your option:&lt;/p&gt;&lt;p&gt;&lt;img title="Add reference dialog" style="float: none; margin-left: auto; display: block; margin-right: auto" alt="Add reference dialog" src="http://storage2.timheuer.com/cc-addref.png" /&gt;&lt;/p&gt;&lt;p&gt;There are other configuration options for the SDKManifest that you can use and the required reading is the Extension SDK section in this &lt;strong&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkID=235409"&gt;MSDN article: How to: Create a Software Development Kit&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;&lt;p&gt;The next step for an Extension SDK is to really package it up nicely.  You probably don’t want your users copy directories around all the time…and what about updates as well!  Using the Visual Studio VSIX structure for this really makes it easy to do.&lt;/p&gt;&lt;p&gt;There are tools for Visual Studio to allow you to create a VSIX package.  This requires the &lt;a href="http://www.microsoft.com/visualstudio/11/en-us/downloads#vs-sdk"&gt;Visual Studio extensibility SDK&lt;/a&gt; to be installed and using Visual Studio professional or higher.  Once you do that you can create a VSIX package and you will see the VSIX manifest designer.  On the Install Targets tab you will choose Extension SDK:&lt;/p&gt;&lt;p&gt;&lt;img title="VSIX Install Targets" style="float: none; margin-left: auto; display: block; margin-right: auto" alt="VSIX Install Targets" src="http://storage2.timheuer.com/cc-vsixtarget.png" /&gt;&lt;/p&gt;&lt;p&gt;We then re-create the layout structure in the VSIX project and add the Assets to the manifest.  The result in the IDE looks something like this:&lt;/p&gt;&lt;p&gt;&lt;img title="VSIX Manifest Assets" style="float: none; margin-left: auto; display: block; margin-right: auto" alt="VSIX Manifest Assets" src="http://storage2.timheuer.com/cc-vsixmanifest.png" /&gt;&lt;/p&gt;&lt;p&gt;Now when we build we will get a VSIX installer that we can upload to the Visual Studio Gallery or distribute to our customers.&lt;/p&gt;&lt;p&gt;NOTE: Uploading the to Visual Studio Gallery has benefits in that once installed, any update you put in the gallery will provide notifications to the Visual Studio user than an update exists.  This is done via the unique Product ID value in your manifest, so choose that value accordingly and don’t change it if you want this capability.&lt;/p&gt;&lt;p&gt;When a user gets the VSIX, they double-click it and see the installer:&lt;/p&gt;&lt;p&gt;&lt;img title="VSIX Installer" style="float: none; margin-left: auto; display: block; margin-right: auto" alt="VSIX Installer" src="http://storage2.timheuer.com/cc-vsixinstaller.png" /&gt;&lt;/p&gt;&lt;p&gt;And then they can use it as normally in Add Reference just like described above.  Additional details on other VSIX deployment configurations can be found here: &lt;strong&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ff363239.aspx"&gt;VSIX Deployment&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;&lt;p&gt;Once you have your VSIX you can upload to the Visual Studio Gallery and make it discoverable for users from within Visual Studio.  Remember that this method of Extension SDK is machine-wide which is in contrast to the second method described next.&lt;/p&gt;&lt;h2&gt;Package your control as a NuGet Package&lt;/h2&gt;&lt;p&gt;The other option you have is to package up your control via a &lt;a href="http://www.nuget.org"&gt;NuGet&lt;/a&gt; package.  NuGet packages apply to the &lt;strong&gt;project&lt;/strong&gt; and not the machine, but have the flexibility of not having to have anything installed and can travel their dependencies with the project.  NuGet packages are another type of package that has a manifest that describes what the content does.  &lt;/p&gt;&lt;p&gt;For Metro style XAML controls you will have to do a few things differently currently with the NuGet package you create.  NuGet packages are based on nuspec files, which is basically a manifest describing where to get/put things in the package.  You can also use the &lt;a href="http://docs.nuget.org/docs/creating-packages/creating-and-publishing-a-package"&gt;NuGet Package Explorer&lt;/a&gt; for a GUI way of reading/creating new packages.  If you are unfamiliar with the nuspec format, using the package explorer will help you get a package created quickly.  &lt;/p&gt;&lt;p&gt;NuGet is one area where there actually are current differences in C++ or managed code.  Right now NuGet only supports managed code projects and not C++.  I’m sure this may change in the future, but as of right now this applies only to managed code.  For our control above here is what my nuspec file looks like:&lt;/p&gt;&lt;div id="codeSnippetWrapper" style="cursor: text; font-size: 8pt; border-top: silver 1px solid; font-family: 'Courier New', courier, monospace; border-right: silver 1px solid; width: 97.5%; border-bottom: silver 1px solid; overflow: auto; padding-bottom: 4px; direction: ltr; text-align: left; padding-top: 4px; padding-left: 4px; margin: 20px 0px 10px; border-left: silver 1px solid; line-height: 12pt; padding-right: 4px; background-color: #f4f4f4"&gt;  &lt;div id="codeSnippet" style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum1" style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="color: #800000"&gt;xml&lt;/span&gt; &lt;span style="color: #ff0000"&gt;version&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="1.0"&lt;/span&gt;?&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum2" style="color: #606060"&gt;   2:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;package&lt;/span&gt; &lt;span style="color: #ff0000"&gt;xmlns&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum3" style="color: #606060"&gt;   3:&lt;/span&gt;   &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;metadata&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum4" style="color: #606060"&gt;   4:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;version&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;1.0.0&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;version&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum5" style="color: #606060"&gt;   5:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;authors&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;Tim Heuer&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;authors&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum6" style="color: #606060"&gt;   6:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;owners&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum7" style="color: #606060"&gt;   7:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;id&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;SimpleCustomControl&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;id&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum8" style="color: #606060"&gt;   8:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;title&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum9" style="color: #606060"&gt;   9:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;requireLicenseAcceptance&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;false&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;requireLicenseAcceptance&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum10" style="color: #606060"&gt;  10:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;description&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;A simple custom control for Metro style apps&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;description&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum11" style="color: #606060"&gt;  11:&lt;/span&gt;   &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;metadata&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum12" style="color: #606060"&gt;  12:&lt;/span&gt;   &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;files&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum13" style="color: #606060"&gt;  13:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;file&lt;/span&gt; &lt;span style="color: #ff0000"&gt;src&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="SimpleCustomControl\bin\Debug\Themes\Generic.xaml"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;target&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="lib\winrt\SimpleCustomControl\Themes\Generic.xaml"&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum14" style="color: #606060"&gt;  14:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;file&lt;/span&gt; &lt;span style="color: #ff0000"&gt;src&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="SimpleCustomControl\bin\Debug\SimpleCustomControl.dll"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;target&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="lib\winrt\SimpleCustomControl.dll"&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum15" style="color: #606060"&gt;  15:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;file&lt;/span&gt; &lt;span style="color: #ff0000"&gt;src&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="SimpleCustomControl\bin\Debug\SimpleCustomControl.pri"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;target&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="lib\winrt\SimpleCustomControl.pri"&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum16" style="color: #606060"&gt;  16:&lt;/span&gt;   &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;files&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum17" style="color: #606060"&gt;  17:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;package&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;This assumes that the binaries being referenced here are all relative to the nuspec file.  Notice how all the files go into the lib\winrt folder and that we essentially re-create that SDK layout in our package as well.&lt;/p&gt;&lt;p&gt;Now when I build this with nuget.exe I get a package output.  In Visual Studio (with NuGet installed) I can now right-click on a project and choose &lt;em&gt;Manage NuGet Packages &lt;/em&gt;and browse the library of packages.  In testing out my package, I create a custom library (you do this via the Settings option when you are in the Manage NuGet Packages dialog) and just point it to the folder where my nupkg file was created:&lt;/p&gt;&lt;p&gt;&lt;img title="Manage NuGet Packages dialog" style="float: none; margin-left: auto; display: block; margin-right: auto" alt="Manage NuGet Packages dialog" src="http://storage2.timheuer.com/cc-nugetmanage.png" /&gt;&lt;/p&gt;&lt;p&gt;When the package is selected, the reference is added to my project and during build, all the right pieces are put in my APPX package where they need to go.  Once the reference is there I build and run my project and the control renders as expected!&lt;/p&gt;&lt;h2&gt;What about the design-time experience?&lt;/h2&gt;&lt;p&gt;All of the methods above will allow you to view your control on the XAML design surface in Visual Studio as well.  In the Extension SDK method there is actually additional affordances for you to provide additional design-time assemblies/resources to make that experience even better.  Custom control developers for XAML know about this .Design.dll that is created for their projects that can improve the design-time experience for UI controls.  I highly encourage you to do that if you are creating a control that is for wide distribution and not just yourself or your small group of friends.&lt;/p&gt;&lt;h2&gt;Summary&lt;/h2&gt;&lt;p&gt;Wow this felt like a long post…thanks for reading this far!  I think developing custom controls is a great way to encapsulate specific UI and behavior you want in your application.  XAML has a great ecosystem of control vendors and I fully expect them to produce controls for Metro style apps as well.  Hopefully these techniques of packaging them up for distribution will help us all take advantage of them.&lt;/p&gt;&lt;p&gt;I also think that creating an Extension SDK *and* a NuGet package are the best ways of thinking about it as a producer.  This enables your consumers to have the greatest flexibility in how they want to consume your control.  Creating these distribution mechanisms may seem cumbersome at first (and there are some places where Visual Studio can improve the experience of creating/managing these manifests), but once you understand the core layout that is required for a Metro style XAML control and the fact that you now have “loose files” to consider it really becomes pretty streamlined and you can automate the creation of these pretty quickly in your build systems.&lt;/p&gt;&lt;p&gt;Be sure to check out these resources again:&lt;/p&gt;&lt;ul&gt;  &lt;li&gt;Windows SDK: &lt;strong&gt;&lt;a href="http://code.msdn.microsoft.com/windowsapps/XAML-user-and-custom-a8a9505e"&gt;XAML User and Custom Controls&lt;/a&gt;&lt;/strong&gt; (shows the C++ custom control as well)&lt;/li&gt;  &lt;li&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkID=235409"&gt;Creating a Software Development Kit&lt;/a&gt; (refer to Extension SDK section)&lt;/li&gt;  &lt;li&gt;&lt;a href="http://docs.nuget.org/docs/creating-packages/creating-and-publishing-a-package"&gt;NuGet Packages&lt;/a&gt;&lt;/li&gt;  &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ff363239.aspx"&gt;VSIX Deployment&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Here is the solution for the project I walked through above: &lt;a href="http://s3.amazonaws.com:80/storage2.timheuer.com/SimpleCustomControl.zip"&gt;SimpleCustomControl.zip&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Hope this helps!  &lt;/p&gt;&lt;div id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:a855f32c-534b-4b6e-9992-ebb0d4fa959f" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"&gt;&lt;span class="tags"&gt;tags: &lt;a href="http://timheuer.com/blog/Tags/xaml/default.aspx" rel="tag"&gt;xaml&lt;/a&gt;, &lt;a href="http://timheuer.com/blog/Tags/winrt/default.aspx" rel="tag"&gt;winrt&lt;/a&gt;, &lt;a href="http://timheuer.com/blog/Tags/nuget/default.aspx" rel="tag"&gt;nuget&lt;/a&gt;, &lt;a href="http://timheuer.com/blog/Tags/windows+8/default.aspx" rel="tag"&gt;windows 8&lt;/a&gt;, &lt;a href="http://timheuer.com/blog/Tags/controls/default.aspx" rel="tag"&gt;controls&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="wlWriterHeaderFooter" style="margin:0px; padding:0px 0px 0px 0px;"&gt;&lt;hr /&gt;&lt;div class="cc-license"&gt;This work is licensed under a &lt;a href="http://creativecommons.org/licenses/by/3.0/"&gt;Creative Commons Attribution By license.&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;img src="http://timheuer.com/blog/aggbug/14829.aspx" width="1" height="1" /&gt;&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/9pi3lPJCv5LM5xMsodde3Lc3ug8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/9pi3lPJCv5LM5xMsodde3Lc3ug8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/9pi3lPJCv5LM5xMsodde3Lc3ug8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/9pi3lPJCv5LM5xMsodde3Lc3ug8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/timheuer/~4/HjRqwDAP5L4" height="1" width="1"/&gt;</description>      <creator xmlns="http://purl.org/dc/elements/1.1/">Tim Heuer</creator>      <guid isPermaLink="false">http://timheuer.com/blog/archive/2012/03/07/creating-custom-controls-for-metro-style-apps.aspx</guid>      <pubDate>Wed, 07 Mar 2012 22:35:52 GMT</pubDate>      <comments>http://timheuer.com/blog/archive/2012/03/07/creating-custom-controls-for-metro-style-apps.aspx#feedback</comments>      <comments xmlns="http://purl.org/rss/1.0/modules/slash/">3</comments>      <commentRss xmlns="http://wellformedweb.org/CommentAPI/">http://timheuer.com/blog/comments/commentRss/14829.aspx</commentRss>      <ping xmlns="http://madskills.com/public/xml/rss/module/trackback/">http://timheuer.com/blog/services/trackbacks/14829.aspx</ping>      <origLink xmlns="http://rssnamespace.org/feedburner/ext/1.0">http://timheuer.com/blog/archive/2012/03/07/creating-custom-controls-for-metro-style-apps.aspx</origLink>    </item>    <item>      <title>Use Bing Maps in your Windows 8 XAML applications</title>      <category>devdays</category>      <category>developer</category>      <category>expression</category>      <category>tech stuff</category>      <category>ux</category>      <category>silverlight</category>      <category>windows</category>      <category>xaml</category>      <link>http://feeds.timheuer.com/~r/timheuer/~3/BLurzGbUlbU/bing-maps-for-winrt-xaml.aspx</link>      <description>&lt;p&gt;Today the Bing team announced the release of their WinRT Bing Maps control (BETA) for XAML applications.  First the goods:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Read their announcement here: &lt;a href="http://www.bing.com/community/site_blogs/b/maps/archive/2012/03/06/announcing-bing-maps-for-metro-style-apps.aspx"&gt;Bing Maps for Metro style apps&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;Download the bits: &lt;a href="http://go.microsoft.com/fwlink/?LinkId=242709"&gt;Bing Maps SDK for Metro style apps&lt;/a&gt; (VSIX)&lt;/li&gt;    &lt;li&gt;Read the reference API docs: &lt;a href="http://go.microsoft.com/fwlink/?LinkID=242866&amp;amp;clcid=0x409"&gt;Bing Maps SDK&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;If you are familiar with the &lt;a href="http://silverlight.net"&gt;Silverlight&lt;/a&gt; control, it is &lt;em&gt;similar&lt;/em&gt; in nature to how you would use it in your XAML Metro style app.  Here’s some helpful tips that are in the docs but just wanted to elevate them because we have a tendency not to read docs :-).&lt;/p&gt;  &lt;h2&gt;Installing&lt;/h2&gt;  &lt;p&gt;Installing is simple for Visual Studio.  Download the VSIX file and double-click it.  If you have both Express and Ultimate installed it will prompt you to install it for both installations.  That’s it…you are done.  If you had VS running while you did this, it would be a good idea to restart VS.&lt;/p&gt;  &lt;h2&gt;Creating a .NET XAML application with maps&lt;/h2&gt;  &lt;p&gt;Once you restart VS, you can create a new C# Metro style application.  Once you have this, just right click on the project and choose Add Reference and then navigate to the Windows\Extensions section and you will see Bing Maps:&lt;/p&gt;  &lt;p&gt;&lt;img style="display: block; float: none; margin-left: auto; margin-right: auto" title="Bing Maps Reference" alt="Bing Maps Reference" src="http://storage2.timheuer.com/bingmapref.png" /&gt;&lt;/p&gt;  &lt;p&gt;When you do this you will also want to add a reference to the VCLibs Extension at this time.  Why?  Well, the Map control is a native control.  Adding the VCLibs dependency at this time will add the necessary information in your app’s package manifest noting the dependency and it will install any required package dependencies from the store when your user’s install it.&lt;/p&gt;  &lt;p&gt;If you compile your application immediately you will notice an exception during build:&lt;/p&gt;  &lt;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: 'Courier New', 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"&gt;   &lt;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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;     &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; 1&amp;gt;------ Build started: Project: Application17, Configuration: Debug Any CPU ------&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt; 1&amp;gt;C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1667,5): error MSB3774: Could not find SDK &lt;span style="color: #006080"&gt;"Microsoft.VCLibs, Version=11.0"&lt;/span&gt;.&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt; 1&amp;gt;C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1667,5): error MSB3778: &lt;span style="color: #006080"&gt;"APPX"&lt;/span&gt; attributes were found &lt;span style="color: #0000ff"&gt;in&lt;/span&gt; the SDK manifest file however none of the attributes matched the targeted configuration and architecture and no &lt;span style="color: #006080"&gt;"APPX"&lt;/span&gt; attribute without configuration and architecture could be found. If an appx is required then the project will fail at runtime.&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt;   4:&lt;/span&gt; ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;This is because by default the managed applications are “AnyCPU” configuration and the native control doesn’t have that configuration.  Change your app to be either x86 or amd64 and your build will succeed.  This means that yes, you will want to create multiple architecture-specific packages for your app.  The good thing is during package creation, the tools in Visual Studio make this easy for you.&lt;/p&gt;&lt;h2&gt;Creating a C++ XAML application with maps&lt;/h2&gt;&lt;p&gt;For C++ the step is to just reference the Bing Maps extension SDK and you are done.  C++ projects are always architecture-specific so you don’t have the AnyCPU situation here.&lt;/p&gt;&lt;h2&gt;Using the Map control&lt;/h2&gt;&lt;p&gt;You’ll need to get set up with an API key, which the &lt;a href="http://msdn.microsoft.com/en-us/library/hh846498.aspx"&gt;getting started&lt;/a&gt; docs inform you about.  Once you have that you are ready to use the control.  I’m a fan of putting the API key in my App.xaml as a resource:&lt;/p&gt;&lt;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: 'Courier New', 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"&gt;  &lt;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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Application.Resources&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ResourceDictionary&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ResourceDictionary.MergedDictionaries&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt;   4:&lt;/span&gt;             &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ResourceDictionary&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Source&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Common/StandardStyles.xaml"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt;   5:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ResourceDictionary.MergedDictionaries&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt;   6:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;x:String&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Key&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="BingMapsApiKey"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;YOUR KEY HERE&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;x:String&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt;   7:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ResourceDictionary&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum8"&gt;   8:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Application.Resources&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;And then in my Map control I can just refer to it:&lt;/p&gt;&lt;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: 'Courier New', 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"&gt;  &lt;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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Page&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt;     &lt;span style="color: #ff0000"&gt;x:Class&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Application17.BlankPage"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt;     &lt;span style="color: #ff0000"&gt;xmlns&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="http://schemas.microsoft.com/winfx/2006/xaml/presentation"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt;   4:&lt;/span&gt;     &lt;span style="color: #ff0000"&gt;xmlns:x&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="http://schemas.microsoft.com/winfx/2006/xaml"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt;   5:&lt;/span&gt;     &lt;span style="color: #ff0000"&gt;xmlns:local&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="using:Application17"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt;   6:&lt;/span&gt;     &lt;span style="color: #ff0000"&gt;xmlns:d&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="http://schemas.microsoft.com/expression/blend/2008"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt;   7:&lt;/span&gt;     &lt;span style="color: #ff0000"&gt;xmlns:mc&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="http://schemas.openxmlformats.org/markup-compatibility/2006"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum8"&gt;   8:&lt;/span&gt;     &lt;span style="color: #ff0000"&gt;xmlns:bing&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="using:Bing.Maps"&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum9"&gt;   9:&lt;/span&gt;     &lt;span style="color: #ff0000"&gt;mc:Ignorable&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="d"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum10"&gt;  10:&lt;/span&gt;  &lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum11"&gt;  11:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Background&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="{StaticResource ApplicationPageBackgroundBrush}"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum12"&gt;  12:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;bing:Map&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="MyMap"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Width&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="640"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Height&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="480"&lt;/span&gt; &lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum13"&gt;  13:&lt;/span&gt;             &lt;span style="color: #ff0000"&gt;Credentials&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="{StaticResource BingMapsApiKey}"&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum14"&gt;  14:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum15"&gt;  15:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Page&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;Once I have those pieces in place, I’m done and can run my app and get full map interactivity.  Notice the xmlns declaration in my Page with the “using:Bing.Maps” notation.  Now when I run:&lt;/p&gt;&lt;p&gt;&lt;img style="display: block; float: none; margin-left: auto; margin-right: auto" title="Bing Maps" alt="Bing Maps" src="http://storage2.timheuer.com/bingmaprunning.png" /&gt;&lt;/p&gt;&lt;p&gt;I can quickly add location to my app by setting the capability in the Package.appxmanifest and then wiring up the map to center on my current location…&lt;/p&gt;&lt;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: 'Courier New', 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"&gt;  &lt;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: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; async &lt;span style="color: #0000ff"&gt;protected&lt;/span&gt; &lt;span style="color: #0000ff"&gt;override&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; OnNavigatedTo(NavigationEventArgs e)&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt;     Geolocator geo = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Geolocator();&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt;   4:&lt;/span&gt;     geo.DesiredAccuracy = PositionAccuracy.Default;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt;   5:&lt;/span&gt;     var currentPosition = await geo.GetGeopositionAsync();&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt;   6:&lt;/span&gt;  &lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt;   7:&lt;/span&gt;     Location loc = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Location() { Latitude = currentPosition.Coordinate.Latitude, &lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum8"&gt;   8:&lt;/span&gt;         Longitude = currentPosition.Coordinate.Longitude };&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum9"&gt;   9:&lt;/span&gt;  &lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum10"&gt;  10:&lt;/span&gt;     MyMap.SetView(&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum11"&gt;  11:&lt;/span&gt;         loc, &lt;span style="color: #008000"&gt;// location&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum12"&gt;  12:&lt;/span&gt;         13, &lt;span style="color: #008000"&gt;// zoom level&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum13"&gt;  13:&lt;/span&gt;         &lt;span style="color: #0000ff"&gt;true&lt;/span&gt;); &lt;span style="color: #008000"&gt;//show animations)&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum14"&gt;  14:&lt;/span&gt;  &lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum15"&gt;  15:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;I’m excited about what the Bing team has done here and you should go grab it, read the docs and start incorporating location visualization into your Metro style XAML apps today!&lt;/p&gt;&lt;p&gt;Hope this helps!  &lt;/p&gt;&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:f62597b0-dd41-4073-8288-ebe28938bcff" class="wlWriterEditableSmartContent"&gt;&lt;span class="tags"&gt;tags: &lt;a href="http://timheuer.com/blog/Tags/windows+8/default.aspx" rel="tag"&gt;windows 8&lt;/a&gt;, &lt;a href="http://timheuer.com/blog/Tags/bing/default.aspx" rel="tag"&gt;bing&lt;/a&gt;, &lt;a href="http://timheuer.com/blog/Tags/bing+maps/default.aspx" rel="tag"&gt;bing maps&lt;/a&gt;, &lt;a href="http://timheuer.com/blog/Tags/winrt/default.aspx" rel="tag"&gt;winrt&lt;/a&gt;, &lt;a href="http://timheuer.com/blog/Tags/xaml/default.aspx" rel="tag"&gt;xaml&lt;/a&gt;, &lt;a href="http://timheuer.com/blog/Tags/geolocation/default.aspx" rel="tag"&gt;geolocation&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="wlWriterHeaderFooter" style="margin:0px; padding:0px 0px 0px 0px;"&gt;&lt;hr /&gt;&lt;div class="cc-license"&gt;This work is licensed under a &lt;a href="http://creativecommons.org/licenses/by/3.0/"&gt;Creative Commons Attribution By license.&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;img src="http://timheuer.com/blog/aggbug/14828.aspx" width="1" height="1" /&gt;&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/dqaY7OVlM9nsTU0QjuRZgtUydfk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/dqaY7OVlM9nsTU0QjuRZgtUydfk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/dqaY7OVlM9nsTU0QjuRZgtUydfk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/dqaY7OVlM9nsTU0QjuRZgtUydfk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/timheuer/~4/BLurzGbUlbU" height="1" width="1"/&gt;</description>      <creator xmlns="http://purl.org/dc/elements/1.1/">Tim Heuer</creator>      <guid isPermaLink="false">http://timheuer.com/blog/archive/2012/03/06/bing-maps-for-winrt-xaml.aspx</guid>      <pubDate>Tue, 06 Mar 2012 20:04:32 GMT</pubDate>      <comments>http://timheuer.com/blog/archive/2012/03/06/bing-maps-for-winrt-xaml.aspx#feedback</comments>      <comments xmlns="http://purl.org/rss/1.0/modules/slash/">4</comments>      <commentRss xmlns="http://wellformedweb.org/CommentAPI/">http://timheuer.com/blog/comments/commentRss/14828.aspx</commentRss>      <ping xmlns="http://madskills.com/public/xml/rss/module/trackback/">http://timheuer.com/blog/services/trackbacks/14828.aspx</ping>      <origLink xmlns="http://rssnamespace.org/feedburner/ext/1.0">http://timheuer.com/blog/archive/2012/03/06/bing-maps-for-winrt-xaml.aspx</origLink>    </item>    <item>      <title>Building a good app settings experience in XAML</title>      <category>blogging</category>      <category>devdays</category>      <category>developer</category>      <category>expression</category>      <category>silverlight</category>      <category>tech stuff</category>      <category>ux</category>      <category>windows</category>      <category>xaml</category>      <link>http://feeds.timheuer.com/~r/timheuer/~3/b2lnSX2Ta0o/creating-custom-settings-pane-xaml-windows-8.aspx</link>      <description>&lt;p&gt;So you’ve started to kick the tires of the &lt;a href="http://preview.windows.com"&gt;Windows 8 Consumer Preview&lt;/a&gt; and now you are building an app.  You’ve read all the &lt;a href="http://design.windows.com"&gt;UX design guidelines&lt;/a&gt; and started looking at some great apps on the store.   Perhaps you’ve also viewed the &lt;a href="http://msdn.microsoft.com/windows"&gt;online documentation and some samples&lt;/a&gt;?  And you’ve likely read about the contract implementations and other charms items like custom settings.  &lt;/p&gt;  &lt;h2&gt;What is Settings?&lt;/h2&gt;  &lt;p&gt;When I refer to Settings here I’m referring to that consistent experience in Metro style apps when the user invokes the charms bar and chooses settings.  By default &lt;strong&gt;every&lt;/strong&gt; application will respond to that Settings charm.  If you do nothing you will get the default experience that you may have seen:&lt;/p&gt;  &lt;p&gt;&lt;img title="Default Settings experience" style="float: none; margin-left: auto; display: block; margin-right: auto" alt="Default Settings experience" src="http://storage2.timheuer.com/win8-settings-default.png" /&gt;&lt;/p&gt;  &lt;p&gt;The text items underneath your app title are referred to as commands.  Each application will always get the &lt;em&gt;Permissions&lt;/em&gt; command.  When the user clicks this they will get some “about” information on your app (name, version, publisher) as well as the permissions the app has requested.  As an app developer, you have to do nothing to get this experience.  In addition to that the Settings pane shows some OS-level options like volume, Wi-Fi, brightness, etc. that the user can manipulate.  But you, my fellow app developer, can also implement custom settings options in your app.&lt;/p&gt;  &lt;h2&gt;The custom SettingsCommand&lt;/h2&gt;  &lt;p&gt;The first thing you have to do to customize your experience is implement a custom &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.applicationsettings.settingscommand.aspx#Y0"&gt;SettingsCommand&lt;/a&gt;.  These are implemented by first listening to when the &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.applicationsettings.settingspane.aspx"&gt;SettingsPane&lt;/a&gt; will request if there are any additional commands for the current view.  Settings can be global if you have something like a “master” page setup in your XAML application, but &lt;strong&gt;can also&lt;/strong&gt; be specific to a currently viewed XAML page.  It is not an either/or but a both.  I’ll leave the exercise up to you and your app on when you need which (or both).&lt;/p&gt;  &lt;p&gt;First thing you have to do is listen for the event.  You would likely do this in your XAML view’s constructor:&lt;/p&gt;  &lt;div id="codeSnippetWrapper" style="cursor: text; font-size: 8pt; border-top: silver 1px solid; font-family: 'Courier New', courier, monospace; border-right: silver 1px solid; width: 97.5%; border-bottom: silver 1px solid; overflow: auto; padding-bottom: 4px; direction: ltr; text-align: left; padding-top: 4px; padding-left: 4px; margin: 20px 0px 10px; border-left: silver 1px solid; line-height: 12pt; padding-right: 4px; background-color: #f4f4f4"&gt;   &lt;div id="codeSnippet" style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;     &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum1" style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; BlankPage()&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum2" style="color: #606060"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum3" style="color: #606060"&gt;   3:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.InitializeComponent();&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum4" style="color: #606060"&gt;   4:&lt;/span&gt;  &lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum5" style="color: #606060"&gt;   5:&lt;/span&gt;     _windowBounds = Window.Current.Bounds;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum6" style="color: #606060"&gt;   6:&lt;/span&gt;  &lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum7" style="color: #606060"&gt;   7:&lt;/span&gt;     Window.Current.SizeChanged += OnWindowSizeChanged;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum8" style="color: #606060"&gt;   8:&lt;/span&gt;  &lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum9" style="color: #606060"&gt;   9:&lt;/span&gt;     SettingsPane.GetForCurrentView().CommandsRequested += BlankPage_CommandsRequested;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum10" style="color: #606060"&gt;  10:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;Notice the &lt;em&gt;SettingsPane.GetForCurrentView().&lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.applicationsettings.settingspane.commandsrequested.aspx"&gt;CommandsRequested&lt;/a&gt;&lt;/em&gt; event handler that I am using.  This will get triggered whenever the user invokes the Settings charm while on this view.  It is your opportunity to add more commands to that experience.  In your method for this you would create your new SettingsCommand and add them to the &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.applicationsettings.settingspanecommandsrequest.applicationcommands.aspx"&gt;ApplicationCommands&lt;/a&gt;:&lt;/p&gt;&lt;div id="codeSnippetWrapper" style="cursor: text; font-size: 8pt; border-top: silver 1px solid; font-family: 'Courier New', courier, monospace; border-right: silver 1px solid; width: 97.5%; border-bottom: silver 1px solid; overflow: auto; padding-bottom: 4px; direction: ltr; text-align: left; padding-top: 4px; padding-left: 4px; margin: 20px 0px 10px; border-left: silver 1px solid; line-height: 12pt; padding-right: 4px; background-color: #f4f4f4"&gt;  &lt;div id="codeSnippet" style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum1" style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; BlankPage_CommandsRequested(SettingsPane sender, SettingsPaneCommandsRequestedEventArgs args)&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum2" style="color: #606060"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum3" style="color: #606060"&gt;   3:&lt;/span&gt;     ResourceLoader rl = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; ResourceLoader();&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum4" style="color: #606060"&gt;   4:&lt;/span&gt;  &lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum5" style="color: #606060"&gt;   5:&lt;/span&gt;     SettingsCommand cmd = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; SettingsCommand(&lt;span style="color: #006080"&gt;"sample"&lt;/span&gt;, &lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum6" style="color: #606060"&gt;   6:&lt;/span&gt;         rl.GetString(&lt;span style="color: #006080"&gt;"SoundOptionCommandText"&lt;/span&gt;), (x) =&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum7" style="color: #606060"&gt;   7:&lt;/span&gt;         {&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum8" style="color: #606060"&gt;   8:&lt;/span&gt;             &lt;span style="color: #008000"&gt;// more in a minute&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum9" style="color: #606060"&gt;   9:&lt;/span&gt;         });&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum10" style="color: #606060"&gt;  10:&lt;/span&gt;  &lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum11" style="color: #606060"&gt;  11:&lt;/span&gt;     args.Request.ApplicationCommands.Add(cmd);&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum12" style="color: #606060"&gt;  12:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;You are able to add the text-based commands to the SettingsPane at this time.  The second argument I provided above will be the text that will display as the menu.  Notice how here I’m using &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.resources.resourceloader.aspx"&gt;ResourceLoader&lt;/a&gt; to get the string value for the text to be displayed.  This is a best practice to ensure you give your user’s the best experience.  Even though you may not localize now, setting this up in the beginning makes it way easier to just drop in localized strings and not have to change code.  The “SoundOptionCommandText” exists as a key/value pair in a file in my project located at en/Resources.resw.&lt;/p&gt;&lt;p&gt;Now that I have this enabled and my CommandsRequested wired up, when I invoke the charm while my app is running you see my new command:&lt;/p&gt;&lt;p&gt;&lt;img title="Custom SettingsCommand" style="float: none; margin-left: auto; display: block; margin-right: auto" alt="Custom SettingsCommand" src="http://storage2.timheuer.com/win8-settings-custom-1.png" /&gt;&lt;/p&gt;&lt;p&gt;Yippee!  Your custom commands will show before the Permissions one.  The next step is to actually add something valuable to the user when they click on this new command…and that means some UI.&lt;/p&gt;&lt;h2&gt;The custom Settings UI&lt;/h2&gt;&lt;p&gt;When your user clicks your new shiny command you want them to see some shiny, but relevant UI.  If you were using HTML/JS you would use the &lt;a href="http://msdn.microsoft.com/library/windows/apps/Hh701253"&gt;WinJS.UI.SettingsFlyout&lt;/a&gt; control to do a lot of this for you.  There is a &lt;a href="http://code.msdn.microsoft.com/windowsapps/App-settings-sample-1f762f49"&gt;sample of this for comparison located in the Windows 8 developer samples&lt;/a&gt;.  In XAML there isn’t the literal ‘SettingsFlyout’ control equivalent, but a set of primitives for you to create the experience.  There are a few pieces you will need in place.&lt;/p&gt;&lt;p&gt;First I create a few member variable helpers to store some items away:&lt;/p&gt;&lt;ul&gt;  &lt;li&gt;_windowBounds – this is the Rect of the current Window size.  I will need this for proper placement &lt;/li&gt;  &lt;li&gt;_settingsWidth – The UX guidelines suggest either a 346 or 646 wide settings flyout &lt;/li&gt;  &lt;li&gt;_settingsPopup – the Popup that will actually host my settings UI &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.controls.primitives.popup.aspx"&gt;Popup&lt;/a&gt; is the important piece here.  It is the primitive that provides us with the “light dismiss” behavior that you see a lot in the Windows 8 experience.  This is where you have a menu/dialog and you simply tap away and it dismisses.  &lt;em&gt;Popup.IsLightDismissEnabled&lt;/em&gt; gives us that functionality in our control that we will need in XAML.  Now let us go back to where we created our custom SettingsCommand and add back in the creation of our Popup and custom UI:&lt;/p&gt;&lt;div id="codeSnippetWrapper" style="cursor: text; font-size: 8pt; border-top: silver 1px solid; font-family: 'Courier New', courier, monospace; border-right: silver 1px solid; width: 97.5%; border-bottom: silver 1px solid; overflow: auto; padding-bottom: 4px; direction: ltr; text-align: left; padding-top: 4px; padding-left: 4px; margin: 20px 0px 10px; border-left: silver 1px solid; line-height: 12pt; padding-right: 4px; background-color: #f4f4f4"&gt;  &lt;div id="codeSnippet" style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum1" style="color: #606060"&gt;   1:&lt;/span&gt; SettingsCommand cmd = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; SettingsCommand(&lt;span style="color: #006080"&gt;"sample"&lt;/span&gt;, rl.GetString(&lt;span style="color: #006080"&gt;"SoundOptionCommandText"&lt;/span&gt;), (x) =&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum2" style="color: #606060"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum3" style="color: #606060"&gt;   3:&lt;/span&gt;     _settingsPopup = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Popup();&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum4" style="color: #606060"&gt;   4:&lt;/span&gt;     _settingsPopup.Closed += OnPopupClosed;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum5" style="color: #606060"&gt;   5:&lt;/span&gt;     Window.Current.Activated += OnWindowActivated;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum6" style="color: #606060"&gt;   6:&lt;/span&gt;     _settingsPopup.IsLightDismissEnabled = &lt;span style="color: #0000ff"&gt;true&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum7" style="color: #606060"&gt;   7:&lt;/span&gt;     _settingsPopup.Width = _settingsWidth;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum8" style="color: #606060"&gt;   8:&lt;/span&gt;     _settingsPopup.Height = _windowBounds.Height;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum9" style="color: #606060"&gt;   9:&lt;/span&gt;  &lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum10" style="color: #606060"&gt;  10:&lt;/span&gt;     &lt;span style="color: #008000"&gt;// more to come still&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum11" style="color: #606060"&gt;  11:&lt;/span&gt; });&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;Notice that we are creating the Popup, setting the width to the value specified in _settingsWidth and the height to whatever the current height of the active Window is at this time.  We are also listening to the Activated event on the Window to ensure that when our Window may be de-activated for something that a user may not have done via touch/mouse interaction (i.e., some other charm invocation, snapping an app, etc.) that we dismiss the Popup correctly.  here is the OnWindowActivated method definition:&lt;/p&gt;&lt;div id="codeSnippetWrapper" style="cursor: text; font-size: 8pt; border-top: silver 1px solid; font-family: 'Courier New', courier, monospace; border-right: silver 1px solid; width: 97.5%; border-bottom: silver 1px solid; overflow: auto; padding-bottom: 4px; direction: ltr; text-align: left; padding-top: 4px; padding-left: 4px; margin: 20px 0px 10px; border-left: silver 1px solid; line-height: 12pt; padding-right: 4px; background-color: #f4f4f4"&gt;  &lt;div id="codeSnippet" style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum1" style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; OnWindowActivated(&lt;span style="color: #0000ff"&gt;object&lt;/span&gt; sender, Windows.UI.Core.WindowActivatedEventArgs e)&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum2" style="color: #606060"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum3" style="color: #606060"&gt;   3:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (e.WindowActivationState == Windows.UI.Core.CoreWindowActivationState.Deactivated)&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum4" style="color: #606060"&gt;   4:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum5" style="color: #606060"&gt;   5:&lt;/span&gt;         _settingsPopup.IsOpen = &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum6" style="color: #606060"&gt;   6:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum7" style="color: #606060"&gt;   7:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum8" style="color: #606060"&gt;   8:&lt;/span&gt;  &lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum9" style="color: #606060"&gt;   9:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; OnPopupClosed(&lt;span style="color: #0000ff"&gt;object&lt;/span&gt; sender, &lt;span style="color: #0000ff"&gt;object&lt;/span&gt; e)&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum10" style="color: #606060"&gt;  10:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum11" style="color: #606060"&gt;  11:&lt;/span&gt;     Window.Current.Activated -= OnWindowActivated;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum12" style="color: #606060"&gt;  12:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;Notice we are also listening for the Popup.Closed event.  This is so that we can remove the OnWindowActivated method to avoid any reference leaks lying around.  Great, now let’s put some UI into our Popup.&lt;/p&gt;&lt;p&gt;For my example here I’m using a UserControl that I created to exhibit my settings needs.  Your use may vary and you may just need some simple things.  As we know in XAML there is more than one way to implement it in this flexible framework and this is just an example.  Going back to our custom SettingsCommand we now create an instance of my UserControl and set it as the Child of the Popup, setting appropriate Width/Height values as well:&lt;/p&gt;&lt;div id="codeSnippetWrapper" style="cursor: text; font-size: 8pt; border-top: silver 1px solid; font-family: 'Courier New', courier, monospace; border-right: silver 1px solid; width: 97.5%; border-bottom: silver 1px solid; overflow: auto; padding-bottom: 4px; direction: ltr; text-align: left; padding-top: 4px; padding-left: 4px; margin: 20px 0px 10px; border-left: silver 1px solid; line-height: 12pt; padding-right: 4px; background-color: #f4f4f4"&gt;  &lt;div id="codeSnippet" style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum1" style="color: #606060"&gt;   1:&lt;/span&gt; SettingsCommand cmd = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; SettingsCommand(&lt;span style="color: #006080"&gt;"sample"&lt;/span&gt;, rl.GetString(&lt;span style="color: #006080"&gt;"SoundOptionCommandText"&lt;/span&gt;), (x) =&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum2" style="color: #606060"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum3" style="color: #606060"&gt;   3:&lt;/span&gt;     _settingsPopup = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Popup();&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum4" style="color: #606060"&gt;   4:&lt;/span&gt;     _settingsPopup.Closed += OnPopupClosed;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum5" style="color: #606060"&gt;   5:&lt;/span&gt;     Window.Current.Activated += OnWindowActivated;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum6" style="color: #606060"&gt;   6:&lt;/span&gt;     _settingsPopup.IsLightDismissEnabled = &lt;span style="color: #0000ff"&gt;true&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum7" style="color: #606060"&gt;   7:&lt;/span&gt;     _settingsPopup.Width = _settingsWidth;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum8" style="color: #606060"&gt;   8:&lt;/span&gt;     _settingsPopup.Height = _windowBounds.Height;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum9" style="color: #606060"&gt;   9:&lt;/span&gt;  &lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum10" style="color: #606060"&gt;  10:&lt;/span&gt;     SimpleSettingsNarrow mypane = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; SimpleSettingsNarrow();&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum11" style="color: #606060"&gt;  11:&lt;/span&gt;     mypane.Width = _settingsWidth;                    &lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum12" style="color: #606060"&gt;  12:&lt;/span&gt;     mypane.Height = _windowBounds.Height;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum13" style="color: #606060"&gt;  13:&lt;/span&gt;  &lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum14" style="color: #606060"&gt;  14:&lt;/span&gt;     _settingsPopup.Child = mypane;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum15" style="color: #606060"&gt;  15:&lt;/span&gt;     _settingsPopup.SetValue(Canvas.LeftProperty, _windowBounds.Width - _settingsWidth);&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum16" style="color: #606060"&gt;  16:&lt;/span&gt;     _settingsPopup.SetValue(Canvas.TopProperty, 0);&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum17" style="color: #606060"&gt;  17:&lt;/span&gt;     _settingsPopup.IsOpen = &lt;span style="color: #0000ff"&gt;true&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum18" style="color: #606060"&gt;  18:&lt;/span&gt; });&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;Now when the user clicks the “Sound Options” they will see my custom UI:&lt;/p&gt;&lt;p&gt;&lt;img title="Custom Settings UI" style="float: none; margin-left: auto; display: block; margin-right: auto" alt="Custom Settings UI" src="http://storage2.timheuer.com/win8-settings-custom-2.png" /&gt;&lt;/p&gt;&lt;p&gt;And if the user taps/clicks away from the dialog then it automatically dismisses itself.  You now have the fundamentals on how to create your custom UI for settings.&lt;/p&gt;&lt;h2&gt;Some guiding principles&lt;/h2&gt;&lt;p&gt;While this is simple to implement, there are some key guiding principles that make this key for your user’s experience.  First and foremost, this should be a consistent and predictable experience for your users.  Don’t get crazy with your implementation and stay within the UX design guidelines to ensure your app gives the user confidence when using it.  Additionally, here are some of my other tips.&lt;/p&gt;&lt;p&gt;&lt;em&gt;Header Elements&lt;/em&gt;&lt;/p&gt;&lt;p&gt;You’ll notice above that the header of the custom UI is specific and contains a few elements.  The title should be clear (and again be ideally localized) in what the settings is doing.  The background color would match your app’s branding and likely be the same as the value of BackgroundColor in your app’s package manifest.  Putting your logo (use the same image you use for your SmallLogo setting in your package manifest) helps re-enforce this is the setting only for this app and not for the system.  Additionally providing a “back” button so the user can navigate back to the root SettingsPane and not have to invoke the charm again if they wanted to change other app settings.  In my example, the button simply just calls the SettingsPane APIs again to show it:&lt;/p&gt;&lt;div id="codeSnippetWrapper" style="cursor: text; font-size: 8pt; border-top: silver 1px solid; font-family: 'Courier New', courier, monospace; border-right: silver 1px solid; width: 97.5%; border-bottom: silver 1px solid; overflow: auto; padding-bottom: 4px; direction: ltr; text-align: left; padding-top: 4px; padding-left: 4px; margin: 20px 0px 10px; border-left: silver 1px solid; line-height: 12pt; padding-right: 4px; background-color: #f4f4f4"&gt;  &lt;div id="codeSnippet" style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum1" style="color: #606060"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; MySettingsBackClicked(&lt;span style="color: #0000ff"&gt;object&lt;/span&gt; sender, RoutedEventArgs e)&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum2" style="color: #606060"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum3" style="color: #606060"&gt;   3:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (&lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.Parent.GetType() == &lt;span style="color: #0000ff"&gt;typeof&lt;/span&gt;(Popup))&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum4" style="color: #606060"&gt;   4:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum5" style="color: #606060"&gt;   5:&lt;/span&gt;         ((Popup)&lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.Parent).IsOpen = &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum6" style="color: #606060"&gt;   6:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum7" style="color: #606060"&gt;   7:&lt;/span&gt;     SettingsPane.Show();&lt;/pre&gt;&lt;!--CRLF--&gt;    &lt;pre style="border-top-style: none; font-size: 8pt; font-family: 'Courier New', courier, monospace; width: 100%; border-bottom-style: none; color: black; overflow: visible; padding-bottom: 0px; direction: ltr; text-align: left; padding-top: 0px; border-right-style: none; padding-left: 0px; margin: 0em; border-left-style: none; line-height: 12pt; padding-right: 0px; background-color: #f4f4f4"&gt;&lt;span id="lnum8" style="color: #606060"&gt;   8:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;You may be curious to see the XAML used for my custom UI and I’ve included that in the download at the end here as not to take up viewing area here on the key areas.&lt;/p&gt;&lt;p&gt;&lt;em&gt;Immediate Action&lt;/em&gt;&lt;/p&gt;&lt;p&gt;Unlike some modal dialog experiences, the Settings experience should create immediate change to your application.  Don’t put confirmation/save/cancel buttons in your UI but rather have the changes take effect immediately.  For instance in my sound example, if the user invokes the Settings charm, clicks/taps on my Sound Options and toggles the Sound Effects option on/off, then the sound should immediately turn on/off.  Now implementing this philosophy may change the way you create your custom UI and/or UserControl, but take that into account when designing.&lt;/p&gt;&lt;p&gt;&lt;em&gt;Light Dismiss&lt;/em&gt;&lt;/p&gt;&lt;p&gt;This concept of light dismiss is about honoring the user’s action and not requiring interruption.  This is why we use the Popup.IsLightDismissEnabled option as we get this capability for free.  By using this if the user taps away to another part of the application or Window, then the Popup simply dismisses.  Don’t hang confirmation dialogs in there to block the user from doing what they want, but rather honor the context change for them.&lt;/p&gt;&lt;h2&gt;Summary&lt;/h2&gt;&lt;p&gt;The Windows platform has afforded us developers a lot of great APIs to create very predictable and consistent user experiences for the common things our apps will need.  Settings is one of those simple, yet effective places to create confidence in your application and a consistent Windows experience for your users.  Stick to the principles:&lt;/p&gt;&lt;ul&gt;  &lt;li&gt;Set up custom commands that make sense for the context of the view and/or for the app as a whole &lt;/li&gt;  &lt;li&gt;Create and show your UI according to the UX design guidelines &lt;/li&gt;  &lt;li&gt;Have your settings immediately affect the application &lt;/li&gt;  &lt;li&gt;Ensure that you use the dismiss model &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Combine all these and you will be set.  Everything I talk about above is supported in XAML and WinRT.  My example is in C# because I’m most proficient in that language.  But this 100% equally applies in C++ as well and should be identical in practice.&lt;/p&gt;&lt;p&gt;You may be saying to yourself &lt;em&gt;wouldn’t this make a great custom control?&lt;/em&gt;  Ah, stay tuned and &lt;a href="http://feeds.timheuer.com/timheuer"&gt;subscribe here&lt;/a&gt; :-)!&lt;/p&gt;&lt;p&gt;Hope this helps!&lt;/p&gt;&lt;p&gt;Download Sample: &lt;a href="http://s3.amazonaws.com:80/storage2.timheuer.com/SettingsExample.zip"&gt;SettingsExample.zip&lt;/a&gt; &lt;/p&gt;&lt;div id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:38ce04ab-2e4c-4da1-bdc2-b1e5ffec5b8b" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px"&gt;&lt;span class="tags"&gt;tags: &lt;a href="http://timheuer.com/blog/Tags/windows+8/default.aspx" rel="tag"&gt;windows 8&lt;/a&gt;, &lt;a href="http://timheuer.com/blog/Tags/xaml/default.aspx" rel="tag"&gt;xaml&lt;/a&gt;, &lt;a href="http://timheuer.com/blog/Tags/winrt/default.aspx" rel="tag"&gt;winrt&lt;/a&gt;, &lt;a href="http://timheuer.com/blog/Tags/settings/default.aspx" rel="tag"&gt;settings&lt;/a&gt;, &lt;a href="http://timheuer.com/blog/Tags/appbar/default.aspx" rel="tag"&gt;appbar&lt;/a&gt;, &lt;a href="http://timheuer.com/blog/Tags/winjs/default.aspx" rel="tag"&gt;winjs&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="wlWriterHeaderFooter" style="margin:0px; padding:0px 0px 0px 0px;"&gt;&lt;hr /&gt;&lt;div class="cc-license"&gt;This work is licensed under a &lt;a href="http://creativecommons.org/licenses/by/3.0/"&gt;Creative Commons Attribution By license.&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;img src="http://timheuer.com/blog/aggbug/14827.aspx" width="1" height="1" /&gt;&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/lkIw6_MVBNOsqXK6u0S8Au9lbWM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/lkIw6_MVBNOsqXK6u0S8Au9lbWM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/lkIw6_MVBNOsqXK6u0S8Au9lbWM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/lkIw6_MVBNOsqXK6u0S8Au9lbWM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/timheuer/~4/b2lnSX2Ta0o" height="1" width="1"/&gt;</description>      <creator xmlns="http://purl.org/dc/elements/1.1/">Tim Heuer</creator>      <guid isPermaLink="false">http://timheuer.com/blog/archive/2012/03/06/creating-custom-settings-pane-xaml-windows-8.aspx</guid>      <pubDate>Tue, 06 Mar 2012 15:48:50 GMT</pubDate>      <comments>http://timheuer.com/blog/archive/2012/03/06/creating-custom-settings-pane-xaml-windows-8.aspx#feedback</comments>      <comments xmlns="http://purl.org/rss/1.0/modules/slash/">13</comments>      <commentRss xmlns="http://wellformedweb.org/CommentAPI/">http://timheuer.com/blog/comments/commentRss/14827.aspx</commentRss>      <ping xmlns="http://madskills.com/public/xml/rss/module/trackback/">http://timheuer.com/blog/services/trackbacks/14827.aspx</ping>      <origLink xmlns="http://rssnamespace.org/feedburner/ext/1.0">http://timheuer.com/blog/archive/2012/03/06/creating-custom-settings-pane-xaml-windows-8.aspx</origLink>    </item>    <item>      <title>Known issues with RIA Services V1 SP2 on Visual Studio 11 Beta</title>      <link>http://blogs.msdn.com/b/silverlightws/archive/2012/03/05/known-issues-with-ria-services-v1-sp2-on-visual-studio-11-beta.aspx</link>      <pubDate>Tue, 06 Mar 2012 00:46:55 GMT</pubDate>      <guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10278073</guid>      <creator xmlns="http://purl.org/dc/elements/1.1/">Yavor Georgiev - MSFT</creator>      <comments xmlns="http://purl.org/rss/1.0/modules/slash/">0</comments>      <wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/silverlightws/rsscomments.aspx?WeblogPostID=10278073</wfw:commentRss>      <wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/silverlightws/commentapi.aspx?WeblogPostID=10278073</wfw:comment>      <comments>http://blogs.msdn.com/b/silverlightws/archive/2012/03/05/known-issues-with-ria-services-v1-sp2-on-visual-studio-11-beta.aspx#comments</comments>      <description>&lt;p&gt;RIA Services V1 SP2 works great with With Visual Studio 11 Beta. There are a few small issues to be aware of, check out my post here: &lt;a href="http://hashtagfail.com/post/18631640309/ria-sp2-vs11-beta"&gt;http://hashtagfail.com/post/18631640309/ria-sp2-vs11-beta&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10278073" width="1" height="1"&gt;</description>      <category domain="http://blogs.msdn.com/b/silverlightws/archive/tags/ria+services/">ria services</category>    </item>    <item>      <title>CSS3 Background Gradients</title>      <link>http://feeds.johnpapa.net/~r/JohnPapa/~3/vgBhVsk8tjE/css3-background-gradients</link>      <description>&lt;p align="justify"&gt;CSS3 background gradients can add jut the right amount of pop to a web page when used properly, but its important to know how they work differently in the major browsers.&lt;/p&gt; &lt;p align="justify"&gt;This month in my Papa’s Perspective column in Visual Studio Magazine I discuss CSS3 background gradients and show some tips on how to use them across Chrome, Safari, Firefox and IE. It’s a quick article that will help get you jump started and coding with them in just a few minutes. You can check out my article on &lt;a href="http://visualstudiomagazine.com/articles/2012/03/01/5-minute-tour-of-css3-background-gradients.aspx"&gt;CSS3 background gradients here&lt;/a&gt;.&lt;/p&gt;&lt;div class="feedflare"&gt;&lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=vgBhVsk8tjE:Atz9-nG25l4:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?i=vgBhVsk8tjE:Atz9-nG25l4:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=vgBhVsk8tjE:Atz9-nG25l4:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?i=vgBhVsk8tjE:Atz9-nG25l4:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=vgBhVsk8tjE:Atz9-nG25l4:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=vgBhVsk8tjE:Atz9-nG25l4:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JohnPapa/~4/vgBhVsk8tjE" height="1" width="1"/&gt;</description>      <pubDate>Mon, 05 Mar 2012 18:38:10 GMT</pubDate>      <guid isPermaLink="false">http://johnpapa.net:80/css3-background-gradients</guid>      <origLink xmlns="http://rssnamespace.org/feedburner/ext/1.0">http://johnpapa.net:80/css3-background-gradients</origLink>    </item>    <item>      <title>SilverlightShow Interview with Tim Huckaby - Keynote Speaker at Visual Studio Live! Las Vegas 5-day Conference</title>      <description>&lt;p&gt;&lt;strong&gt;In this SilverlightShow interview, we talk with &lt;a href="http://ads.silverlightshow.net/a.aspx?ZoneID=71&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=2211" target="_blank"&gt;&lt;img alt="" src="http://ads.silverlightshow.net/a.aspx?ZoneID=71&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=2211" width="0" height="0" style="border-width: 0px;border-style: solid;" /&gt;Tim Huckaby&lt;/a&gt; &amp;ndash; keynote speaker on the 3&lt;sup&gt;rd&lt;/sup&gt; day of &lt;a href="http://ads.silverlightshow.net/a.aspx?ZoneID=55&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=47104" target="_blank"&gt; &lt;img alt="" src="http://ads.silverlightshow.net/a.aspx?ZoneID=55&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=47104" width="0" height="0" style="border-width: 0px;border-style: solid;" /&gt;Visual Studio Live! Las Vegas&lt;/a&gt; conference (March 26-30, 2012). The keynote will be focused on &lt;/strong&gt;&lt;a href="http://ads.silverlightshow.net/a.aspx?ZoneID=72&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=86367" target="_blank"&gt;&lt;img alt="" src="http://ads.silverlightshow.net/a.aspx?ZoneID=72&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=86367" width="0" height="0" style="border-width: 0px;border-style: solid;" /&gt;&lt;strong&gt;The Future of User Experience: The Natural User Interface (NUI)&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;.     &lt;br /&gt;As we have announced, SilverlightShow is the &lt;/strong&gt;&lt;a href="http://vslive.com/events/las-vegas-2012/information/sponsors.aspx"&gt;&lt;strong&gt;Social Media Premiere Partner&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt; for this conference and we are &lt;/strong&gt;&lt;a href="http://www.silverlightshow.net/community/contest_vslive.aspx"&gt;&lt;strong&gt;sending one SilverlightShow member to this conference for free&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;.&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/SilverlightShow/tim_h_2.jpg"&gt;&lt;img style="border-style: initial; border-color: initial; border-image: initial; background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; float: left; margin-right: 10px; border-color: initial;        border-width: 0px;border-style: solid;" title="tim_h" alt="tim_h" src="http://www.silverlightshow.net/Storage/Users/SilverlightShow/tim_h_thumb.jpg" /&gt;&lt;/a&gt;About Tim:&lt;/em&gt;&lt;/strong&gt;&lt;em&gt; &lt;/em&gt;&lt;em&gt;Tim Huckaby is focused on the Natural User Interface (NUI)- Touch, Gesture, and Neural in Rich Client Technologies like HTML5, Silverlight, WPF, &amp;amp; IOS on a broad spectrum of devices that include computers, tablets, the Surface, the Kinect, and mobile devices. &lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;Tim has been called a &amp;ldquo;Pioneer of the Smart Client Revolution&amp;rdquo; by the press. Tim has been awarded many times for the highest rated technical presentations and keynotes for Microsoft and many other technology conferences around the world. Tim is consistently rated in the top 10% of all speakers at these events. Having worked for or with Microsoft for over 20 years, Tim has been on stage with, and done numerous keynote demos for many Microsoft executives including Bill Gates and Steve Ballmer. &lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;Tim founded InterKnowlogy, experts in .NET and Microsoft Platforms in 1999 and Actus Interactive Software in 2011 and has over 30 years of experience including serving on a Microsoft product team as a development lead on an architecture team on a Server Product. Tim is a Microsoft Regional Director, a Microsoft MVP and serves on many Microsoft councils and boards like the Microsoft .NET Partner Advisory Council. &lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;SilverlightShow: &lt;/strong&gt;Hi Tim! Your upcoming keynote at Visual Studio Live!Las Vegas is one of the most awaited ones, according to the conference organizers. What aspect or direction of development of Natural User Experience (NUI) is currently important for developers, what&amp;rsquo;s bringing them to your keynote?&lt;/p&gt;&lt;p&gt;&lt;strong&gt;TH: &lt;/strong&gt;Well, thanks for the kind words. Clearly the conference organizers are friends of mine. I really am looking forward to doing this keynote for numerous reasons. Firstly, because I will strive to make the message clear: You may not be doing natural user interfaces in your software solutions now, but you will be. It&amp;rsquo;s just a matter of time. I reinforce that with demos of some of the most compelling NUI software out there. And then I will speculate about the future of NUI with more compelling use cases. I bring it back to reality by going through the past 30 years of user interfaces. I was there when the mouse came out. I remember thinking how unnatural is was to take my right hand off the keyboard and grab the mouse. Now we consider that second nature. I will argue that in a timely manner we&amp;rsquo;ll say the same thing about waving at software&amp;hellip;using simple gestures to manipulate the interface. &lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style="text-align: center;"&gt;&lt;a href="http://ads.silverlightshow.net/a.aspx?ZoneID=58&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=28122" target="_blank"&gt;&lt;img alt="" src="http://ads.silverlightshow.net/a.aspx?ZoneID=58&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=28122" width="468" height="60" style="border-width: 0px;border-style: solid;" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;SilverlightShow:&lt;/strong&gt; What are the main difficulties developers have when building NUI in their applications, and how will the technology evolve to allow easier creation and integration of such interfaces?&lt;/p&gt;&lt;p&gt;&lt;strong&gt;TH: &lt;/strong&gt;Great question. I find it so interesting that the challenges of NUI software are not as much technical as they are of usability. Let&amp;rsquo;s face it. CRUD applications are simply not a good use case for NUI. Nothing that I know of can produce text as quickly as a keyboard. So finding the right use cases for touching, or gesturing or voice controlled software is the real challenge. It&amp;rsquo;s also very interesting to me that Microsoft has pretty much dominated and paved the way for multi-touch support in .NET for years. Yet, it wasn&amp;rsquo;t until that magically expensive Apple device to make multi-touch a mainstream way to use software. Now with the Kinect for Windows SDK shipping we have an extremely powerful and compelling dev stack for NUI based applications.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;SilverlightShow:&lt;/strong&gt; NUI is already available in Win8, mobile platforms, Kinect and others. On which platforms do you think it will have the biggest potential to evolve, to become a standard, and push related innovations?&lt;/p&gt;&lt;p&gt;&lt;strong&gt;TH: &lt;/strong&gt;Let&amp;rsquo;s add Windows 7 in all forms, and the Microsoft Surface to your list. And then we can say on the Microsoft and IOS platforms we will have multi-touch covered end to end. What I tell developers is that from here on in you are going to get multi-touch capability in the hardware whether you want it or not. So, now is the time to start leveraging it. Kinect clearly is an awesome differentiator on the Microsoft side. But, what is most exciting to me, and is really not well known, is that the HTML5 spec calls for multi-touch capability and programmatic access. In that respect the Multi-touch part of NUI truly can be called a standard. &lt;/p&gt;&lt;p&gt;&lt;strong&gt;SilverlightShow: &lt;/strong&gt;Can you name 1 or 2 applications that are best using NUI at this current moment, and why?&lt;/p&gt;&lt;p&gt;&lt;strong&gt;TH: &lt;/strong&gt;Well, let&amp;rsquo;s be clear. I&amp;rsquo;m a Kinect fanatic. I have not seen anything so powerful and cool from Microsoft in years. So, that being said, the work we do in health care and life sciences is truly futuristic cool because of the complexity, the 3d, and the gesture and voice controlled interfaces with Kinect. I&amp;rsquo;ll be demoing a good number of these apps in my keynote. On the other side of the spectrum of Kinect is simple gesture based interfaces to control an interactive kiosk. In many environments, especially in a public place you do not want to touch anything. So a simple wave of the right hand from right to left is a very legitimate use case for next. An important part of my professional life right now is interactive kiosk and active digital signage solutions, and with Actus Interactive software we plan to rock that world. In fact, we already are.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;SilverlightShow:&lt;/strong&gt; How do you see the future of NUI? In which areas of life should we also expect to see NUIs very soon?&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;TH: &lt;/strong&gt;In the keynote I will talk about the future. And I will show off some of the innovative work that is being done now for the future of NUI. It&amp;rsquo;s high tech stuff: it&amp;rsquo;s holodeck like software and it&amp;rsquo;s neural interfaces to software. Imagine a world where you think at software to use it. it&amp;rsquo;s not so far in the future. And Microsoft research is already doing proofs of concepts in totally virtual environments. Crazy exciting stuff.&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;SilverlightShow: &lt;/strong&gt;How and where may conference attendees meet you during the conference?&lt;/p&gt;&lt;p&gt;&lt;strong&gt;TH: &lt;/strong&gt;I just love talking to technologists&amp;hellip; not just developers, but everyone involved in the computing lifecycle. So, it is absolutely my pleasure to hang out and talk to as many VSLive attendees as possible.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Thanks Tim for this interview! Wish you, as well as our free pass winner a great conference event!&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;Do you know about applications that give an outstanding example of successful use of Natural User Interfaces? Share it with us by commenting below this interview! &lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;</description>      <link>http://www.silverlightshow.net/items/SilverlightShow-Interview-with-Tim-Huckaby-Keynote-Speaker-at-Visual-Studio-Live-Las-Vegas-5-day-Conference.aspx</link>      <author>editorial@silverlightshow.net (Silverlight Show )</author>      <comments>http://www.silverlightshow.net/items/SilverlightShow-Interview-with-Tim-Huckaby-Keynote-Speaker-at-Visual-Studio-Live-Las-Vegas-5-day-Conference.aspx#comments</comments>      <guid isPermaLink="true">http://www.silverlightshow.net/items/SilverlightShow-Interview-with-Tim-Huckaby-Keynote-Speaker-at-Visual-Studio-Live-Las-Vegas-5-day-Conference.aspx</guid>      <pubDate>Mon, 05 Mar 2012 14:27:00 GMT</pubDate>    </item>    <item>      <title>KnockoutJS's Built-in Bindings</title>      <link>http://feeds.johnpapa.net/~r/JohnPapa/~3/MUx6d_VH1Dg/knockoutjs-s-built-in-bindings</link>      <description>&lt;p align="justify"&gt;Bindings are the glue between the data values in the source (JavaScript objects) and the presentation in the target (the DOM). I continue to explore the KnockoutJS JavaScript library by examining &lt;a href="http://jpapa.me/clientIn1203"&gt;Knockout’s various built in bindings in this month’s Client Insight column&lt;/a&gt; in MSDN Magazine, that just hit the shelves. &lt;/p&gt; &lt;p align="justify"&gt;&lt;pre class="csharpcode"&gt;&amp;lt;htmltag     data-bind=&lt;span class="str"&gt;"built-in-binding:vm-property1,         another-built-in-binding:vm-property2"&lt;/span&gt;&amp;gt;&amp;lt;/htmltag&amp;gt;&lt;/pre&gt;&lt;p&gt;&lt;style type="text/css"&gt;.csharpcode, .csharpcode pre{	font-size: small;	color: black;	font-family: consolas, "Courier New", courier, monospace;	background-color: #ffffff;	/*white-space: pre;*/}.csharpcode pre { margin: 0em; }.csharpcode .rem { color: #008000; }.csharpcode .kwrd { color: #0000ff; }.csharpcode .str { color: #006080; }.csharpcode .op { color: #0000c0; }.csharpcode .preproc { color: #cc6633; }.csharpcode .asp { background-color: #ffff00; }.csharpcode .html { color: #800000; }.csharpcode .attr { color: #ff0000; }.csharpcode .alt {	background-color: #f4f4f4;	width: 100%;	margin: 0em;}.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;/p&gt;&lt;p align="justify"&gt;If you are not familiar with Knockout, you may want to first read the &lt;a href="http://jpapa.me/clientIn1202"&gt;overview article on Knockout in last months’ Client Insight column&lt;/a&gt; here first.&lt;/p&gt;&lt;p align="justify"&gt;&lt;/p&gt;&lt;p align="justify"&gt;&lt;a href="http://johnpapa.net/Media/Default/Windows-Live-Writer/KnockoutJSs-Built-in-Bindings_90A8/image_4.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 4px 4px 4px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://johnpapa.net/Media/Default/Windows-Live-Writer/KnockoutJSs-Built-in-Bindings_90A8/image_thumb_1.png" width="260" height="58"&gt;&lt;/a&gt;&lt;/p&gt;&lt;p align="justify"&gt;Knockout is ideal for building single page web apps (SPA’s) and works great with the MVVM pattern with JavaScript and HTML. If you are interested in learning Knockout from end to end, you can check out my Pluralsight course &lt;a href="http://jpapa.me/komvvm"&gt;Building HTML5 and JavaScript Apps with MVVM and Knockout&lt;/a&gt;, which contains over 40 examples you can download with your Pluralsight subscription. &lt;/p&gt;&lt;p align="justify"&gt;And if you like it, please be sure to&amp;nbsp; share it.&lt;/p&gt;&lt;p align="justify"&gt;&lt;a href="http://jpapa.me/komvvm"&gt;&lt;img style="display: block; float: none; margin-left: auto; margin-right: auto" alt="image" src="http://johnpapa.net/Media/Default/Windows-Live-Writer/KnockoutJS-MVVM_12D51/image_12.png"&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="feedflare"&gt;&lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=MUx6d_VH1Dg:gI5pg8f2j4s:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?i=MUx6d_VH1Dg:gI5pg8f2j4s:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=MUx6d_VH1Dg:gI5pg8f2j4s:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?i=MUx6d_VH1Dg:gI5pg8f2j4s:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=MUx6d_VH1Dg:gI5pg8f2j4s:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=MUx6d_VH1Dg:gI5pg8f2j4s:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JohnPapa/~4/MUx6d_VH1Dg" height="1" width="1"/&gt;</description>      <pubDate>Fri, 02 Mar 2012 15:40:55 GMT</pubDate>      <guid isPermaLink="false">http://johnpapa.net:80/knockoutjs-s-built-in-bindings</guid>      <origLink xmlns="http://rssnamespace.org/feedburner/ext/1.0">http://johnpapa.net:80/knockoutjs-s-built-in-bindings</origLink>    </item>    <item>      <title>Physamajig is a First Apps Contest Winner!</title>      <description>&lt;P&gt;&lt;A href="http://www.andybeaulieu.com/Home/tabid/67/EntryID/223/Default.aspx"&gt;Physamajig&lt;/A&gt; was selected as one of the Winning entries of the &lt;A href="https://buildwindowscontest.com/"&gt;Windows 8 First Apps Contest&lt;/A&gt;! Microsoft unveiled the 8 Winners today in Barcelona while unveiling the Consumer Preview of Windows 8. &lt;/P&gt;&lt;P&gt;[&lt;A href="http://blogs.msdn.com/b/windowsstore/archive/2012/02/29/introducing-the-winners-of-the-first-apps-contest.aspx#physamajig"&gt;read the Windows Store blog post&lt;/A&gt;]&lt;/P&gt;&lt;P&gt;[&lt;A href="http://www.youtube.com/watch?v=JvePvx7uPGI"&gt;see the video about the contest winners&lt;/A&gt;]&lt;/P&gt;&lt;P&gt;[&lt;A href="https://buildwindowscontest.com/"&gt;the contest site also has a nice summary&lt;/A&gt;]&lt;/P&gt;&lt;P&gt;If you've downloaded the Consumer Preview, you can find Physamajig in the Store under the Entertainment Category:&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://www.andybeaulieu.com/images/physamajigstore.png"&gt;&lt;/P&gt;&lt;P&gt;I'll be continuing to add some goodies to Physamajig, and here is a little sneak peek of something in the next version: &lt;STRONG&gt;Textures&lt;/STRONG&gt;! I really like how these textures make your creations seem more toy-like!&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://www.andybeaulieu.com/images/texturePhysamajig.jpg" width=700&gt;&lt;/P&gt;</description>      <link>http://www.andybeaulieu.com/Home/tabid/67/EntryID/224/Default.aspx</link>      <author>andy@andybeaulieu.com</author>      <comments>http://www.andybeaulieu.com/Home/tabid/67/EntryID/224/Default.aspx#Comments</comments>      <guid isPermaLink="true">http://www.andybeaulieu.com/Default.aspx?tabid=67&amp;EntryID=224</guid>      <pubDate>Wed, 29 Feb 2012 21:02:00 GMT</pubDate>      <comments xmlns="http://purl.org/rss/1.0/modules/slash/">3</comments>      <ping xmlns="http://madskills.com/public/xml/rss/module/trackback/">http://www.andybeaulieu.com/DesktopModules/Blog/Trackback.aspx?id=224</ping>    </item>    <item>      <title>Windows Phone SDK 7.1.1 Update CTP</title>      <link>http://blogs.msdn.com/b/silverlight_sdk/archive/2012/02/29/windows-phone-sdk-7-1-1-update-ctp.aspx</link>      <pubDate>Wed, 29 Feb 2012 17:25:00 GMT</pubDate>      <guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10274634</guid>      <creator xmlns="http://purl.org/dc/elements/1.1/">Cheryl Simmons - MSFT</creator>      <comments xmlns="http://purl.org/rss/1.0/modules/slash/">0</comments>      <wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/silverlight_sdk/rsscomments.aspx?WeblogPostID=10274634</wfw:commentRss>      <comments>http://blogs.msdn.com/b/silverlight_sdk/archive/2012/02/29/windows-phone-sdk-7-1-1-update-ctp.aspx#comments</comments>      <description>&lt;p&gt;&lt;span style="font-size: small;"&gt;We recently released an update to the &lt;a href="http://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;amp;id=28962"&gt;Windows Phone SDK&lt;/a&gt; that provides extra tools and features for developing for 256-MB devices. Most importantly, this tools update contains a new 256-MB emulator to test your applications. Keep in mind&amp;nbsp; however, that this release does not include the necessary license to publish your apps to the Marketplace, so you should use it to test your apps for now and plan on publishing them after the final release of this update. You can expect the final release to be happening soon.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: small;"&gt;We've also updated the docs to help you develop for 256-MB devices. You will find a new icon&amp;nbsp;&amp;nbsp; &lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-84-20/2642.Icon_5F00_MultiDevice.png"&gt;&lt;img border="0" alt="" src="http://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-84-20/2642.Icon_5F00_MultiDevice.png" width="18" height="15" /&gt;&lt;/a&gt;&amp;nbsp; in relevant places to call&amp;nbsp; to call out considerations for developing for 256-MB devices. If you want to dig into the docs,&amp;nbsp;a&lt;/span&gt;&lt;span style="font-size: small;"&gt; good place to start is the overview topic, &lt;a href="http://msdn.microsoft.com/en-us/library/hh855081(v=vs.92).aspx"&gt;Developing for 256-MB Devices&lt;/a&gt;. If you are developing with the XNA Framework, you can check out&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: small;"&gt;a new topic on &lt;a href="http://msdn.microsoft.com/en-us/library/hh855082(v=vs.92).aspx"&gt;reducing memory use in XNA games&lt;/a&gt;. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: small;"&gt;Making sure your applications run well on 256-MB devices will provide you with the greatest market reach for your apps, so check out the tools and docs today!&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10274634" width="1" height="1"&gt;</description>    </item>    <item>      <title>SilverlightShow Interview with Billy Hollis - Presenter in a Visual Studio Live! Las Vegas Workshop</title>      <description>&lt;table width="20"&gt;    &lt;tbody&gt;        &lt;tr&gt;            &lt;td&gt;            &lt;div class="fb-like" data-show-faces="true" data-send="false" data-href="http://www.silverlightshow.net/items/SilverlightShow-Interview-with-Billy-Hollis-Presenter-in-a-Visual-Studio-Live-Las-Vegas-Workshop.aspx" data-font="segoe ui" data-layout="button_count"&gt;&lt;/div&gt;            &lt;/td&gt;            &lt;td&gt;&lt;a href="https://twitter.com/share" class="twitter-share-button" data-via="silverlightshow" data-counturl="http://www.silverlightshow.net/items/SilverlightShow-Interview-with-Billy-Hollis-Presenter-in-a-Visual-Studio-Live-Las-Vegas-Workshop.aspx" data-count="horizontal" data-text="Interview with @BillyHollis - Presenter in a @VSLive Las Vegas Workshop" data-url="http://slshow.net/y7ZHob"&gt;Tweet&lt;/a&gt;&lt;/td&gt;            &lt;td&gt;&lt;g:plusone size="medium" href="http://www.silverlightshow.net/items/SilverlightShow-Interview-with-Billy-Hollis-Presenter-in-a-Visual-Studio-Live-Las-Vegas-Workshop.aspx"&gt;&lt;/g:plusone&gt;            &lt;/td&gt;            &lt;td&gt;            &lt;/td&gt;        &lt;/tr&gt;    &lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;&lt;strong&gt;In this SilverlightShow interview, we talk with &lt;a href="http://ads.silverlightshow.net/a.aspx?ZoneID=70&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=52138" target="_blank"&gt;&lt;img alt="" src="http://ads.silverlightshow.net/a.aspx?ZoneID=70&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=52138" width="0" height="0" style="border-width: 0px;border-style: solid;" /&gt;Billy Hollis&lt;/a&gt;&amp;nbsp;&amp;ndash; the presenter at the most-awaited workshop at &lt;a href="http://ads.silverlightshow.net/a.aspx?ZoneID=55&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=47104" target="_blank"&gt; &lt;img alt="" src="http://ads.silverlightshow.net/a.aspx?ZoneID=55&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=47104" width="0" height="0" style="border-width: 0px;border-style: solid;" /&gt;Visual Studio Live! Las Vegas&lt;/a&gt; conference (March 26-30, 2012) -&amp;nbsp;&lt;/strong&gt;&lt;a href="http://ads.silverlightshow.net/a.aspx?ZoneID=61&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=15184" target="_blank"&gt;&lt;img alt="" src="http://ads.silverlightshow.net/a.aspx?ZoneID=61&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=15184" width="0" height="0" style="border-width: 0px;border-style: solid;" /&gt;&lt;strong&gt;&amp;lsquo;Creating Today&amp;rsquo;s User Experiences - An Entry Point for Developers&amp;rsquo;&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;.      &lt;br /&gt;As we have announced, SilverlightShow is the &lt;/strong&gt;&lt;a href="http://vslive.com/events/las-vegas-2012/information/sponsors.aspx" target="_blank"&gt;&lt;strong&gt;Social Media Premiere Partner&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt; for this conference and we&amp;rsquo;ll be &lt;/strong&gt;&lt;a href="http://www.silverlightshow.net/community/contest_vslive.aspx"&gt;&lt;strong&gt;sending one SilverlightShow member to this conference for free&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;.&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;About Billy:&lt;/em&gt;&lt;/strong&gt;&lt;em&gt; Billy Hollis is an author and software developer from Nashville, Tennessee. Billy is co-author of the first book ever published on Visual Basic .NET, VB .NET Programming on the Public Beta. He has written many articles, and is a frequent speaker at conferences. He is the Regional Director of Developer Relations in Nashville for Microsoft, and runs a consulting company focusing on user experience design and rich client applications. You can visit his website at: &lt;/em&gt;&lt;a href="http://www.billyhollis.com/"&gt;&lt;em&gt;www.billyhollis.com&lt;/em&gt;&lt;/a&gt;&lt;em&gt;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;SilverlightShow: &lt;/strong&gt;Hi Billy! According to info from the kitchen of Visual Studio Live!Las Vegas, your workshop has so far attracted most interest by the conference registrants. The topic of the workshop is: &amp;lsquo;Creating Today&amp;rsquo;s User Experiences - An Entry Point for Developers&amp;rsquo;. Why do you think user experience has become an important topic for developers right now? Isn&amp;rsquo;t it better for developers to just leave this work to a UX expert, and focus on development only?&lt;/p&gt;&lt;p&gt;&lt;strong&gt;BH:&lt;/strong&gt; The biggest reason developers are shifting focus to user experience is simple. Apple is kicking us to the curb in some key spaces. Executives are demanding, for example, that corporate apps be made available on iPads, and the users just expect the experience on such devices to be excellent. &lt;/p&gt;&lt;p&gt;I believe that the notion that developers can delegate user experience design to a UX expert, and then just stop worrying about it, is just not feasible for most applications. First, such UX experts are hard to find. If you&amp;rsquo;re in, say, Springfield, Illinois, where do you get one? Certainly small to medium teams often can&amp;rsquo;t find or can&amp;rsquo;t afford such help. Second, designing great user experience requires a deep understanding of the application domain. Developers usually have that, and pure designers generally don&amp;rsquo;t. Designers do a lot better in the consumer space, because they are themselves consumers, but it&amp;rsquo;s much harder for them to put themselves inside the mind of a typical corporate application user.&lt;/p&gt;&lt;p&gt;Finally, I think the best designs, particularly for complex business applications, come through collaboration. Even if a designer is involved, the end product will be better if there is collaboration with developers, and developers will be better collaborators if they understand the principles and speak the language of design.&lt;/p&gt;&lt;p&gt;&lt;a href="http://ads.silverlightshow.net/a.aspx?ZoneID=58&amp;amp;Task=Click&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=28122" target="_blank"&gt;&lt;img alt="" style="display: block; float: none; margin-left: auto; margin-right: auto;        border-width: 0px;border-style: solid;" src="http://ads.silverlightshow.net/a.aspx?ZoneID=58&amp;amp;Task=Get&amp;amp;Mode=HTML&amp;amp;SiteID=1&amp;amp;PageID=28122" width="468" height="60" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;SilverlightShow:&lt;/strong&gt; What are some of the key user experience concepts you plan to touch upon in this workshop, why should attendees join it?&lt;/p&gt;&lt;p&gt;&lt;strong&gt;BH:&lt;/strong&gt; I&amp;rsquo;ll be covering over two dozen key concepts, out of a universe of about 150 design principles that I&amp;rsquo;ve studied in the past five years. The ones I zero in on are the ones that have helped me most in doing designs for my own clients. &lt;/p&gt;&lt;p&gt;I cover them in families of related concepts. One family concerns how users efficiently select options and navigate through an application. It includes Hick&amp;rsquo;s Law, inattentional blindness, and gestalt principles, among others. These principles are mostly concerned with how the user&amp;rsquo;s visual and cognitive systems work. Then there&amp;rsquo;s another family of design principles based on the human preference for natural things. It includes whitespace, proper use of gradients and animation, layering to get 3D effects, and so forth. &lt;/p&gt;&lt;p&gt;Then I talk some about purely aesthetic concepts, plus ideas such as mapping and affordances. I also discuss the need to use context to decide good designs, because sometimes design principles involve tradeoffs, and the right balance depends on circumstances.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;SilverlightShow:&lt;/strong&gt; That sounds like a lot of material! Can attendees really learn all that in one day?&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;BH:&lt;/strong&gt; It is a lot, and that&amp;rsquo;s why I used the term &amp;ldquo;entry point&amp;rdquo; in the workshop title. I can&amp;rsquo;t teach everything, but I can build a skeleton that will enable attendees to keep learning on their own.&lt;/p&gt;&lt;p&gt;But I think it&amp;rsquo;s quite true that they would walk out with their heads spinning if I just talked all day. So instead, we do regular exercises to help them apply the concepts themselves, and I require class interaction at certain points. That makes it real to them. &lt;/p&gt;&lt;p&gt;Some exercises are just a minute or two &amp;ndash; for example, analyzing an elevator panel to see what&amp;rsquo;s wrong with it. Others take as long as twenty minutes. I think there are about ten or twelve exercises scattered throughout the day. In that sense, it really is a workshop, not a day long technical lecture session.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;SilverlightShow: &lt;/strong&gt;What knowledge do you expect attendees to gain after this workshop, and how would you advise them to continue their education?&lt;/p&gt;&lt;p&gt;&lt;strong&gt;BH:&lt;/strong&gt; First, they should walk out with a sense of how important this material is. In fact, I actually scare them at certain points. I&amp;rsquo;ve seen an entire dominant ecosystem of this industry become irrelevant in ten years &amp;ndash; IBM, from 1985 to 1995. I don&amp;rsquo;t want that to happen to the Microsoft side of the industry, and meeting rising user expectations is, I think, one of the essential foundations to prevent that.&lt;/p&gt;&lt;p&gt;Then I hope they find out if this kind of work resonates with them. I believe almost all developers can do a lot better in user experience design than they realize, but some just don&amp;rsquo;t take to it. Others get really lit up about it.&lt;/p&gt;&lt;p&gt;Finally, they will have learned the raw essentials, and be directed to resources that will take them further. If they really like this area, they&amp;rsquo;ll be studying it for years. But I think they can take some of the basic ideas out of the workshop and begin applying them in their own projects the day they get back home.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;SilverlightShow:&lt;/strong&gt; What is the trickiest part in building user interfaces, where do you think developers stumble most?&lt;/p&gt;&lt;p&gt;&lt;strong&gt;BH:&lt;/strong&gt; The trickiest part by far is breaking out of the ruts they&amp;rsquo;ve formed from old technologies. Modern technologies, such as HTML5 and XAML, give us enormous freedom in the way we interact with the user. But most developers have ingrained habits to just divide the screen up into rectangles and pour something into each one. Some of my exercises are designed, in fact, primarily to force them out of their ruts.&lt;/p&gt;&lt;p&gt;Another tricky part is finding the right level of understanding of the problem space before beginning design. With our current emphasis on agile, a lot of developers interpret that to mean they need to get down to coding really early in the process, and figure out requirements as they go. For certain phases of development, that works OK, but to come up with, say, the central navigation theme for the entire application, it doesn&amp;rsquo;t. A certain breadth of understanding of the problem space is needed to do that, and even then usually some experimentation and user feedback is needed to get a good design.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;SilverlightShow:&lt;/strong&gt; Most SilverlightShow community members are already quite fluent with Windows Phone development and have created one or more applications for this platform. In your opinion, to what extent does user experience contribute to the success of such an application, compared to functionality?&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;BH:&lt;/strong&gt; Functionality comes first, in the sense that no one will use an application without functionality they need, regardless of how pretty or well designed it is. &lt;/p&gt;&lt;p&gt;However, if you assume that most developers can get the functionality part figured out, then user experience becomes the differentiator. User experience also weighs as heavy as functionality on how much value the user perceives in the typical application. Plus, to be blunt, really bad user experience repels users, especially when they&amp;rsquo;ve become accustomed to better UX in other apps.&lt;/p&gt;&lt;p&gt;I like to put it like this. For most of our careers, success has been measured by our ability to make something possible. That&amp;rsquo;s not enough anymore. Now, we are also expected to make it easy.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;SilverlightShow: &lt;/strong&gt;How and where may conference attendees meet you during the conference (outside the workshop)?&lt;/p&gt;&lt;p&gt;&lt;strong&gt;BH:&lt;/strong&gt; Oh, I&amp;rsquo;m pretty easy to find. I spend a fair amount of time in the areas outside sessions, lounging around, and I&amp;rsquo;m there specifically for people to come up and talk if they need to. I usually come to lunch too, even though I don&amp;rsquo;t usually eat lunch, and anyone who sees me wandering through the lunch hall is welcome to flag me down for a discussion. Finally, I&amp;rsquo;ll be MC at the evening event, Wild Wednesday. I do about twenty minutes of comedy ranting there, plus draw the tickets to give away prizes and such. I&amp;rsquo;m usually available afterwards for a conversation or two.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Thanks Billy for this interview! Wish you, as well as our free pass winner, a successful workshop and conference event!&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;Do you, as a developer, manage to create good user experience for your apps, what are the difficulties you face? Feel free to comment below this interview. &lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;</description>      <link>http://www.silverlightshow.net/items/SilverlightShow-Interview-with-Billy-Hollis-Presenter-in-a-Visual-Studio-Live-Las-Vegas-Workshop.aspx</link>      <author>editorial@silverlightshow.net (Silverlight Show )</author>      <comments>http://www.silverlightshow.net/items/SilverlightShow-Interview-with-Billy-Hollis-Presenter-in-a-Visual-Studio-Live-Las-Vegas-Workshop.aspx#comments</comments>      <guid isPermaLink="true">http://www.silverlightshow.net/items/SilverlightShow-Interview-with-Billy-Hollis-Presenter-in-a-Visual-Studio-Live-Las-Vegas-Workshop.aspx</guid>      <pubDate>Tue, 28 Feb 2012 13:44:14 GMT</pubDate>    </item>    <item>      <title>Goodbye and Hello!</title>      <link>http://feedproxy.google.com/~r/JesseLiberty-SilverlightGeek/~3/fnaWL_dPWRg/</link>      <comments>http://jesseliberty.com/2012/02/27/goodbye-and-hello/#comments</comments>      <pubDate>Mon, 27 Feb 2012 14:00:00 +0000</pubDate>      <creator xmlns="http://purl.org/dc/elements/1.1/">Jesse Liberty</creator>      <category><![CDATA[Community]]></category>      <category><![CDATA[News]]></category>      <category><![CDATA[Telerik]]></category>      <guid isPermaLink="false">http://jesseliberty.com/?p=5224</guid>      <encoded xmlns="http://purl.org/rss/1.0/modules/content/"><![CDATA[After (nearly) five years at Microsoft, I have left to take&#160; a position as XAML Evangelist at Telerik.&#160;&#160; My experiences at Microsoft were terrific, and I had the opportunity to meet and come to know some great and very bright &#8230; Continue reading &#8594;<br/><br/>For the complete article and hyperlinks, please visit my blog at http://JesseLiberty.com<div class="feedflare"><a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=fnaWL_dPWRg:DivKRaxpJOU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=fnaWL_dPWRg:DivKRaxpJOU:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=fnaWL_dPWRg:DivKRaxpJOU:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?i=fnaWL_dPWRg:DivKRaxpJOU:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=fnaWL_dPWRg:DivKRaxpJOU:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?i=fnaWL_dPWRg:DivKRaxpJOU:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=fnaWL_dPWRg:DivKRaxpJOU:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?i=fnaWL_dPWRg:DivKRaxpJOU:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=fnaWL_dPWRg:DivKRaxpJOU:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?d=qj6IDK7rITs" border="0"></img></a></div><img src="http://feeds.feedburner.com/~r/JesseLiberty-SilverlightGeek/~4/fnaWL_dPWRg" height="1" width="1"/>]]></encoded>      <commentRss xmlns="http://wellformedweb.org/CommentAPI/">http://jesseliberty.com/2012/02/27/goodbye-and-hello/feed/</commentRss>      <comments xmlns="http://purl.org/rss/1.0/modules/slash/">21</comments>      <origLink xmlns="http://rssnamespace.org/feedburner/ext/1.0">http://jesseliberty.com/2012/02/27/goodbye-and-hello/</origLink>    </item>    <item>      <title>Windows Phone + SignalR = Awesome Possibilities!</title>      <description>&lt;table width="20"&gt;    &lt;tbody&gt;        &lt;tr&gt;            &lt;td&gt;            &lt;div class="fb-like" data-show-faces="true" data-send="false" data-href="http://www.silverlightshow.net/items/Windows-Phone-SignalR-Awesome-Possibilities.aspx" data-font="segoe ui" data-layout="button_count"&gt;&lt;/div&gt;            &lt;/td&gt;            &lt;td&gt;&lt;a href="https://twitter.com/share" class="twitter-share-button" data-via="silverlightshow" data-counturl="http://www.silverlightshow.net/items/Windows-Phone-SignalR-Awesome-Possibilities.aspx" data-count="horizontal" data-text="Reading @samidip's article '#WindowsPhone + #SignalR = Awesome Possibilities!' #wpdev" data-url="http://slshow.net/xgcRV8"&gt;Tweet&lt;/a&gt;&lt;/td&gt;            &lt;td&gt;&lt;g:plusone size="medium" href="http://www.silverlightshow.net/items/Windows-Phone-SignalR-Awesome-Possibilities.aspx"&gt;&lt;/g:plusone&gt;            &lt;/td&gt;            &lt;td&gt;            &lt;/td&gt;        &lt;/tr&gt;    &lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;Real-time communication. Many software applications on variety of platforms &amp;amp; form factors have a genuine need for it. But persistent networks, real-time connectivity &amp;amp; asynchrony continue to challenge us developers in building such applications. Is there a silver lining? Could we have near-real-time communication in our mobile apps? Imagine the possibilities.&lt;/p&gt;&lt;h4&gt;&lt;a href="http://www.silverlightshow.net/Storage/Sources/SignalR_WP7.zip"&gt;Download Source Code&lt;/a&gt;&lt;/h4&gt;&lt;h4&gt;&amp;nbsp;&lt;/h4&gt;&lt;h4&gt;Live Demo&lt;/h4&gt;&lt;p&gt;Now, let&amp;rsquo;s do something a little fun before we get to the crux of what this article is about. &lt;/p&gt;&lt;div style="border:1px solid #dddddd;border-image: initial; padding-bottom: 5px; background-color: #f3f3f3; margin-top: 5px; padding-left: 10px; width: 200px; float: right; margin-left: 10px; margin-right: 5px; padding-top: 5px;"&gt;&lt;h3&gt;Don't miss...&lt;/h3&gt;&lt;ul style="list-style-type: circle; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 20px; font-size: 12px;"&gt;    &lt;li style="padding-bottom: 5px;"&gt;&lt;a href="http://www.silverlightshow.net/video/10-Best-Practices-for-Windows-Phone-Devs-Webinar.aspx"&gt;Recording of Samidip's Webinar: 10 Best Practices for WP devs&lt;/a&gt; &lt;/li&gt;    &lt;li style="padding-bottom: 5px;"&gt;&lt;a href="http://www.silverlightshow.net/items/Producing-and-Consuming-OData-in-a-Silverlight-and-Windows-Phone-7-application.aspx"&gt;The article series: Producing and Consuming OData in a Silverlight and WP7 application&lt;/a&gt; &lt;/li&gt;    &lt;li style="padding-bottom: 5px;"&gt;&lt;a href="http://www.silverlightshow.net/ebooks/odata_cloud.aspx"&gt;Samidip's Ebook 'OData &amp;amp; Cloud Augmentation of Windows Phone Apps':&lt;/a&gt; &lt;/li&gt;&lt;/ul&gt;&lt;p style="padding-bottom: 5px; text-align: center;"&gt;&lt;a href="http://www.silverlightshow.net/ebooks/odata_cloud.aspx"&gt;&lt;img style="width: 107px; height: 150px;" alt="Producing and Consuming OData in a Silverlight and WP7 App Ebook" src="http://www.silverlightshow.net/Storage/Ebooks/odata_cloud.png" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="http://www.silverlightshow.net/ebooks.aspx"&gt;All SilverlightShow Ebooks&lt;/a&gt;&amp;nbsp;&lt;img alt="" src="http://www.silverlightshow.net/Storage/arrow-content.jpg" /&gt;&lt;/p&gt;&lt;/div&gt;How about a live demo of the sample application in action? Works from anywhere on earth with a data connection; in fact, more &amp;amp; diverse the user demographics, the merrier. Let&amp;rsquo;s do this:&lt;ul&gt;    &lt;li&gt;This demo will work with your Windows Phone emulator; but better with your unlocked Windows Phone that can side-load apps, given XAP or source code. &lt;/li&gt;    &lt;li&gt;Download the Source Code &amp;amp; extract the Windows Phone solution. &lt;/li&gt;    &lt;li&gt;Load in Visual Studio, build &amp;amp; Deploy to emulator/phone. &lt;/li&gt;    &lt;li&gt;The sample Windows Phone app essentially shares your location &amp;amp; connects you to a backend SignalR server for continuous real-time chat. &lt;/li&gt;    &lt;li&gt;Go to &lt;a href="http://signalrserver.cloudapp.net/" target="_blank"&gt;http://signalrserver.cloudapp.net/&lt;/a&gt; and keep it open. &lt;/li&gt;    &lt;li&gt;Fire up the app and give yourself a name for the Chatroom. &lt;/li&gt;    &lt;li&gt;Share your location &amp;amp; join the fun. &lt;/li&gt;    &lt;li&gt;If on a Windows Phone, you should see a pushpin on the Bing map for your actual location (if allowed by your settings). On the emulator, you&amp;rsquo;ll start out at the mothership, that is, Seattle. Feel free to use the location simulator to fake your position. &lt;/li&gt;    &lt;li&gt;See yourself pop up in the chat dialog box? &lt;/li&gt;    &lt;li&gt;Now fire away what you want to say .. no profanity please. &lt;/li&gt;    &lt;li&gt;See what you say show up in your phone&amp;rsquo;s chat dialog &amp;amp; on the Server almost immediately? Fun, eh? &lt;/li&gt;    &lt;li&gt;Exit the chatroom and you&amp;rsquo;ll see yourself leave, along with a disappearing pushpin on map. &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The result should be something like this:&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/samidip/_image_24.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;        border-width: 0px;border-style: solid;" title="image" alt="image" src="http://www.silverlightshow.net/Storage/Users/samidip/_image_thumb_10.png" width="604" height="284" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;I&amp;rsquo;m hoping if we keep the site running, we can see Pushpins show up on different parts of the world map; the Bing map used should zoom in &amp;amp; out to accommodate all pins. Having said that, the server side code isn&amp;rsquo;t hosted on massive hardware. I&amp;rsquo;ll try to keep it up; but if load or other issues force it down, please feel free unpack the server code &amp;amp; run it locally. It is a simple MVC3 app that should run just fine on your machine. Only change you would have to do is to point your Windows Phone app to &lt;em&gt;Localhost&lt;/em&gt;, instead of the above server. So, let&amp;rsquo;s hope the site stays up &amp;amp; we can see folks from different places show up on live map &amp;amp; chatroom.&lt;/p&gt;&lt;h4&gt;Introduction&lt;/h4&gt;&lt;p&gt;SignalR is an async persistent connection library for client-server communication that aids in building real-time, multi-user connected applications across multiple platforms. The connection between clients &amp;amp; server is persisted over best possible transport mechanism, which could be a combination of long polling, periodic polling &amp;amp; sockets. The point is the transport layer is abstracted away to provide a seamless persistent connection for ease of development in making connected applications across the web, mobile &amp;amp; other form factors.&lt;/p&gt;&lt;p&gt;SignalR was started by &lt;a href="https://twitter.com/#!/DamianEdwards" target="_blank"&gt;Damian Edwards&lt;/a&gt; &amp;amp; &lt;a href="https://twitter.com/#!/davidfowl" target="_blank"&gt;David Fowler&lt;/a&gt; from the ASP.NET team and is now an OSS on GitHub (&lt;a href="https://github.com/SignalR/SignalR" target="_blank"&gt;https://github.com/SignalR/SignalR&lt;/a&gt;). Want to chat with these &amp;amp; other cool folks working with SignalR? Join the conversations @ &lt;a href="http://jabbr.net/#/rooms/signalr" target="_blank"&gt;http://jabbr.net/#/rooms/signalr&lt;/a&gt;. The easiest way to start using SignalR is to utilize the Nugets as need in your application. They are:&lt;/p&gt;&lt;ul&gt;    &lt;li&gt;&lt;a href="http://nuget.org/List/Packages/SignalR" target="_blank"&gt;SignalR&lt;/a&gt; - Package for SignalR.Server and SignalR.Js &lt;/li&gt;    &lt;li&gt;&lt;a href="http://nuget.org/List/Packages/SignalR.Server" target="_blank"&gt;SignalR.Server&lt;/a&gt; - Server components needed for SignalR endpoints &lt;/li&gt;    &lt;li&gt;&lt;a href="http://nuget.org/List/Packages/SignalR.Js" target="_blank"&gt;SignalR.Js&lt;/a&gt; - Javascript client for SignalR &lt;/li&gt;    &lt;li&gt;&lt;a href="http://nuget.org/List/Packages/SignalR.Client" target="_blank"&gt;SignalR.Client&lt;/a&gt; - .NET client for SignalR &lt;/li&gt;    &lt;li&gt;&lt;a href="http://nuget.org/List/Packages/SignalR.Ninject" target="_blank"&gt;SignalR.Ninject&lt;/a&gt; - Ninject dependeny resolver for SignalR &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;These can be incorporated in your project by using the visual Nuget Library Manager or the command-based Management console. This one statement gets you all dependencies:&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/samidip/_image_12.png"&gt;&lt;img style="background-image: none; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;        border-width: 0px;border-style: solid;" title="image" alt="image" src="http://www.silverlightshow.net/Storage/Users/samidip/_image_thumb_4.png" width="444" height="44" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;While there are other technologies that have tried to solve the real-time communication problem, like Socket.IO or HTML5 WebSockets, few do it as simply as SignalR and support cross-platform between the web and mobile platforms like Windows Phone, &lt;a href="https://github.com/DyKnow/SignalR-ObjC" target="_blank"&gt;iOS&lt;/a&gt; &amp;amp; Android (through Mono). While the low-level &lt;em&gt;PersistenceConnection&lt;/em&gt; class might give you more control, most times the abstraction over it called the &lt;em&gt;Hub&lt;/em&gt; class &amp;amp; your implementation of it, will provide easy persistence between client &amp;amp; Server. Want to learn more about SignalR? Try these wonderful posts:&lt;/p&gt;&lt;ul&gt;    &lt;li&gt;&lt;a title="http://bit.ly/qeJFyf" href="http://bit.ly/qeJFyf"&gt;http://bit.ly/qeJFyf&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://jbeckwith.com/2011/10/12/building-a-user-map-with-signalr-and-bing/"&gt;http://jbeckwith.com/2011/10/12/building-a-user-map-with-signalr-and-bing/&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://blog.maartenballiauw.be/post/2011/12/06/Using-SignalR-to-broadcast-a-slide-deck.aspx"&gt;http://blog.maartenballiauw.be/post/2011/12/06/Using-SignalR-to-broadcast-a-slide-deck.aspx&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.dotnetcurry.com/ShowArticle.aspx?ID=780"&gt;http://www.dotnetcurry.com/ShowArticle.aspx?ID=780&lt;/a&gt; &lt;/li&gt;&lt;/ul&gt;&lt;h4&gt;&amp;nbsp;&lt;/h4&gt;&lt;h4&gt;The Sample&lt;/h4&gt;&lt;p&gt;So, having learnt a little about SignalR, do you think it would work with and have applications in Windows Phone development? Absolutely! Real-time communication with a backend server on a personal device like the Windows Phone has potentially tons of ways to leverage the technology in Apps. Allow me to show you two here &amp;ndash; mapping Windows Phone App users across the globe and real-time chat dialog between multiple Windows Phones &amp;amp; the web. The rest is up to your imagination ..&lt;/p&gt;&lt;h4&gt;The Server&lt;/h4&gt;&lt;p&gt;You obviously have choices here. I started with a default MVC3 web application; but wanted to change the look to showing mapping &amp;amp; chat dialog. First up, let&amp;rsquo;s get it ready to be a SignalR server. Here&amp;rsquo;s how to add the Nuget package:&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/samidip/_image_14.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;        border-width: 0px;border-style: solid;" title="image" alt="image" src="http://www.silverlightshow.net/Storage/Users/samidip/_image_thumb_5.png" width="544" height="364" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;With that, we know what a &lt;em&gt;Hub&lt;/em&gt; is. Let us extend it to make something our own. We essentially want to uniquely keep track of Windows Phone users using our app; so let&amp;rsquo;s define a class for the phone clients:&lt;/p&gt;&lt;div style="border:1px solid silver;border-image: initial; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin-top: 20px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow-x: auto; overflow-y: auto; cursor: text; padding-top: 4px; text-align: left;" id="codeSnippetWrapper"&gt;&lt;div style="padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;     text-align: left;border-style: none;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt; &lt;span style="color: #008000;"&gt;// Individual Phone clients.&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt;   2:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;class&lt;/span&gt; PhoneClient&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum3" style="color: #606060;"&gt;   3:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum4" style="color: #606060;"&gt;   4:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;string&lt;/span&gt; PhoneClientId { get; set; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum5" style="color: #606060;"&gt;   5:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;float&lt;/span&gt; Latitude { get; set; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum6" style="color: #606060;"&gt;   6:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;float&lt;/span&gt; Longitude { get; set; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum7" style="color: #606060;"&gt;   7:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;Next, let&amp;rsquo;s add functionality to add phone clients to Hub, disconnect &amp;amp; broadcast messages to all:&lt;/p&gt;&lt;div style="border:1px solid silver;border-image: initial; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin-top: 20px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow-x: auto; overflow-y: auto; cursor: text; padding-top: 4px; text-align: left;" id="codeSnippetWrapper"&gt;&lt;div style="padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;     text-align: left;border-style: none;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt; &lt;span style="color: #008000;"&gt;// The Hub of communication.&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt;   2:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;class&lt;/span&gt; MessagingHub : Hub&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum3" style="color: #606060;"&gt;   3:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum4" style="color: #606060;"&gt;   4:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;static&lt;/span&gt; List&amp;lt;PhoneClient&amp;gt; PhoneClientList = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; List&amp;lt;PhoneClient&amp;gt;();        &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum5" style="color: #606060;"&gt;   5:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum6" style="color: #606060;"&gt;   6:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; JoinFromPhone(&lt;span style="color: #0000ff;"&gt;string&lt;/span&gt; phoneID, &lt;span style="color: #0000ff;"&gt;float&lt;/span&gt; latitude, &lt;span style="color: #0000ff;"&gt;float&lt;/span&gt; longitude)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum7" style="color: #606060;"&gt;   7:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum8" style="color: #606060;"&gt;   8:&lt;/span&gt;         PhoneClient phoneClientToAdd = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; PhoneClient();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum9" style="color: #606060;"&gt;   9:&lt;/span&gt;         phoneClientToAdd.PhoneClientId = phoneID;            &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum10" style="color: #606060;"&gt;  10:&lt;/span&gt;         phoneClientToAdd.Latitude = latitude;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum11" style="color: #606060;"&gt;  11:&lt;/span&gt;         phoneClientToAdd.Longitude = longitude;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum12" style="color: #606060;"&gt;  12:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum13" style="color: #606060;"&gt;  13:&lt;/span&gt;         PhoneClientList.Add(phoneClientToAdd);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum14" style="color: #606060;"&gt;  14:&lt;/span&gt;         Clients.addClient(phoneClientToAdd);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum15" style="color: #606060;"&gt;  15:&lt;/span&gt;         &lt;span style="color: #0000ff;"&gt;this&lt;/span&gt;.Caller.addClients(PhoneClientList.ToArray());&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum16" style="color: #606060;"&gt;  16:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum17" style="color: #606060;"&gt;  17:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum18" style="color: #606060;"&gt;  18:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; Disconnect(&lt;span style="color: #0000ff;"&gt;string&lt;/span&gt; phoneID)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum19" style="color: #606060;"&gt;  19:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum20" style="color: #606060;"&gt;  20:&lt;/span&gt;         PhoneClient client = &lt;span style="color: #0000ff;"&gt;null&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum21" style="color: #606060;"&gt;  21:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum22" style="color: #606060;"&gt;  22:&lt;/span&gt;         &lt;span style="color: #0000ff;"&gt;foreach&lt;/span&gt; (PhoneClient existingClient &lt;span style="color: #0000ff;"&gt;in&lt;/span&gt; PhoneClientList)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum23" style="color: #606060;"&gt;  23:&lt;/span&gt;         {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum24" style="color: #606060;"&gt;  24:&lt;/span&gt;             &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (phoneID == existingClient.PhoneClientId)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum25" style="color: #606060;"&gt;  25:&lt;/span&gt;             {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum26" style="color: #606060;"&gt;  26:&lt;/span&gt;                 client = existingClient;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum27" style="color: #606060;"&gt;  27:&lt;/span&gt;                 &lt;span style="color: #0000ff;"&gt;break&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum28" style="color: #606060;"&gt;  28:&lt;/span&gt;             }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum29" style="color: #606060;"&gt;  29:&lt;/span&gt;         }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum30" style="color: #606060;"&gt;  30:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum31" style="color: #606060;"&gt;  31:&lt;/span&gt;         PhoneClientList.Remove(client);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum32" style="color: #606060;"&gt;  32:&lt;/span&gt;         Clients.removeClient(client);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum33" style="color: #606060;"&gt;  33:&lt;/span&gt;     }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum34" style="color: #606060;"&gt;  34:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum35" style="color: #606060;"&gt;  35:&lt;/span&gt;     &lt;span style="color: #0000ff;"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; PushMessageToClients(&lt;span style="color: #0000ff;"&gt;string&lt;/span&gt; message)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum36" style="color: #606060;"&gt;  36:&lt;/span&gt;     {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum37" style="color: #606060;"&gt;  37:&lt;/span&gt;         Clients.addChatMessage(message);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum38" style="color: #606060;"&gt;  38:&lt;/span&gt;     }        &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum39" style="color: #606060;"&gt;  39:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;Wondering what some of the function calls are within our Hub? Well .. that&amp;rsquo;s the magic! These are actually JavaScript methods defined in our web UI view. So, let&amp;rsquo;s shoot for a UI like this (in the Index view off our Home controller).. Chat dialog on left &amp;amp; Bing Maps to show the pushpins on the right:&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/samidip/_image_16.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;        border-width: 0px;border-style: solid;" title="image" alt="image" src="http://www.silverlightshow.net/Storage/Users/samidip/_image_thumb_6.png" width="604" height="332" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Here&amp;rsquo;s what&amp;rsquo;s on the view, along with subtle styling included in the downloadable code:&lt;/p&gt;&lt;div style="border:1px solid silver;border-image: initial; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin-top: 20px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow-x: auto; overflow-y: auto; cursor: text; padding-top: 4px; text-align: left;" id="codeSnippetWrapper"&gt;&lt;div style="padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;     text-align: left;border-style: none;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt; &amp;lt;script charset=&lt;span style="color: #006080;"&gt;"UTF-8"&lt;/span&gt; type=&lt;span style="color: #006080;"&gt;"text/javascript"&lt;/span&gt; src=&lt;span style="color: #006080;"&gt;"http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0"&lt;/span&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt;   2:&lt;/span&gt; &amp;lt;script src=&lt;span style="color: #006080;"&gt;"@Url.Content("&lt;/span&gt;~/Scripts/jquery-1.6.4.min.js&lt;span style="color: #006080;"&gt;")"&lt;/span&gt; type=&lt;span style="color: #006080;"&gt;"text/javascript"&lt;/span&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum3" style="color: #606060;"&gt;   3:&lt;/span&gt; &amp;lt;script src=&lt;span style="color: #006080;"&gt;"@Url.Content("&lt;/span&gt;~/Scripts/jquery.signalR.min.js&lt;span style="color: #006080;"&gt;")"&lt;/span&gt; type=&lt;span style="color: #006080;"&gt;"text/javascript"&lt;/span&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum4" style="color: #606060;"&gt;   4:&lt;/span&gt; &amp;lt;script type=&lt;span style="color: #006080;"&gt;"text/javascript"&lt;/span&gt; src=&lt;span style="color: #006080;"&gt;"@Url.Content("&lt;/span&gt;~/signalr/hubs&lt;span style="color: #006080;"&gt;")"&lt;/span&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum5" style="color: #606060;"&gt;   5:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum6" style="color: #606060;"&gt;   6:&lt;/span&gt; &amp;lt;div id=&lt;span style="color: #006080;"&gt;'container'&lt;/span&gt;&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum7" style="color: #606060;"&gt;   7:&lt;/span&gt;     &amp;lt;div id=&lt;span style="color: #006080;"&gt;'chat'&lt;/span&gt;&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum8" style="color: #606060;"&gt;   8:&lt;/span&gt;         &amp;lt;b&amp;gt;Chatroom:&amp;lt;/b&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum9" style="color: #606060;"&gt;   9:&lt;/span&gt;         &amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum10" style="color: #606060;"&gt;  10:&lt;/span&gt;         &amp;lt;input type=&lt;span style="color: #006080;"&gt;"text"&lt;/span&gt; id=&lt;span style="color: #006080;"&gt;"message"&lt;/span&gt; maxlength=&lt;span style="color: #006080;"&gt;"20"&lt;/span&gt; /&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum11" style="color: #606060;"&gt;  11:&lt;/span&gt;         &amp;lt;input type=&lt;span style="color: #006080;"&gt;"button"&lt;/span&gt; id=&lt;span style="color: #006080;"&gt;"broadcast"&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;value&lt;/span&gt;=&lt;span style="color: #006080;"&gt;"Broadcast"&lt;/span&gt; /&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum12" style="color: #606060;"&gt;  12:&lt;/span&gt;         &amp;lt;input type=&lt;span style="color: #006080;"&gt;"button"&lt;/span&gt; id=&lt;span style="color: #006080;"&gt;"clear"&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;value&lt;/span&gt;=&lt;span style="color: #006080;"&gt;"Clear"&lt;/span&gt; /&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum13" style="color: #606060;"&gt;  13:&lt;/span&gt;         &amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum14" style="color: #606060;"&gt;  14:&lt;/span&gt;         &amp;lt;ul id=&lt;span style="color: #006080;"&gt;"chatdialog"&lt;/span&gt;&amp;gt;&amp;lt;/ul&amp;gt;        &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum15" style="color: #606060;"&gt;  15:&lt;/span&gt;     &amp;lt;/div&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum16" style="color: #606060;"&gt;  16:&lt;/span&gt;     &amp;lt;div id=&lt;span style="color: #006080;"&gt;'map'&lt;/span&gt;&amp;gt;&amp;lt;/div&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum17" style="color: #606060;"&gt;  17:&lt;/span&gt; &amp;lt;/div&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum18" style="color: #606060;"&gt;  18:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum19" style="color: #606060;"&gt;  19:&lt;/span&gt; &amp;lt;div id=&lt;span style="color: #006080;"&gt;"legend"&lt;/span&gt;&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum20" style="color: #606060;"&gt;  20:&lt;/span&gt;     &amp;lt;label &lt;span style="color: #0000ff;"&gt;for&lt;/span&gt;=&lt;span style="color: #006080;"&gt;"userCount"&lt;/span&gt;&amp;gt;Mapped Users: &amp;lt;/label&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum21" style="color: #606060;"&gt;  21:&lt;/span&gt;     &amp;lt;span id=&lt;span style="color: #006080;"&gt;"userCount"&lt;/span&gt;&amp;gt;0&amp;lt;/span&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum22" style="color: #606060;"&gt;  22:&lt;/span&gt; &amp;lt;/div&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;The Bing Maps on the page would be using the &lt;a href="http://www.microsoft.com/maps/isdk/ajax/" target="_blank"&gt;Bing Maps Ajax/JavaScript SDK&lt;/a&gt;. If you need to use this on your own, please make sure to get yourself a developer ID that you could pass along to Bing; get it &lt;a href="http://www.microsoft.com/maps/developers/web.aspx" target="_blank"&gt;HERE&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Now, most of the connectivity magic offered by the SignalR server will be in the code bits below. You&amp;rsquo;ll see how we open a connection to our SignalR Hub from the web client and define JavaScript methods to manipulate the UI that will be used by the Hub. You&amp;rsquo;ll notice how we add/remove PushPins on the map using JavaScript &amp;amp; location of phone clients joining the Hub. Also, you&amp;rsquo;ll see the code sending off Chat messages typed in from the web and appending those received from the server. So, here goes:&lt;/p&gt;&lt;div style="border:1px solid silver;border-image: initial; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin-top: 20px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow-x: auto; overflow-y: auto; cursor: text; padding-top: 4px; text-align: left;" id="codeSnippetWrapper"&gt;&lt;div style="padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;     text-align: left;border-style: none;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt; &amp;lt;script type=&lt;span style="color: #006080;"&gt;"text/javascript"&lt;/span&gt;&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt;   2:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum3" style="color: #606060;"&gt;   3:&lt;/span&gt;  var map = &lt;span style="color: #0000ff;"&gt;null&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum4" style="color: #606060;"&gt;   4:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum5" style="color: #606060;"&gt;   5:&lt;/span&gt;  $(function () &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum6" style="color: #606060;"&gt;   6:&lt;/span&gt;  {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum7" style="color: #606060;"&gt;   7:&lt;/span&gt;      &lt;span style="color: #008000;"&gt;// Create the connection to our SignalR Hub.&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum8" style="color: #606060;"&gt;   8:&lt;/span&gt;      var signalRHub = $.connection.messagingHub;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum9" style="color: #606060;"&gt;   9:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum10" style="color: #606060;"&gt;  10:&lt;/span&gt;      &lt;span style="color: #008000;"&gt;// Define some Javascript methods the server-side Hub can invoke.&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum11" style="color: #606060;"&gt;  11:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum12" style="color: #606060;"&gt;  12:&lt;/span&gt;      &lt;span style="color: #008000;"&gt;// Add a new client to the map.&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum13" style="color: #606060;"&gt;  13:&lt;/span&gt;      signalRHub.addClient = function (client) &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum14" style="color: #606060;"&gt;  14:&lt;/span&gt;      {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum15" style="color: #606060;"&gt;  15:&lt;/span&gt;          var pins = getPushPins();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum16" style="color: #606060;"&gt;  16:&lt;/span&gt;          addClient(client);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum17" style="color: #606060;"&gt;  17:&lt;/span&gt;          centerMap();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum18" style="color: #606060;"&gt;  18:&lt;/span&gt;          $(&lt;span style="color: #006080;"&gt;"#userCount"&lt;/span&gt;).html(pins.length + 1)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum19" style="color: #606060;"&gt;  19:&lt;/span&gt;      };&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum20" style="color: #606060;"&gt;  20:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum21" style="color: #606060;"&gt;  21:&lt;/span&gt;      &lt;span style="color: #008000;"&gt;// Remove a client from the map.&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum22" style="color: #606060;"&gt;  22:&lt;/span&gt;      signalRHub.removeClient = function (client) &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum23" style="color: #606060;"&gt;  23:&lt;/span&gt;      {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum24" style="color: #606060;"&gt;  24:&lt;/span&gt;          &lt;span style="color: #0000ff;"&gt;for&lt;/span&gt; (var i = map.entities.getLength() - 1; i &amp;gt;= 0; i--) {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum25" style="color: #606060;"&gt;  25:&lt;/span&gt;              var pushpin = map.entities.get(i);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum26" style="color: #606060;"&gt;  26:&lt;/span&gt;              &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (pushpin instanceof Microsoft.Maps.Pushpin) &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum27" style="color: #606060;"&gt;  27:&lt;/span&gt;              {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum28" style="color: #606060;"&gt;  28:&lt;/span&gt;                  &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (pushpin.getLocation().latitude == client.Latitude &amp;amp;&amp;amp; pushpin.getLocation().longitude == client.Longitude) &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum29" style="color: #606060;"&gt;  29:&lt;/span&gt;                  {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum30" style="color: #606060;"&gt;  30:&lt;/span&gt;                      map.entities.removeAt(i);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum31" style="color: #606060;"&gt;  31:&lt;/span&gt;                      var pins = getPushPins();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum32" style="color: #606060;"&gt;  32:&lt;/span&gt;                      $(&lt;span style="color: #006080;"&gt;"#userCount"&lt;/span&gt;).html(pins.length)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum33" style="color: #606060;"&gt;  33:&lt;/span&gt;                  }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum34" style="color: #606060;"&gt;  34:&lt;/span&gt;              }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum35" style="color: #606060;"&gt;  35:&lt;/span&gt;          }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum36" style="color: #606060;"&gt;  36:&lt;/span&gt;      };&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum37" style="color: #606060;"&gt;  37:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum38" style="color: #606060;"&gt;  38:&lt;/span&gt;      &lt;span style="color: #008000;"&gt;// Add chat messages from server to dialog.&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum39" style="color: #606060;"&gt;  39:&lt;/span&gt;      signalRHub.addChatMessage = function (message) &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum40" style="color: #606060;"&gt;  40:&lt;/span&gt;      {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum41" style="color: #606060;"&gt;  41:&lt;/span&gt;          $(&lt;span style="color: #006080;"&gt;'#chatdialog'&lt;/span&gt;).append(&lt;span style="color: #006080;"&gt;'&amp;lt;li&amp;gt;'&lt;/span&gt; + message + &lt;span style="color: #006080;"&gt;'&amp;lt;/li&amp;gt;'&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum42" style="color: #606060;"&gt;  42:&lt;/span&gt;      };&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum43" style="color: #606060;"&gt;  43:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum44" style="color: #606060;"&gt;  44:&lt;/span&gt;      &lt;span style="color: #008000;"&gt;// Click event-handler for broadcasting chat messages.&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum45" style="color: #606060;"&gt;  45:&lt;/span&gt;      $(&lt;span style="color: #006080;"&gt;'#broadcast'&lt;/span&gt;).click(function () &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum46" style="color: #606060;"&gt;  46:&lt;/span&gt;      {   &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum47" style="color: #606060;"&gt;  47:&lt;/span&gt;          &lt;span style="color: #008000;"&gt;// Call Server method.&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum48" style="color: #606060;"&gt;  48:&lt;/span&gt;          signalRHub.pushMessageToClients($(&lt;span style="color: #006080;"&gt;'#message'&lt;/span&gt;).val());&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum49" style="color: #606060;"&gt;  49:&lt;/span&gt;      });&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum50" style="color: #606060;"&gt;  50:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum51" style="color: #606060;"&gt;  51:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum52" style="color: #606060;"&gt;  52:&lt;/span&gt;      &lt;span style="color: #008000;"&gt;// Start the SignalR Hub.&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum53" style="color: #606060;"&gt;  53:&lt;/span&gt;      $.connection.hub.start(function () &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum54" style="color: #606060;"&gt;  54:&lt;/span&gt;      {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum55" style="color: #606060;"&gt;  55:&lt;/span&gt;          showMap();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum56" style="color: #606060;"&gt;  56:&lt;/span&gt;      });&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum57" style="color: #606060;"&gt;  57:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum58" style="color: #606060;"&gt;  58:&lt;/span&gt;      &lt;span style="color: #008000;"&gt;// Click event-handler for clearing chat messages.&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum59" style="color: #606060;"&gt;  59:&lt;/span&gt;      $(&lt;span style="color: #006080;"&gt;'#clear'&lt;/span&gt;).click(function () &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum60" style="color: #606060;"&gt;  60:&lt;/span&gt;      {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum61" style="color: #606060;"&gt;  61:&lt;/span&gt;          $(&lt;span style="color: #006080;"&gt;'ul li'&lt;/span&gt;).remove();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum62" style="color: #606060;"&gt;  62:&lt;/span&gt;      });&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum63" style="color: #606060;"&gt;  63:&lt;/span&gt;  });&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum64" style="color: #606060;"&gt;  64:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum65" style="color: #606060;"&gt;  65:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum66" style="color: #606060;"&gt;  66:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum67" style="color: #606060;"&gt;  67:&lt;/span&gt;  function addClient(client) &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum68" style="color: #606060;"&gt;  68:&lt;/span&gt;  {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum69" style="color: #606060;"&gt;  69:&lt;/span&gt;      var location = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; Microsoft.Maps.Location(client.Latitude, client.Longitude);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum70" style="color: #606060;"&gt;  70:&lt;/span&gt;      var pushpin = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; Microsoft.Maps.Pushpin(location, { text: &lt;span style="color: #006080;"&gt;'P'&lt;/span&gt;});&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum71" style="color: #606060;"&gt;  71:&lt;/span&gt;      map.entities.push(pushpin);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum72" style="color: #606060;"&gt;  72:&lt;/span&gt;  } &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum73" style="color: #606060;"&gt;  73:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum74" style="color: #606060;"&gt;  74:&lt;/span&gt;  function showMap() &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum75" style="color: #606060;"&gt;  75:&lt;/span&gt;  {        &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum76" style="color: #606060;"&gt;  76:&lt;/span&gt;      var mapOptions = {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum77" style="color: #606060;"&gt;  77:&lt;/span&gt;          credentials: &lt;span style="color: #006080;"&gt;"AuoGTNP56_kmS3IKUa0E-p_PBX1oWJO6WTpw2xFd-hZqFsffSh3FhKGXhFHQD52y"&lt;/span&gt;,&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum78" style="color: #606060;"&gt;  78:&lt;/span&gt;          center: &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; Microsoft.Maps.Location(39.80, -98.55),&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum79" style="color: #606060;"&gt;  79:&lt;/span&gt;          zoom:5&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum80" style="color: #606060;"&gt;  80:&lt;/span&gt;      }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum81" style="color: #606060;"&gt;  81:&lt;/span&gt;      map = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; Microsoft.Maps.Map(document.getElementById(&lt;span style="color: #006080;"&gt;"map"&lt;/span&gt;), mapOptions);                &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum82" style="color: #606060;"&gt;  82:&lt;/span&gt;  }     &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum83" style="color: #606060;"&gt;  83:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum84" style="color: #606060;"&gt;  84:&lt;/span&gt;  function centerMap() &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum85" style="color: #606060;"&gt;  85:&lt;/span&gt;  {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum86" style="color: #606060;"&gt;  86:&lt;/span&gt;      var pins = getPushPins();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum87" style="color: #606060;"&gt;  87:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum88" style="color: #606060;"&gt;  88:&lt;/span&gt;      var locations = [];        &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum89" style="color: #606060;"&gt;  89:&lt;/span&gt;      &lt;span style="color: #0000ff;"&gt;for&lt;/span&gt; (var i = pins.length-1; i&amp;gt;=0; i--) &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum90" style="color: #606060;"&gt;  90:&lt;/span&gt;          locations.push(pins[i].getLocation());&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum91" style="color: #606060;"&gt;  91:&lt;/span&gt;      &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum92" style="color: #606060;"&gt;  92:&lt;/span&gt;      map.setView({&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum93" style="color: #606060;"&gt;  93:&lt;/span&gt;          bounds: Microsoft.Maps.LocationRect.fromLocations(locations),&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum94" style="color: #606060;"&gt;  94:&lt;/span&gt;          zoom: 6&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum95" style="color: #606060;"&gt;  95:&lt;/span&gt;      });&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum96" style="color: #606060;"&gt;  96:&lt;/span&gt;      &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum97" style="color: #606060;"&gt;  97:&lt;/span&gt;   }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum98" style="color: #606060;"&gt;  98:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum99" style="color: #606060;"&gt;  99:&lt;/span&gt;  function getPushPins() &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum100" style="color: #606060;"&gt; 100:&lt;/span&gt;  {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum101" style="color: #606060;"&gt; 101:&lt;/span&gt;      var pins = [];&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum102" style="color: #606060;"&gt; 102:&lt;/span&gt;      &lt;span style="color: #0000ff;"&gt;for&lt;/span&gt; (var i = map.entities.getLength() - 1; i &amp;gt;= 0; i--) &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum103" style="color: #606060;"&gt; 103:&lt;/span&gt;      {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum104" style="color: #606060;"&gt; 104:&lt;/span&gt;          var pushpin = map.entities.get(i);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum105" style="color: #606060;"&gt; 105:&lt;/span&gt;          &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (pushpin instanceof Microsoft.Maps.Pushpin) &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum106" style="color: #606060;"&gt; 106:&lt;/span&gt;          {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum107" style="color: #606060;"&gt; 107:&lt;/span&gt;              pins.push(pushpin);        &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum108" style="color: #606060;"&gt; 108:&lt;/span&gt;          } &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum109" style="color: #606060;"&gt; 109:&lt;/span&gt;      } &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum110" style="color: #606060;"&gt; 110:&lt;/span&gt;      &lt;span style="color: #0000ff;"&gt;return&lt;/span&gt; pins;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum111" style="color: #606060;"&gt; 111:&lt;/span&gt;  }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum112" style="color: #606060;"&gt; 112:&lt;/span&gt;  &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum113" style="color: #606060;"&gt; 113:&lt;/span&gt; &amp;lt;/script&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;h4&gt;&lt;/h4&gt;&lt;h4&gt;&amp;nbsp;&lt;/h4&gt;&lt;h4&gt;The Windows Phone Client&lt;/h4&gt;&lt;p&gt;Now that we have the SignalR server all set up and waiting for interaction from phone clients, let us develop our Windows Phone client app. We&amp;rsquo;ll build a regular one page Windows Phone application just to demo functionality &amp;amp; connectivity to the SignalR Hub. Let&amp;rsquo;s begin by adding the appropriate SignalR nuget as below:&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/samidip/_image_18.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;        border-width: 0px;border-style: solid;" title="image" alt="image" src="http://www.silverlightshow.net/Storage/Users/samidip/_image_thumb_7.png" width="604" height="404" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;As we launch the app, we ask for a one-time user name so the phone client can be identified in the chatroom. For brevity, let us skip showing the simple XAML markup; you may find it in the downloadable code. Both UIs as below:&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/samidip/_image_20.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;        border-width: 0px;border-style: solid;" title="image" alt="image" src="http://www.silverlightshow.net/Storage/Users/samidip/_image_thumb_8.png" width="254" height="484" /&gt;&lt;/a&gt;&amp;nbsp; &lt;a href="http://www.silverlightshow.net/Storage/Users/samidip/_image_22.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;        border-width: 0px;border-style: solid;" title="image" alt="image" src="http://www.silverlightshow.net/Storage/Users/samidip/_image_thumb_9.png" width="254" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;As the user indicates with button click that he/she wants to join, we use location awareness in Windows Phone to figure out current geo-coordinates of the user with a physical device or read mock emulator inputs. Here&amp;rsquo;s some code:&lt;/p&gt;&lt;div style="border:1px solid silver;border-image: initial; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin-top: 20px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow-x: auto; overflow-y: auto; cursor: text; padding-top: 4px; text-align: left;" id="codeSnippetWrapper"&gt;&lt;div style="padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;     text-align: left;border-style: none;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;private&lt;/span&gt; GeoCoordinateWatcher gcw;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt;   2:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;double&lt;/span&gt; phoneLatitude;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum3" style="color: #606060;"&gt;   3:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;double&lt;/span&gt; phoneLongitude;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum4" style="color: #606060;"&gt;   4:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum5" style="color: #606060;"&gt;   5:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; connectButton_Click(&lt;span style="color: #0000ff;"&gt;object&lt;/span&gt; sender, RoutedEventArgs e)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum6" style="color: #606060;"&gt;   6:&lt;/span&gt;  {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum7" style="color: #606060;"&gt;   7:&lt;/span&gt;      &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (gcw == &lt;span style="color: #0000ff;"&gt;null&lt;/span&gt;)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum8" style="color: #606060;"&gt;   8:&lt;/span&gt;      {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum9" style="color: #606060;"&gt;   9:&lt;/span&gt;          &lt;span style="color: #008000;"&gt;// Look for present geo-location with GPS.&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum10" style="color: #606060;"&gt;  10:&lt;/span&gt;          gcw = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; GeoCoordinateWatcher(GeoPositionAccuracy.High);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum11" style="color: #606060;"&gt;  11:&lt;/span&gt;          gcw.MovementThreshold = 10;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum12" style="color: #606060;"&gt;  12:&lt;/span&gt;          gcw.StatusChanged += &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; EventHandler&amp;lt;GeoPositionStatusChangedEventArgs&amp;gt;(gcw_StatusChanged);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum13" style="color: #606060;"&gt;  13:&lt;/span&gt;      }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum14" style="color: #606060;"&gt;  14:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum15" style="color: #606060;"&gt;  15:&lt;/span&gt;      gcw.Start();            &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum16" style="color: #606060;"&gt;  16:&lt;/span&gt;  }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;Once we have location, it&amp;rsquo;s time to fire up the reference to the SignalR server and try to connect. Here&amp;rsquo;s the sample code:&lt;/p&gt;&lt;div style="border:1px solid silver;border-image: initial; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin-top: 20px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow-x: auto; overflow-y: auto; cursor: text; padding-top: 4px; text-align: left;" id="codeSnippetWrapper"&gt;&lt;div style="padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;     text-align: left;border-style: none;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt; IHubProxy SignalRServerHub;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt;   2:&lt;/span&gt; HubConnection connection = &lt;span style="color: #0000ff;"&gt;new&lt;/span&gt; HubConnection(&lt;span style="color: #006080;"&gt;"http://localhost:49968/"&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum3" style="color: #606060;"&gt;   3:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum4" style="color: #606060;"&gt;   4:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; gcw_StatusChanged(&lt;span style="color: #0000ff;"&gt;object&lt;/span&gt; sender, GeoPositionStatusChangedEventArgs e)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum5" style="color: #606060;"&gt;   5:&lt;/span&gt;  {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum6" style="color: #606060;"&gt;   6:&lt;/span&gt;      &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (e.Status == GeoPositionStatus.Ready)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum7" style="color: #606060;"&gt;   7:&lt;/span&gt;      {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum8" style="color: #606060;"&gt;   8:&lt;/span&gt;          &lt;span style="color: #008000;"&gt;// Get position from watcher &amp;amp; stop it to conserve battery.&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum9" style="color: #606060;"&gt;   9:&lt;/span&gt;          phoneLatitude = gcw.Position.Location.Latitude;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum10" style="color: #606060;"&gt;  10:&lt;/span&gt;          phoneLongitude = gcw.Position.Location.Longitude;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum11" style="color: #606060;"&gt;  11:&lt;/span&gt;          gcw.Stop();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum12" style="color: #606060;"&gt;  12:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum13" style="color: #606060;"&gt;  13:&lt;/span&gt;          &lt;span style="color: #008000;"&gt;// Reference to SignalR Server Hub &amp;amp; Proxy.                      &lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum14" style="color: #606060;"&gt;  14:&lt;/span&gt;          var messagingHub = connection.CreateProxy(&lt;span style="color: #006080;"&gt;"SignalRServer.MessagingHub"&lt;/span&gt;);&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum15" style="color: #606060;"&gt;  15:&lt;/span&gt;          SignalRServerHub = messagingHub;               &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum16" style="color: #606060;"&gt;  16:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum17" style="color: #606060;"&gt;  17:&lt;/span&gt;          &lt;span style="color: #008000;"&gt;// Fire up SignalR Connection &amp;amp; share location.  &lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum18" style="color: #606060;"&gt;  18:&lt;/span&gt;          connection.Start().ContinueWith(task =&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum19" style="color: #606060;"&gt;  19:&lt;/span&gt;          {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum20" style="color: #606060;"&gt;  20:&lt;/span&gt;              &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (task.IsFaulted)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum21" style="color: #606060;"&gt;  21:&lt;/span&gt;              {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum22" style="color: #606060;"&gt;  22:&lt;/span&gt;                  &lt;span style="color: #008000;"&gt;// Oopsie, do some error handling.&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum23" style="color: #606060;"&gt;  23:&lt;/span&gt;              }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum24" style="color: #606060;"&gt;  24:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum25" style="color: #606060;"&gt;  25:&lt;/span&gt;              &lt;span style="color: #008000;"&gt;// Join the Server's list of mapped clients.&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum26" style="color: #606060;"&gt;  26:&lt;/span&gt;              messagingHub.Invoke(&lt;span style="color: #006080;"&gt;"JoinFromPhone"&lt;/span&gt;, deviceID, phoneLatitude, phoneLongitude).Wait();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum27" style="color: #606060;"&gt;  27:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum28" style="color: #606060;"&gt;  28:&lt;/span&gt;              &lt;span style="color: #008000;"&gt;// Tell the chatroom that you joined.&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum29" style="color: #606060;"&gt;  29:&lt;/span&gt;              SignalRServerHub.Invoke(&lt;span style="color: #006080;"&gt;"PushMessageToClients"&lt;/span&gt;, App.Current.userName + &lt;span style="color: #006080;"&gt;" just joined!"&lt;/span&gt;).Wait();                  &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum30" style="color: #606060;"&gt;  30:&lt;/span&gt;          });&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum31" style="color: #606060;"&gt;  31:&lt;/span&gt;       }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum32" style="color: #606060;"&gt;  32:&lt;/span&gt;    }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;Notice how we build a proxy on the fly (not tight-binding though) and invoke the &amp;ldquo;&lt;em&gt;JoinFromPhone()&lt;/em&gt;&amp;rdquo; method of the server from the phone app, passing in some identifying information &amp;amp; location coordinates. The point is, you can pass in whatever your server needs. The unique qualifier that we pass in for every phone client to the server is the unique Device ID of the phone. Once pinged, the SignalR Hub wakes up, adds the incoming phone client to an internal collection (which you can persist) and reaches back to each web client (MVC3 view) to invoke some JavaScript functions that actually add a Pushpin on the map. Next up, we also announce on the Chatroom that a new user has joined the Hub by invoking the &amp;ldquo;&lt;em&gt;PushMessageToClients()&lt;/em&gt;&amp;rdquo; server method. Simple enough, right?&lt;/p&gt;&lt;p&gt;When the user types in some content and hits the Chat button, we got to let the SignalR server know, so that the chat message gets posted on the web front-end &amp;amp; all connected Windows Phone clients. Here&amp;rsquo;s how we achieve that .. notice that we are making some of these server calls on background threads so as to not hose up our UI:&lt;/p&gt;&lt;div style="border:1px solid silver;border-image: initial; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin-top: 20px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow-x: auto; overflow-y: auto; cursor: text; padding-top: 4px; text-align: left;" id="codeSnippetWrapper"&gt;&lt;div style="padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;     text-align: left;border-style: none;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; chatButton_Click(&lt;span style="color: #0000ff;"&gt;object&lt;/span&gt; sender, RoutedEventArgs e)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt;   2:&lt;/span&gt;  {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum3" style="color: #606060;"&gt;   3:&lt;/span&gt;      &lt;span style="color: #0000ff;"&gt;if&lt;/span&gt; (chatTextbox.Text != &lt;span style="color: #0000ff;"&gt;string&lt;/span&gt;.Empty &amp;amp;&amp;amp; chatTextbox.Text != &lt;span style="color: #0000ff;"&gt;null&lt;/span&gt;)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum4" style="color: #606060;"&gt;   4:&lt;/span&gt;      {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum5" style="color: #606060;"&gt;   5:&lt;/span&gt;          &lt;span style="color: #008000;"&gt;// Fire off background thread to post message to server Chatroom.&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum6" style="color: #606060;"&gt;   6:&lt;/span&gt;          chatMessage = chatTextbox.Text.Trim();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum7" style="color: #606060;"&gt;   7:&lt;/span&gt;          chatTextbox.Text = &lt;span style="color: #0000ff;"&gt;string&lt;/span&gt;.Empty;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum8" style="color: #606060;"&gt;   8:&lt;/span&gt;          ChatBackgroundDataWorker.RunWorkerAsync();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum9" style="color: #606060;"&gt;   9:&lt;/span&gt;      }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum10" style="color: #606060;"&gt;  10:&lt;/span&gt;  }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum11" style="color: #606060;"&gt;  11:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum12" style="color: #606060;"&gt;  12:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; ChatBackgroundDataWorker_DoWork(&lt;span style="color: #0000ff;"&gt;object&lt;/span&gt; sender, DoWorkEventArgs e)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum13" style="color: #606060;"&gt;  13:&lt;/span&gt;  {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum14" style="color: #606060;"&gt;  14:&lt;/span&gt;      &lt;span style="color: #008000;"&gt;// Post message to server chatroom.&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum15" style="color: #606060;"&gt;  15:&lt;/span&gt;      SignalRServerHub.Invoke(&lt;span style="color: #006080;"&gt;"PushMessageToClients"&lt;/span&gt;, chatMessage).Wait();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum16" style="color: #606060;"&gt;  16:&lt;/span&gt;      chatMessage = &lt;span style="color: #0000ff;"&gt;string&lt;/span&gt;.Empty;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum17" style="color: #606060;"&gt;  17:&lt;/span&gt;  }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;Now, this takes care of the chat message posting part where the server informs all other clients. However, if someone posts a chat message from the web front-end or other phone clients, how does our app know to update the chat dialog with content? There has to be a trigger, right? Unlike JavaScript clients which the SignalR server can directly reach out to in case something of interest happens, there isn&amp;rsquo;t an easy proposition for .NET clients since we do not have a reference. But, we do have a persistent connection and there is an &amp;ldquo;&lt;em&gt;On&lt;/em&gt;&amp;rdquo; method on the connection that can be rigged up to fire anytime a certain event happens on the server. Let us do that any time the server posts a message to all clients. Here&amp;rsquo;s the code .. you&amp;rsquo;ll be surprised how instantaneously this mechanism posts the chat message to all connected Windows Phone clients:&lt;/p&gt;&lt;div style="border:1px solid silver;border-image: initial; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin-top: 20px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow-x: auto; overflow-y: auto; cursor: text; padding-top: 4px; text-align: left;" id="codeSnippetWrapper"&gt;&lt;div style="padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;     text-align: left;border-style: none;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt; &lt;span style="color: #008000;"&gt;// Listen in on when Server posts anything to Chatroom.&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt;   2:&lt;/span&gt;  SignalRServerHub.On&amp;lt;&lt;span style="color: #0000ff;"&gt;string&lt;/span&gt;&amp;gt;(&lt;span style="color: #006080;"&gt;"addChatMessage"&lt;/span&gt;, message =&amp;gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum3" style="color: #606060;"&gt;   3:&lt;/span&gt;  {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum4" style="color: #606060;"&gt;   4:&lt;/span&gt;      &lt;span style="color: #008000;"&gt;// Add to local ChatRoom.&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum5" style="color: #606060;"&gt;   5:&lt;/span&gt;      chatDialog.Text += &lt;span style="color: #006080;"&gt;"\r\n"&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum6" style="color: #606060;"&gt;   6:&lt;/span&gt;      chatDialog.Text += message.Trim();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum7" style="color: #606060;"&gt;   7:&lt;/span&gt;  });&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;p&gt;Now, when you are done chit-chatting with your fellow geeks, you would like to disconnect officially and take your Pushpin out, right? Let&amp;rsquo;s add this code to disconnect, so that the corresponding Disconnect method is fired on the server. Again, notice how we do this on the background thread and officially sign out of the chatroom:&lt;/p&gt;&lt;div style="border:1px solid silver;border-image: initial; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin-top: 20px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'courier new', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow-x: auto; overflow-y: auto; cursor: text; padding-top: 4px; text-align: left;" id="codeSnippetWrapper"&gt;&lt;div style="padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;     text-align: left;border-style: none;" id="codeSnippet"&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum1" style="color: #606060;"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; disconnectButton_Click(&lt;span style="color: #0000ff;"&gt;object&lt;/span&gt; sender, RoutedEventArgs e)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum2" style="color: #606060;"&gt;   2:&lt;/span&gt; {            &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum3" style="color: #606060;"&gt;   3:&lt;/span&gt;     DisconnectBackgroundDataWorker.RunWorkerAsync();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum4" style="color: #606060;"&gt;   4:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum5" style="color: #606060;"&gt;   5:&lt;/span&gt;     chatTextbox.IsEnabled = &lt;span style="color: #0000ff;"&gt;false&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum6" style="color: #606060;"&gt;   6:&lt;/span&gt;     chatButton.IsEnabled = &lt;span style="color: #0000ff;"&gt;false&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum7" style="color: #606060;"&gt;   7:&lt;/span&gt;     disconnectButton.IsEnabled = &lt;span style="color: #0000ff;"&gt;false&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum8" style="color: #606060;"&gt;   8:&lt;/span&gt;     connectButton.IsEnabled = &lt;span style="color: #0000ff;"&gt;true&lt;/span&gt;;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum9" style="color: #606060;"&gt;   9:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum10" style="color: #606060;"&gt;  10:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum11" style="color: #606060;"&gt;  11:&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;void&lt;/span&gt; DisconnectBackgroundDataWorker_DoWork(&lt;span style="color: #0000ff;"&gt;object&lt;/span&gt; sender, DoWorkEventArgs e)&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum12" style="color: #606060;"&gt;  12:&lt;/span&gt; {&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum13" style="color: #606060;"&gt;  13:&lt;/span&gt;     &lt;span style="color: #008000;"&gt;// Send Farewell to Chatroom.&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum14" style="color: #606060;"&gt;  14:&lt;/span&gt;     SignalRServerHub.Invoke(&lt;span style="color: #006080;"&gt;"PushMessageToClients"&lt;/span&gt;, App.Current.userName + &lt;span style="color: #006080;"&gt;" just left!"&lt;/span&gt;).Wait();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum15" style="color: #606060;"&gt;  15:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum16" style="color: #606060;"&gt;  16:&lt;/span&gt;     &lt;span style="color: #008000;"&gt;// Disconnect from Hub.&lt;/span&gt;&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum17" style="color: #606060;"&gt;  17:&lt;/span&gt;     SignalRServerHub.Invoke(&lt;span style="color: #006080;"&gt;"Disconnect"&lt;/span&gt;, deviceID).Wait();&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;pre style="text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin-top: 0em; margin-right: 0em; margin-bottom: 0em; margin-left: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'courier new', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow-x: visible; overflow-y: visible; padding-top: 0px;border-style: none;"&gt;&lt;span id="lnum18" style="color: #606060;"&gt;  18:&lt;/span&gt; }&lt;/pre&gt;&lt;!--CRLF--&gt;&lt;/div&gt;&lt;/div&gt;&lt;h4&gt;&amp;nbsp;&lt;/h4&gt;&lt;h4&gt;Conclusion&lt;/h4&gt;&lt;p&gt;That&amp;rsquo;s it. A functional Windows Phone client that connects to a SignalR server backend and allows us to see the interactions on a web front-end. The SignalR magic simply provides the persistent connectivity through whatever transport means feasible. Now, could there be potential benefit in leveraging such technology in our Windows Phone apps? Think, think ...&lt;/p&gt;&lt;h4&gt;&lt;/h4&gt;&lt;h4&gt;About the Author&lt;/h4&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/samidip/_ActualPic_5.jpg"&gt;&lt;img style="background-image: none; margin-top: 0px; margin-right: 15px; margin-bottom: 0px; margin-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; float: left;        border-width: 0px;border-style: solid;" title="ActualPic" alt="ActualPic" src="http://www.silverlightshow.net/Storage/Users/samidip/_ActualPic_thumb_4.jpg" width="154" height="188" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Samidip Basu (&lt;a href="https://twitter.com/#!/samidip"&gt;@samidip&lt;/a&gt;) is a technologist &amp;amp; gadget-lover working as a Manager &amp;amp; Solutions Lead for Sogeti USA out of the Columbus Unit. With a strong developer background in Microsoft technology stack, he now spends much of his time in spreading the word to discover the full potential of the Windows Phone platform &amp;amp; cloud-backed mobile solutions in general. He passionately runs the Central Ohio Windows Phone User Group (&lt;a href="http://cowpug.org/"&gt;http://cowpug.org&lt;/a&gt;), labors in M3 Conf (&lt;a href="http://m3conf.com/"&gt;http://m3conf.com/&lt;/a&gt;) organization and can be found with at-least a couple of hobbyist projects at any time. His spare times call for travel and culinary adventures with the wife. Find out more at &lt;a href="http://samidipbasu.com/"&gt;http://samidipbasu.com&lt;/a&gt;.&lt;/p&gt;</description>      <link>http://www.silverlightshow.net/items/Windows-Phone-SignalR-Awesome-Possibilities.aspx</link>      <author>editorial@silverlightshow.net (Samidip Basu )</author>      <comments>http://www.silverlightshow.net/items/Windows-Phone-SignalR-Awesome-Possibilities.aspx#comments</comments>      <guid isPermaLink="true">http://www.silverlightshow.net/items/Windows-Phone-SignalR-Awesome-Possibilities.aspx</guid>      <pubDate>Mon, 27 Feb 2012 04:29:00 GMT</pubDate>    </item>    <item>      <title>Getting Started with XAML: Slides and demos</title>      <author>Pete Brown	</author>      <link>http://10rem.net/blog/2012/02/26/getting-started-with-xaml-slides-and-demos</link>      <pubDate>Mon, 27 Feb 2012 00:22:17 GMT</pubDate>      <guid>http://10rem.net/blog/2012/02/26/getting-started-with-xaml-slides-and-demos</guid>      <description>&lt;p&gt;At the South Florida Code Camp last week, I gave an earlymorning talk titled "Getting Started with XAML". In this talk, Icovered the basics of XAML, the property system, layout, and otherthings you need to know as a XAML developer for WPF, Silverlight,or Windows 8.&lt;/p&gt;&lt;p&gt;&lt;img src="http://10rem.net/media/83828/Windows-Live-Writer_ff6b33035bc2_11C5E_image_3.png" width="644" height="363" alt="image" border="0" style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px"/&gt;&lt;/p&gt;&lt;h3&gt;Slides&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;Attached to this post&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;Demos&lt;/h3&gt;&lt;p&gt;It was all real-time stuff in this talk. No downloadable demos.I encourage you to use the Getting Started content on MSDN:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/ff728590"&gt;Build yourfirst Silverlight web application&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/ff728576"&gt;Build yourfirst desktop RIA application with Silverlight&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Both include downloadable code in both C# and Visual Basic.&lt;/p&gt;&lt;h3&gt;My Silverlight Book&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://manning.com/pbrown2/"&gt;Silverlight 5 inAction&lt;/a&gt;&lt;/li&gt;&lt;li&gt;I also have a Windows 8 XAML book in progress. More on thatwhen it gets closer to publication&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;Related Links&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.silverlight.net/"&gt;Home:Silverlight.NET&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/windows"&gt;Windows DevCenter&lt;/a&gt; (for Windows 8 Metro XAML)&lt;/li&gt;&lt;li&gt;&lt;a href="http://windowsclient.net/"&gt;The Official Microsoft WPFand Windows Forms Site&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/_8GG38DditzRVozbXVc-Sm4L24s/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_8GG38DditzRVozbXVc-Sm4L24s/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/_8GG38DditzRVozbXVc-Sm4L24s/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/_8GG38DditzRVozbXVc-Sm4L24s/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/PeteBrown-Silverlight/~4/tj9ukG9Fogg" height="1" width="1"/&gt;</description>    </item>    <item>      <title>REST with Silverlight 5, ASP.NET Web API, and MVC 4 Beta</title>      <author>Pete Brown	</author>      <link>http://10rem.net/blog/2012/02/26/rest-with-silverlight-5-aspnet-web-api-and-mvc-4-beta</link>      <pubDate>Sun, 26 Feb 2012 23:50:21 GMT</pubDate>      <guid>http://10rem.net/blog/2012/02/26/rest-with-silverlight-5-aspnet-web-api-and-mvc-4-beta</guid>      <description>&lt;p&gt;At the South Florida Code Camp I gave a newer version of theREST Silverlight talk using the just released MVC 4 Beta andASP.NET Web API.&lt;/p&gt;&lt;p&gt;This talk shows how to share code between different versions ofthe framework, how to use the ASP.NET Web API from Silverlight, andhow to integrate a Silverlight application into an MVC 4 site.&lt;/p&gt;&lt;p&gt;&lt;img src="http://10rem.net/media/83782/Windows-Live-Writer_REST-with-Silverlight-5_1133C_image_thumb.png" width="644" height="364" alt="image" border="0" style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px"/&gt;&lt;/p&gt;&lt;h3&gt;Powerpoint Slides&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;Attached to this post&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;Demos and Examples&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;Download the &lt;a href="http://10rem.net/pub/demos/MVC4Beta_REST_SL5_Demo.zip"target="_blank"&gt;full source and my demo snippit text filehere&lt;/a&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;My Book&lt;/h3&gt;&lt;p&gt;I cover this in my Silverlight 5 book. At the time of thiswriting, the MEAP has the MVC3 version. I'll update it for theprint and ebook shortly.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://manning.com/pbrown2/"&gt;Silverlight 5 inAction&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;Related Links&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;&lt;ahref="http://weblogs.asp.net/jgalloway/archive/2012/02/16/asp-net-4-beta-released.aspx"&gt;ASP.NET MVC 4 Beta Released! - Jon Galloway&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.asp.net/web-api"&gt;Web API: The OfficialMicrosoft ASP.NET Site&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;ahref="http://10rem.net/blog/2011/08/01/creating-a-silverlight-5-helper-for-aspnet-mvc3-razor"&gt;Creating a Silverlight 5 Helper for ASP.NET MVC3 Razor&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;ahref="http://www.hanselman.com/blog/OneASPNETMakingJSONWebAPIsWithASPNETMVC4BetaAndASPNETWebAPI.aspx"&gt;One ASP.NET - Making JSON Web APIs with ASP.NET MVC 4 Beta andASP.NET Web API - Scott Hanselman&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://wcf.codeplex.com/"&gt;WCF Community Site&lt;/a&gt; (forolder WCF version)&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;Previous Versions&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;&lt;ahref="http://10rem.net/blog/2011/12/15/slides-and-code-from-my-vslive-silverlight-5-rest-wcf-web-api-mvc-talk"&gt;Slides and Code from my VSLive Silverlight 5, REST, WCF Web API,MVC talk&lt;/a&gt; (MVC 3 version)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/IqUlHUyGrHiQg_dsqZArCqQZRqI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/IqUlHUyGrHiQg_dsqZArCqQZRqI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/IqUlHUyGrHiQg_dsqZArCqQZRqI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/IqUlHUyGrHiQg_dsqZArCqQZRqI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/PeteBrown-Silverlight/~4/4-kercvO9Gg" height="1" width="1"/&gt;</description>    </item>    <item>      <title>A Lap Around Silverlight 5: Slides and Code</title>      <author>Pete Brown	</author>      <link>http://10rem.net/blog/2012/02/26/a-lap-around-silverlight-5-slides-and-code</link>      <pubDate>Sun, 26 Feb 2012 23:30:47 GMT</pubDate>      <guid>http://10rem.net/blog/2012/02/26/a-lap-around-silverlight-5-slides-and-code</guid>      <description>&lt;p&gt;At the South Florida Code Camp, I gave the "Lap AroundSilverlight 5" talk. The slides and code are all available via thelinks below.&lt;/p&gt;&lt;p&gt;&lt;img src="http://10rem.net/media/83760/Windows-Live-Writer_65e267c6fe8f_F85C_image_3.png" width="644" height="364" alt="image" border="0" style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px"/&gt;&lt;/p&gt;&lt;h3&gt;Powerpoint Slides&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;Attached to this post&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;Demos and Examples&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;&lt;ahref="http://10rem.net/blog/2011/09/04/the-big-list-of-whats-new-or-improved-in-silverlight-5"&gt;The Big List of What's New or Improved in Silverlight 5 - PeteBrown's 10rem.net&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;ahref="http://10rem.net/blog/2012/01/10/threading-considerations-for-binding-and-change-notification-in-silverlight-5"&gt;Threading Considerations for Binding and Change Notification inSilverlight 5&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;ahref="http://10rem.net/blog/2012/02/07/creating-big-silverlight-windows-and-getting-monitor-resolutions-and-positions-with-pinvoke"&gt;Creating Big Silverlight Windows and Getting Monitor Resolutionsand Positions with PInvoke&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;ahref="http://10rem.net/blog/2011/04/13/silverlight-5-using-the-soundeffect-class-for-low-latency-sound-and-play-wav-files-in-silverlight"&gt;Silverlight 5: Using the SoundEffect Class for Low-Latency Sound(and play WAV files in Silverlight)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;ahref="http://10rem.net/blog/2011/04/13/silverlight-5-working-with-operating-system-windows"&gt;Silverlight 5: Working with Operating System Windows&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;ahref="http://10rem.net/blog/2011/04/13/silverlight-5-working-with-implicit-templates"&gt;Silverlight 5: Working with Implicit Templates&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;ahref="http://10rem.net/blog/2011/04/13/silverlight-5-debugging-bindings-with-xaml-breakpoints"&gt;Silverlight 5: Debugging Bindings with Xaml Breakpoints&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;ahref="http://10rem.net/blog/2011/04/13/silverlight-5-supporting-double-and-even-triple-click-for-the-mouse"&gt;Silverlight 5: Supporting Double and Even Triple Click for theMouse&lt;/a&gt;&lt;/li&gt;&lt;li style="list-style: none"&gt;&lt;ul&gt;&lt;li&gt;&lt;ahref="http://10rem.net/blog/2011/04/25/supporting-both-double-and-triple-click-in-silverlight-5"&gt;Supporting both Double and Triple Click in Silverlight 5&lt;/a&gt;(article with the timer approach)&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;ahref="http://10rem.net/blog/2011/04/13/silverlight-5-advancements-in-text"&gt;Silverlight5: Advancements in Text&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;My Book&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://manning.com/pbrown2/"target="_blank"&gt;Silverlight 5 in Action&lt;/a&gt;&lt;!--EndFragment--&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;Downloads&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;&lt;ahref="http://code.msdn.microsoft.com/3D-Housebuilder-demo-from-def4af04"&gt;Download the 3D House Builder Demo Application&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://babylontoolkit.codeplex.com/"&gt;See the Babylon3d Engine on CodePlex&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;Related Links&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;&lt;ahref="http://www.silverlight.net/getstarted/silverlight-5-beta/"&gt;Silverlight5 Page on Silverlight.net&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;ahref="http://10rem.net/blog/2011/04/13/announcing-the-silverlight-5-beta-release-and-the-silverlightnet-redesign"&gt;Announcing the Silverlight 5 Beta Release and the Silverlight.netRedesign&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;Previous Versions&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;&lt;ahref="http://10rem.net/blog/2011/05/23/slides-videos-and-downloads-from-my-tech-ed-atlanta-2011-and-recent-user-group-talks"&gt;Slides, Videos, and Downloads from my Tech Ed Atlanta 2011 andRecent User Group Talks&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;ahref="http://10rem.net/blog/2011/10/25/updated-slides-and-demos-from-vslive-redmond-2011"&gt;Updated Slides and Demos from VSLive Redmond 2011&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/HXjsX95u4E6SfJJWjxfRBbnWFis/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/HXjsX95u4E6SfJJWjxfRBbnWFis/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/HXjsX95u4E6SfJJWjxfRBbnWFis/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/HXjsX95u4E6SfJJWjxfRBbnWFis/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/PeteBrown-Silverlight/~4/9UUyuOT5uD0" height="1" width="1"/&gt;</description>    </item>    <item>      <title>Part 3: Developing for a multitude of clients: strategies for code reuse and keeping costs in check.</title>      <description>&lt;table width="20"&gt;    &lt;tbody&gt;        &lt;tr&gt;            &lt;td&gt;            &lt;div class="fb-like" data-show-faces="true" data-send="false" data-href="http://www.silverlightshow.net/items/Part-3-Developing-for-a-multitude-of-clients-strategies-for-code-reuse-and-keeping-costs-in-check.aspx" data-font="segoe ui" data-layout="button_count"&gt;&lt;/div&gt;            &lt;/td&gt;            &lt;td&gt;&lt;a href="https://twitter.com/share" class="twitter-share-button" data-via="silverlightshow" data-counturl="http://www.silverlightshow.net/items/Part-3-Developing-for-a-multitude-of-clients-strategies-for-code-reuse-and-keeping-costs-in-check.aspx" data-count="horizontal" data-text="Developing for a multitude of clients Part 3: Strategies for code reuse and keeping costs in check" data-url="http://slshow.net/xyi4we"&gt;Tweet&lt;/a&gt;&lt;/td&gt;            &lt;td&gt;&lt;g:plusone size="medium" href="http://www.silverlightshow.net/items/Part-3-Developing-for-a-multitude-of-clients-strategies-for-code-reuse-and-keeping-costs-in-check.aspx"&gt;&lt;/g:plusone&gt;            &lt;/td&gt;            &lt;td&gt;            &lt;/td&gt;        &lt;/tr&gt;    &lt;/tbody&gt;&lt;/table&gt;&lt;h3&gt;Introduction&lt;/h3&gt;&lt;p&gt;Welcome to the third part of this article series on strategies for designing your application for a multitude of different clients. In the &lt;a href="http://www.silverlightshow.net/items/Developing-for-a-multitude-of-clients-strategies-for-code-reuse-and-keeping-costs-in-check.aspx" target="_blank"&gt;first part of this series&lt;/a&gt;, we've had a look at the &lt;strong&gt;business case &amp;amp; some general concerns&lt;/strong&gt; we'll have to tackle. &lt;/p&gt;In the &lt;a href="http://www.silverlightshow.net/items/Developing-for-a-multitude-of-clients-strategies-for-code-reuse-and-keeping-costs-in-check-part-2.aspx" target="_blank"&gt;second part&lt;/a&gt;, we made a &lt;strong&gt;choice for a service layer: WCF RIA Services&lt;/strong&gt;, looked into what this choice offered us and why we made it, and looked into some general guidelines you should keep in mind when designing a service layer which will be used by a multitude of clients.&lt;p&gt;In this part, we'll start with the&lt;strong&gt; development of the first client: a web-based Silverlight client&lt;/strong&gt;. &lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/KevinDockx/______image_2.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;        border-width: 0px;border-style: solid;" title="image" alt="image" src="http://www.silverlightshow.net/Storage/Users/KevinDockx/______image_thumb.png" width="479" height="253" /&gt;&lt;/a&gt; &lt;/p&gt;&lt;p&gt;You can &lt;a href="http://www.silverlightshow.net/Storage/Sources/SalesDashboard_3.zip"&gt;&lt;strong&gt;download the source code for this article here&lt;/strong&gt;&lt;/a&gt; (you can log in to the demo application with &lt;strong&gt;pete.campbell@madmen.com / abc@123&lt;/strong&gt;). &lt;/p&gt;&lt;p&gt;&amp;nbsp; &lt;/p&gt;&lt;h3&gt;Quick 'n dirty?&lt;/h3&gt;&lt;p&gt;As stated, the first client we're going to build will be a Silverlight client. &lt;/p&gt;&lt;div style="border:1px solid #dddddd;border-image: initial; padding-bottom: 5px; background-color: #f3f3f3; margin-top: 5px; padding-left: 10px; width: 200px; float: right; margin-left: 10px; padding-top: 5px;"&gt;&lt;h3&gt;More resources...&lt;/h3&gt;&lt;ul style="list-style-type: circle; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-left: 20px; font-size: 12px;"&gt;    &lt;li style="padding-bottom: 5px;"&gt;&lt;a href="http://www.silverlightshow.net/items/WCF-RIA-Services-Part-1-Getting-Started.aspx"&gt;10-part Article Series: WCF RIA Services&lt;/a&gt; &lt;/li&gt;    &lt;li style="padding-bottom: 5px;"&gt;&lt;a href="http://www.silverlightshow.net/video/Part-2-of-the-Webinar-Metro-and-WinRT.aspx"&gt;Recent Webinar Recording: Metro and WinRT for the Silverlight/WPF Developer: Part 2&lt;/a&gt; &lt;/li&gt;    &lt;li style="padding-bottom: 5px;"&gt;&lt;a href="http://www.silverlightshow.net/ebooks/silverlight_exam.aspx"&gt;'Getting Ready for Microsoft Silverlight Exam 70-506' Ebook &lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style="padding-bottom: 5px; text-align: center;"&gt;&lt;a href="http://www.silverlightshow.net/ebooks/silverlight_exam.aspx"&gt;&lt;img style="border:0px solid; border-image: initial;" alt="Getting Ready for Microsoft Silverlight Exam 70-506: Ebook" src="http://www.silverlightshow.net/Storage/sl_exam_thumb_small.png" usemap="#rade_img_map_1291385581316" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="font-size: 12px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="http://www.silverlightshow.net/ebooks.aspx"&gt;All SilverlightShow Ebooks&lt;/a&gt;&amp;nbsp;&lt;img alt="" src="http://www.silverlightshow.net/Storage/arrow-content.jpg" /&gt;&lt;/p&gt;&lt;/div&gt;The easy, quick 'n dirty way would be to simply add a Silverlight application to our solution, add our Views, ViewModels and application app logic to it, and let it communicate with the EmployeeOpportunityService we've created in the second part.&lt;p&gt;However, as we know we'll have to build multiple clients, that's probably not the best option: reuse of code would be fairly limited, in fact: we would only be able to reuse the service layer (and accompanying client-side model, generated through WCF RIA Services). There's got to be a way to improve on this, right? &lt;/p&gt;&lt;p&gt;The answer lies in modularity. As you might remember from the first parts of this article series, we're only creating one module for demo purposes: the Employee Opportunity module. The main Silverlight client could, before going into production, import multiple modules: a Management Module, a Reporting Module, .... It makes sense to logically separate these out: some clients might offer all modules, some of the modules, &amp;hellip; . Separating this out offers an advantage: code reuse. Each module could be reused by a variety of clients (for example: our Silverlight Out of Browser client can reuse the same assemblies). &lt;/p&gt;&lt;p&gt;&amp;nbsp; &lt;/p&gt;&lt;h3&gt;Add reference&amp;hellip;&lt;/h3&gt;&lt;p&gt;The first approach is quite similar to what any .NET developer is used to. Instead of adding the Views and ViewModels in our WebClient project, we create a new Silverlight class library. In this class library, we add the Views and ViewModels that logically belong to the Employee Opportunity Module. For other modules, we do the same. &lt;/p&gt;&lt;p&gt;In our WebClient project, we now add a reference to the class librar(y)(ies) of the modules that can be used by this specific client, and we add references to any assemblies that might be used by any of these modules. &lt;/p&gt;&lt;p&gt;Build, run, and we're set. &lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/KevinDockx/____image_4.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;        border-width: 0px;border-style: solid;" title="image" alt="image" src="http://www.silverlightshow.net/Storage/Users/KevinDockx/____image_thumb_1.png" width="525" height="349" /&gt;&lt;/a&gt; &lt;/p&gt;&lt;p&gt;Or are we? &lt;/p&gt;&lt;p&gt;&amp;nbsp; &lt;/p&gt;&lt;h3&gt;A better approach.&lt;/h3&gt;&lt;p&gt;While the previous approach might be valid (we've got our reusability), it does offer a disadvantage: your final XAP contains all the code from the assemblies from the different modules, in other words: it can get quite big, resulting in slower load times and higher bandwidth consumption. Moreover, in quite a few applications the modules the user can access depends on his rights: why would we want to get an XAP, containing all modules, to a client who only has access to one module? &lt;/p&gt;&lt;p&gt;And what's more: as this is an article series on code reuse, something's not quite right with our modules either: we've still got no way to reuse Views without importing a specific ViewModel implementation, or the other way around: the module contains both. As we're building different clients, it's not unimaginable we'll want to reuse the code in a specific ViewModel, but use it as DataContext to a different View. Or we could have a client which want to reuse a specific View, but has no need for the ViewModel, as it provides its own, client-specific implementation. &lt;/p&gt;&lt;p&gt;So, what we want to do is keep our Views in one assembly, and keep our ViewModels in a different assembly. When we start our Silverlight client, the Employee Opportunity module will be composed by importing what's needed. &lt;/p&gt;&lt;p&gt;What we really need here is composability &amp;amp; on-demand loading: say hello to MEF. &lt;/p&gt;&lt;p&gt;&amp;nbsp; &lt;/p&gt;&lt;h3&gt;The Managed Extensibility Framework - a short introduction.&lt;/h3&gt;&lt;p&gt;MEF, or the Managed Extensibility Framework, was designed to simplify the design of extensible applications and components. Applications can have changing requirements, or need to be able to plug in extra pieces of logic. After some amount of time, it can become difficult to add new functionality easily to your application. MEF solves this problem by making it easy to &amp;ldquo;plug in&amp;rdquo; new functionality into your application. In our example, we can use this to "plug in" the modules when needed. &lt;/p&gt;&lt;ul&gt;    &lt;li&gt;First of all, there's the concept of Composition: you start by telling MEF where it can find the parts of the application it needs to provide by creating a catalog. From this catalog, you then create a CompositionContainer. &lt;/li&gt;    &lt;li&gt;Next, there's the Export concept: by using the Export attribute on a component, you tell MEF you want to export this component (type, property), so it can be composed via the container. &lt;/li&gt;    &lt;li&gt;Lastly, there's the Import (or ImportMany) concept, which tells MEF what type of components should be imported in a specific part of your application. &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;These 3 simple concepts are the basics of MEF, and should give a basic understanding of what MEF is and what it does. A lot more information can be found at &lt;a href="http://mef.codeplex.com/"&gt;http://mef.codeplex.com/&lt;/a&gt; &lt;/p&gt;&lt;p&gt;Note: in quite a few projects, MEF is used as a replacement for an Inversion of Control container, like Castle or Ninject. In my opinion, this is defendable (depending on your project requirements, of course), but in essence MEF is designed managing unknown dependencies (hence: plugability), while a classic IoC container is used for managing known dependencies. &lt;/p&gt;&lt;p&gt;&amp;nbsp; &lt;/p&gt;&lt;h3&gt;Some refactoring &amp;amp; custom code&lt;/h3&gt;&lt;p&gt;The first thing to do is separate out our Views from our ViewModels: they both need to be in separate assemblies. This results in the following project division: &lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/KevinDockx/__image_6.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;        border-width: 0px;border-style: solid;" title="image" alt="image" src="http://www.silverlightshow.net/Storage/Users/KevinDockx/__image_thumb_2.png" width="401" height="300" /&gt;&lt;/a&gt; &lt;/p&gt;&lt;p&gt;For now, we'll keep the View assembly as a reference to our WebClient project, and we'll load the ViewModel assembly on-demand when the application starts (more on why I'm making this choice can be found at the end of the article). &lt;/p&gt;&lt;p&gt;&amp;hellip; and we've bumped into a problem. In Silverlight, you can load XAP-files on demand with MEF, but you can't load assemblies on demand. Out of the box, there's no way to compose our application with external assemblies - which is what we'd like. &lt;/p&gt;&lt;p&gt;Luckily, Chris Pietschman (&lt;a href="http://pietschsoft.com/"&gt;http://pietschsoft.com/&lt;/a&gt;) made this possible through his SuperDeploymentCatalog implementation. This is actually for about 95% the same code as a regular DeploymentCatalog, but he changed the HandleOpenReadCompleted method so it allows DLL importing. The complete code can be found in the accompanying source code, in Framework.Silverlight, but this is the part that matters:&lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; HandleOpenReadCompleted(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, OpenReadCompletedEventArgs e){    Exception error = e.Error;    &lt;span class="kwrd"&gt;bool&lt;/span&gt; cancelled = e.Cancelled;    &lt;span class="kwrd"&gt;if&lt;/span&gt; (Interlocked.CompareExchange(&lt;span class="kwrd"&gt;ref&lt;/span&gt; &lt;span class="kwrd"&gt;this&lt;/span&gt;._state, 0xbb8, 0x7d0) != 0x7d0)    {        cancelled = &lt;span class="kwrd"&gt;true&lt;/span&gt;;    }    &lt;span class="kwrd"&gt;if&lt;/span&gt; ((error == &lt;span class="kwrd"&gt;null&lt;/span&gt;) &amp;amp;&amp;amp; !cancelled)    {        &lt;span class="kwrd"&gt;try&lt;/span&gt;        {            &lt;span class="rem"&gt;// Check if a XAP or DLL was downloaded, based on file extension&lt;/span&gt;            &lt;span class="kwrd"&gt;if&lt;/span&gt; (&lt;span class="kwrd"&gt;this&lt;/span&gt;._uri.OriginalString.ToLower().EndsWith(&lt;span class="str"&gt;".xap"&lt;/span&gt;))            {                &lt;span class="rem"&gt;// Load Assemblies from XAP&lt;/span&gt;                IEnumerable&amp;lt;Assembly&amp;gt; assemblies = Package.LoadPackagedAssemblies(e.Result);                &lt;span class="kwrd"&gt;this&lt;/span&gt;.DiscoverParts(assemblies);            }            &lt;span class="kwrd"&gt;else&lt;/span&gt;             {                &lt;span class="rem"&gt;// Load DLL Assembly&lt;/span&gt;                var assemblies = &lt;span class="kwrd"&gt;new&lt;/span&gt; List&amp;lt;Assembly&amp;gt;();                assemblies.Add((&lt;span class="kwrd"&gt;new&lt;/span&gt; AssemblyPart()).Load(e.Result));                &lt;span class="kwrd"&gt;this&lt;/span&gt;.DiscoverParts(assemblies);            }        }        &lt;span class="kwrd"&gt;catch&lt;/span&gt; (Exception exception2)        {            error = &lt;span class="kwrd"&gt;new&lt;/span&gt; InvalidOperationException(&lt;span class="str"&gt;"Strings.InvalidOperationException_ErrorReadingXap"&lt;/span&gt;, exception2);        }    }    &lt;span class="kwrd"&gt;this&lt;/span&gt;.OnDownloadCompleted(&lt;span class="kwrd"&gt;new&lt;/span&gt; AsyncCompletedEventArgs(error, cancelled, &lt;span class="kwrd"&gt;this&lt;/span&gt;));}&lt;/pre&gt;&lt;style type="text/css"&gt;    .csharpcode, .csharpcode pre    {    font-size: small;    color: black;    font-family: consolas, "Courier New", courier, monospace;    background-color: #ffffff;    /*white-space: pre;*/    }    .csharpcode pre { margin: 0em; }    .csharpcode .rem { color: #008000; }    .csharpcode .kwrd { color: #0000ff; }    .csharpcode .str { color: #006080; }    .csharpcode .op { color: #0000c0; }    .csharpcode .preproc { color: #cc6633; }    .csharpcode .asp { background-color: #ffff00; }    .csharpcode .html { color: #800000; }    .csharpcode .attr { color: #ff0000; }    .csharpcode .alt    {    background-color: #f4f4f4;    width: 100%;    margin: 0em;    }    .csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;p&gt;&amp;nbsp; &lt;/p&gt;&lt;p&gt;In the Application_Startup method, we'll load our ViewModel assembly. First, we create a new AggregateCatalog instance. To this type of catalog, other catalogs can be added dynamically (this will also come in useful later on in this article series). Next, we create a new SuperDeploymentCatalog, pointing to the ViewModel assembly. This catalog is added to the Catalogs collection of the AggregateCatalog instance. &lt;/p&gt;&lt;p&gt;We add an event handler to the DownloadCompleted event of our SuperDeploymentCatalog instance. When this event is correctly completed, we set the RootVisual to a new instance of our applications' MainPage. Note that this shouldn't be done earlier, as MainPage contains a View which in turn imports a ViewModel instance: that ViewModel instance is only available after the ViewModel assembly has been loaded. &lt;/p&gt;&lt;p&gt;Next, we'll call the DownloadAsync() method, and we initialize MEF's CompositionHost by passing in our AggregateCatalog instance. &lt;/p&gt;&lt;pre class="csharpcode"&gt;&lt;span class="kwrd"&gt;private&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Application_Startup(&lt;span class="kwrd"&gt;object&lt;/span&gt; sender, StartupEventArgs e){    &lt;span class="kwrd"&gt;this&lt;/span&gt;.Resources.Add(&lt;span class="str"&gt;"WebContext"&lt;/span&gt;, WebContext.Current);    WebRequest.RegisterPrefix(&lt;span class="str"&gt;"http://"&lt;/span&gt;, WebRequestCreator.ClientHttp);    WebRequest.RegisterPrefix(&lt;span class="str"&gt;"https://"&lt;/span&gt;, WebRequestCreator.ClientHttp);    var catalog = &lt;span class="kwrd"&gt;new&lt;/span&gt; AggregateCatalog();    var catalogVM = &lt;span class="kwrd"&gt;new&lt;/span&gt; SuperDeploymentCatalog(&lt;span class="str"&gt;"SalesDashboard.SL.Modules.EmpOpp.ViewModels.dll"&lt;/span&gt;);    catalog.Catalogs.Add(catalogVM);    catalogVM.DownloadCompleted += (senderVM, argsVM) =&amp;gt;    {        &lt;span class="kwrd"&gt;if&lt;/span&gt; (argsVM.Error != &lt;span class="kwrd"&gt;null&lt;/span&gt;)        {            MessageBox.Show(argsVM.Error.Message);        }        &lt;span class="kwrd"&gt;else&lt;/span&gt;        {           &lt;span class="kwrd"&gt;this&lt;/span&gt;.RootVisual = &lt;span class="kwrd"&gt;new&lt;/span&gt; MainPage();        }    };    catalogVM.DownloadAsync();    CompositionHost.Initialize(catalog);    CompositionInitializer.SatisfyImports(&lt;span class="kwrd"&gt;this&lt;/span&gt;);}&lt;/pre&gt;&lt;style type="text/css"&gt;    .csharpcode, .csharpcode pre    {    font-size: small;    color: black;    font-family: consolas, "Courier New", courier, monospace;    background-color: #ffffff;    /*white-space: pre;*/    }    .csharpcode pre { margin: 0em; }    .csharpcode .rem { color: #008000; }    .csharpcode .kwrd { color: #0000ff; }    .csharpcode .str { color: #006080; }    .csharpcode .op { color: #0000c0; }    .csharpcode .preproc { color: #cc6633; }    .csharpcode .asp { background-color: #ffff00; }    .csharpcode .html { color: #800000; }    .csharpcode .attr { color: #ff0000; }    .csharpcode .alt    {    background-color: #f4f4f4;    width: 100%;    margin: 0em;    }    .csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;p&gt;We can now build and run our application. The application is composed on-demand: the ViewModels are not included as a reference, they are loaded when needed. This results in a smaller XAP (faster loading times), composability, and an assembly that can easily be reused. We've now got a technique for code reuse across clients: instead of having to rewrite your ViewModel code, you can simply reuse the existing code. &lt;/p&gt;&lt;p&gt;&lt;a href="http://www.silverlightshow.net/Storage/Users/KevinDockx/image_8.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px;        border-width: 0px;border-style: solid;" title="image" alt="image" src="http://www.silverlightshow.net/Storage/Users/KevinDockx/image_thumb_3.png" width="527" height="313" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Note: as we're loading assemblies on-demand, you might want to ensure the correct version is loaded. By default, when you build a project in debug-mode, the resulting assembly is put in the projects' bin/debug-folder (wherefrom it can't be loaded on demand by the Silverlight application, as you won't have rights to access that folder). An easy way to ensure the resulting assembly is always available is by changing its output path to the ClientBin folder of the WebClient.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;Conclusion &lt;/h3&gt;&lt;p&gt;We've seen a few different techniques to separate out parts of our application: referencing &amp;amp; loading on demand through MEF. This allows us to reuse code across different clients. &lt;/p&gt;&lt;p&gt;Then again, we're not quite there yet. In fact, we're just getting started with this: can we do better? &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;What's coming up? &lt;/h3&gt;&lt;p&gt;You might notice I've carefully avoided a few pretty obvious issues in this article: why are we not loading the Views on demand, but keeping them as a reference instead? And what about those other assemblies, like the model assembly? As we're modularizing the application, it would make sense to only load the model assembly when the ViewModels using that model are necessary, no? &lt;/p&gt;&lt;p&gt;Of course, those are valid concerns, and this is exactly what we'll tackle in the next part of this series. It requires quite a bit of custom coding: we'll need some extensions to the Silverlight Navigation framework (as it's not as straightforward as we would like to navigate to views in assemblies that are loaded on-demand), and we'll need a component loader component (to ensure we can load all necessary assemblies at once, instead of one by one). After that part, we'll end up with a truly composable app, separated out in modules/assemblies that can easily be reused across different clients. &lt;/p&gt;&lt;p&gt;Up until then: happy coding! &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;About the author&lt;/h3&gt;&lt;p&gt;Kevin Dockx lives in Belgium and works at RealDolmen, one of Belgium's biggest ICT companies, where he is a technical specialist/project leader on .NET web applications, mainly Silverlight, and a solution manager for Rich Applications (Silverlight, Windows Phone 7 Series, WPF, Surface, HTML5). His main focus lies on all things Silverlight, but he still keeps an eye on the new developments concerning other products from the Microsoft .NET (Web) Stack. As a Silverlight enthusiast, he's a regular speaker on various national and international events, like Microsoft DevDays in The Netherlands, Microsoft Techdays in Belgium &amp;amp; Portugal, NDC2011, ... Next to that, he also authored a best-selling Silverlight book, Packt Publishing's &lt;a href="https://www.packtpub.com/microsoft-silverlight-4-data-and-services-cookbook/book"&gt;Silverlight 4 Data and Services Cookbook&lt;/a&gt;, together with Gill Cleeren. His blog, which contains various tidbits on Silverlight, .NET, and the occasional rambling, can be found at &lt;a href="http://blog.kevindockx.com/"&gt;http://blog.kevindockx.com/&lt;/a&gt;, and you can contact him on Twitter via &lt;a href="http://twitter.com/#!/KevinDockx"&gt;@KevinDockx&lt;/a&gt;.&lt;/p&gt;</description>      <link>http://www.silverlightshow.net/items/Part-3-Developing-for-a-multitude-of-clients-strategies-for-code-reuse-and-keeping-costs-in-check.aspx</link>      <author>editorial@silverlightshow.net (Kevin Dockx )</author>      <comments>http://www.silverlightshow.net/items/Part-3-Developing-for-a-multitude-of-clients-strategies-for-code-reuse-and-keeping-costs-in-check.aspx#comments</comments>      <guid isPermaLink="true">http://www.silverlightshow.net/items/Part-3-Developing-for-a-multitude-of-clients-strategies-for-code-reuse-and-keeping-costs-in-check.aspx</guid>      <pubDate>Fri, 24 Feb 2012 20:23:00 GMT</pubDate>    </item>    <item>      <link>http://feedproxy.google.com/~r/MarkMonster_Silverlight/~3/yoaajKEel-Q/reset-the-back-of-your-tile-through-push</link>      <author xmlns="http://www.w3.org/2005/Atom">        <name>Mark Monster</name>      </author>      <category>.NET</category>      <category>Phone</category>      <category>Silverlight</category>      <category>Technology</category>      <category>WP7</category>      <category>WPDev</category>      <title>Reset the back of your Tile through push</title>      <description>&lt;p&gt;Have you ever created the back of your tile with a Push notification? You just add some xml in the Notification Message that you send to the Notification Channel.&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:BF48545B-72FC-48CD-B241-BB2967E2EF01:083da8d6-49e1-4dfc-9156-8517f754b4ba" class="wlWriterEditableSmartContent"&gt;&lt;pre class="brush:xml; gutter:true; first-line: 1; tab-size: 4; toolbar: false; collapse: false; "&gt;&amp;lt;wp:BackBackgroundImage&amp;gt;http://someurlinthewild.com/BackTileBackground.png&amp;lt;/wp:BackBackgroundImage&amp;gt;&amp;lt;wp:BackTitle&amp;gt;Back&amp;lt;/wp:BackTitle&amp;gt;&amp;lt;wp:BackContent&amp;gt;Content&amp;lt;/wp:BackContent&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Yeah that’s easy. Ever tried to get rid of it using a Push notification? Yeah, trying to push without content. Thought that should work as well, didn’t. Leaving the full Xml elements from the Push Notification? Didn’t work either. You explicitly have to add an attribute &lt;strong&gt;Action&lt;/strong&gt; and give it the value &lt;strong&gt;Clear&lt;/strong&gt;, like this:&lt;/p&gt;&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:BF48545B-72FC-48CD-B241-BB2967E2EF01:7bd7b889-0855-4fa1-b771-521d6a5bc650" class="wlWriterEditableSmartContent"&gt;&lt;pre class="brush:xml; gutter:true; first-line: 1; tab-size: 4; toolbar: false; collapse: false; "&gt;&amp;lt;wp:BackBackgroundImage Action=&amp;quot;Clear&amp;quot;&amp;gt;&amp;lt;/wp:BackBackgroundImage&amp;gt;&amp;lt;wp:BackTitle Action=&amp;quot;Clear&amp;quot;&amp;gt;&amp;lt;/wp:BackTitle&amp;gt;&amp;lt;wp:BackContent Action=&amp;quot;Clear&amp;quot;&amp;gt;&amp;lt;/wp:BackContent&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This works for the Title and Count properties for the front of your tile as well. This can all be found in &lt;a href="http://msdn.microsoft.com/en-us/library/hh202945(v=vs.92).aspx"&gt;the documentation for Push Notifications&lt;/a&gt; as well, but today it took me some time to figure this out.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/MarkMonster_Silverlight/~4/yoaajKEel-Q" height="1" width="1"/&gt;</description>      <pubDate>Tue, 21 Feb 2012 21:26:52 +0100</pubDate>      <updated xmlns="http://www.w3.org/2005/Atom">2012-02-21T21:26:52+01:00</updated>      <origLink xmlns="http://rssnamespace.org/feedburner/ext/1.0">http://mark.mymonster.nl/2012/02/21/reset-the-back-of-your-tile-through-push</origLink>    </item>    <item>      <title>Knockout Session from South Florida Code Camp</title>      <link>http://feeds.johnpapa.net/~r/JohnPapa/~3/giVOrNyBYNs/sflcc2012slides</link>      <description>&lt;p&gt;I had a great time at the South Florida Code Camp last weekend presenting a Whirlwind tour of Knockout and Javascript Patterns. The rooms were small and way overpacked, but I’ll take that as a sign that the topic is popular &lt;img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://johnpapa.net/Media/Default/Windows-Live-Writer/Knockout-Session-from-South-Florida-Code_9E67/wlEmoticon-smile_2.png"&gt;&lt;/p&gt; &lt;p&gt;The Knockout session is a whirlwind tour of &lt;a href="http://knockoutjs.com/"&gt;KnockoutJS&lt;/a&gt; ’s features. If you like it and want to see more in depth material on Knockout, you can check out my full&amp;nbsp; course at &lt;a href="http://pluralsight.net"&gt;Pluralsight&lt;/a&gt; titled &lt;a href="http://jpapa.me/komvvm"&gt;Building HTML5 and JavaScript Apps with MVVM and KnockoutJS&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;&lt;a href="http://jpapa.me/komvvm"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://johnpapa.net/Media/Default/Windows-Live-Writer/Knockout-Session-from-South-Florida-Code_9E67/image_3.png" width="1283" height="220"&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Here are the &lt;a href="http://johnpapa.net/files/downloads/kowhirlwind.zip"&gt;slides and sample code&lt;/a&gt; from the presentation at code camp. Thanks for attending!&lt;/p&gt;&lt;div class="feedflare"&gt;&lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=giVOrNyBYNs:2friM5mY9VI:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?i=giVOrNyBYNs:2friM5mY9VI:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=giVOrNyBYNs:2friM5mY9VI:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?i=giVOrNyBYNs:2friM5mY9VI:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=giVOrNyBYNs:2friM5mY9VI:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=giVOrNyBYNs:2friM5mY9VI:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JohnPapa/~4/giVOrNyBYNs" height="1" width="1"/&gt;</description>      <pubDate>Tue, 21 Feb 2012 16:23:31 GMT</pubDate>      <guid isPermaLink="false">http://johnpapa.net:80/sflcc2012slides</guid>      <origLink xmlns="http://rssnamespace.org/feedburner/ext/1.0">http://johnpapa.net:80/sflcc2012slides</origLink>    </item>    <item>      <title>Yet Another Podcast #60–Knockout.js</title>      <link>http://feedproxy.google.com/~r/JesseLiberty-SilverlightGeek/~3/tQiJcpw4vPs/</link>      <comments>http://jesseliberty.com/2012/02/20/yet-another-podcast-60knockout-js/#comments</comments>      <pubDate>Mon, 20 Feb 2012 21:06:03 +0000</pubDate>      <creator xmlns="http://purl.org/dc/elements/1.1/">Jesse Liberty</creator>      <category><![CDATA[Essentials]]></category>      <category><![CDATA[JavaScript]]></category>      <category><![CDATA[Languages]]></category>      <category><![CDATA[MVVM]]></category>      <category><![CDATA[Patterns & Skills]]></category>      <category><![CDATA[Podcast]]></category>      <category><![CDATA[YapCast]]></category>      <guid isPermaLink="false">http://jesseliberty.com/?p=5219</guid>      <encoded xmlns="http://purl.org/rss/1.0/modules/content/"><![CDATA[Talking with Steve Sanderson, John Papa and Jon Galloway about Knockout.js and client side JavaScript programming. KnockoutJS Home Steve Sanderson’s Home Page John Papa’s Home Page Jon Galloway’s Home Page Knockout Tutorials Pluralsight Course on Knockout Single Page Applications Listen &#8230;...<br/><br/>For the complete article and hyperlinks, please visit my blog at http://JesseLiberty.com<div class="feedflare"><a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=tQiJcpw4vPs:vhrsTrssYcM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=tQiJcpw4vPs:vhrsTrssYcM:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=tQiJcpw4vPs:vhrsTrssYcM:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?i=tQiJcpw4vPs:vhrsTrssYcM:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=tQiJcpw4vPs:vhrsTrssYcM:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?i=tQiJcpw4vPs:vhrsTrssYcM:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=tQiJcpw4vPs:vhrsTrssYcM:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?i=tQiJcpw4vPs:vhrsTrssYcM:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?a=tQiJcpw4vPs:vhrsTrssYcM:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/JesseLiberty-SilverlightGeek?d=qj6IDK7rITs" border="0"></img></a></div><img src="http://feeds.feedburner.com/~r/JesseLiberty-SilverlightGeek/~4/tQiJcpw4vPs" height="1" width="1"/>]]></encoded>      <commentRss xmlns="http://wellformedweb.org/CommentAPI/">http://jesseliberty.com/2012/02/20/yet-another-podcast-60knockout-js/feed/</commentRss>      <comments xmlns="http://purl.org/rss/1.0/modules/slash/">2</comments>      <enclosure url="http://jesseliberty.com/wp-content/media/Show60.mp3" length="33567170" type="audio/mpeg" />      <origLink xmlns="http://rssnamespace.org/feedburner/ext/1.0">http://jesseliberty.com/2012/02/20/yet-another-podcast-60knockout-js/</origLink>    </item>    <item>      <title>Impressions, slides and code from TechDays Belgium and Netherlands</title>      <link>http://geekswithblogs.net/lbugnion/archive/2012/02/19/impressions-slides-and-code-from-techdays-belgium-and-netherlands.aspx</link>      <description>&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; Posted the video of “MVVM Applied” below.&lt;/p&gt;  &lt;p&gt;This week I was “on tour” in Belgium and Netherlands and presented 3 times:&lt;/p&gt;  &lt;h2&gt;“MVVM Applied, From Silverlight to Windows Phone to Windows 8”&lt;/h2&gt;  &lt;p&gt;(in Belgium and Netherlands)&lt;/p&gt;  &lt;p&gt;The goal of this session was to make people feel confident that the skills they acquired working in various XAML frameworks (Silverlight, Windows Phone, WPF, Surface, etc) are going to help them tremendously when developing Windows 8 applications. It was a session packed with code, where we went from a Silverlight 5 application, added design time experience, reworked the design in Expression Blend, then created an application reusing most of the code in Windows Phone (including design time experience in Blend), and then created a WinRT application which, again, reused most of the code (including design time experience in the Visual Studio Designer). Of course the sample code uses &lt;a href="http://www.galasoft.ch/mvvm"&gt;the MVVM Light Toolkit&lt;/a&gt; in order to make the coding easier, and to maximize code reuse.&lt;/p&gt;  &lt;p&gt;I also showed techniques to keep as much compatible code as possible between the frameworks, and abstract the differences. For instance, Windows 8 is more asynchronous than Silverlight (which was already more asynchronous than WPF, remember the discussions around the lack of synchronous web requests in Silverlight?). In Windows 8, operations such as file system access and stream access (read/write) are asynchronous now. Using techniques such as callbacks, you can quite easily isolate the code that is Windows 8-specific, and call into it from shared code (more about this technique in a following blog post). It was an interesting session that gathered quite a lot of positive feedback.&lt;/p&gt;  &lt;p&gt;You can &lt;a href="https://skydrive.live.com/?cid=40cffde85f1ab56a&amp;amp;id=40CFFDE85F1AB56A%211136"&gt;download the following from Skydrive&lt;/a&gt;:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Start solution (PictureUploader-0-Start, running Silverlight 5 application, without design time data) &lt;/li&gt;    &lt;li&gt;Silverlight 5 (PictureUploader-1-SL5) design time data complete &lt;/li&gt;    &lt;li&gt;Windows Phone 7 (PictureUploader-2-WP7) application complete &lt;/li&gt;    &lt;li&gt;Windows 8 (PictureUploader-3-Win8) application complete &lt;/li&gt;    &lt;li&gt;Code snippets for VS10 (Snippets.vssettings, Silverlight 5 and Windows Phone) &lt;/li&gt;    &lt;li&gt;Code snippets for VS11 (SnippetsWin8.vssetings, Windows 8) &lt;/li&gt;    &lt;li&gt;Slides (MVVMApplied) &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;To import the code snippets in Visual Studio’s toolbox, select the menu Tools, Import and Export Settings, and select the snippets file. This will import the snippets into your toolbox. Note that if you had snippets in your toolbox before, it will add the new ones instead of overwriting the old ones.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Note about the Windows 8 sample: For some reason the sample refuses to start if you include the GalaSoft.MvvmLight.Extras DLL for Windows 8. It does however run just fine if you include the project instead. For that reason, I included a copy of that project’s source code and referenced it directly. Given the current state of Windows RT (developer preview), I won’t even waste any time looking for a fix. We’ll see about that in the Consumer preview ;)&lt;/em&gt;&lt;/p&gt; &lt;video controls="" poster="http://media.ch9.ms/ch9/7ad8/553f1512-b527-4639-8e92-088f852d7ad8/Techdays2012NetherlandsMVVMAppliedfromSilverlight_Custom.jpg"&gt;&lt;source src="http://media.ch9.ms/ch9/7ad8/553f1512-b527-4639-8e92-088f852d7ad8/Techdays2012NetherlandsMVVMAppliedfromSilverlight_mid.mp4" /&gt;&lt;source src="http://media.ch9.ms/ch9/7ad8/553f1512-b527-4639-8e92-088f852d7ad8/Techdays2012NetherlandsMVVMAppliedfromSilverlight.webm" /&gt;&lt;/video&gt;  &lt;p&gt;&lt;em&gt;The video of this talk, also available at &lt;a href="http://channel9.msdn.com/Events/TechDays/Techdays-2012-the-Netherlands/2264"&gt;Channel 9&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;  &lt;h2&gt;“100 Fidelity: From comps to apps, tips and tricks for XAML integration”&lt;/h2&gt;  &lt;p&gt;(in Netherlands only)&lt;/p&gt;  &lt;p&gt;The purpose of this session was to show the audience usage of various tools (of course mainly Expression Blend) to create user experience that is as close from the designers’ vision as possible. Nowadays with XAML and Blend, it is possible to reach 100% fidelity. I also talked about the integrator role, a role that we fully embrace at &lt;a href="http://www.identitymine.com"&gt;IdentityMine&lt;/a&gt;. The integrator’s main tool is Blend, and Blend is used to integrate the design assets into the application. We talked about and demoed the features that make Blend truly shine, such a gradient creation, resource management, animations, etc.&lt;/p&gt;  &lt;p&gt;Even though this session was in the graveyard shift (Friday afternoon, 4PM), I was positively surprised to see quite a few people attending. Also, when asked who in the audience is a designer, I saw approximately 10 hands raising, which is more than usual. Are we seeing more interest from designers in Blend due to Metro? One can only wish so!&lt;/p&gt;  &lt;p&gt;You can &lt;a href="https://skydrive.live.com/?cid=40cffde85f1ab56a&amp;amp;id=40CFFDE85F1AB56A%211136"&gt;download the following from Skydrive&lt;/a&gt;:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Slides (100%Fidelity) &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;There is no source code for this session, because most of the demos were about creating and integrating assets in Blend. Refer to the video for more details.&lt;/p&gt;  &lt;h2&gt;Screenshots&lt;/h2&gt;  &lt;p&gt;These screenshots are taken from the “MVVM Applied” session&lt;/p&gt;  &lt;p&gt;&lt;a title="2012021504 by lbugnionblog, on Flickr" href="http://www.flickr.com/photos/36917929@N06/6883243071/"&gt;&lt;img alt="2012021504" src="http://farm8.staticflickr.com/7055/6883243071_15de2d83b2_z.jpg" width="640" height="423" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;em&gt;Silverlight 5 application with a beginning of styling&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="2012021505 by lbugnionblog, on Flickr" href="http://www.flickr.com/photos/36917929@N06/6883240399/"&gt;&lt;img alt="2012021505" src="http://farm8.staticflickr.com/7062/6883240399_26fff3ff6f_z.jpg" width="352" height="640" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;em&gt;Windows Phone application start screen&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="2012021507 by lbugnionblog, on Flickr" href="http://www.flickr.com/photos/36917929@N06/6883241443/"&gt;&lt;img alt="2012021507" src="http://farm8.staticflickr.com/7045/6883241443_c9665737f3_z.jpg" width="352" height="640" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Windows Phone application during upload&lt;/em&gt;&lt;/p&gt;  &lt;p&gt; &lt;a title="2012021508 by lbugnionblog, on Flickr" href="http://www.flickr.com/photos/36917929@N06/6883242077/"&gt;&lt;img alt="2012021508" src="http://farm8.staticflickr.com/7204/6883242077_b1a1c6c1ab_z.jpg" width="352" height="640" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Windows Phone application, upload completed&lt;/em&gt;&lt;/p&gt;  &lt;p&gt; &lt;a title="2012021501 by lbugnionblog, on Flickr" href="http://www.flickr.com/photos/36917929@N06/6883234961/"&gt;&lt;img alt="2012021501" src="http://farm8.staticflickr.com/7046/6883234961_ca2901aae9_z.jpg" width="640" height="360" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;em&gt;Windows 8 application, start screen with application bar&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="2012021502 by lbugnionblog, on Flickr" href="http://www.flickr.com/photos/36917929@N06/6883239829/"&gt;&lt;img alt="2012021502" src="http://farm8.staticflickr.com/7067/6883239829_19fd596791_z.jpg" width="640" height="360" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;em&gt;Windows 8 picture picker&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="2012021503 by lbugnionblog, on Flickr" href="http://www.flickr.com/photos/36917929@N06/6883236309/"&gt;&lt;img alt="2012021503" src="http://farm8.staticflickr.com/7203/6883236309_fb4ff7826e_z.jpg" width="640" height="360" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;em&gt;Windows 8 application during upload&lt;/em&gt;&lt;/p&gt;  &lt;h2&gt;A few impressions&lt;/h2&gt;  &lt;p&gt;&lt;a title="WP_001358 by Laurent Bugnion, on Flickr" href="http://www.flickr.com/photos/lbugnion/6905413593/"&gt;&lt;img alt="WP_001358" src="http://farm8.staticflickr.com/7205/6905413593_8c4580c6f8.jpg" width="500" height="375" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;em&gt;The room where I presented MVVM Applied in Netherlands&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="WP_001359 by Laurent Bugnion, on Flickr" href="http://www.flickr.com/photos/lbugnion/6905414541/"&gt;&lt;img alt="WP_001359" src="http://farm8.staticflickr.com/7067/6905414541_8d54b0d17f.jpg" width="500" height="375" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;em&gt;The room where I presented MVVM Applied in Netherlands&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="WP_001360 by Laurent Bugnion, on Flickr" href="http://www.flickr.com/photos/lbugnion/6905418111/"&gt;&lt;img alt="WP_001360" src="http://farm8.staticflickr.com/7063/6905418111_38b2be7e24.jpg" width="500" height="375" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;They had my book (and Brennon’s) at the conference bookstore :)&lt;/em&gt; &lt;/p&gt; &lt;object type="application/x-shockwave-flash" width="640" height="360" data="http://www.flickr.com/apps/video/stewart.swf?v=109786" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"&gt; &lt;param name="flashvars" value="intl_lang=en-us&amp;amp;photo_secret=74a3f9a504&amp;amp;photo_id=6905458231&amp;amp;hd_default=false" /&gt; &lt;param name="movie" value="http://www.flickr.com/apps/video/stewart.swf?v=109786" /&gt; &lt;param name="bgcolor" value="#000000" /&gt; &lt;param name="allowFullScreen" value="true" /&gt;&lt;embed type="application/x-shockwave-flash" src="http://www.flickr.com/apps/video/stewart.swf?v=109786" bgcolor="#000000" allowfullscreen="true" flashvars="intl_lang=en-us&amp;amp;photo_secret=74a3f9a504&amp;amp;photo_id=6905458231&amp;amp;hd_default=false" height="360" width="640"&gt;&lt;/embed&gt;&lt;/object&gt;  &lt;p&gt;&lt;em&gt;A cool clownfish&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Cheers,    &lt;br /&gt;Laurent&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;div style="margin-bottom: -1em"&gt;   &lt;div style="vertical-align: middle"&gt;&lt;a href="http://www.galasoft.ch/"&gt;&lt;img title="GalaSoft Laurent Bugnion" alt="GalaSoft Laurent Bugnion" src="http://www.galasoft.ch/logo/Current/logo_120x30.png" /&gt;&lt;/a&gt; &lt;/div&gt;    &lt;div style="position: relative; top: -36px; left: 130px"&gt;&lt;strong&gt;&lt;a href="http://www.galasoft.ch/contact_en.html"&gt;Laurent Bugnion (GalaSoft)&lt;/a&gt;&lt;/strong&gt;       &lt;br /&gt;&lt;a href="http://feeds.feedburner.com/galasoft"&gt;Subscribe&lt;/a&gt; | &lt;a href="http://twitter.com/lbugnion"&gt;Twitter&lt;/a&gt; | &lt;a href="http://www.facebook.com/lbugnion"&gt;Facebook&lt;/a&gt; | &lt;a href="http://www.flickr.com/photos/lbugnion"&gt;Flickr&lt;/a&gt; | &lt;a href="http://www.linkedin.com/in/lbugnion"&gt;LinkedIn&lt;/a&gt;       &lt;br /&gt;&lt;iframe style="border-bottom-style: none; margin-top: 7px; border-left-style: none; width: 450px; border-top-style: none; margin-bottom: -20px; height: 23px; border-right-style: none; overflow: hidden" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblog.galasoft.ch/archive/2012/02/19/impressions-slides-and-code-from-techdays-belgium-and-netherlands.aspx&amp;amp;layout=standard&amp;amp;show_faces=true&amp;amp;width=450&amp;amp;action=like&amp;amp;colorscheme=light" frameborder="0" allowtransparency="allowtransparency" scrolling="no"&gt;&lt;/iframe&gt;&lt;/div&gt; &lt;/div&gt; &lt;img src="http://geekswithblogs.net/lbugnion/aggbug/148757.aspx" width="1" height="1" /&gt;</description>      <creator xmlns="http://purl.org/dc/elements/1.1/">Laurent Bugnion</creator>      <guid>http://geekswithblogs.net/lbugnion/archive/2012/02/19/impressions-slides-and-code-from-techdays-belgium-and-netherlands.aspx</guid>      <pubDate>Sun, 19 Feb 2012 22:30:25 GMT</pubDate>      <comment xmlns="http://wellformedweb.org/CommentAPI/">http://geekswithblogs.net/lbugnion/comments/148757.aspx</comment>      <comments>http://geekswithblogs.net/lbugnion/archive/2012/02/19/impressions-slides-and-code-from-techdays-belgium-and-netherlands.aspx#feedback</comments>      <comments xmlns="http://purl.org/rss/1.0/modules/slash/">2</comments>      <commentRss xmlns="http://wellformedweb.org/CommentAPI/">http://geekswithblogs.net/lbugnion/comments/commentRss/148757.aspx</commentRss>      <ping xmlns="http://madskills.com/public/xml/rss/module/trackback/">http://geekswithblogs.net/lbugnion/services/trackbacks/148757.aspx</ping>    </item>    <item>      <title>South Florida Code Camp is Tomorrow</title>      <link>http://feeds.johnpapa.net/~r/JohnPapa/~3/9AgQM_YA2Jc/sfcc2012</link>      <description>&lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p align="justify"&gt;&lt;a href="http://www.fladotnet.com/codecamp/"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px 0px 0px 5px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" align="right" src="http://johnpapa.net/Media/Default/Windows-Live-Writer/e58a68b47406_CA7C/image_3.png" width="240" height="102"&gt;&lt;/a&gt;I’ll be heading to Ft Lauderdale tonight so I can get a bright and early start for &lt;a href="http://www.fladotnet.com/codecamp/"&gt;South Florida Code Camp&lt;/a&gt; tomorrow. They have a pretty good lineup and I’ll be presenting 2 sessions. Hope to catch you there!&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;HTML5 and JavaScript Fundamentals with MVVM and KnockoutJS&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;em&gt;John Papa&lt;/em&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;em&gt;11:10am – 12:20pm&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p align="justify"&gt;Do you write a lot of HTML and JavaScript code to push and pull data? In this session you will learn popular techniques to use &lt;a href="http://johnpapa.net/Media/Default/Windows-Live-Writer/e58a68b47406_CA7C/image_7.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 3px 0px 3px 3px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" align="right" src="http://johnpapa.net/Media/Default/Windows-Live-Writer/e58a68b47406_CA7C/image_thumb_2.png" width="340" height="197"&gt;&lt;/a&gt;data binding to bind your data to your target controls in HTML writing less code, but gaining more power. See how to consume json data, use json objects in JavaScript, use declarative binding, using KnockoutJS. You will also see how to use the MVVM pattern to write data centric JavaScript code that follows good separation patterns and creates highly maintainable code.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Techniques, Strategies, and Patterns for Structuring JavaScript Code&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;em&gt;John Papa&lt;/em&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;1:20pm – 2:30pm&lt;/strong&gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p align="justify"&gt;Are you writing a lot of JavaScript code and trying to apply good practices to make it more maintainable and flexible? In this session learn about common practices to make avoid problems such as polluting the global namespace and code that executes inconsistently, by using patterns such as separation and the Revealing Module Pattern. You will leave this session with several tips on how to write clean, more maintainable, and consistent code.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&amp;lt;shameless plug&amp;gt;&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;If you enjoy these and want more, you can check my latest course &lt;a href="http://jpapa.me/komvvm"&gt;Building HTML5 and JavaScript Apps with MVVM and Knockout&lt;/a&gt; which is now available at &lt;a href="http://pluralsight.net/"&gt;Pluralsight&lt;/a&gt;. In it, I demonstrate how to build robust and maintainable Web applications with JavaScript patterns, MVVM, and &lt;a href="http://knockoutjs.com/"&gt;KnockoutJS&lt;/a&gt; . &lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&amp;lt;/shameless plug&amp;gt;&lt;/p&gt;&lt;div class="feedflare"&gt;&lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=9AgQM_YA2Jc:IpEYx9Cty74:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?i=9AgQM_YA2Jc:IpEYx9Cty74:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=9AgQM_YA2Jc:IpEYx9Cty74:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?i=9AgQM_YA2Jc:IpEYx9Cty74:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=9AgQM_YA2Jc:IpEYx9Cty74:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.johnpapa.net/~ff/JohnPapa?a=9AgQM_YA2Jc:IpEYx9Cty74:dnMXMwOfBR0"&gt;&lt;img src="http://feeds.feedburner.com/~ff/JohnPapa?d=dnMXMwOfBR0" border="0"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/JohnPapa/~4/9AgQM_YA2Jc" height="1" width="1"/&gt;</description>      <pubDate>Fri, 17 Feb 2012 19:43:25 GMT</pubDate>      <guid isPermaLink="false">http://johnpapa.net:80/sfcc2012</guid>      <origLink xmlns="http://rssnamespace.org/feedburner/ext/1.0">http://johnpapa.net:80/sfcc2012</origLink>    </item>    <item>      <title>Screenshots of my #mvvm demo at #techdaysbe</title>      <link>http://geekswithblogs.net/lbugnion/archive/2012/02/15/screenshots-of-my-mvvm-demo-at-techdaysbe.aspx</link>      <description>&lt;p&gt;Today I gave a talk in TechDays in Belgium about MVVM in Silverlight 5, Windows Phone 7 and Windows 8. This was the first time I gave that particular talk, and in addition keep in mind this is a developer preview, meaning that it is not finished, and not always stable. &lt;/p&gt;  &lt;p&gt;I had a few surprises with this build. For example from time to time, the new “Metro style applications” just cannot be launched anymore. Nothing that a simple reboot cannot fix… but I’ll come back to that in a moment.&lt;/p&gt;  &lt;p&gt;A couple of hours before my session started, I was notified by Windows 8 that it wanted to install updates. I even joked about it on Twitter. No way was I going to install updates just before a talk! Everyone knows you shouldn’t do that, it can change your computer configuration and cause unexpected effects during the talk! Yeah I thought I was clever.&lt;/p&gt;  &lt;p&gt;The presentation went well, but towards the end I wanted to run the application to show it to my audience. Unfortunately when I clicked the shortcut on the Start screen, nothing happened. I tried launching another Metro app and it also failed. I immediately thought it was the effect I mentioned before, where Metro apps stop working and you need to reboot. Turns out I was wrong. Of course the decision I had to take, with more than 100 people waiting for my next move, was tough. I decided to reboot. And yep, at that moment I had totally forgotten about the pending updates.&lt;/p&gt;  &lt;p&gt;And this is what happened:&lt;/p&gt; &lt;a title="422588_10150597686144651_824314650_8775617_2027170317_n by lbugnionblog, on Flickr" href="http://www.flickr.com/photos/36917929@N06/6883256469/"&gt;&lt;img alt="422588_10150597686144651_824314650_8775617_2027170317_n" src="http://farm8.staticflickr.com/7053/6883256469_763aa1aa58_o.jpg" width="720" height="539" /&gt;&lt;/a&gt;   &lt;p&gt;Damn &lt;img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://geekswithblogs.net/images/geekswithblogs_net/lbugnion/Windows-Live-Writer/Screenshots-of-my-mvvm-demo-at-techdaysb_144F8/wlEmoticon-smile_2.png" /&gt; well I have to say the audience was really nice and supportive. I took the occasion to take a few questions (THANK YOU to those who asked something and gave me the chance to fill that void with content!!)&lt;/p&gt;  &lt;h2&gt;What was the issue actually?&lt;/h2&gt;  &lt;p&gt;After reboot I tried again, and the same result happened: No Metro apps could be started. From the room, I got the suggestion that it was a resolution problem. And indeed: You cannot run Metro applications with less than 768 pixels vertical resolution. And because of the projector, I was running at 1280x720. So I thought OK, let’s try it, increased the resolution to 1280x768 and indeed I could start the Metro apps… but then the projector stopped showing the image!&lt;/p&gt;  &lt;p&gt;That’s really a tough problem to solve, and I must say I am not quite sure yet how to make this work. Projectors nowadays are, for the most part, limited to 1024x768 resolution. If you want to go 16:9, you often get 1280x720. My tests after my session show that at 1024x768, Metro apps seem to run but I am not sure what will happen when I attach the projector again in my next session… I guess I will find out tomorrow &lt;img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://geekswithblogs.net/images/geekswithblogs_net/lbugnion/Windows-Live-Writer/Screenshots-of-my-mvvm-demo-at-techdaysb_144F8/wlEmoticon-smile_2.png" /&gt;&lt;/p&gt;  &lt;h2&gt;Screenshots&lt;/h2&gt;  &lt;p&gt;I thought I would take this occasion to show my excellent audience what I wanted to actually show them, and how the finished Metro application looks like. So here are some screenshots. First you will recognize the Silverlight 5 version of the uploader, then the Windows Phone one, and finally the Metro application. I will post the code and the presentation in the following few days, and the video of the presentation will follow shortly after the Windows 8 beta is released. I want to really thank everyone for their attention and support, and for the many kind words I received after my session.&lt;/p&gt; &lt;a title="2012021504 by lbugnionblog, on Flickr" href="http://www.flickr.com/photos/36917929@N06/6883243071/"&gt;&lt;img alt="2012021504" src="http://farm8.staticflickr.com/7055/6883243071_19a6ccb8a2_o.png" width="640" height="422" /&gt;&lt;/a&gt;   &lt;p&gt;&lt;em&gt;Silverlight 5 version&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="2012021505 by lbugnionblog, on Flickr" href="http://www.flickr.com/photos/36917929@N06/6883240399/"&gt;&lt;img alt="2012021505" src="http://farm8.staticflickr.com/7062/6883240399_60bed0dd23_o.png" width="402" height="731" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;em&gt;Windows Phone initial screen&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="2012021506 by lbugnionblog, on Flickr" href="http://www.flickr.com/photos/36917929@N06/6883240973/"&gt;&lt;img alt="2012021506" src="http://farm8.staticflickr.com/7204/6883240973_51c7b9137b_o.png" width="402" height="731" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;em&gt;Windows Phone picture selection&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="2012021507 by lbugnionblog, on Flickr" href="http://www.flickr.com/photos/36917929@N06/6883241443/"&gt;&lt;img alt="2012021507" src="http://farm8.staticflickr.com/7045/6883241443_5fe2f5d315_o.png" width="402" height="731" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;em&gt;Windows Phone during upload&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="2012021508 by lbugnionblog, on Flickr" href="http://www.flickr.com/photos/36917929@N06/6883242077/"&gt;&lt;img alt="2012021508" src="http://farm8.staticflickr.com/7204/6883242077_7103aab884_o.png" width="402" height="731" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;em&gt;Windows Phone upload completed&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="2012021501 by lbugnionblog, on Flickr" href="http://www.flickr.com/photos/36917929@N06/6883234961/"&gt;&lt;img alt="2012021501" src="http://farm8.staticflickr.com/7046/6883234961_4675e0b4ee_o.png" width="640" height="360" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;em&gt;Windows 8 initial screen with Application Bar&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="2012021502 by lbugnionblog, on Flickr" href="http://www.flickr.com/photos/36917929@N06/6883239829/"&gt;&lt;img alt="2012021502" src="http://farm8.staticflickr.com/7067/6883239829_bc2fbd585e_o.png" width="640" height="360" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;em&gt;Windows 8 Picture Picker&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;a title="2012021503 by lbugnionblog, on Flickr" href="http://www.flickr.com/photos/36917929@N06/6883236309/"&gt;&lt;img alt="2012021503" src="http://farm8.staticflickr.com/7203/6883236309_32e7c8f658_o.png" width="640" height="360" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Windows 8 during upload&lt;/em&gt;&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;div style="margin-bottom: -1em"&gt;   &lt;div style="vertical-align: middle"&gt;&lt;a href="http://www.galasoft.ch/"&gt;&lt;img title="GalaSoft Laurent Bugnion" alt="GalaSoft Laurent Bugnion" src="http://www.galasoft.ch/logo/Current/logo_120x30.png" /&gt;&lt;/a&gt; &lt;/div&gt;    &lt;div style="position: relative; top: -36px; left: 130px"&gt;&lt;strong&gt;&lt;a href="http://www.galasoft.ch/contact_en.html"&gt;Laurent Bugnion (GalaSoft)&lt;/a&gt;&lt;/strong&gt;       &lt;br /&gt;&lt;a href="http://feeds.feedburner.com/galasoft"&gt;Subscribe&lt;/a&gt; | &lt;a href="http://twitter.com/lbugnion"&gt;Twitter&lt;/a&gt; | &lt;a href="http://www.facebook.com/lbugnion"&gt;Facebook&lt;/a&gt; | &lt;a href="http://www.flickr.com/photos/lbugnion"&gt;Flickr&lt;/a&gt; | &lt;a href="http://www.linkedin.com/in/lbugnion"&gt;LinkedIn&lt;/a&gt;       &lt;br /&gt;&lt;iframe style="border-bottom-style: none; margin-top: 7px; border-left-style: none; width: 450px; border-top-style: none; margin-bottom: -20px; height: 23px; border-right-style: none; overflow: hidden" src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fblog.galasoft.ch&amp;amp;layout=standard&amp;amp;show_faces=true&amp;amp;width=450&amp;amp;action=like&amp;amp;colorscheme=light" frameborder="0" allowtransparency="allowtransparency" scrolling="no"&gt;&lt;/iframe&gt;&lt;/div&gt; &lt;/div&gt; &lt;img src="http://geekswithblogs.net/lbugnion/aggbug/148722.aspx" width="1" height="1" /&gt;</description>      <creator xmlns="http://purl.org/dc/elements/1.1/">Laurent Bugnion</creator>      <guid>http://geekswithblogs.net/lbugnion/archive/2012/02/15/screenshots-of-my-mvvm-demo-at-techdaysbe.aspx</guid>      <pubDate>Wed, 15 Feb 2012 22:52:35 GMT</pubDate>      <comment xmlns="http://wellformedweb.org/CommentAPI/">http://geekswithblogs.net/lbugnion/comments/148722.aspx</comment>      <comments>http://geekswithblogs.net/lbugnion/archive/2012/02/15/screenshots-of-my-mvvm-demo-at-techdaysbe.aspx#feedback</comments>      <comments xmlns="http://purl.org/rss/1.0/modules/slash/">2</comments>      <commentRss xmlns="http://wellformedweb.org/CommentAPI/">http://geekswithblogs.net/lbugnion/comments/commentRss/148722.aspx</commentRss>      <ping xmlns="http://madskills.com/public/xml/rss/module/trackback/">http://geekswithblogs.net/lbugnion/services/trackbacks/148722.aspx</ping>    </item>    <item>      <link>http://feedproxy.google.com/~r/MarkMonster_Silverlight/~3/Yyecr3BEoW4/unified-ad-for-windows-phone-part-4-genericadproviderforxaml</link>      <author xmlns="http://www.w3.org/2005/Atom">        <name>Mark Monster</name>      </author>      <category>.NET</category>      <category>advertisement</category>      <category>Open Source</category>      <category>Silverlight</category>      <category>Technology</category>      <category>WP7</category>      <category>WPDev</category>      <category>WPUnifiedAd</category>      <title>Unified Ad for Windows Phone - Part 4 - GenericAdProviderForXaml</title>      <description>&lt;p&gt;Alright, we have &lt;a href="http://mark.mymonster.nl/2012/02/07/windows-phone-unified-ad-part-1-introduction/"&gt;signed up to a lot of Ad Providers in Part 1&lt;/a&gt;, &lt;a href="http://mark.mymonster.nl/2012/02/08/unified-ad-for-windows-phone-part-2-basic-usage/"&gt;setup the Unified Ad control in Part 2&lt;/a&gt; and even &lt;a href="http://mark.mymonster.nl/2012/02/13/unified-ad-for-windows-phone-part-3-remote-ad-provider-configuration/"&gt;implemented the Remote Ad Provider configuration in Part 3&lt;/a&gt;. What’s next?&lt;/p&gt;  &lt;h3&gt;The Generic Ad Provider for Xaml&lt;/h3&gt;  &lt;p&gt;Think of the Generic Ad Provider as a very simple AdProvider. It can show Xaml and that’s basically it. You could use this Ad Provider for example to market your own applications within your own applications. So a piece of Xaml with a little bit of text and an HyperlinkButton that links to a Uri. And after a minute the Ad Provider will rotate to the next Ad Provider. The Xaml can be much more complex, we will come up to that in a moment. But first see a small example Ad in Xaml.&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:BF48545B-72FC-48CD-B241-BB2967E2EF01:e33d321b-0e0b-46e3-97db-68bd7912a330" class="wlWriterEditableSmartContent"&gt;&lt;pre class="brush:xml; gutter:true; first-line: 1; tab-size: 4; toolbar: false; collapse: false; "&gt;&amp;lt;Grid xmlns=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;      Width=&amp;quot;480&amp;quot;      Height=&amp;quot;80&amp;quot;      Background=&amp;quot;{StaticResource PhoneBackgroundBrush}&amp;quot;&amp;gt;    &amp;lt;Border BorderBrush=&amp;quot;{StaticResource PhoneAccentBrush}&amp;quot;            BorderThickness=&amp;quot;1&amp;quot;&amp;gt;        &amp;lt;Grid&amp;gt;            &amp;lt;TextBlock Text=&amp;quot;WP Unified Ad&amp;quot;                       Foreground=&amp;quot;{StaticResource PhoneAccentBrush}&amp;quot; Margin=&amp;quot;0&amp;quot;                       VerticalAlignment=&amp;quot;Center&amp;quot; HorizontalAlignment=&amp;quot;Center&amp;quot; FontSize=&amp;quot;35&amp;quot;/&amp;gt;            &amp;lt;HyperlinkButton NavigateUri=&amp;quot;http://wpunifiedad.codeplex.com&amp;quot;                             HorizontalAlignment=&amp;quot;Stretch&amp;quot;                             VerticalAlignment=&amp;quot;Stretch&amp;quot;&amp;gt;            &amp;lt;/HyperlinkButton&amp;gt;        &amp;lt;/Grid&amp;gt;    &amp;lt;/Border&amp;gt;&amp;lt;/Grid&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3&gt;Where do we put the Xaml?&lt;/h3&gt;&lt;p&gt;Ideal it would be on a remote server. But if you don’t have the remote server or you want to have a fallback ad in case the remote server isn’t available you can use the &lt;strong&gt;OfflineContent&lt;/strong&gt; property of the &lt;strong&gt;GenericAdProvider&lt;/strong&gt;.&lt;/p&gt;&lt;p&gt;If you do have the remote server you can set the &lt;strong&gt;XamlUri&lt;/strong&gt; property to the remote Url. In case you want to some more intelligent stuff, like a special ad for each country, or making sure you do something special for the current application, you can make use of the format parameters. The first {0} argument will be replaced by the ApplicationID and the second {1} argument will be replace by the CountryCode. So let’s say I have a server app that returns ads for me, my XamlUri could be configured like this:&lt;/p&gt;&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:BF48545B-72FC-48CD-B241-BB2967E2EF01:d7272825-2ef6-4282-9dec-95562b1d0730" class="wlWriterEditableSmartContent"&gt;&lt;pre class="brush:text; gutter:true; first-line: 1; tab-size: 4; toolbar: false; collapse: false; "&gt;http://someurlontheinternet.com/ProvideAd?Country={1}&amp;amp;AppId={0}&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If you don’t need one or both arguments you could omit them off course.&lt;/p&gt;&lt;h3&gt;Using Phone Styles&lt;/h3&gt;&lt;p&gt;If you want to make sure that the advertisements have the same color palette as the Phone settings you can even make use of the usual Phone Resources. Like this example where the Background is set to the PhoneBackgroundBrush and the Border and Text to the PhoneAccentBrush.&lt;/p&gt;&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:BF48545B-72FC-48CD-B241-BB2967E2EF01:9a7166e4-a494-4228-9397-cf35925e9031" class="wlWriterEditableSmartContent"&gt;&lt;pre class="brush:xml; gutter:true; first-line: 1; tab-size: 4; toolbar: false; collapse: false; "&gt;&amp;lt;Grid Width=&amp;quot;480&amp;quot;        Height=&amp;quot;80&amp;quot;        Background=&amp;quot;{StaticResource PhoneBackgroundBrush}&amp;quot;&amp;gt;    &amp;lt;Border BorderBrush=&amp;quot;{StaticResource PhoneAccentBrush}&amp;quot;            BorderThickness=&amp;quot;1&amp;quot;&amp;gt;        &amp;lt;Grid&amp;gt;            &amp;lt;TextBlock Text=&amp;quot;WP Unified Ad&amp;quot;                        Foreground=&amp;quot;{StaticResource PhoneAccentBrush}&amp;quot;                        Margin=&amp;quot;0&amp;quot;                        VerticalAlignment=&amp;quot;Center&amp;quot;                        HorizontalAlignment=&amp;quot;Center&amp;quot;                        FontSize=&amp;quot;35&amp;quot; /&amp;gt;        &amp;lt;/Grid&amp;gt;    &amp;lt;/Border&amp;gt;&amp;lt;/Grid&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3&gt;How to add links&lt;/h3&gt;&lt;p&gt;The easiest way to add a link is to put a HyperlinkButton on top of the full Xaml. You don’t have to give it a visual appearance as long as you make it stretch to the full Ad space. Put the Uri you want to link to in the NavigateUri. What? Yes put the Uri in the NavigateUri. But won’t that only work for navigation inside the application, from page to page? Yes but this is improved navigation.&lt;/p&gt;&lt;ul&gt;  &lt;li&gt;“&lt;a href="http://anythingontheweb.com"&gt;http://anythingontheweb.com&lt;/a&gt;” and “&lt;a href="https://anythingontheweb.com"&gt;https://anythingontheweb.com&lt;/a&gt;” will start the WebBrowserTask &lt;/li&gt;  &lt;li&gt;“marketplace://search/some content” will start the MarketplaceSearchTask with “some content” as query. &lt;/li&gt;  &lt;li&gt;“marketplace://review” will start the MarketplaceReviewTask for the current application. &lt;/li&gt;  &lt;li&gt;“marketplace://detail” will start the MarketplaceDetailTask for the current application. &lt;/li&gt;  &lt;li&gt;“marketplace://detail/5f171b43-6ea8-e011-a53c-78e7d1fa76f8” will start the MarketplaceDetailTask for the application with the mentioned ID. &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;This will enable you to create simple ads that show a webpage. But if you want more, like for example market your other apps you can do this as well.&lt;/p&gt;&lt;h3&gt;Complex Ads&lt;/h3&gt;&lt;p&gt;I’m not the best designer, but I know a little about Xaml. So I was interested to see if I could get a more complex Ad working. The below Ad for example has a Storyboard attached that changes the opacity of two elements. Sounds easy, it is easy. Just think about what more nice things you can do instead.&lt;/p&gt;&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:BF48545B-72FC-48CD-B241-BB2967E2EF01:d5982d3e-c222-4156-aa9d-90cea3f3e9a7" class="wlWriterEditableSmartContent"&gt;&lt;pre class="brush:xml; gutter:true; first-line: 1; tab-size: 4; toolbar: false; collapse: false; "&gt;&amp;lt;Grid xmlns=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;      xmlns:x=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;      Width=&amp;quot;480&amp;quot;      Height=&amp;quot;80&amp;quot;      Background=&amp;quot;{StaticResource PhoneBackgroundBrush}&amp;quot;&amp;gt;	&amp;lt;Grid.Resources&amp;gt;		&amp;lt;Storyboard x:Name=&amp;quot;Storyboard&amp;quot; AutoReverse=&amp;quot;True&amp;quot; RepeatBehavior=&amp;quot;Forever&amp;quot;&amp;gt;			&amp;lt;DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=&amp;quot;(UIElement.Opacity)&amp;quot; Storyboard.TargetName=&amp;quot;One&amp;quot;&amp;gt;				&amp;lt;EasingDoubleKeyFrame KeyTime=&amp;quot;0&amp;quot; Value=&amp;quot;1&amp;quot;/&amp;gt;				&amp;lt;EasingDoubleKeyFrame KeyTime=&amp;quot;0:0:2&amp;quot; Value=&amp;quot;1&amp;quot;/&amp;gt;				&amp;lt;EasingDoubleKeyFrame KeyTime=&amp;quot;0:0:3&amp;quot; Value=&amp;quot;0&amp;quot;/&amp;gt;				&amp;lt;EasingDoubleKeyFrame KeyTime=&amp;quot;0:0:5&amp;quot; Value=&amp;quot;0&amp;quot;/&amp;gt;			&amp;lt;/DoubleAnimationUsingKeyFrames&amp;gt;			&amp;lt;DoubleAnimationUsingKeyFrames Storyboard.TargetProperty=&amp;quot;(UIElement.Opacity)&amp;quot; Storyboard.TargetName=&amp;quot;Two&amp;quot;&amp;gt;				&amp;lt;EasingDoubleKeyFrame KeyTime=&amp;quot;0&amp;quot; Value=&amp;quot;0&amp;quot;/&amp;gt;				&amp;lt;EasingDoubleKeyFrame KeyTime=&amp;quot;0:0:2&amp;quot; Value=&amp;quot;0&amp;quot;/&amp;gt;				&amp;lt;EasingDoubleKeyFrame KeyTime=&amp;quot;0:0:3&amp;quot; Value=&amp;quot;1&amp;quot;/&amp;gt;				&amp;lt;EasingDoubleKeyFrame KeyTime=&amp;quot;0:0:5&amp;quot; Value=&amp;quot;1&amp;quot;/&amp;gt;			&amp;lt;/DoubleAnimationUsingKeyFrames&amp;gt;		&amp;lt;/Storyboard&amp;gt;	&amp;lt;/Grid.Resources&amp;gt;    &amp;lt;Border BorderBrush=&amp;quot;{StaticResource PhoneAccentBrush}&amp;quot;            BorderThickness=&amp;quot;1&amp;quot;&amp;gt;        &amp;lt;Grid&amp;gt;            &amp;lt;Grid x:Name=&amp;quot;One&amp;quot;&amp;gt;        		&amp;lt;TextBlock Text=&amp;quot;WP Unified Ad&amp;quot;        			Foreground=&amp;quot;{StaticResource PhoneAccentBrush}&amp;quot; Margin=&amp;quot;0&amp;quot;        			VerticalAlignment=&amp;quot;Center&amp;quot; HorizontalAlignment=&amp;quot;Center&amp;quot; FontSize=&amp;quot;35&amp;quot;/&amp;gt;        	&amp;lt;/Grid&amp;gt;            &amp;lt;Grid x:Name=&amp;quot;Two&amp;quot; Opacity=&amp;quot;0&amp;quot;&amp;gt;            	&amp;lt;TextBlock Text=&amp;quot;by Mark Monster&amp;quot;            		Foreground=&amp;quot;{StaticResource PhoneAccentBrush}&amp;quot; Margin=&amp;quot;0&amp;quot;            		VerticalAlignment=&amp;quot;Center&amp;quot; HorizontalAlignment=&amp;quot;Center&amp;quot; FontSize=&amp;quot;35&amp;quot;/&amp;gt;            &amp;lt;/Grid&amp;gt;            &amp;lt;HyperlinkButton NavigateUri=&amp;quot;http://wpunifiedad.codeplex.com&amp;quot;                             HorizontalAlignment=&amp;quot;Stretch&amp;quot;                             VerticalAlignment=&amp;quot;Stretch&amp;quot;/&amp;gt;        &amp;lt;/Grid&amp;gt;    &amp;lt;/Border&amp;gt;&amp;lt;/Grid&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/MarkMonster_Silverlight/~4/Yyecr3BEoW4" height="1" width="1"/&gt;</description>      <pubDate>Tue, 14 Feb 2012 21:31:29 +0100</pubDate>      <updated xmlns="http://www.w3.org/2005/Atom">2012-02-14T21:31:29+01:00</updated>      <origLink xmlns="http://rssnamespace.org/feedburner/ext/1.0">http://mark.mymonster.nl/2012/02/14/unified-ad-for-windows-phone-part-4-genericadproviderforxaml</origLink>    </item>    <item>      <link>http://feedproxy.google.com/~r/MarkMonster_Silverlight/~3/VpyU4YxC_JE/unified-ad-for-windows-phone-part-3-remote-ad-provider-configuration</link>      <author xmlns="http://www.w3.org/2005/Atom">        <name>Mark Monster</name>      </author>      <category>.NET</category>      <category>advertisement</category>      <category>Open Source</category>      <category>Phone</category>      <category>Silverlight</category>      <category>Technology</category>      <category>WP7</category>      <category>WPDev</category>      <category>WPUnifiedAd</category>      <title>Unified Ad for Windows Phone - Part 3 - Remote Ad Provider configuration</title>      <description>&lt;p&gt;Did you read the previous parts?&lt;/p&gt;  &lt;p&gt;&lt;a href="http://mark.mymonster.nl/2012/02/07/windows-phone-unified-ad-part-1-introduction/"&gt;Part 1 – Introduction&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://mark.mymonster.nl/2012/02/08/unified-ad-for-windows-phone-part-2-basic-usage/"&gt;Part 2 – Basic Usage&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Done? Let’s continue with Part 3, configure the Ad Providers from a remote location.&lt;/p&gt;  &lt;h3&gt;Step 1, Add the RemoteAdProviderStrategy&lt;/h3&gt;  &lt;p&gt;Okay, let’s forget about the default AdProviderStrategy. The default just rotates between the different AdProviders, we want more. First we set the &lt;strong&gt;AdProviderStrategy&lt;/strong&gt; property of the &lt;strong&gt;AdControl&lt;/strong&gt;. Just like this.&lt;/p&gt;    &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:BF48545B-72FC-48CD-B241-BB2967E2EF01:7bdaaf49-d439-4153-b065-ec01eef42fa2" class="wlWriterEditableSmartContent"&gt;&lt;pre class="brush:xml; gutter:true; first-line: 1; tab-size: 4; toolbar: false; collapse: false; "&gt;&amp;lt;Ads:AdControl.AdProviderStrategy&amp;gt;    &amp;lt;Strategy:RemoteAdProviderStrategy xmlns:Strategy=&amp;quot;clr-namespace:MC.Phone.Ads.Strategy;assembly=MC.Phone.Ads&amp;quot; /&amp;gt;&amp;lt;/Ads:AdControl.AdProviderStrategy&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3&gt;Step 2, Create a configuration file&lt;/h3&gt;&lt;p&gt;It could very well be that you already have a functional configuration file. When you for example made use of &lt;a href="http://wp7adrotator.codeplex.com/"&gt;Windows Phone 7 Ad Rotator&lt;/a&gt; you already have a configuration file that’s fully compatible with the Unfied Ad. But if you want the full power of the Unified Ad you have to use a different configuration file structure. Xml files explain best by showing an example file.&lt;/p&gt;&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:BF48545B-72FC-48CD-B241-BB2967E2EF01:e4921950-dd69-4bb0-b9c0-049b33ab4325" class="wlWriterEditableSmartContent"&gt;&lt;pre class="brush:xml; gutter:true; first-line: 1; tab-size: 4; toolbar: false; collapse: false; "&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot; ?&amp;gt;&amp;lt;AdSettings&amp;gt;  &amp;lt;CountryDescriptors&amp;gt;    &amp;lt;AdCountryDescriptor Country=&amp;quot;US, GB&amp;quot;&amp;gt;      &amp;lt;Probability Value=&amp;quot;70&amp;quot; AdProvider=&amp;quot;None&amp;quot; /&amp;gt;      &amp;lt;Probability Value=&amp;quot;10&amp;quot; AdProvider=&amp;quot;AdMob&amp;quot; /&amp;gt;      &amp;lt;Probability Value=&amp;quot;10&amp;quot; AdProvider=&amp;quot;MobFox&amp;quot; /&amp;gt;      &amp;lt;Probability Value=&amp;quot;10&amp;quot; AdProvider=&amp;quot;AdDuplex&amp;quot; /&amp;gt;    &amp;lt;/AdCountryDescriptor&amp;gt;    &amp;lt;AdCountryDescriptor Country=&amp;quot;DE&amp;quot;&amp;gt;      &amp;lt;Probability Value=&amp;quot;15&amp;quot; AdProvider=&amp;quot;PubCenter&amp;quot; /&amp;gt;      &amp;lt;Probability Value=&amp;quot;15&amp;quot; AdProvider=&amp;quot;AdMob&amp;quot; /&amp;gt;      &amp;lt;Probability Value=&amp;quot;20&amp;quot; AdProvider=&amp;quot;AdDuplex&amp;quot; /&amp;gt;      &amp;lt;Probability Value=&amp;quot;50&amp;quot; AdProvider=&amp;quot;None&amp;quot; /&amp;gt;    &amp;lt;/AdCountryDescriptor&amp;gt;    &amp;lt;AdCountryDescriptor&amp;gt;      &amp;lt;Probability Value=&amp;quot;20&amp;quot; AdProvider=&amp;quot;PubCenter&amp;quot; /&amp;gt;      &amp;lt;Probability Value=&amp;quot;20&amp;quot; AdProvider=&amp;quot;AdMob&amp;quot; /&amp;gt;      &amp;lt;Probability Value=&amp;quot;20&amp;quot; AdProvider=&amp;quot;AdDuplex&amp;quot; /&amp;gt;      &amp;lt;Probability Value=&amp;quot;20&amp;quot; AdProvider=&amp;quot;Smaato&amp;quot; /&amp;gt;      &amp;lt;Probability Value=&amp;quot;20&amp;quot; AdProvider=&amp;quot;MobFox&amp;quot; /&amp;gt;    &amp;lt;/AdCountryDescriptor&amp;gt;  &amp;lt;/CountryDescriptors&amp;gt;&amp;lt;/AdSettings&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Let examine the last &lt;strong&gt;AdCountryDescriptor&lt;/strong&gt; element lines 16-22. Because this AdCountryDescriptor element doesn’t have a Country property this will be the default configuration to fall back to when there isn’t any other that matches the country of the user.&lt;/p&gt;&lt;p&gt;Inside the AdCountryDescriptor elements there are Probabilty elements, they consist of two values: a probability and an AdProvider name. You can best compare the Probabilty with the chance in percentage that the specific Ad Provider is chosen during AdRotation. If you don’t want an AdProvider to be shown during rotation you either put the probability to 0, but better just remove the element. The AdProvider property is the name of the AdProvider that has to be filled in. Currently that would be one of these AdProviders: &lt;strong&gt;AdMob, MobFox, AdDuplex, PubCenter, Smaato, InnerActive, None &lt;/strong&gt;and&lt;strong&gt; GenericAdProviderForXaml&lt;/strong&gt;. &lt;/p&gt;&lt;p&gt;If you want no ads to be displayed for a certain percentage of the time you should use the None AdProvider. In a future post we will discuss the GenericAdProviderForXaml, for now just see it as a remote location where you put some Xaml that will be displayed as an Ad.&lt;/p&gt;&lt;p&gt;So we now have a default configuration, what about specific country configurations? Yes important of course, by specifying the Country attribute of the AdCountryDescriptor element you can specify to which countries a specific configuration belongs. Which could be one country, or multiple countries. Each country is only allowed once in the configuration but you can specify multiple countries for one configuration by separating the country-codes by a “,”. For the country-codes make sure you use &lt;a href="http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2"&gt;the two-letter codes from the ISO_3166-1&lt;/a&gt;, so for the UK this is GB.&lt;/p&gt;&lt;h3&gt;Step 3, Where to put this configuration file?&lt;/h3&gt;&lt;p&gt;Put it somewhere on a webserver where it’s accessible through http or https. Though if you don’t want to configure it remotely but ship this Xml file as part of your application that’s fine as well. But be aware that the only way to change your shipped configuration file is by shipping a new version of your application. But to have local configuration file makes sense even if you have a remote configuration file. When for example your remote config file cannot be accessed (could be any reason) the RemoteAdProviderStrategy will fallback to the local configuration file. So let’s configure the strategy accordingly.&lt;/p&gt;&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:BF48545B-72FC-48CD-B241-BB2967E2EF01:d500abcd-9a74-4bba-82bd-b3fbdda1a423" class="wlWriterEditableSmartContent"&gt;&lt;pre class="brush:xml; gutter:true; first-line: 1; tab-size: 4; toolbar: false; collapse: false; highlight: [3,4]"&gt;&amp;lt;Ads:AdControl.AdProviderStrategy&amp;gt;    &amp;lt;Strategy:RemoteAdProviderStrategy xmlns:Strategy=&amp;quot;clr-namespace:MC.Phone.Ads.Strategy;assembly=MC.Phone.Ads&amp;quot;                                        LocalProviderSettingsUri=&amp;quot;Ads/AdSettings.xml&amp;quot;                                        RemoteProviderSettingsUri=&amp;quot;http://someurlinthewild.com/ads.xml&amp;quot; /&amp;gt;&amp;lt;/Ads:AdControl.AdProviderStrategy&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The &lt;strong&gt;RemoteProviderSettingsUri&lt;/strong&gt; needs to be filled with the remote location url. So put the file somewhere on an internet website, your own is probably the best so that you can easily change it when you want to. The local provider settings can be used as alternative to the remote location in case you don’t want to remotely configure your ads but it could also be used as fallback when the remote url is not available for some reason. For the LocalProviderSettingsUri you need to be aware that it’s &lt;a href="http://msdn.microsoft.com/en-us/library/ms596994(v=vs.95).aspx"&gt;an ResourceUri&lt;/a&gt;, not an internet Uri. This means that if your xml file has a &lt;strong&gt;BuildAction “Content”&lt;/strong&gt; you can put a simple relative Uri in there, like in the above example. If you would add the Xml file with BuildAction “Resource” you would have to use an Uri like this “/MC.Phone.Ads.Example;component/Ads/AdSettings.xml”.&lt;/p&gt;&lt;p&gt;Hope this explains the Remote Ad Provider configuration a little bit. Please post any questions.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/MarkMonster_Silverlight/~4/VpyU4YxC_JE" height="1" width="1"/&gt;</description>      <pubDate>Mon, 13 Feb 2012 20:52:07 +0100</pubDate>      <updated xmlns="http://www.w3.org/2005/Atom">2012-02-13T20:52:07+01:00</updated>      <origLink xmlns="http://rssnamespace.org/feedburner/ext/1.0">http://mark.mymonster.nl/2012/02/13/unified-ad-for-windows-phone-part-3-remote-ad-provider-configuration</origLink>    </item>    <item>      <title>New Single: Paint a Flower in the Sky</title>      <link>http://electricbeach.org/?p=975</link>      <comments>http://electricbeach.org/?p=975#comments</comments>      <pubDate>Thu, 09 Feb 2012 10:31:37 +0000</pubDate>      <creator xmlns="http://purl.org/dc/elements/1.1/">cs</creator>      <category><![CDATA[Uncategorized]]></category>      <guid isPermaLink="false">http://electricbeach.org/?p=975</guid>      <description><![CDATA[<!--Searching /hermes/bosweb/web201/b2010/ipw.cschormann/public_html/wp-content/plugins/random_image: found 1 images in 0.0017360000000001 seconds--><!---Displayed in 0.111268 seconds.-->One day I asked my daughter Mara what she was drawing: &#8220;Oh, I&#8217;m just painting flowers in the sky&#8221; she answered.Another day, after a very sick night, she said to me in the morning: &#8220;Don&#8217;t worry about it Dad &#8211; when I am sick at night, my angel comes and takes me for a ride&#8221;. And [...]]]></description>      <commentRss xmlns="http://wellformedweb.org/CommentAPI/">http://electricbeach.org/?feed=rss2&amp;p=975</commentRss>      <comments xmlns="http://purl.org/rss/1.0/modules/slash/">0</comments>    </item>    <item>      <title>Windows Client Developer Roundup 087 for 2/9/2012</title>      <author>Pete Brown	</author>      <link>http://10rem.net/blog/2012/02/08/windows-client-developer-roundup-087-for-2-9-2012</link>      <pubDate>Thu, 09 Feb 2012 02:44:11 GMT</pubDate>      <guid>http://10rem.net/blog/2012/02/08/windows-client-developer-roundup-087-for-2-9-2012</guid>      <description>&lt;p&gt;The Windows Client Developer Roundup aggregates information ofinterest to Windows Client Developers, including &lt;ahref="http://dev.windows.com/"&gt;WinRT XAML&lt;/a&gt;, &lt;ahref="http://windowsclient.net/"&gt;WPF&lt;/a&gt;, &lt;ahref="http://silverlight.net/"&gt;Silverlight&lt;/a&gt;, &lt;ahref="http://msdn.microsoft.com/en-us/visualc/default.aspx"&gt;VisualC++&lt;/a&gt;, &lt;a href="http://creators.xna.com/"&gt;XNA&lt;/a&gt;, &lt;ahref="http://expression.microsoft.com/"&gt;Expression Blend&lt;/a&gt;, &lt;ahref="http://www.microsoft.com/surface/"&gt;Surface&lt;/a&gt;, &lt;ahref="http://msdn.microsoft.com/en-us/windows/default.aspx"&gt;Windows7&lt;/a&gt;, &lt;ahref="http://msdn.microsoft.com/en-us/ff380145.aspx"&gt;WindowsPhone&lt;/a&gt;, Visual Studio, &lt;ahref="http://silverlight.net/riaservices/"&gt;WCF RIA Services&lt;/a&gt; andmore. Sometimes I even include a little jQuery and HTML5. If youhave something interesting you've done or have run across, or youblog regularly on the topics included here, please send me the URLand brief description via the &lt;a href="http://10rem.net/contact"&gt;contactlink&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Note that I've started breaking the Netduino, Electronics,Robotics, Synthesizer and similar content into a new roundup seriescalled the &lt;a href="http://10rem.net/blog?filterby=MakerRoundup"&gt;Maker GeekRoundup&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Oh and you'll get Windows 8 Consumer Preview on February29. Get ready to code (and&lt;/strong&gt; &lt;ahref="http://10rem.net/blog/2012/01/25/now-more-than-ever-you-need-a-designer"&gt;&lt;strong&gt;design&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;) :)&lt;/strong&gt;&lt;/p&gt;&lt;h3&gt;Windows 8 and WinRT/Metro General&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;&lt;ahref="http://blogs.msdn.com/b/b8/archive/2012/02/07/improving-power-efficiency-for-applications.aspx"&gt;Improving power efficiency for applications&lt;/a&gt; (Sharif Farag andBen Srour)&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;XAML Technologies (Silverlight, WPF, WinRT Metro XAML)&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;&lt;ahref="http://grokys.blogspot.com/2012/02/mvvm-and-multiple-selection-part-iv.html"&gt;Bad Entropy: MVVM and Multiple Selection - Part IV - DataGrid&lt;/a&gt;(Bad Entropy)&lt;/li&gt;&lt;li&gt;&lt;ahref="http://www.sharpgis.net/post/2012/01/23/Overwriting-the-default-WebRequest-used-by-WebClient.aspx"&gt;Overwriting the default WebRequest used by WebClient&lt;/a&gt; (MortenNielsen)&lt;/li&gt;&lt;li&gt;&lt;ahref="http://www.sharpgis.net/post/2012/01/17/Building-A-Multi-Touch-Photo-Viewer-Control.aspx"&gt;Building A Multi-Touch Photo Viewer Control&lt;/a&gt; (MortenNielsen)&lt;/li&gt;&lt;li&gt;&lt;ahref="http://www.abhisheksur.com/2012/02/optimizing-inpc-objects-against-memory.html"&gt;DOT NET TRICKS: Optimizing INPC Objects against memory leaks usingWeakEvents&lt;/a&gt; (Abhishek Sur)&lt;/li&gt;&lt;li style="list-style: none"&gt;&lt;ul&gt;&lt;li&gt;Also see &lt;ahref="http://10rem.net/blog/2012/02/01/event-handler-memory-leaks-unwiring-events-and-the-weakeventmanager-in-wpf-45"&gt;my post on weak events.&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;ahref="http://michaelcrump.net/using-the-live-sdk-in-windows-8-xaml/c-metro-applications"&gt;Using the Live SDK in Windows 8 XAML/C# Metro Applications -Michael Crump&lt;/a&gt; (Michael Crump)&lt;/li&gt;&lt;li&gt;&lt;ahref="http://www.sharpgis.net/post/2012/01/12/Reading-and-Writing-text-files-in-Windows-8-Metro.aspx"&gt;Reading and Writing text files in Windows 8 Metro&lt;/a&gt; (MortenNielsen)&lt;/li&gt;&lt;li&gt;&lt;ahref="http://www.scottlogic.co.uk/blog/colin/2012/02/a-simple-pattern-for-creating-re-useable-usercontrols-in-wpf-silverlight/"&gt;A Simple Pattern for Creating Re-useable UserControls in WPF /Silverlight&lt;/a&gt; (Colin Eberhardt)&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;DirectX Technologies (DirectX, XNA, WinRT DirectX, GPU and GameProgramming)&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;&lt;ahref="http://xna-uk.net/blogs/darkgenesis/archive/2012/01/20/the-starter2d-and-starter3d-tutorials-now-on-the-marketplace.aspx"&gt;The Starter2D and Starter3D tutorials now on the Marketplace&lt;/a&gt;(Dark Genesis)&lt;/li&gt;&lt;li&gt;&lt;ahref="http://channel9.msdn.com/coding4fun/blog/Large-Scale-Terrain-Rendering"&gt;Large Scale Terrain Rendering&lt;/a&gt; (Coding4Fun)&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;C++ and Native Development&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;&lt;ahref="http://geekswithblogs.net/mikebmcl/archive/2012/02/02/c-to-c-ndash-a-somewhat-short-guide.aspx"&gt;C# to C++ - A Somewhat Short Guide&lt;/a&gt; (Bob Taco Industries)&lt;/li&gt;&lt;li&gt;&lt;ahref="http://blogs.msdn.com/b/vcblog/archive/2012/02/02/10263304.aspx"&gt;C++11 Conformance Survey&lt;/a&gt; (Vikas Bhatia)&lt;/li&gt;&lt;li&gt;&lt;ahref="http://blogs.msdn.com/b/vcblog/archive/2012/02/03/10263262.aspx"&gt;The Microsoft C++ Compiler Turns 20!&lt;/a&gt; (Visual C++ Blog)&lt;/li&gt;&lt;li&gt;&lt;ahref="http://blogs.msdn.com/b/somasegar/archive/2012/02/03/c-amp-open-specification.aspx"&gt;C++ AMP Open Specification&lt;/a&gt; (Soma)&lt;/li&gt;&lt;li&gt;&lt;ahref="http://channel9.msdn.com/posts/Announcing-the-GoingNative-2012-Full-Schedule"&gt;GoingNative 2012: All Sessions are now available On-Demand!&lt;/a&gt;(Channel 9)&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;Visual Studio and .NET General&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;&lt;ahref="http://blogs.msdn.com/b/visualstudio/archive/2012/01/18/announcing-visual-studio-achievements.aspx"&gt;Bring Some Game To Your Code!&lt;/a&gt; (Visual Studio Blog)&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;NUI (Kinect, Surface, More)&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;&lt;ahref="http://robrelyea.wordpress.com/2012/02/01/k4w-details-of-api-changes-from-beta2-to-v1-managed/"&gt;Kinect for Windows - Details of API Changes from Beta2 to v1.0(C#/VB)&lt;/a&gt; (Rob Relyea)&lt;/li&gt;&lt;li&gt;&lt;ahref="http://blogs.msdn.com/b/surface/archive/2012/02/05/microsoft-surface-2-sdk-and-runtime-update.aspx"&gt;Microsoft® Surface® 2.0 SDK and Runtime Update&lt;/a&gt; (LuisCabrera)&lt;/li&gt;&lt;li&gt;&lt;ahref="http://kinecthacks.net/interactive-portfolio/"&gt;InteractivePortfolio&lt;/a&gt; (Kinect Hacks)&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;Off-Topic Fun&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.youtube.com/watch?v=LJSZ1TwjcsQ"&gt;The KarateRap&lt;/a&gt; (YouTube)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;I leave you with only the one "off-topic" item today, becauseafter watching that, nothing else will ever suffice. Ever.&lt;/p&gt;&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/2W3Bv21FrL_E04Ujrigt7DqRflg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2W3Bv21FrL_E04Ujrigt7DqRflg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/2W3Bv21FrL_E04Ujrigt7DqRflg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/2W3Bv21FrL_E04Ujrigt7DqRflg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/PeteBrown-Silverlight/~4/F41cjYACnZ8" height="1" width="1"/&gt;</description>    </item>    <item>      <link>http://feedproxy.google.com/~r/MarkMonster_Silverlight/~3/imxaU8A-YIM/unified-ad-for-windows-phone-part-2-basic-usage</link>      <author xmlns="http://www.w3.org/2005/Atom">        <name>Mark Monster</name>      </author>      <category>.NET</category>      <category>advertisement</category>      <category>Open Source</category>      <category>Phone</category>      <category>Silverlight</category>      <category>Technology</category>      <category>WP7</category>      <category>WPDev</category>      <category>WPUnifiedAd</category>      <title>Unified Ad for Windows Phone - Part 2 - Basic Usage</title>      <description>&lt;p&gt;Time for Part 2 of the &lt;a href="http://wpunifiedad.codeplex.com/"&gt;Unified Ad for Windows Phone&lt;/a&gt; series. Also read &lt;a href="http://mark.mymonster.nl/2012/02/07/windows-phone-unified-ad-part-1-introduction"&gt;part 1 for the introduction of the Unified Ad for Windows Phone&lt;/a&gt;. We covered the reason why we want the &lt;a href="http://wpunifiedad.codeplex.com" target="_blank"&gt;Unified ad for Windows Phone control&lt;/a&gt; and also registered for a couple of Ad Providers. Let’s start with implementing the Unified ad control in our application.&lt;/p&gt;  &lt;h3&gt;Install the NuGet Package for Unified Ad for Windows Phone&lt;/h3&gt;  &lt;p&gt;Start managing your NuGet Packages for your Windows Phone project. Search for “wpunifiedad” and click install.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://mark.mymonster.nl/Uploads/2012/02/image-2.png"&gt;&lt;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="Manage NuGet Packages, search for wpunifiedad" border="0" alt="Manage NuGet Packages, search for wpunifiedad" src="http://mark.mymonster.nl/Uploads/2012/02/image-thumb.png" width="244" height="151" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Go to one of your pages, for example “MainPage.xaml” and add the following Xaml in for example the ContentPanel Grid.&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:BF48545B-72FC-48CD-B241-BB2967E2EF01:24e1cf0a-96be-4323-b96b-57e48dfd8bfb" class="wlWriterEditableSmartContent"&gt;&lt;pre class="brush:xml; gutter:true; first-line: 1; tab-size: 4; toolbar: true; collapse: false; "&gt;&amp;lt;Ads:AdControl x:Name=&amp;quot;AdBasic&amp;quot;                FallbackAdProviderName=&amp;quot;AdDuplex&amp;quot;                IsTest=&amp;quot;True&amp;quot;                xmlns:Ads=&amp;quot;clr-namespace:MC.Phone.Ads;assembly=MC.Phone.Ads&amp;quot;                xmlns:PubCenter=&amp;quot;clr-namespace:MC.Phone.Ads.PubCenter;assembly=MC.Phone.Ads.PubCenter&amp;quot;                xmlns:Smaato=&amp;quot;clr-namespace:MC.Phone.Ads.Smaato;assembly=MC.Phone.Ads.Smaato&amp;quot;                xmlns:MobFox=&amp;quot;clr-namespace:MC.Phone.Ads.MobFox;assembly=MC.Phone.Ads.MobFox&amp;quot;                xmlns:AdMob=&amp;quot;clr-namespace:MC.Phone.Ads.AdMob;assembly=MC.Phone.Ads.AdMob&amp;quot;                xmlns:Provider=&amp;quot;clr-namespace:MC.Phone.Ads.Provider;assembly=MC.Phone.Ads&amp;quot;                xmlns:AdDuplex=&amp;quot;clr-namespace:MC.Phone.Ads.AdDuplex;assembly=MC.Phone.Ads.AdDuplex&amp;quot;&amp;gt;    &amp;lt;Ads:AdControl.AdProviders&amp;gt;        &amp;lt;Provider:GenericAdProviderForXaml XamlUri=&amp;quot;http://remoteurlontheinternet.com/Ad.xaml?appid={0}&amp;quot; /&amp;gt;        &amp;lt;Provider:NoneAdProvider /&amp;gt;        &amp;lt;AdDuplex:AdDuplexAdProvider App=&amp;quot;&amp;quot; /&amp;gt;        &amp;lt;AdMob:AdMobAdProvider AdUnit=&amp;quot;&amp;quot; /&amp;gt;        &amp;lt;MobFox:MobFoxAdProvider Publisher=&amp;quot;test&amp;quot; /&amp;gt;        &amp;lt;Smaato:SmaatoAdProvider AdSpace=&amp;quot;0&amp;quot;                                    Publisher=&amp;quot;0&amp;quot; /&amp;gt;        &amp;lt;PubCenter:PubCenterAdProvider Application=&amp;quot;&amp;quot;                                        AdUnit=&amp;quot;&amp;quot; /&amp;gt;        &amp;lt;!--InnerActive is not really suitable for the Ad Rotation because it doesn't have any events to react on.--&amp;gt;        &amp;lt;!--&amp;lt;InnerActive:InnerActiveAdProvider App=&amp;quot;&amp;quot; /&amp;gt;--&amp;gt;    &amp;lt;/Ads:AdControl.AdProviders&amp;gt;&amp;lt;/Ads:AdControl&amp;gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Lines 12 to 22 are the AdProviders that are available for the Unified ad control. Just remove the elements for the AdProviders that you’re not using or planning to use. For now also remove the GenericAdProviderForXaml element. This ad provider will be discussed separately in a next part. Also take a look at line 3, it is now configured to be run in Test mode. Now let’s start configuring the different ad providers.&lt;/p&gt;&lt;h3&gt;AdDuplex configuration&lt;/h3&gt;&lt;p&gt;After you added a new application to AdDuplex you will see the &lt;strong&gt;App ID&lt;/strong&gt;. Copy this value to the &lt;strong&gt;App&lt;/strong&gt; property of the &lt;strong&gt;AdDuplexAdProvider&lt;/strong&gt;.&lt;/p&gt;&lt;p&gt;&lt;a href="http://mark.mymonster.nl/Uploads/2012/02/image-6.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://mark.mymonster.nl/Uploads/2012/02/image-thumb-2.png" width="244" height="93" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;h3&gt;AdMob configuration&lt;/h3&gt;&lt;p&gt;When you completed the configuration of a new site/app in AdMob you will see a so called &lt;strong&gt;Publisher ID&lt;/strong&gt;. Copy this value to the &lt;strong&gt;AdUnit&lt;/strong&gt; property of the &lt;strong&gt;AdMobAdProvider&lt;/strong&gt;.&lt;/p&gt;&lt;p&gt;&lt;a href="http://mark.mymonster.nl/Uploads/2012/02/image-8.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://mark.mymonster.nl/Uploads/2012/02/image-thumb-3.png" width="244" height="42" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;h3&gt;MobFox configuration&lt;/h3&gt;&lt;p&gt;For MobFox you should copy the &lt;strong&gt;Publisher ID&lt;/strong&gt; from the app to the &lt;strong&gt;Publisher&lt;/strong&gt; property of the &lt;strong&gt;MobFoxAdProvider&lt;/strong&gt;.&lt;/p&gt;&lt;p&gt;&lt;a href="http://mark.mymonster.nl/Uploads/2012/02/image-10.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://mark.mymonster.nl/Uploads/2012/02/image-thumb-4.png" width="244" height="65" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;h3&gt;Smaato configuration&lt;/h3&gt;&lt;p&gt;For Smaato you should fill in both the &lt;strong&gt;AdSpace&lt;/strong&gt; and the &lt;strong&gt;Publisher&lt;/strong&gt; number in the &lt;strong&gt;SmaatoAdProvider&lt;/strong&gt;. Copy the &lt;strong&gt;AdSpaceId&lt;/strong&gt; from the application list for your application to the &lt;strong&gt;AdSpace&lt;/strong&gt; property for the &lt;strong&gt;SmaatoAdProvider&lt;/strong&gt;. Copy the &lt;strong&gt;PubisherId&lt;/strong&gt; below at that screen to the &lt;strong&gt;Publisher&lt;/strong&gt; property for the &lt;strong&gt;SmaatoAdProvider&lt;/strong&gt;.&lt;/p&gt;&lt;p&gt;&lt;a href="http://mark.mymonster.nl/Uploads/2012/02/image-16.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://mark.mymonster.nl/Uploads/2012/02/image-thumb-1.png" width="244" height="83" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;h3&gt;PubCenter configuration&lt;/h3&gt;&lt;p&gt;The PubCenter configuration consist of two parts. An Application, where you need to copy the &lt;strong&gt;Application ID&lt;/strong&gt; to the &lt;strong&gt;Application&lt;/strong&gt; property of the &lt;strong&gt;PubCenterAdProvider&lt;/strong&gt;. And an Ad Unit where you need to copy the &lt;strong&gt;ID&lt;/strong&gt; of the Ad Unit to the &lt;strong&gt;AdUnit&lt;/strong&gt; property of the &lt;strong&gt;PubCenterAdProvider&lt;/strong&gt;.&lt;/p&gt;&lt;p&gt;&lt;a href="http://mark.mymonster.nl/Uploads/2012/02/image-14.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://mark.mymonster.nl/Uploads/2012/02/image-thumb-6.png" width="244" height="101" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;h3&gt;InnerActive configuration&lt;/h3&gt;&lt;p&gt;InnerActive can be configured, but I cannot recommend using it in combination of the Unified Ad control. Inner Active doesn’t have any events that can be listened to like: NoAd, NewAd or AdEngaged. And because of this it’s impposible to let it rotate with the other Ad Providers. When you want to configure it though, you can. Copy the &lt;strong&gt;App Name&lt;/strong&gt; and put it in the &lt;strong&gt;App&lt;/strong&gt; property of the &lt;strong&gt;InnerActiveAdProvider&lt;/strong&gt;.&lt;/p&gt;&lt;p&gt;&lt;a href="http://mark.mymonster.nl/Uploads/2012/02/image-12.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://mark.mymonster.nl/Uploads/2012/02/image-thumb-5.png" width="244" height="45" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;h3&gt;Test or not?&lt;/h3&gt;&lt;p&gt;You can put your AdControl in production mode by setting the &lt;strong&gt;IsTest&lt;/strong&gt; property to &lt;strong&gt;False&lt;/strong&gt; or completely removing the property from the Xaml.&lt;/p&gt;&lt;p&gt;The next part will be about the Remote Ad Provider configuration.&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/MarkMonster_Silverlight/~4/imxaU8A-YIM" height="1" width="1"/&gt;</description>      <pubDate>Wed, 08 Feb 2012 21:46:37 +0100</pubDate>      <updated xmlns="http://www.w3.org/2005/Atom">2012-02-10T16:05:57+01:00</updated>      <origLink xmlns="http://rssnamespace.org/feedburner/ext/1.0">http://mark.mymonster.nl/2012/02/08/unified-ad-for-windows-phone-part-2-basic-usage</origLink>    </item>    <item>      <title>Creating Big Silverlight Windows and Getting Monitor Resolutions and Positions with PInvoke</title>      <author>Pete Brown	</author>      <link>http://10rem.net/blog/2012/02/07/creating-big-silverlight-windows-and-getting-monitor-resolutions-and-positions-with-pinvoke</link>      <pubDate>Wed, 08 Feb 2012 03:59:11 GMT</pubDate>      <guid>http://10rem.net/blog/2012/02/07/creating-big-silverlight-windows-and-getting-monitor-resolutions-and-positions-with-pinvoke</guid>      <description>&lt;p&gt;While doing the (long!) tech review for Silverlight 5 in Action,my friend and former coworker &lt;ahref="http://codemares.blogspot.com/"&gt;Tom McKearney&lt;/a&gt; mentionedthat we should put together some code to make handling windowsacross multiple monitors a reasonable task in Silverlight 5. Then,on a mailing list, I recently saw the question:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;Hi all -- I'm wondering if there is a maximum window size forSilverlight documented anywhere. For example if I had hardware thatcould support a 3x3 or 3x4 grid of 1920x1080 displays, can I makean SL5 OOB window that big? Can I make individual items in thewindow that big? Can I get hardware acceleration on all of it? Doesthe 3D API have any different limits than XAML? Or maybeSilverlight has no specific limit, but it's up to the hardware?&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;Curious about that, I decided to try it myself, and combine thiswith what Tom had requested. I don't have a 3x3 array of screensthat size, however. It really is a serious number of pixels.&lt;/p&gt;&lt;p&gt;&lt;ahref="http://10rem.net/media/83370/Windows-Live-Writer_Creating-Big-Silverlight-Windows_123FB_image_2.png" target="_blank"&gt;&lt;img src="http://10rem.net/media/83375/Windows-Live-Writer_Creating-Big-Silverlight-Windows_123FB_image_thumb.png" width="650" height="234" alt="image" border="0" style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Cost of screens aside, most people don't have the video hardwareto be able to run 6 displays. ATI has some displayport cards whichwill do that, but otherwise you're looking at a minimum of threevideo cards and a variety of connections. You're also looking at ashedload of video memory.&lt;/p&gt;&lt;p&gt;What I do have is a pair of 30" displays each running at2560x1600. That's quite a bit smaller, but still much larger thanmost people have. It ends up being a bit less than half therequested pixels. I do get almost the right width, but the heightis lacking.&lt;/p&gt;&lt;p&gt;&lt;ahref="http://10rem.net/media/83380/Windows-Live-Writer_Creating-Big-Silverlight-Windows_123FB_image_4.png" target="_blank"&gt;&lt;img src="http://10rem.net/media/83385/Windows-Live-Writer_Creating-Big-Silverlight-Windows_123FB_image_thumb_1.png" width="650" height="142" alt="image" border="0" style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;I wouldn't want 3x3 of the HD res screens (too much bevel)unless they were big old TV-style ones and you were doingrelatively low-res graphics. 3x3 of the 2560x1600 though?*drool*&lt;/p&gt;&lt;p&gt;In any case, my two combined are still quite a bit larger thanthe typical HD res 1920x1080 screen people have, with its 2,073,600pixels, and is a valid test of creating big windows inSilverlight.&lt;/p&gt;&lt;p&gt;My displays are also oriented a little differently than you mayexpect:&lt;/p&gt;&lt;p&gt;&lt;ahref="http://10rem.net/media/83390/Windows-Live-Writer_Creating-Big-Silverlight-Windows_123FB_image_6.png" target="_blank"&gt;&lt;img src="http://10rem.net/media/83395/Windows-Live-Writer_Creating-Big-Silverlight-Windows_123FB_image_thumb_2.png" width="500" height="326" alt="image" border="0" style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;That means that logical 0,0 is in the middle of the combineddisplay. We'll need to know that for later.&lt;/p&gt;&lt;h3&gt;Creating the Window&lt;/h3&gt;&lt;p&gt;If you want to learn how to create out-of-browser windows inSilverlight 5, &lt;ahref="http://10rem.net/blog/2011/04/13/silverlight-5-working-with-operating-system-windows"&gt;see my post here&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;The first test is to see if I can create a window that fits thedimensions of my two screens. All sizes here will behard-coded.&lt;/p&gt;&lt;p&gt;XAML&lt;/p&gt;&lt;pre class="brush: xml;"&gt;&amp;lt;UserControl x:Class="PeteBrown.SilverlightBigWindow.MainPage"&lt;br /&gt;    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"&lt;br /&gt;    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"&lt;br /&gt;    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"&lt;br /&gt;    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"&lt;br /&gt;    mc:Ignorable="d"&lt;br /&gt;    d:DesignHeight="175&lt;br /&gt;             " d:DesignWidth="800"&amp;gt;&lt;br /&gt;&lt;br /&gt;    &amp;lt;Grid x:Name="LayoutRoot" Background="White"&amp;gt;&lt;br /&gt;        &amp;lt;ListBox x:Name="DisplayList"&lt;br /&gt;                 Margin="126,12,12,12"&amp;gt;&lt;br /&gt;            &amp;lt;ListBox.ItemTemplate&amp;gt;&lt;br /&gt;                &amp;lt;DataTemplate&amp;gt;&lt;br /&gt;                    &amp;lt;Grid&amp;gt;&lt;br /&gt;                        &amp;lt;Grid.ColumnDefinitions&amp;gt;&lt;br /&gt;                            &amp;lt;ColumnDefinition Width="150" /&amp;gt;&lt;br /&gt;                            &amp;lt;ColumnDefinition Width="50" /&amp;gt;&lt;br /&gt;                            &amp;lt;ColumnDefinition Width="150" /&amp;gt;&lt;br /&gt;                            &amp;lt;ColumnDefinition Width="150" /&amp;gt;&lt;br /&gt;                            &amp;lt;ColumnDefinition Width="75" /&amp;gt;&lt;br /&gt;                            &amp;lt;ColumnDefinition Width="75" /&amp;gt;&lt;br /&gt;                        &amp;lt;/Grid.ColumnDefinitions&amp;gt;&lt;br /&gt;&lt;br /&gt;                        &amp;lt;TextBlock Grid.Column="0"&lt;br /&gt;                                   Text="{Binding MonitorName}" /&amp;gt;&lt;br /&gt;                        &amp;lt;TextBlock Grid.Column="1"&lt;br /&gt;                                   Text="{Binding IsPrimary}" /&amp;gt;&lt;br /&gt;                        &amp;lt;TextBlock Grid.Column="2"&lt;br /&gt;                                   Text="{Binding MonitorArea}" /&amp;gt;&lt;br /&gt;                        &amp;lt;TextBlock Grid.Column="3"&lt;br /&gt;                                   Text="{Binding WorkArea}" /&amp;gt;&lt;br /&gt;                        &amp;lt;TextBlock Grid.Column="4"&lt;br /&gt;                                   Text="{Binding Width}" /&amp;gt;&lt;br /&gt;                        &amp;lt;TextBlock Grid.Column="5"&lt;br /&gt;                                   Text="{Binding Height}" /&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                    &amp;lt;/Grid&amp;gt;&lt;br /&gt;                &amp;lt;/DataTemplate&amp;gt;&lt;br /&gt;            &amp;lt;/ListBox.ItemTemplate&amp;gt;&lt;br /&gt;        &amp;lt;/ListBox&amp;gt;&lt;br /&gt;     &lt;br /&gt;     &lt;br /&gt;        &amp;lt;Button Content="Open Full"&lt;br /&gt;                Height="23"&lt;br /&gt;                HorizontalAlignment="Left"&lt;br /&gt;                Margin="12,12,0,0"&lt;br /&gt;                Name="OpenWindow"&lt;br /&gt;                VerticalAlignment="Top"&lt;br /&gt;                Width="108"&lt;br /&gt;                Click="OpenWindow_Click" /&amp;gt;&lt;br /&gt;        &amp;lt;Button Content="Open Primary"&lt;br /&gt;                Height="23"&lt;br /&gt;                HorizontalAlignment="Left"&lt;br /&gt;                Margin="12,41,0,0"&lt;br /&gt;                Name="OpenPrimary"&lt;br /&gt;                VerticalAlignment="Top"&lt;br /&gt;                Width="108"&lt;br /&gt;                Click="OpenPrimary_Click" /&amp;gt;&lt;br /&gt;        &amp;lt;Button Content="Open Secondary"&lt;br /&gt;                Height="23"&lt;br /&gt;                HorizontalAlignment="Left"&lt;br /&gt;                Margin="12,70,0,0"&lt;br /&gt;                Name="OpenSecondary"&lt;br /&gt;                VerticalAlignment="Top"&lt;br /&gt;                Width="108"&lt;br /&gt;                Click="OpenSecondary_Click" /&amp;gt;&lt;br /&gt;    &amp;lt;/Grid&amp;gt;&lt;br /&gt;&amp;lt;/UserControl&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;C# code&lt;/p&gt;&lt;pre class="brush: csharp;"&gt;private void OpenWindow_Click(object sender, RoutedEventArgs e)&lt;br /&gt;{&lt;br /&gt;    Window w = new Window();&lt;br /&gt;&lt;br /&gt;    w.Width = 5120;&lt;br /&gt;    w.Height = 1600;&lt;br /&gt;&lt;br /&gt;    w.Show();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;private void OpenPrimary_Click(object sender, RoutedEventArgs e)&lt;br /&gt;{&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;private void OpenSecondary_Click(object sender, RoutedEventArgs e)&lt;br /&gt;{&lt;br /&gt;}&lt;/pre&gt;&lt;p&gt;This will allow me to click a button and have it open a giantwindow on the screen. The window has no content, so it'll appear asa plain white empty window.&lt;/p&gt;&lt;p&gt;Run it (remember, must be elevated trust out-of-browser app) andwhat do you see? No problem. One giant white window which fitsacross my screen.&lt;/p&gt;&lt;p&gt;&lt;ahref="http://10rem.net/media/83400/Windows-Live-Writer_Creating-Big-Silverlight-Windows_123FB_image_8.png" target="_blank"&gt;&lt;img src="http://10rem.net/media/83405/Windows-Live-Writer_Creating-Big-Silverlight-Windows_123FB_image_thumb_3.png" width="650" height="203" alt="image" border="0" style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;The problem is, however, that it starts in the middle of mydisplays instead of over at the far left. I had to drag it to thefar left to get it to take up the whole set of displays. How do wefigure out how to position and size the window?&lt;/p&gt;&lt;h3&gt;Positioning and Sizing the Window&lt;/h3&gt;&lt;p&gt;On my setup, the monitor to the left is all in negative space.So, to move the window to the far left, I need to move it to -2560.Then we can open the window and then tell it to move to the topleft, or to take up just a single display.&lt;/p&gt;&lt;pre class="brush: csharp;"&gt;private void OpenWindow_Click(object sender, RoutedEventArgs e)&lt;br /&gt;{&lt;br /&gt;    Window w = new Window();&lt;br /&gt;&lt;br /&gt;    w.Width = 5120;&lt;br /&gt;    w.Height = 1600;&lt;br /&gt;&lt;br /&gt;    w.Left = -2560;&lt;br /&gt;    w.Top = 0;&lt;br /&gt;    w.Show();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;private void OpenPrimary_Click(object sender, RoutedEventArgs e)&lt;br /&gt;{&lt;br /&gt;    Window w = new Window();&lt;br /&gt;&lt;br /&gt;    w.Width = 2560;&lt;br /&gt;    w.Height = 1600;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    w.Left = 0;&lt;br /&gt;    w.Top = 0;&lt;br /&gt;    w.Show();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;private void OpenSecondary_Click(object sender, RoutedEventArgs e)&lt;br /&gt;{&lt;br /&gt;    Window w = new Window();&lt;br /&gt;&lt;br /&gt;    w.Width = 2560;&lt;br /&gt;    w.Height = 1600;&lt;br /&gt;&lt;br /&gt;    w.WindowStyle = WindowStyle.None;&lt;br /&gt;&lt;br /&gt;    w.WindowState = WindowState.Maximized;&lt;br /&gt;&lt;br /&gt;    w.Left = -2560;&lt;br /&gt;    w.Top = 0;&lt;br /&gt;    w.Show();&lt;br /&gt;}&lt;/pre&gt;&lt;p&gt;Ok, so we've verified that it can be done. Now we need to makeit work for arbitrary resolutions and monitor configurations.&lt;strong&gt;Before we do that, though, did you notice that the sizingwas off a bit?&lt;/strong&gt; Both the width and height appear to be offby the measurements of the window chrome. It turns out this happenswhether or not you're using custom chrome. &lt;strong&gt;I've reported abug to the team and they're investigating&lt;/strong&gt;, so for nowwe're going to have to ignore the size issues. &lt;strong&gt;If you workaround the sizing in your own code, stick it in an conditionalcompilation block&lt;/strong&gt; or something so you can easily change itif/when the bug is fixed.&lt;/p&gt;&lt;h3&gt;Getting Display Informatin Using PInvoke&lt;/h3&gt;&lt;p&gt;We're running in elevated OOB mode anyway, so as long as youonly care about Windows, you can also throw in some P/Invoke. Themain functions we're interested in are &lt;ahref="http://pinvoke.net/default.aspx/user32.EnumDisplayMonitors"&gt;EnumDisplayMonitors&lt;/a&gt;and &lt;ahref="http://msdn.microsoft.com/en-us/library/dd144901(v=VS.85).aspx"&gt;GetMonitorInfo&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;The PInvoke.net example was enough to get me started, but itlacked a few necessary steps. Of course, it also needed somechanges to work with Silverlight.&lt;/p&gt;&lt;p&gt;The first addition is the DisplayInfo class. We'll use this tohold information about a single monitor.&lt;/p&gt;&lt;pre class="brush: csharp;"&gt;namespace PeteBrown.SilverlightBigWindow&lt;br /&gt;{&lt;br /&gt;    public class DisplayInfo&lt;br /&gt;    {&lt;br /&gt;        public string MonitorName { get; internal set; }&lt;br /&gt;        public Win32Rect MonitorArea { get; internal set; }&lt;br /&gt;        public Win32Rect WorkArea { get; internal set; }&lt;br /&gt;        public int Width { get; internal set; }&lt;br /&gt;        public int Height { get; internal set; }&lt;br /&gt;        public bool IsPrimary { get; internal set; }&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;p&gt;Next, I need a way to populate this class. Here's where all thePInvoke action happens.&lt;/p&gt;&lt;pre class="brush: csharp;"&gt;using System;&lt;br /&gt;using System.Runtime.InteropServices;&lt;br /&gt;using System.Collections.ObjectModel;&lt;br /&gt;&lt;br /&gt;namespace PeteBrown.SilverlightBigWindow&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;    [StructLayout(LayoutKind.Sequential)]&lt;br /&gt;    public struct Win32Rect&lt;br /&gt;    {&lt;br /&gt;        public int Left { get; set; }&lt;br /&gt;        public int Top { get; set; }&lt;br /&gt;        public int Right { get; set; }&lt;br /&gt;        public int Bottom { get; set; }&lt;br /&gt;&lt;br /&gt;        public override string ToString()&lt;br /&gt;        {&lt;br /&gt;            return string.Format("{0}, {1}, {2}, {3}", Left, Top, Right, Bottom);&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]&lt;br /&gt;    internal struct MonitorInfoEx&lt;br /&gt;    {&lt;br /&gt;        public int Size;&lt;br /&gt;        public Win32Rect Monitor;&lt;br /&gt;        public Win32Rect WorkArea;&lt;br /&gt;        public uint Flags;&lt;br /&gt;        [MarshalAs(UnmanagedType.ByValTStr, SizeConst = DisplayManager.DeviceNameCharacterCount)]&lt;br /&gt;        public string DeviceName;&lt;br /&gt;&lt;br /&gt;        public void Init()&lt;br /&gt;        {&lt;br /&gt;            this.Size = 40 + 2 * DisplayManager.DeviceNameCharacterCount;&lt;br /&gt;            this.DeviceName = string.Empty;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;    public class DisplayManager&lt;br /&gt;    {&lt;br /&gt;        // size of a device name string&lt;br /&gt;        internal const int DeviceNameCharacterCount = 32;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        private delegate bool MonitorEnumProcDelegate(IntPtr hMonitor, IntPtr hdcMonitor, ref Win32Rect lprcMonitor, uint dwData);&lt;br /&gt;&lt;br /&gt;        [DllImport("user32.dll")]&lt;br /&gt;        private static extern bool EnumDisplayMonitors(IntPtr hdc, IntPtr lprcClip, MonitorEnumProcDelegate lpfnEnum, uint dwData);&lt;br /&gt;&lt;br /&gt;        [DllImport("user32.dll", CharSet = CharSet.Auto)]&lt;br /&gt;        private static extern bool GetMonitorInfo(IntPtr hMonitor, ref MonitorInfoEx lpmi);&lt;br /&gt;&lt;br /&gt;        private static ObservableCollection&amp;lt;DisplayInfo&amp;gt; _displays = new ObservableCollection&amp;lt;DisplayInfo&amp;gt;();&lt;br /&gt;        public static ObservableCollection&amp;lt;DisplayInfo&amp;gt; Displays&lt;br /&gt;        {&lt;br /&gt;            get { return _displays; }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        public static void LoadDisplays()&lt;br /&gt;        {&lt;br /&gt;            EnumDisplayMonitors(IntPtr.Zero, IntPtr.Zero, MonitorEnumProc, 0);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        [AllowReversePInvokeCalls]&lt;br /&gt;        internal static bool MonitorEnumProc(IntPtr hMonitor, IntPtr hdcMonitor, ref Win32Rect lprcMonitor, uint dwData)&lt;br /&gt;        {&lt;br /&gt;            var monitor = new MonitorInfoEx();&lt;br /&gt;            monitor.Init();&lt;br /&gt;&lt;br /&gt;            bool success = GetMonitorInfo(hMonitor, ref monitor);&lt;br /&gt;&lt;br /&gt;            if (success)&lt;br /&gt;            {&lt;br /&gt;                var display = new DisplayInfo();&lt;br /&gt;&lt;br /&gt;                display.MonitorName = monitor.DeviceName;&lt;br /&gt;&lt;br /&gt;                display.Width = monitor.Monitor.Right - monitor.Monitor.Left;&lt;br /&gt;                display.Height = monitor.Monitor.Bottom - monitor.Monitor.Top;&lt;br /&gt;&lt;br /&gt;                display.MonitorArea = monitor.Monitor;&lt;br /&gt;                display.WorkArea = monitor.WorkArea;&lt;br /&gt;                display.IsPrimary = (monitor.Flags &amp;gt; 0);&lt;br /&gt;&lt;br /&gt;                _displays.Add(display);&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            return true;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;This code calls EnumDisplayMonitors to enumerate the monitors onthe system. For each monitor found, I then call GetMonitorInfo topull back the details. From that call, I create a DisplayInfo classand populate it, ready to be used by the rest of the Silverlightapplication. The list of DisplayInfo classes is stored in aclass-scope collection.&lt;/p&gt;&lt;p&gt;Note the "AllowReversePInvokeCalls" attribute onMonitorEnumProc. That attribute is required for any callbacks. Italso means we couldn't use a simple anonymous delegate for thecallback, as those can't have attributes.&lt;/p&gt;&lt;p&gt;Finally, a short call in MainPage.xaml and we're able to get thedisplay sizes&lt;/p&gt;&lt;pre class="brush: csharp;"&gt;public MainPage()&lt;br /&gt;{&lt;br /&gt;    InitializeComponent();&lt;br /&gt;&lt;br /&gt;    DisplayManager.LoadDisplays();&lt;br /&gt;&lt;br /&gt;    DisplayList.ItemsSource = DisplayManager.Displays;&lt;br /&gt;}&lt;/pre&gt;&lt;p&gt;Run the application. On my screen, it looks like this:&lt;/p&gt;&lt;p&gt;&lt;ahref="http://10rem.net/media/83410/Windows-Live-Writer_Creating-Big-Silverlight-Windows_123FB_image_12.png" target="_blank"&gt;&lt;img src="http://10rem.net/media/83415/Windows-Live-Writer_Creating-Big-Silverlight-Windows_123FB_image_thumb_5.png" width="650" height="177" alt="image" border="0" style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Ok, so now we know how to position a display using hard-codedvalues, and how to get the display list from windows. Now, tocombine the two to help with sizing and positioning.&lt;/p&gt;&lt;h3&gt;Positioning and Sizing the Window&lt;/h3&gt;&lt;p&gt;Positioning the window can be tricky. There are any number ofways that monitors can be configured. Here are just a fewinteresting (and common) ones, in addition to the ones mentionedabove:&lt;/p&gt;&lt;p&gt;&lt;ahref="http://10rem.net/media/83420/Windows-Live-Writer_Creating-Big-Silverlight-Windows_123FB_image_16.png" target="_blank"&gt;&lt;img src="http://10rem.net/media/83425/Windows-Live-Writer_Creating-Big-Silverlight-Windows_123FB_image_thumb_7.png" width="650" height="176" alt="image" border="0" style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;If you look at the teal and the green examples, you can seewhere a rectangular pixel mapping puts some logical pixels out intonever-never land. On systems like that, a single window spanningall displays is not particularly practical. In any case, mostmulti-display configurations are two, or at most, three displaysbecause that's all you can typically drive from a single typicalvideo card.&lt;/p&gt;&lt;p&gt;As an aside, I've run with all four examples shown above, plus afew extras. My current layout is 2x 30" displays side by side withprimary on right and secondary on left, plus a 23" display on topof the primary. The 23" display is connected to a differentcomputer, however, and shared using Input Director, so it doesn'tfactor into this discussion.&lt;/p&gt;&lt;p&gt;With just the two displays I have, it's easy to test a number ofdifferent scenarios simply by changing resolution and monitorposition in display settings. First, some code to position thewindow on a specific screen.&lt;/p&gt;&lt;h4&gt;Position Window on Primary Display&lt;/h4&gt;&lt;p&gt;A PC can have only one primary display. Conveniently, thedisplay is called out as such via the API.&lt;/p&gt;&lt;pre class="brush: csharp;"&gt;private void PositionWindowOnSingleScreen(DisplayInfo screen, Window window, bool SizeToScreen = true, bool maximize = false)&lt;br /&gt;{&lt;br /&gt;    window.Left = screen.MonitorArea.Left;&lt;br /&gt;    window.Top = screen.MonitorArea.Top;&lt;br /&gt;&lt;br /&gt;    if (SizeToScreen)&lt;br /&gt;    {&lt;br /&gt;        window.Width = screen.Width;&lt;br /&gt;        window.Height = screen.Height;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    if (maximize)&lt;br /&gt;        window.WindowState = WindowState.Maximized;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;private void OpenPrimary_Click(object sender, RoutedEventArgs e)&lt;br /&gt;{&lt;br /&gt;    if (DisplayManager.Displays.Count &amp;gt; 0)&lt;br /&gt;    {&lt;br /&gt;        // find primary display&lt;br /&gt;        DisplayInfo info = (from DisplayInfo di in DisplayManager.Displays&lt;br /&gt;                            where di.IsPrimary&lt;br /&gt;                            select di).FirstOrDefault();&lt;br /&gt;&lt;br /&gt;        if (info != null)&lt;br /&gt;        {&lt;br /&gt;            Window w = new Window();&lt;br /&gt;&lt;br /&gt;            PositionWindowOnSingleScreen(info, w, true, false);&lt;br /&gt;&lt;br /&gt;            w.Show();&lt;br /&gt;        }&lt;br /&gt;        else&lt;br /&gt;        {&lt;br /&gt;            MessageBox.Show("No primary display. I suppose you won't see this message.");&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;    else&lt;br /&gt;    {&lt;br /&gt;        MessageBox.Show("Display list not yet loaded.");&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;}&lt;/pre&gt;&lt;p&gt;This example uses a little LINQ to find the primary screen andthen a separate function to position the window on that screen. Ican't think of a case where you'd have no primary display, but Icheck for it anyway.&lt;/p&gt;&lt;h4&gt;Position Window on Secondary Display&lt;/h4&gt;&lt;p&gt;Primary is cool. You can do that without any API calls.Secondary is normally a little more work, but I have youcovered.&lt;/p&gt;&lt;p&gt;You can, of course, have more than one secondary display. In mycase, I have only one, so I'm going to position this window in thefirst secondary display I have.&lt;/p&gt;&lt;pre class="brush: csharp; highlight: [7];"&gt;private void OpenSecondary_Click(object sender, RoutedEventArgs e)&lt;br /&gt;{&lt;br /&gt;    if (DisplayManager.Displays.Count &amp;gt; 0)&lt;br /&gt;    {&lt;br /&gt;        // find first secondary display&lt;br /&gt;        DisplayInfo info = (from DisplayInfo di in DisplayManager.Displays&lt;br /&gt;                            where !di.IsPrimary&lt;br /&gt;                            select di).FirstOrDefault();&lt;br /&gt;&lt;br /&gt;        if (info != null)&lt;br /&gt;        {&lt;br /&gt;            Window w = new Window();&lt;br /&gt;&lt;br /&gt;            PositionWindowOnSingleScreen(info, w, true, false);&lt;br /&gt;&lt;br /&gt;            w.Show();&lt;br /&gt;        }&lt;br /&gt;        else&lt;br /&gt;        {&lt;br /&gt;            MessageBox.Show("No secondary display available.");&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;    else&lt;br /&gt;    {&lt;br /&gt;        MessageBox.Show("Display list not yet loaded.");&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;p&gt;In this case, all I needed to change was the error message andadd a little bang in the where clause of the LINQ query.&lt;/p&gt;&lt;h4&gt;Make a window take up all Display Space&lt;/h4&gt;&lt;p&gt;This goes specifically to the 3x3 screen scenario. As Imentioned, we'll need to assume rectangular window space here, asanything else is going to be pretty application-specific.&lt;/p&gt;&lt;pre class="brush: csharp;"&gt;private void OpenWindow_Click(object sender, RoutedEventArgs e)&lt;br /&gt;{&lt;br /&gt;    if (DisplayManager.Displays.Count &amp;gt; 0)&lt;br /&gt;    {&lt;br /&gt;        Window w = new Window();&lt;br /&gt;&lt;br /&gt;        w.Left = (from DisplayInfo di in DisplayManager.Displays&lt;br /&gt;                  select di.MonitorArea.Left).Min();&lt;br /&gt;&lt;br /&gt;        w.Top = (from DisplayInfo di in DisplayManager.Displays&lt;br /&gt;                 select di.MonitorArea.Top).Min();&lt;br /&gt;&lt;br /&gt;        w.Width = (from DisplayInfo di in DisplayManager.Displays&lt;br /&gt;                   select di.Width).Sum();&lt;br /&gt;&lt;br /&gt;        w.Height = (from DisplayInfo di in DisplayManager.Displays&lt;br /&gt;                    select di.Height).Sum();&lt;br /&gt;&lt;br /&gt;        w.Show();&lt;br /&gt;    }&lt;br /&gt;    else&lt;br /&gt;    {&lt;br /&gt;        MessageBox.Show("Display list not yet loaded.");&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;p&gt;Because we're assuming a reasonably logical rectangle, I cansimply take the minimum left and top values and use that toposition the window, and then sum the height and width values inorder to size the window.&lt;/p&gt;&lt;p&gt;As an aside, Silverlight had no issues opening this window on mymachine. I'm not sure I'd recommend stretching a video across it,though.&lt;/p&gt;&lt;p&gt;Well, actually, I can't let that lie out there like that. Let'stry it. Add this code right after the w.Height setting and beforethe w.Show() line&lt;/p&gt;&lt;pre class="brush: csharp;"&gt;MediaElement video = new MediaElement();&lt;br /&gt;video.Width = w.Width;&lt;br /&gt;video.Height = w.Height;&lt;br /&gt;video.Source = new Uri("/pub/sl5iA/NetduinoRobot_SmallM.wmv", UriKind.Absolute);&lt;br /&gt;video.Stretch = Stretch.UniformToFill;&lt;br /&gt;video.AutoPlay = true;&lt;br /&gt;&lt;br /&gt;w.Content = video;&lt;/pre&gt;&lt;p&gt;I stretch the video so it takes up all space (UniformToFill) andclips the video so the aspect ratio stays correct. It works, andworks well, If the the video was high enough resolution, it wouldeven look good.&lt;/p&gt;&lt;p&gt;&lt;ahref="http://10rem.net/media/83430/Windows-Live-Writer_Creating-Big-Silverlight-Windows_123FB_image_18.png" target="_blank"&gt;&lt;img src="http://10rem.net/media/83435/Windows-Live-Writer_Creating-Big-Silverlight-Windows_123FB_image_thumb_8.png" width="531" height="166" alt="image" border="0" style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px"/&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;Sweet! Big video. That's almost like IMax or &lt;ahref="http://en.wikipedia.org/wiki/Ultra_High_Definition_Television"&gt;UHDTV&lt;/a&gt; :)&lt;/p&gt;&lt;h4&gt;Position Main Window on a Named Display&lt;/h4&gt;&lt;p&gt;This is particularly useful if you're restoring windows whenstarting up a new session. You could store the display device nameand then do some checks on startup and if the device name andresolution are still valid (they could have swapped displays,bought new ones, got rid of one, etc.) position the window on thatdisplay. If not, position it on the main display.&lt;/p&gt;&lt;p&gt;In this case, I'm simply going to position the main Silverlightwindow on to the display you click on in the ListBox. The code issimple enough. First, add a button to the MainPage, under the otherbuttons.&lt;/p&gt;&lt;pre class="brush: xml;"&gt;&amp;lt;Button Content="Move to Selected"&lt;br /&gt;        Height="23"&lt;br /&gt;        HorizontalAlignment="Left"&lt;br /&gt;        Margin="12,115,0,0"&lt;br /&gt;        Name="MoveToSelectedButton"&lt;br /&gt;        VerticalAlignment="Top"&lt;br /&gt;        Width="108"&lt;br /&gt;        Click="MoveToSelectedButton_Click" /&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;Next, the event handler and work function in the code-behind.&lt;strong&gt;There are many ways I could have done this (especiallyusing SelectedItem), but I specifically want to show using thedevice name&lt;/strong&gt;. I know it's extra work, but I'm doing iton-purpose; the value you store upon exiting is not going to be anobject instance, it's going to be a screen device name string.&lt;/p&gt;&lt;pre class="brush: csharp;"&gt;private void MoveMainWindowToSelectedDisplay()&lt;br /&gt;{&lt;br /&gt;    // see comments in blog post as to why I went with strings&lt;br /&gt;    string deviceName = ((DisplayInfo)DisplayList.SelectedItem).MonitorName;&lt;br /&gt;&lt;br /&gt;    DisplayInfo display = (from DisplayInfo di in DisplayManager.Displays&lt;br /&gt;                            where di.MonitorName.ToLower() == deviceName.ToLower()&lt;br /&gt;                            select di).FirstOrDefault();&lt;br /&gt;&lt;br /&gt;    var mainWindow = Application.Current.MainWindow;&lt;br /&gt;&lt;br /&gt;    // center on the display&lt;br /&gt;&lt;br /&gt;    mainWindow.Left = display.MonitorArea.Left + (display.Width - mainWindow.Width) / 2;&lt;br /&gt;    mainWindow.Top = display.MonitorArea.Top + (display.Height - mainWindow.Height) / 2;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;private void MoveToSelectedButton_Click(object sender, RoutedEventArgs e)&lt;br /&gt;{&lt;br /&gt;    if (DisplayList.SelectedItem != null)&lt;br /&gt;    {&lt;br /&gt;        MoveMainWindowToSelectedDisplay();&lt;br /&gt;    }&lt;br /&gt;    else&lt;br /&gt;    {&lt;br /&gt;        MessageBox.Show("Please select a screen from the list");&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;p&gt;The code moves the window to the selected monitor and thencenters in that monitor. Some additional checking to make sure thewindow isn't wider than that monitor would be a good idea.&lt;/p&gt;&lt;h3&gt;Summary&lt;/h3&gt;&lt;p&gt;The intent of this post was to give you the foundation you'llneed in order to do window manipulation in Silverlight. Once youstart doing multi-monitor window manipulation, you probably have agood idea of what you want to do with it. I'll leave it up to youto take this code and run with it to suit your specific applicationneeds.&lt;/p&gt;&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/abTfC3bvPnuqH0QldgCE0SY_eBw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/abTfC3bvPnuqH0QldgCE0SY_eBw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/abTfC3bvPnuqH0QldgCE0SY_eBw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/abTfC3bvPnuqH0QldgCE0SY_eBw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/PeteBrown-Silverlight/~4/LnBVZe8RTLI" height="1" width="1"/&gt;</description>    </item>    <item>      <link>http://feedproxy.google.com/~r/MarkMonster_Silverlight/~3/iS9Mz8hPq0Q/windows-phone-unified-ad-part-1-introduction</link>      <author xmlns="http://www.w3.org/2005/Atom">        <name>Mark Monster</name>      </author>      <category>.NET</category>      <category>advertisement</category>      <category>Open Source</category>      <category>Phone</category>      <category>Silverlight</category>      <category>Technology</category>      <category>WP7</category>      <category>WPDev</category>      <category>WPUnifiedAd</category>      <title>Unified Ad for Windows Phone - Part 1 - Introduction</title>      <description>&lt;p&gt;About a month ago I started a new investigation about which Ad Provider I should use. Things I wanted.&lt;/p&gt;  &lt;p&gt;- Best eCPM&lt;/p&gt;  &lt;p&gt;- Best Fill Rate&lt;/p&gt;  &lt;p&gt;- Easy to use&lt;/p&gt;  &lt;p&gt;Some of the things that are causing problems is the Ad Availability per Country. Depending on where your app is used more or less localized ads are used. So we know that the Microsoft PubCenter has a high &lt;a href="http://adsense.blogspot.com/2006/02/ecpm-what-exactly-is-that.html" target="_blank"&gt;eCPM&lt;/a&gt; for the US, it is low for The Netherlands. There are more of those problems with other Ad Providers. I heard there was a solution for this problem. Use the &lt;a href="http://wp7adrotator.codeplex.com/" target="_blank"&gt;Ad Rotator for Windows Phone 7&lt;/a&gt; which can be found on Codeplex. I did give it a try but at that moment AdMob was not supported (mostly because there were some AdMob specific problems) and also MobFox and Smaato weren’t supported. Those were the specific Ad Providers I was interested in.&lt;/p&gt;  &lt;p&gt;My initial though would be, let’s try to modify the source a little bit, to get support for MobFox and Smaato in. But after looking into the source I was warned, almost all the code was in the Code Behind for the AdControl. While I am not against the usage of the Code Behind, I’m pro extensibility. The code I saw was far from maintainable and extensibility is done by adding more code. So when more AdProviders will be added code will be less and less maintainable.&lt;/p&gt;  &lt;h3&gt;Unification&lt;/h3&gt;  &lt;p&gt;When I look at the differences between the AdControls, they more or less do the same, but in a different way. All of them have a TestMode, but enabling the testmode is different for each AdControl. Same for the events they have. I want to have a unified ad control that does handle these ‘Complexities’ for me and the rest of the world. There isn’t such a control yet, so why not use the good parts of wp7adrotator (the remote configuration, multiple adproviders) and create something that suits my needs better. So I did.&lt;/p&gt;  &lt;p&gt;The &lt;a href="http://wpunifiedad.codeplex.com" target="_blank"&gt;Windows Phone Unified Ad control&lt;/a&gt; is universal in the following ways.&lt;/p&gt;  &lt;p&gt;Properties:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;- Country – Will be passed to all the AdProviders that support Country or Location as input&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;- IsTest – Will be pass to all the AdProviders that support a way of TestMode. Some have a simple boolean field, others require to set the PublisherId to be set to a specific value.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Events:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;- NewAd – When a new ad is available this event will be fired, even though the different AdProviders have different events to notify the user, like: NewAdAvailable, AdLoaded, ControlAdRefreshed.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;- NoAd – When no ad is availabe this event will be fired, even though the different AdProviders have different events to notify the user, like: AdFailed, ControlErrorOccurred, AdError.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;- AdEngaged – When an ad is engaged or clicked this event will be fired, even though the different AdProviders have different events to notify the user, like: AdClick, ControlAdEngaged, ControlIsAdEngagedChanged, AdLeavingApplication.&amp;#160; &lt;/em&gt;&lt;/p&gt;  &lt;h3&gt;Best Fill Rate&lt;/h3&gt;  &lt;p&gt;To get the best fill rate the Windows Phone Unified Ad control supports ad provider rotation. As soon as an Ad Provider is not providing an ad the next Provider will be asked to provide an ad. This will enable you to get a higher fill rate compared to using just one ad provider. You can even roll in your own custom ad based on Xaml.&lt;/p&gt;  &lt;h3&gt;Best eCPM&lt;/h3&gt;  &lt;p&gt;Every single Ad Provider changes it’s &lt;a href="http://adsense.blogspot.com/2006/02/ecpm-what-exactly-is-that.html" target="_blank"&gt;eCPM&lt;/a&gt; from time to time. But they even have different &lt;a href="http://adsense.blogspot.com/2006/02/ecpm-what-exactly-is-that.html" target="_blank"&gt;eCPMs&lt;/a&gt; per country. Same as they might have, or might not have ads for a particular country at all. To get the best of both worlds &lt;a href="http://wpunifiedad.codeplex.com/"&gt;Windows Phone Unified Ad control&lt;/a&gt; supports AdProviders per Country. Similar to the wp7adrotator, but instead the Country is used and not so much the full culture. If you already have configuration files for wp7adrotator you can use those as well, they are supported in the &lt;a href="http://wpunifiedad.codeplex.com" target="_blank"&gt;Windows Phone Unified Ad control&lt;/a&gt; as well.&lt;/p&gt;  &lt;h3&gt;Supported AdProviders&lt;/h3&gt;  &lt;p&gt;All Ad Providers that currently have an Ad Control for Windows Phone 7 are supported. Register with the ones you like best. Inner-Active support is experimental because they have no way to find out there’s an ad displayed or not, yet.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://pubcenter.microsoft.com/"&gt;&lt;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="Microsoft PubCenter" border="0" alt="Microsoft PubCenter" src="http://mark.mymonster.nl/Uploads/2012/02/image-3.png" width="180" height="56" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.admob.com/"&gt;&lt;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="AdMob" border="0" alt="AdMob" src="http://mark.mymonster.nl/Uploads/2012/02/image-6.png" width="180" height="62" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.smaato.com/"&gt;&lt;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="Smaato" border="0" alt="Smaato" src="http://mark.mymonster.nl/Uploads/2012/02/image-9.png" width="180" height="42" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.mobfox.com/"&gt;&lt;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="MobFox" border="0" alt="MobFox" src="http://mark.mymonster.nl/Uploads/2012/02/image-18.png" width="180" height="49" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.adduplex.com/"&gt;&lt;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="AdDuplex" border="0" alt="AdDuplex" src="http://mark.mymonster.nl/Uploads/2012/02/image-17.png" width="180" height="45" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.inner-active.com/"&gt;&lt;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="Inner-Active" border="0" alt="Inner-Active" src="http://mark.mymonster.nl/Uploads/2012/02/image-16.png" width="180" height="41" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;There are two special Ad Provider implementations.&lt;/p&gt;  &lt;p&gt;- None – This ad provider is used to not show an ad at all. Can be very handy during testing phase, when testing the application and not the advertisements. But could also be used to show no ads for a certain percentage of the app usage.&lt;/p&gt;  &lt;p&gt;- GenericAdProviderForXaml – This ad provider is used to show some custom Xaml that’s loaded from a remote url. Can be very handy to market your own applications within your own applications.&lt;/p&gt;  &lt;h3&gt;What’s next?&lt;/h3&gt;  &lt;p&gt;&lt;a href="http://mark.mymonster.nl/2012/02/08/unified-ad-for-windows-phone-part-2-basic-usage"&gt;Next part will be about the basic usage of the Windows Phone Unified Ad Control.&lt;/a&gt; If you can’t wait? You can find &lt;a href="http://wpunifiedad.codeplex.com/SourceControl/list/changesets"&gt;the source and an example project with the Windows Phone Unified Ad control on codeplex&lt;/a&gt;. If you want to start right away you can &lt;a href="https://www.nuget.org/packages/wpunifiedad/0.1.0"&gt;add the NuGet Package called WPUnifiedAd&lt;/a&gt;. Also the &lt;a href="http://wpunifiedad.codeplex.com/"&gt;homepage contains a basic guide&lt;/a&gt; that will help as well.&lt;/p&gt;  &lt;p&gt;Part 3 will be about using the Remote Ad Provider Configuration. Future parts will come on how to make use of the GenericAdProviderForXaml&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/MarkMonster_Silverlight/~4/iS9Mz8hPq0Q" height="1" width="1"/&gt;</description>      <pubDate>Tue, 07 Feb 2012 21:13:42 +0100</pubDate>      <updated xmlns="http://www.w3.org/2005/Atom">2012-02-08T21:56:53+01:00</updated>      <origLink xmlns="http://rssnamespace.org/feedburner/ext/1.0">http://mark.mymonster.nl/2012/02/07/windows-phone-unified-ad-part-1-introduction</origLink>    </item>  </channel></rss>
