<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://windowsteamblog.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Windows Phone Developer Blog</title><link>http://windowsteamblog.com/windows_phone/b/wpdev/default.aspx</link><description /><dc:language>en-US</dc:language><generator>Telligent Community 1.5.134.12674 (Build: 5.5.134.12674)</generator><item><title>Listbox, Why Art Thou Blanking?</title><link>http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/05/16/listbox-why-art-thou-blanking.aspx</link><pubDate>Thu, 17 May 2012 00:53:58 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:581658</guid><dc:creator>Oren Nachman</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://windowsteamblog.com/windows_phone/b/wpdev/rsscomments.aspx?WeblogPostID=581658</wfw:commentRss><comments>http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/05/16/listbox-why-art-thou-blanking.aspx#comments</comments><description>&lt;p&gt;One of the biggest performance changes for developers using Silverlight in Mango (WP 7.5) is off-thread input for ListBox. In a nutshell this basically means that all any flick or pan a user makes on a ListBox is handled by a dedicated thread, the Direct Manipulation (DM) thread, instead of the UI thread. By connecting the DM thread to the Compositor thread (that’s the one that does all the drawing to the screen independent of the UI thread) we have a ListBox that moves smoothly even when the UI thread is completely blocked.&lt;/p&gt;  &lt;p&gt;Unfortunately this also comes with a price – the ListBox is now so responsive and moves so fast that the Listbox can run out of content to display to the user as the user is flicking, and blank – basically drawing nothing except for an updated ScrollBar (so the user knows he’s still moving in the ListBox, but it doesn’t help much) and the background while the UI thread scrambles to bring in new items to fill up the holes.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;My ListBox isn’t blanking, why do I care about this blog post?&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;You care because you care about your users. You’re the kind of dev who knows that even though he’s got a great, powerful phone, not everyone does. You care because you are proud to call yourself a developer. You care because… ok, back to reality. &lt;/p&gt;  &lt;p&gt;With the release of Tango, Windows Phone is now supported on lower powered machines which often have slower hardware and less memory, so even though your device shows no blanking, others may see blanking, especially if they’re rocking a new, lower powered, Tango phone. This post will help give you the tools that let your app run smooth, with hardly any blanks, even on those phones.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;My ListBox is not blanking, but it’s really jerky during scroll&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Holy Smokes Batman! Jerky scrolling is all but eliminated in the new ListBox, even for WP7 apps – are you sure you’re using it? There’s a good chance you’re using the original LongListSelector (LLS) from the &lt;a href="http://silverlight.codeplex.com/"&gt;toolkit&lt;/a&gt;, which doesn’t auto-update when you move your project to Mango. To take full advantage of the new ListBox improvements you need to download the latest toolkit from &lt;a href="http://silverlight.codeplex.com"&gt;http://silverlight.codeplex.com&lt;/a&gt; and update to the new LLS which is based on the platform’s ListBox.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Why does blanking occur: the nitty gritty&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;There are a couple of common code / design reasons that cause a ListBox to blank, but in general it all boils down to the amount of time it takes to bring in a new item. The ListBox maintains a one screen buffer of items in each direction which moves with the user’s viewport as they scroll around. If the ListBox can’t fill that buffer in the direction of the scroll fast enough, you get blanking.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/0333.clip_5F00_image002_5F00_7C463585.png"&gt;&lt;img title="clip_image002" style="border: 0px currentcolor; margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" border="0" alt="clip_image002" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/3487.clip_5F00_image002_5F00_thumb_5F00_25BD0777.png" width="78" height="292" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;b&gt;&lt;i&gt;Diagram 1: &lt;/i&gt;&lt;/b&gt;In a stationary world, when there is no scrolling going on, the user will be looking at the center screen and there will be buffered items waiting to be shown in both directions&lt;/p&gt;  &lt;p&gt;Filling the buffer takes a few steps, namely creating an Item Container (if a suitable one from the excess buffer in the other direction doesn’t already exist) and Data Binding the new item’s content (which kicks off the Measure pass). All of these updates occur on the UI thread and they all happen at once (not item by item) so if a flick is fast and the ListBox realizes that it needs to draw a full screen worth’s of items it will block the UI thread while it does just that. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/2313.clip_5F00_image004_5F00_6586EDFC.png"&gt;&lt;img title="clip_image004" style="border: 0px currentcolor; margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" border="0" alt="clip_image004" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/2728.clip_5F00_image004_5F00_thumb_5F00_13080DC0.png" width="154" height="319" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;b&gt;&lt;i&gt;Diagram 2:&lt;/i&gt;&lt;/b&gt; As the user moves downwards we balance the buffers by transferring the excess buffer from the top buffer (red) to the bottom buffer and re-databind it to the new data, maintaining 1 screen of buffer in each direction.&lt;/p&gt;  &lt;p&gt;But if the user flicks again while the UI thread is blocked bringing in buffer items, we’ll get even more out of sync and move completely out of our buffer space – since there is nothing in the Control to draw (remember, the ListBox is still scrambling on the UI thread to bring the new items in, it’s just too slow) you just get the background, i.e blankness.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;If there’s nothing to draw, why is the ListBox still moving? Or, look at it from another angle:&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;As we mentioned earlier, scrolling is now off-thread, so from the Compositor’s point of view it’s moving the ListBox and everything in it, the problem is that the UI thread hasn’t stuck anything in it (at that position) yet, so we blank.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/5140.clip_5F00_image006_5F00_40892D83.png"&gt;&lt;img title="clip_image006" style="border: 0px currentcolor; margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" border="0" alt="clip_image006" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/3326.clip_5F00_image006_5F00_thumb_5F00_02FBCFBA.png" width="144" height="356" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;b&gt;&lt;i&gt;Diagram 3:&lt;/i&gt;&lt;/b&gt; Fast flicking a few times get you into this situation, where we have excess buffer above which we are trying to move downwards, but because there is so much of it and the UI thread is blocked trying to bring these items in we don’t finish in time and the user sees blankness (black) until the items are ready, at which time they simply appear.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;So why is *my* ListBox blanking? And how do I fix it?&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Let’s run through a couple of common reasons why ListBoxes blank, with some proposed solutions to each one.&lt;/p&gt;  &lt;p&gt;1. &lt;b&gt;Using ValueConverters in your template      &lt;br /&gt;&lt;/b&gt;    &lt;br /&gt;ValueConverters are great – they allow you to transform your data on the fly as they are being DataBound into your items. Unfortunately they incur a UI thread cost – we need to transition from Silverlight into User Code, run your converter and then return. If your converter is heavy or you’re using lots of them in your template, then this will introduce blanking.     &lt;br /&gt;    &lt;br /&gt;Question to ask yourself: does this code look like it can run in a trivial amount of time across all of the elements being brought in for a given frame? If not, you probably should explore a different way of doing the DataBinding. For example,you can have the object translate the values on population / property get time instead of using a converter - even though this may break your Data Model this can significantly reduce the DataBinding cost (and you could always wrap your object in a ViewModel).&lt;/p&gt;  &lt;p&gt;&lt;b&gt;2. &lt;/b&gt;&lt;b&gt;Complex DataTemplates&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;When an item is moved from one buffer to another during a scroll, ListBox is usually smart enough to determine that this is the same kind of item and just update the data in the item. While this might sound cheap this dirties the item causing it to be remeasured. If your template is complex you will find that a lot of your time is wasted in Measure – remeasuring the layout of the control now that the data has been updated.    &lt;br /&gt;    &lt;br /&gt;Fixing this is very per-scenario. Some general guidelines are to make sure to only use a container if you really need the options it provides – do you have a Grid within a Grid? Could you replace all of your Grids with a simple Canvas or maybe a StackPanel?&lt;/p&gt;  &lt;p&gt;&lt;b&gt;3. &lt;/b&gt;&lt;b&gt;Decoding images on the UI thread&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;By default all images are decoded synchronously on the UI thread, so if you have something like this:&lt;/p&gt;  &lt;p&gt;&lt;font face="Consolas"&gt;&amp;lt;Image Source=”{Binding ImageUrl}”/&amp;gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;you're going to block the UI thread for however long it takes to decode your image. Luckily there’s an easy fix for this, change your template to read as follows:&lt;/p&gt;  &lt;p&gt;&lt;font face="Consolas"&gt;&amp;lt;Image&amp;gt;      &lt;br /&gt;&amp;#160; &amp;lt;Image.Source&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;BitmapImage UriSource=&amp;quot;{Binding ImgUrl}&amp;quot; CreateOptions=&amp;quot;BackgroundCreation&amp;quot;/&amp;gt;       &lt;br /&gt;&lt;/font&gt;&lt;font face="Consolas"&gt;&amp;#160; &amp;lt;/Image.Source&amp;gt;      &lt;br /&gt;&amp;lt;/Image&amp;gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Note that this does come with some caveats – older images will still show up until the new ones are loaded and the user may see a visual pop-in of the image when it is done loading, but these can all be worked around and massaged into a nice user experience that is not harmed by excessive image decode.&lt;/p&gt;  &lt;p&gt;For further details see &lt;a href="http://blogs.msdn.com/b/slmperf/archive/2011/06/13/off-thread-decoding-of-images-on-mango-how-it-impacts-you-application.aspx"&gt;this blog post&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;4. &lt;/b&gt;&lt;b&gt;Using &lt;/b&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.controls.itemscontrol.preparecontainerforitemoverride(v=vs.95).aspx"&gt;&lt;b&gt;PrepareItemForContainerOverride&lt;/b&gt;&lt;/a&gt;&lt;b&gt; to dynamically select a template&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;A simple list item is often times just not good enough – your app has an image item, a text item, a video item, a link item etc. etc. and you have a different template for each one of them. A common pattern is to use the ListBox’s PrepareItemForContainerOverride callback to dynamically change the container’s template based on what item is being databound. &lt;/p&gt;  &lt;p&gt;Unfortunately, doing this can completely throw off the ListBox’s buffering technique – the ListBox sees that the container that it had in its buffer is not the type that you need and junks it, wasting even more time on the march to blankness.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;So how do I solve this?&lt;/strong&gt; Surprisingly enough, it is often cheaper to have all of your template parts in one large template (yes, yes, I know about point 2 above – keep reading!) with each mini-template collapsed if it does not apply. Since collapsed template items incur next to no cost during layout, they have next to no impact on run time (though there is a slightly larger memory cost).&lt;/p&gt;  &lt;p&gt;And how do I get my different items to display on the different templates? Simple – databind to a new property on your classes which either has a type enumeration that runs through a value converter (ItemTypeToVisibility), these kinds of converters are often cheap, or wrap your class in a UI view model so that it has a property that returns the Visibility type directly. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;5. Pulling data from [favorite heavy source] as part of your binding      &lt;br /&gt;&lt;/strong&gt;    &lt;br /&gt;The properties you bind to should have simple getters (setters is a different story) – always. If you have logic like this:     &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;&lt;font face="Consolas"&gt;public int Rating      &lt;br /&gt;{       &lt;br /&gt;&amp;#160; get       &lt;br /&gt;&amp;#160; {       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;read from database&amp;gt;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; - or -       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;read from IsoStore&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; - or -       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;parse out some XML&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; - etc -&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;&amp;#160; &lt;/font&gt;&lt;font face="Consolas"&gt;}      &lt;br /&gt;}&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;then you’re doing something wrong. This kind of logic is fine for a property that you know is only read very rarely, if at all, but if it’s in a ListBox then it most likely is going to be seen and you should be initializing the data up front.     &lt;br /&gt;    &lt;br /&gt;Don’t get me wrong – you don’t need to load everything as you are pulling in 1000 items to your list, but you can certainly do it on a background thread as a deferred task kicked off in the constructor of your object. If your objects are really heavy and memory is becoming an issue then you have a few possible routes:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Implement a completely delayed load by hooking into the ListBox’s scroll amount or compression states and only loading more items when you get to the end of the list      &lt;br /&gt;&lt;/li&gt;    &lt;li&gt;Implement a DoubleLinkedObservableCollection, where each item in the collection knows about the next node (in each direction) and when it gets databound (based on one of the properties) it notifies X number of nodes on each side to make sure they all have their data ready to go. This should be done on a background thread, just don’t forget to Dispatch back to update any properties that raise a PropertyChanged event.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;6. &lt;b&gt;Cut down background work      &lt;br /&gt;&lt;/b&gt;    &lt;br /&gt;With only one core any background thread can interfere with the smoothness of the UI thread. Although background threads get a much smaller time slice compared to the UI thread, enough of them vying for time will effectively starve the UI thread.     &lt;br /&gt;&lt;a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/0118.clip_5F00_image008_5F00_1B8B6D0A.png"&gt;&lt;img title="clip_image008" style="border: 0px currentcolor; margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" border="0" alt="clip_image008" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/8228.clip_5F00_image008_5F00_thumb_5F00_3010BC88.png" width="567" height="137" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p align="center"&gt;&lt;em&gt;Diagram 4:&lt;/em&gt; Fictional time slice showing the effects of more background threads (not to scale)&lt;/p&gt;  &lt;p&gt;&lt;i&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p&gt;Across any given slice of time, the UI thread will be allowed to run longer than any other thread, but is effectively running at the same priority, hence it is forced to yield to the background threads when its time is up. The more background threads, the longer it is before you get back to the UI thread so that it can complete its task.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Moral of the story?&lt;/b&gt; Be wise about the number of active background, especially in high stress scenarios. Stick to using a thread pool so that you can queue up your work without it all trying to run at the same time.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;I’ve tried all the above, it’s still blanking and I only have a couple of screens of data – help!&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;If you find yourself blanking on a relative small set of data (approximately 3-5 screens), then it might be time for drastic measures. As mentioned above the cause for blanking is the amount of time it takes to bring in new items with new data as the user is scrolling, i.e. the virtualization overhead is the culprit. If you disable virtualization on your list, you’ll generate of all your items up front and scrolling will be blankless. To do this, add the following to your XAML:&lt;/p&gt;  &lt;pre&gt;&lt;code&gt;&lt;font face="Consolas"&gt;&amp;lt;ListBox.ItemsPanel&amp;gt;&lt;br /&gt;  &amp;lt;ItemsPanelTemplate&amp;gt;&lt;br /&gt;    &amp;lt;StackPanel&amp;gt;&lt;br /&gt;    &amp;lt;/StackPanel&amp;gt;&lt;br /&gt;  &amp;lt;/ItemsPanelTemplate&amp;gt;&lt;br /&gt;&amp;lt;/ListBox.ItemsPanel&amp;gt;&lt;/font&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;font size="2" face="Consolas"&gt;&lt;/font&gt;

&lt;p&gt;While making this change is relatively simple, the impact can be drastic – no more blanking, but it comes at a cost:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Startup time for the Page increases – we now have to realize more items, so it’s going to take longer 
    &lt;br /&gt;&lt;/li&gt;

  &lt;li&gt;Memory – same as above, more items hanging around, larger memory cost&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you give it a try on a low end device and startup and memory look acceptable – then this is your magic bullet!&lt;/p&gt;

&lt;p&gt;&lt;b&gt;So what are we left with?&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Hopefully at this point you have a non to minimally blanking list, which scrolls smoothly and generally delights your users! Have you run into any other pitfalls that you think others should be warned of? Let us know below!&lt;/p&gt;

&lt;p&gt;Running into other, unrelated performance issues? Drop us a line and we'll see if we can focus on them in a future blog post (stay tuned for a &amp;quot;memory&amp;quot; series coming soon).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://windowsteamblog.com/aggbug.aspx?PostID=581658" width="1" height="1"&gt;</description></item><item><title>Memory Profiling - The Heap Summary View</title><link>http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/05/10/memory-profiling-the-heap-summary-view.aspx</link><pubDate>Thu, 10 May 2012 16:24:11 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:581472</guid><dc:creator>Pratap Lakshman</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://windowsteamblog.com/windows_phone/b/wpdev/rsscomments.aspx?WeblogPostID=581472</wfw:commentRss><comments>http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/05/10/memory-profiling-the-heap-summary-view.aspx#comments</comments><description>&lt;p&gt;In an &lt;a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/04/19/memory-profiling-launching-graphs-and-markers.aspx"&gt;earlier post&lt;/a&gt; we looked at how we can gain broad insight into an application scenario’s memory characteristics and how the graph and markers drew our attention to ranges of execution for further analyses. Recall that in the &lt;a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/02/01/memory-profiling-for-application-performance.aspx"&gt;memory leak diagnosis case&lt;/a&gt; we chose to analyze only the time range over which we observed the increase in memory usage. Indeed, that is a key first step to the analysis: filtering the memory activity data by a time range. The &lt;b&gt;Heap Summary &lt;/b&gt;view is the result of such filtering, and represents the population of the heap during the chosen time range.&lt;/p&gt;  &lt;h1&gt;Heap Summary View&lt;/h1&gt;  &lt;p&gt;The Heap Summary view presents, in tabular form, a demographic analysis of the population of the heap.&lt;/p&gt;  &lt;p&gt;In human population demographics, data collection happens through a census as well as through a continuous update to registries that track births, deaths, migration of place of residence and the like. The data collection in the case of heap population demographics is no different. “Births” map to allocations, “deaths” map to objects’ memory collected by the GC, and “migration of place of residence” maps to the migration of objects between the Gen0 region of the heap and the Gen1 region. A census of the heap at the start of time range identifies all incumbent objects (i.e. that were in existence). Births, deaths, and migrations are updated continuously, and a final census at the end of the time range identifies all the objects that were retained. In order to have a consistent terminology, we refer to the incumbent objects at the start as objects that were “retained” at the start.&lt;/p&gt;  &lt;p&gt;Managed Silverlight Visual elements (i.e. objects that go into the Silverlight visual tree) are not just plain old managed objects. These might be facades with backing native-implementations holding native memory and during the course of execution might create and hold on to texture memory. Casual use of such elements in code can even lead to subtle leaks. From this perspective, subsequent analysis can be made easier if Silverlight Visual elements were tracked and reported separately from plain old managed objects. And this is precisely how they are tracked and reported through the Heap Summary view. Continuing with the demographic analogy, such classification has precedent in social demographics where human populations have been classified on ethnicity.&lt;/p&gt;  &lt;p&gt;Armed with this context, let us study the following Heap Summary view from the &lt;a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/02/01/memory-profiling-for-application-performance.aspx"&gt;memory leak diagnosis case&lt;/a&gt;:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/1055.image_5F00_797B31D3.png"&gt;&lt;img style="display: inline; background-image: none;" title="image" border="0" alt="image" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/7536.image_5F00_thumb_5F00_086260EE.png" width="508" height="365" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The shaded region across the graph and markers indicates the time range used as the filer.&lt;/p&gt;  &lt;p&gt;The census at the start reports 5576 instances of managed type objects accounting for about 283 KB and 26 instances of Silverlight Visual elements accounting for about 13 KB. In terms of incumbency the plain old managed objects dominate.&lt;/p&gt;  &lt;p&gt;The churn happening within the selected time range is reported as 10615 instances allocated (births) and 11590 instances collected (deaths), accounting for about 23 MB each. The counts and sizes are somewhat balanced and cancel each other out to an extent. And this is borne out by the census at the end for the managed objects; the census at the end reports 4601 instances of managed type objects accounting for about 223 KB, which is just a little lower than what we had at the start. However, it also reports 69 instances of Silverlight Visual elements accounting for about 4 MB now (up from 13KB at the start).&lt;/p&gt;  &lt;p&gt;When we correlate this table with the graph, our suspicion is drawn towards the Silverlight visuals. Why did their count go up, and why are they accounting for so much more memory? Within the filtered time range, memory usage has been steadily increasing too. Could we be leaking memory? Could we be leaking some part of visual tree itself? And there even seem to be images being loaded along the way; might we be leaking their texture memory too? We wonder.&lt;/p&gt;  &lt;p&gt;Clearly, the next lead to follow is to get more visibility into what are those “Retained Silverlight Visuals at End”.&lt;/p&gt;  &lt;h1&gt;Summary&lt;/h1&gt;  &lt;p&gt;The Heap Summary view presents, in tabular form, a demographic analysis of the population of the heap. Interpreting the data in the table and correlating it with the graph and markers by itself can be used to make educated guesses at what could potentially be the problem, but equally importantly it serves to inform the next step in the performance investigation, as we shall see.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://windowsteamblog.com/aggbug.aspx?PostID=581472" width="1" height="1"&gt;</description></item><item><title>Delivering Rich Mobile Web Experiences in Windows Phone 7.5 (ESPN.com Case Study)</title><link>http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/05/02/delivering-rich-mobile-web-experiences-in-windows-phone-7-5-espn-com-case-study.aspx</link><pubDate>Wed, 02 May 2012 16:09:42 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:581178</guid><dc:creator>Amin Lakhani</dc:creator><slash:comments>7</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://windowsteamblog.com/windows_phone/b/wpdev/rsscomments.aspx?WeblogPostID=581178</wfw:commentRss><comments>http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/05/02/delivering-rich-mobile-web-experiences-in-windows-phone-7-5-espn-com-case-study.aspx#comments</comments><description>&lt;p&gt;The Windows Phone Browser team has a goal of delivering the best web browsing experience on a smartphone. This goal has many components within our team: from the &lt;a href="http://windowsteamblog.com/windows_phone/b/windowsphone/archive/2011/09/22/designing-ie9-mobile-putting-sites-in-the-spotlight.aspx"&gt;UI of the browser&lt;/a&gt;, compatibility with a wide array of website layouts, and of course buttery-smooth rendering performance. However, even if we execute flawlessly on our end, we are missing a crucial piece - delivering a great web experience is fundamentally a &lt;i&gt;partnership&lt;/i&gt; between our team and web developers. Achieving this goal means working together to ensure that your content and services are delightful for users to consume on Windows Phone. &lt;/p&gt;  &lt;p&gt;We understand that web development resources are always limited as you keep up with the increasing traffic from mobile devices, and the elusive &amp;quot;write once, run everywhere&amp;quot; promise of web development has not perfectly materialized. However, with IE9 for Windows Phone 7.5, we took a big step in the direction of this promise. By sharing a codebase with IE9 for the PC, we achieved identical &lt;a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2011/09/22/ie9-mobile-developer-overview.aspx"&gt;support for new web standards&lt;/a&gt; and pushed the envelope on real-world performance with &lt;a href="http://youtu.be/PfYeoR3Ug4E"&gt;industry-leading hardware acceleration&lt;/a&gt;. We wanted to hear about developing for IE9 on WP7.5 from web developers directly, so we decided to collect some feedback and share it on the blog. &lt;/p&gt;  &lt;p&gt;ESPN.com recently deployed their premium web experience to Windows Phone, and we thought it would be great to hear what they had to say about developing for IE9 on Windows Phone. As a side note, ESPN started looking into supporting Windows Phone because of a simple request I made on their support page. Lots of folks on my team are sports fans and were asking me about the site's experience on WP7.5, so I just dropped ESPN a note like any user would. The message was quickly routed to the mobile site team; I have immense respect for ESPN’s responsiveness and the system they have place to address user feedback. Here's what Mike Marrone, technical lead, had to say about developing for IE9 on WP7.5:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;Overall, it was an easy process. We support only WP7.5 and IE9 thanks to its very good CSS3/HTML5 support. We are in a convenient position of having an existing legacy mobile site that older devices can fallback to. Honestly, development for WP7.5 boiled down to a fairly basic process - IE9 on the PC, being nearly the same browser, was a great dev tool to get most of the way there before final QA on actual devices.&lt;/p&gt; &lt;/blockquote&gt;  &lt;blockquote&gt;   &lt;p&gt;Some other more specific development notes:&lt;/p&gt;    &lt;ul&gt;     &lt;li&gt;The &amp;quot;display: box&amp;quot; CSS style is not supported on WP7.5. We use this in carousel experiences to transition elements left or right 100% of the viewport without having to programmatically determine the viewport size (which means the browser automatically updates the positioning upon device rotation, etc.). On WP7.5, we actually used a better alternative thanks to it being the only browser that currently supports the CSS &amp;quot;vw&amp;quot; unit (VERY useful).        &lt;br /&gt;&lt;i&gt;[Amin] See &lt;/i&gt;&lt;a href="http://www.w3.org/TR/css3-values/#viewport-relative-lengths"&gt;&lt;i&gt;here&lt;/i&gt;&lt;/a&gt;&lt;i&gt; and &lt;/i&gt;&lt;a href="http://snook.ca/s/1000"&gt;&lt;i&gt;here&lt;/i&gt;&lt;/a&gt;&lt;i&gt; for more information on vw units.&lt;/i&gt;&lt;/li&gt;      &lt;li&gt;The bulk of our CSS differences between WP7.5 and other supported devices was with gradients. WP7.5 has an easy fallback with filters so it was not a big development issue.        &lt;br /&gt;&lt;i&gt;[Amin] See &lt;/i&gt;&lt;a href="file://tkzaw-pro-19/MyDocs4/aminl/My Documents/MSFT/Blog posts/msdn.microsoft.com/en-us/library/ms532997(v=vs.85).aspx"&gt;&lt;i&gt;here&lt;/i&gt;&lt;/a&gt;&lt;i&gt; for information on using Gradient Filters in IE9.&lt;/i&gt;&lt;/li&gt;      &lt;li&gt;JavaScript touch events would be a nice addition.        &lt;br /&gt;&lt;i&gt;[Amin] We hear you, stay tuned!&lt;/i&gt;&lt;/li&gt;   &lt;/ul&gt;    &lt;p&gt;We look forward to your continued great progress in mobile.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;As you can imagine, this was music to our ears! We often use IE on the PC to investigate bugs, and it was great to hear that the tools work well for web development outside of our offices too. We appreciate the feedback (it will inform our plans for future releases) and welcome additional feedback through the comments below. &lt;/p&gt;  &lt;p&gt;IE9 on Windows Phone is set up to support rich web experiences with great performance, and often all it takes is &lt;a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2011/08/29/introducing-the-ie9-on-windows-phone-mango-user-agent-string.aspx"&gt;updating user-agent logic&lt;/a&gt; and using &lt;a href="http://blogs.msdn.com/b/ie/archive/2010/03/19/the-css-corner-about-css-corners.aspx"&gt;standards based (as opposed to vendor prefixed) HTML &amp;amp; CSS&lt;/a&gt;. ESPN invested a reasonable level of resources to do that and delivered a delightful experience to its users. I've definitely started to see the site pinned to Start around here, and I wouldn't be surprised if our senior managers are secretly checking ESPN during meetings.&lt;/p&gt;  &lt;p&gt;Here's a before (left) and after (right) screenshot of the ESPN.com experience on Windows Phone 7.5. We want to say thanks to ESPN, and we look forward to seeing more rich experiences light up!&lt;/p&gt;  &lt;p align="left"&gt;&lt;a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/5504.image_5F00_1C927520.png"&gt;&lt;img style="display: inline; background-image: none;" title="image" border="0" alt="image" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/2110.image_5F00_thumb_5F00_6DCCBC7D.png" width="241" height="400" /&gt;&lt;/a&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/6232.image_5F00_780DBB10.png"&gt;&lt;img style="display: inline; background-image: none;" title="image" border="0" alt="image" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/3652.image_5F00_thumb_5F00_6C0BCADC.png" width="241" height="400" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;i&gt;Special thanks to Krys Krycinski, Mike Marrone, and James Ballow at ESPN.&lt;/i&gt;&lt;/p&gt;  &lt;p&gt;Amin Lakhani    &lt;br /&gt;Program Manager, Windows Phone&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://windowsteamblog.com/aggbug.aspx?PostID=581178" width="1" height="1"&gt;</description><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/Web/default.aspx">Web</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/HTML5/default.aspx">HTML5</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/IE9/default.aspx">IE9</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/Mango/default.aspx">Mango</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/Mobile+Web/default.aspx">Mobile Web</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/IE9+Mobile/default.aspx">IE9 Mobile</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/Windows+Phone+7-5/default.aspx">Windows Phone 7.5</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/standards/default.aspx">standards</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/web+standards/default.aspx">web standards</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/CSS/default.aspx">CSS</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/touch+events/default.aspx">touch events</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/gradients/default.aspx">gradients</category></item><item><title>Four ways we’re improving Marketplace</title><link>http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/04/30/four-ways-we-re-improving-marketplace.aspx</link><pubDate>Mon, 30 Apr 2012 21:48:45 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:581070</guid><dc:creator>Todd Brix</dc:creator><slash:comments>32</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://windowsteamblog.com/windows_phone/b/wpdev/rsscomments.aspx?WeblogPostID=581070</wfw:commentRss><comments>http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/04/30/four-ways-we-re-improving-marketplace.aspx#comments</comments><description>&lt;p&gt;Today I’ll outline the latest steps we’re taking in our ongoing effort to keep the quality bar high in our rapidly growing Marketplace. I know most of you share our goal of a great shopping experience and already go out of your way to follow our policies and guidance. For others, I hope this insight into a few near-term changes we’re putting in place helps save you time and reduces your risk of having apps pulled from the Marketplace.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Avoiding trademark trouble&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;When a trademark or copyright owner contacts us about a suspected violation, we investigate and pull apps when the complaint is valid. Lately we’ve been doing more of this, especially for trademark misuse. Sometimes the requests come from the owners of big, well-known brands. Other times they come from new brands. Either way, we often find trademark violations are unintentional: some developers just aren’t clear on what constitutes a violation. But these investigations—and the time and money they can cost—can be avoided by doing a little homework before submitting or updating your app.&lt;/p&gt;  &lt;p&gt;If you’re developing an app, please consult our &lt;a href="http://msdn.microsoft.com/en-us/library/hh184842(v=vs.92).aspx"&gt;content policy&lt;/a&gt; covering trademarks and this related &lt;a href="http://msdn.microsoft.com/en-us/library/hh347118(v=VS.92).aspx"&gt;Q&amp;amp;A&lt;/a&gt;. (The &lt;a href="http://www.uspto.gov/trademarks/basics/trade_defin.jsp"&gt;U.S. Trademark and Patent Office&lt;/a&gt; also has helpful background and a trademark search tool.) Our rules boil down to this: Your registered publisher name and everything about your app—name, logo, description, screenshots—must be unique and free of trademarked content unless (1) you own the trademark, (2) you’ve secured permission from the owner to use it, or (3) you’re using a trademarked name (&lt;i&gt;not&lt;/i&gt; a logo) to describe your app’s features or functionality without suggesting that the app is actually published by the trademark owner. &lt;/p&gt;  &lt;p&gt;For example, using “Microsoft App Co.” as your publisher name would cause problems because “Microsoft” is a trademarked term. By the same logic, you couldn’t call your app “MSN” or “YouTube”. However, you may be able to make an app called “Reader for MSN,” as long as you don’t use the MSN logo or otherwise suggest that the app is published by Microsoft.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Keeping the quality bar high &lt;/b&gt;&lt;/p&gt;  &lt;p&gt;I’ve &lt;a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2011/09/29/taking-a-tougher-stance-on-bulk-app-publishing.aspx" target="_blank"&gt;posted before&lt;/a&gt; about our efforts to help ensure that apps in Marketplace offer clear value. One of those efforts concerns bulk publishing—developers who send us hundreds of similar apps simultaneously. Today I want to mention two related issues on our radar that could affect developers working on app genres that lend themselves to bulk publishing. &lt;/p&gt;  &lt;p&gt;First, we’re seeing developers submit the same app to multiple Marketplace categories, a violation of our policies. Instead, you should pick a single category that best reflects the content and function of your app. This not only helps customers find your app but gives all developers an equal opportunity to have their app discovered where people expect. Developers who submit the same app across multiple categories will have it removed from the catalog.&lt;/p&gt;  &lt;p&gt;Second, when you create multiple closely-related apps—say, a series of quote apps that vary by theme—the Marketplace tile images must reflect the unique features of each individual app. They cannot be duplicates or near duplicates of each other. Your branding also shouldn’t dominate the tile. Here are a few examples of dos and don’ts:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/2845.image_5F00_7B79CB49.png"&gt;&lt;img style="border: 0px currentcolor; margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" title="image" border="0" alt="image" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/2705.image_5F00_thumb_5F00_39FF18F0.png" width="642" height="201" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/5047.image_5F00_671405BE.png"&gt;&lt;img style="border: 0px currentcolor; margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" title="image" border="0" alt="image" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/0172.image_5F00_thumb_5F00_0D75E90A.png" width="641" height="209" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Creating unique, easily distinguishable app tiles helps customers see at a glance what’s different about the apps you’re publishing, improving the shopping experience and potential for downloads.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Cleaning up keywords&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Some developers have been violating Marketplace policy by entering more than the five allowed keywords for an app. A keyword is a word or short phrase that describes your app. Entered during the App Hub submission process, these words or phrases are always separated by commas.&lt;/p&gt;  &lt;p&gt;Starting this week, we’re going to start enforcing the five keyword rule for all current and future Marketplace apps. Any app that exceeds this number will have &lt;i&gt;all&lt;/i&gt; its keywords deleted. Affected developers will be notified and can then enter five new keywords in App Hub. We’re taking this action to help ensure that customers are able to find the most relevant set of apps for their search—including yours. &lt;/p&gt;  &lt;p&gt;We’re also starting to examine app keywords for relevancy. We’ve noticed some developers have been entering keywords that are popular search terms—“Justin Bieber,” “YouTube”—but are totally unrelated to their app and what it does. If we find a keyword that’s not relevant to your app’s function or content, we’ll delete that keyword. Additionally, if you suspect that other developers are using high-impact keywords unrelated to their app— “Skype” for a tic-tac-toe game, for example—email &lt;a href="mailto:reportapp@microsoft.com"&gt;reportapp@microsoft.com&lt;/a&gt; with the details and we’ll investigate.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Refining our approach to content policy enforcement &lt;/b&gt;&lt;/p&gt;  &lt;p&gt;The final issue I want to discuss is one that affects all major app stores today: the treatment of apps that are “racy” or sexual in nature. We’re committed to offering a diverse selection of safe and quality apps that appeal to a wide range of customer interests. Items that some customers view as entertainment, others may consider inappropriate. This is a challenge for any big retailer, whether they operate online or down the street.&lt;/p&gt;  &lt;p&gt;We think the right solution is (a) to be transparent about what’s acceptable and (b) to show the right merchandise to the right customer in the right place. Our content policies are &lt;a href="http://msdn.microsoft.com/en-us/library/hh184842(v=vs.92).aspx"&gt;clearly spelled out&lt;/a&gt;: we don’t allow apps containing “sexually suggestive or provocative” images or content. What we do permit is the kind of content you occasionally see on prime-time TV or the pages of a magazine’s swimsuit issue.&lt;/p&gt;  &lt;p&gt;Admittedly, it’s tricky catering to such a wide range of people and markets. But we take this responsibility seriously and evaluate and discuss questionable cases. Recently we decided that we could improve the shopping experience for &lt;i&gt;all &lt;/i&gt;our customers by a more stringent interpretation and enforcement of our existing content policy.&lt;/p&gt;  &lt;p&gt;Specifically, we will be paying more attention to the icons, titles, and content of these apps and expect them to be more subtle and modest in the imagery and terms used. Apps that don’t fit our standard will need to be updated to remain in the store. This is about presenting the right content to the right customer and ensuring that apps meet our standards. We will also monitor customer reaction to apps and reserve the right to remove ones that our customers find offensive&lt;/p&gt;  &lt;p&gt;While this change might require a little extra work on the part of a small number of developers, there are plenty of creative and appropriate ways to comply: showing male or female models in silhouette, for example, is one possible alternative. Here are a few other examples of app tiles that pass muster:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/5481.image_5F00_05EA799D.png"&gt;&lt;img style="border: 0px currentcolor; margin-right: auto; margin-left: auto; float: none; display: block; background-image: none;" title="image" border="0" alt="image" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/7633.image_5F00_thumb_5F00_175ADA75.png" width="483" height="97" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If you’re one of the handful of impacted developers, we will be reaching out to you within the next few days with more specific guidance on changes you need to make. If you don’t hear from us, there is no immediate action you need to take. &lt;/p&gt;  &lt;p&gt;I hope this post has provided some useful tips and helpful insight into our policies, and how they’re evolving to reflect both customer and developer feedback and the growing size and reach of the Windows Phone Marketplace. We’re committed to our developer community and appreciate your feedback on how we can make Marketplace better for you and your customers. I look forward to hearing your thoughts.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://windowsteamblog.com/aggbug.aspx?PostID=581070" width="1" height="1"&gt;</description><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/Windows+Phone/default.aspx">Windows Phone</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/Marketplace/default.aspx">Marketplace</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/Apps/default.aspx">Apps</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/tiles/default.aspx">tiles</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/Content+Policies/default.aspx">Content Policies</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/App/default.aspx">App</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/Windows+Phone+7-5/default.aspx">Windows Phone 7.5</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/keywords/default.aspx">keywords</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/trademark/default.aspx">trademark</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/icons/default.aspx">icons</category></item><item><title>Two Marketplace changes; An update on 9 new markets</title><link>http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/04/24/two-marketplace-changes-an-update-on-9-new-markets.aspx</link><pubDate>Tue, 24 Apr 2012 22:49:34 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:580787</guid><dc:creator>Todd Brix</dc:creator><slash:comments>11</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://windowsteamblog.com/windows_phone/b/wpdev/rsscomments.aspx?WeblogPostID=580787</wfw:commentRss><comments>http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/04/24/two-marketplace-changes-an-update-on-9-new-markets.aspx#comments</comments><description>&lt;p&gt;I wanted to make sure you saw the Windows Phone consumer blog today, because my colleague Mazhar &lt;a href="http://windowsteamblog.com/windows_phone/b/windowsphone/archive/2012/04/24/two-marketplace-changes-and-how-they-affect-you.aspx"&gt;highlights&lt;/a&gt; two changes to the Marketplace shopping experience that developers should be aware of.&lt;/p&gt;  &lt;p&gt;First, we’re removing the option to browse and buy Windows Phone apps from the Zune PC software, a change that started rolling out this afternoon. Second, in the coming weeks we’ll also start requiring that customers have Windows Phone 7.5 installed on their phone to buy, download, update, or review apps in Marketplace. &lt;/p&gt;  &lt;p&gt;Mazhar’s post has more details and background. But I want to highlight one important way the removal of the Windows Phone store from Zune impacts developers.&lt;/p&gt;  &lt;p&gt;It’s important to make sure you’re using the correct protocol for direct links to your app in Marketplace. This “deep link,” as it’s also called, makes it easy for customers to pull up your app in the phone and web stores. The correct format is: &lt;/p&gt;  &lt;p align="center"&gt;&lt;em&gt;http://windowsphone.com/s?appId={GUID}&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;You’ll find more details on deep links &lt;a href="http://msdn.microsoft.com/en-us/library/ff967553(v=vs.92).aspx"&gt;here on MSDN&lt;/a&gt;. If you use the older &lt;em&gt;zune://&lt;/em&gt;&lt;strong&gt; &lt;/strong&gt;format for links, customers will see an error message. Just something to keep in mind.&lt;/p&gt;  &lt;p&gt;One final update for today: We just released the OS software required to bring Marketplace to customers in Bahrain, Israel, Iraq, Kazakhstan, Qatar, Saudi Arabia, Thailand, UAE and Vietnam. These nine markets—which are already open for app submissions—were part of the larger Marketplace&amp;#160; expansion &lt;a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/03/15/app-hub-accepting-submissions-for-new-markets-soon.aspx"&gt;I outlined&lt;/a&gt; last month. Our hardware partners can now create phones for these markets and begin their final launch preparations. &lt;/p&gt;  &lt;p&gt;Mazhar will have more to say about these new storefronts in the weeks ahead.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://windowsteamblog.com/aggbug.aspx?PostID=580787" width="1" height="1"&gt;</description><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/Windows+Phone/default.aspx">Windows Phone</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/Marketplace/default.aspx">Marketplace</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/Apps/default.aspx">Apps</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/Deep+Links/default.aspx">Deep Links</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/Zune+Software/default.aspx">Zune Software</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/App/default.aspx">App</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/Windows+Phone+7-5/default.aspx">Windows Phone 7.5</category></item><item><title>Respond to User Input</title><link>http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/04/24/respond-to-user-input.aspx</link><pubDate>Tue, 24 Apr 2012 15:53:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:580771</guid><dc:creator>Mike Battista</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://windowsteamblog.com/windows_phone/b/wpdev/rsscomments.aspx?WeblogPostID=580771</wfw:commentRss><comments>http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/04/24/respond-to-user-input.aspx#comments</comments><description>&lt;p&gt;The fourth of the four principles I mentioned in &lt;a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/03/07/optimizing-apps-for-lower-cost-devices.aspx"&gt;Optimizing Apps for Lower Cost Devices&lt;/a&gt; is Respond to User Input.&lt;/p&gt;
&lt;p&gt;A responsive UI is a basic expectation that users have of apps.&amp;nbsp; Failing to respond to user input can frustrate users and can ultimately drive them away to other apps that are more responsive.&lt;/p&gt;
&lt;p&gt;The basic guidance here is to keep as much activity off of the UI thread as possible until absolutely necessary.&amp;nbsp; The UI thread is what processes user input for you, so any code you execute on that thread will interfere with this processing.&amp;nbsp; Unless you're updating elements of your UI, you generally should not be executing code on the UI thread.&lt;/p&gt;
&lt;p&gt;A quick way to check whether a block of code is running on the UI thread is to call &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.threading.dispatcher.checkaccess(v=vs.95).aspx"&gt;Deployment.Current.Dispatcher.CheckAccess()&lt;/a&gt; inside that block of code (Intellisense won't show this method but it is there and useful).&amp;nbsp; This will return true if the code is executing on the UI thread, so if this returns true and you're not updating your UI, then you've found code that could be moved to background threads.&lt;/p&gt;
&lt;p&gt;An easy way to move code to background threads is to wrap it in a call to &lt;a href="http://msdn.microsoft.com/en-us/library/kbf0f1ct(v=vs.95).aspx"&gt;ThreadPool.QueueUserWorkItem()&lt;/a&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// Running on the UI thread.&lt;br /&gt;...&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;// Running on a background thread.&lt;br /&gt;ThreadPool.QueueUserWorkItem((o) =&amp;gt;&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The &lt;a href="http://msdn.microsoft.com/en-us/library/y5htx827(v=vs.95).aspx"&gt;ThreadPool&lt;/a&gt; is (as its name suggests) a pool of background threads that are waiting to execute work items for you.&amp;nbsp; &lt;a href="http://msdn.microsoft.com/en-us/library/kbf0f1ct(v=vs.95).aspx"&gt;QueueUserWorkItem&lt;/a&gt; enables you to register blocks of code that will execute on the next available background thread in the ThreadPool.&amp;nbsp; Note that use of ThreadPools is common and encouraged across many platforms (including &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/windows.system.threading.aspx"&gt;Windows 8&lt;/a&gt;) so familiarizing yourself with them will serve you well in future projects.&lt;/p&gt;
&lt;p&gt;When you are ready to update your UI, you will need to return to the UI thread.&amp;nbsp; You can return to the UI thread at any time from a background thread by wrapping your code in a call to &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.threading.dispatcher(v=vs.95).aspx"&gt;Deployment.Current.Dispatcher.BeginInvoke()&lt;/a&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;// Running on a background thread.&lt;br /&gt;ThreadPool.QueueUserWorkItem((o) =&amp;gt;&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Running on the UI thread.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Deployment.Current.Dispatcher.BeginInvoke(() =&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you try to update your UI from a background thread, you will receive an UnauthorizedAccessException with the message "Invalid cross-thread access."&amp;nbsp; In these cases, wrap the offending code in a call to &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.threading.dispatcher(v=vs.95).aspx"&gt;Deployment.Current.Dispatcher.BeginInvoke()&lt;/a&gt; as shown above to execute it on the UI thread as required.&lt;/p&gt;
&lt;p&gt;In addition to being able to control whether your code executes on the UI thread or on background threads, you also have options to do the same with framework code in several places.&lt;/p&gt;
&lt;p&gt;Image decoding is an expensive operation that can harm interactivity significantly if executed on the UI thread, particularly if you're loading many images at a time.&amp;nbsp; The framework allows you to specify &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.bitmapcreateoptions(v=vs.95).aspx"&gt;BitmapCreateOptions&lt;/a&gt; to control whether image decoding executes on the UI thread or on background threads.&amp;nbsp; Be sure to use the &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.bitmapcreateoptions(v=vs.95).aspx"&gt;BackgroundCreation&lt;/a&gt; option to move image decoding to background threads.&lt;/p&gt;
&lt;p&gt;The built-in ProgressBar control has &lt;a href="http://www.jeff.wilcox.name/2010/08/performanceprogressbar/"&gt;known performance problems&lt;/a&gt; that can harm UI performance as a result of its animations executing on the UI thread.&amp;nbsp; Use the SystemTray &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.phone.shell.progressindicator(v=VS.92).aspx"&gt;ProgressIndicator&lt;/a&gt; for the best performance as the &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.phone.shell.progressindicator(v=VS.92).aspx"&gt;ProgressIndicator&lt;/a&gt; is a shell component that will not interfere with your UI thread.&amp;nbsp; A bonus to using the &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.phone.shell.progressindicator(v=VS.92).aspx"&gt;ProgressIndicator&lt;/a&gt; is that your UX will more closely match the UX of the built-in experiences.&lt;/p&gt;
&lt;p&gt;If you're using animations in your app, use &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.media.animation.storyboard(v=vs.95).aspx"&gt;Storyboards&lt;/a&gt; wherever possible as these run on an important background thread known as the compositor thread and will not interfere with your UI thread.&amp;nbsp; If you're familiar with &lt;a href="http://msdn.microsoft.com/en-us/library/cc295346(v=expression.40).aspx"&gt;Expression Blend&lt;/a&gt;, it can be particularly useful for generating Storyboards.&lt;/p&gt;
&lt;p&gt;With code now running off of the UI thread for a given page, you should also focus on optimizing navigation between pages.&lt;/p&gt;
&lt;p&gt;To keep page load times and in-app navigation responsive, defer loading activities until the first frame is rendered. The guidance for &lt;a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/04/03/optimize-startup-time.aspx"&gt;optimizing startup time of your MainPage&lt;/a&gt; applies to optimizing the startup time of subsequent page loads as well. Enabling the &lt;a href="http://msdn.microsoft.com/en-us/library/ff941094(v=VS.92).aspx"&gt;TiltEffect&lt;/a&gt; is a great way to acknowledge user input and indicate that navigation is in progress. This will make your app look and feel more like the first party experiences as well.&lt;/p&gt;
&lt;p&gt;Many apps add page transition animations to add style to in-app navigations. While this is a great practice to make your apps more dynamic, excessive use of transition animations can delay load times, particularly when the generation/execution of the animations result in spikes in memory/CPU usage.&amp;nbsp; If transition animations are causing performance problems in your app, disabling them completely, or at least &lt;a href="http://msdn.microsoft.com/en-us/library/hh855083(v=vs.92).aspx"&gt;on low-memory devices only&lt;/a&gt;, can significantly improve in-app navigation performance.&lt;/p&gt;
&lt;p&gt;Maintaining a responsive UI is important regardless of the platform you are targeting.&amp;nbsp; By offloading work to background threads and keeping in-app navigation fast, you'll provide the best possible experience to your users.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://windowsteamblog.com/aggbug.aspx?PostID=580771" width="1" height="1"&gt;</description><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/Performance/default.aspx">Performance</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/Best+Practices/default.aspx">Best Practices</category></item><item><title>Memory Profiling - Launching, Graphs and Markers</title><link>http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/04/19/memory-profiling-launching-graphs-and-markers.aspx</link><pubDate>Thu, 19 Apr 2012 18:25:04 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:580675</guid><dc:creator>Pratap Lakshman</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://windowsteamblog.com/windows_phone/b/wpdev/rsscomments.aspx?WeblogPostID=580675</wfw:commentRss><comments>http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/04/19/memory-profiling-launching-graphs-and-markers.aspx#comments</comments><description>&lt;p&gt;It is said that “A point of view is worth 80 IQ points”;&lt;i&gt; &lt;/i&gt;the meaning perhaps being that if we can look at things in different ways then we might understand them better. The Memory Profiler that ships with the &lt;a href="http://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;amp;id=27570"&gt;Windows Phone SDK 7.1&lt;/a&gt; provides, in its own way, multiple views into the memory usage of your application, and in an &lt;a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/02/01/memory-profiling-for-application-performance.aspx"&gt;earlier post&lt;/a&gt; we had seen how specific views helped us understand one particular issue with the application better. But even before we got to the specific views, there was a graph and a couple of rows of markers, remember? Let us discuss them briefly.&lt;/p&gt;  &lt;h1&gt;Launching the Memory Profiler&lt;/h1&gt;  &lt;p&gt;How do you even know that you need to run your application scenario through the Memory Profiler, especially since there might not be any obvious visual cue? The answer lies in an Execution Profiler warning message. The expectation is that you would run your application scenario through the Execution Profiler for evaluating visual and code performance, and if it suspects any memory related issues it will raise a warning message suggesting running the scenario through the Memory Profiler!&lt;/p&gt;  &lt;p&gt;Users of the Execution Profiler will find the interaction model of the Memory Profiler familiar. It launches from the same page, with the difference being that you select the &lt;b&gt;Memory (managed object allocations and texture usage)&lt;/b&gt; option. The &lt;b&gt;Advanced Settings &lt;/b&gt;option can be ignored for the purpose of this discussion. The following is the launch page for the Memory Profiler:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/8507.image_5F00_3BE8B0AB.png"&gt;&lt;img style="display: inline; background-image: none;" title="image" border="0" alt="image" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/3124.image_5F00_thumb_5F00_4193A484.png" width="508" height="342" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;A warning message is issued if the deployment target happens to be the Windows Phone Emulator. The emulator runs on the desktop, and the desktop has a different hardware architecture than the device, with different performance characteristics across the board. The warning therefore alerts you to this lack of performance fidelity. If you are doing Execution profiling beware! The emulator is still a suitable target for doing memory profiling since in that case we are dealing with (memory) allocation profiling. Clicking on the &lt;b&gt;Launch Application &lt;/b&gt;link deploys the application to the target and commences the profiling session.&lt;/p&gt;  &lt;h1&gt;Stop Profiling&lt;/h1&gt;  &lt;p&gt;There are two ways to gracefully end the profiling session:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;By hitting the &lt;b&gt;Stop Profiling&lt;/b&gt; link on the Profiler page.&lt;/li&gt;    &lt;li&gt;By hitting the back button on the target (device or emulator) until you exit the application.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/4530.image_5F00_1DAACD2A.png"&gt;&lt;img style="display: inline; background-image: none;" title="image" border="0" alt="image" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/3264.image_5F00_thumb_5F00_0074FF53.png" width="508" height="342" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If the connection from Visual Studio to the target is broken for any reason (for example, if the emulator instance is closed, or the device is untethered, or the device shuts down, the connection is broken) the session is aborted.&lt;/p&gt;  &lt;p&gt;Once the session is gracefully ended, the data gathered during the run is processed and presented graphically for analyses, starting with a &lt;b&gt;Memory Usage&lt;/b&gt; graph plotting memory usage over time, and two rows of markers indicating image loads and GC runs as shown below:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/7701.image_5F00_0AE5ADA6.png"&gt;&lt;img style="display: inline; background-image: none;" title="image" border="0" alt="image" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/7282.image_5F00_thumb_5F00_390F8393.png" width="508" height="342" /&gt;&amp;#160;&lt;/a&gt;&lt;/p&gt;  &lt;h1&gt;Memory usage graph&lt;/h1&gt;  &lt;p&gt;The memory usage reported is that of private bytes: exclusive bytes allocated by the process being profiled. Some variance in memory usage is normal and not indicative of a problem. However, memory usage that keeps rising bears examination.&lt;/p&gt;  &lt;h1&gt;Image load markers&lt;/h1&gt;  &lt;p&gt;A tooltip on the image load marker indicates the encoding format, the ID of the executing thread on which it got loaded, the point in time when it was loaded, and how long it took to load. A spike in memory usage corresponding to an image load marker might indicate a large sized image being loaded (larger than 2000 x 2000 pixels). Windows Phone imposes this limit, and larger images will be sampled at a lower resolution, and will take longer to load. If you must use large images consider displaying only a portion that meets this limit by loading the image into a &lt;a href="http://go.microsoft.com/fwlink/?LinkID=203572"&gt;System.Windows.Media.Imaging.WriteableBitmap&lt;/a&gt; and using the &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.extensions.loadjpeg(v=vs.92).aspx"&gt;LoadJpeg(WriteableBitmap, Stream)&lt;/a&gt; extension method as shown below:&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Consolas"&gt;&amp;#160; int width = (int) this.image1.Width;      &lt;br /&gt;&amp;#160; int height = (int) this.image1.Height;       &lt;br /&gt;&amp;#160; Uri uri = new System.Uri(&amp;quot;image.jpg&amp;quot;, UriKind.Relative);       &lt;br /&gt;&amp;#160; StreamResourceInfo sri = Application.GetResourceStream(uri);       &lt;br /&gt;&amp;#160; WriteableBitmap wb = new WriteableBitmap(width, height);       &lt;br /&gt;&amp;#160; System.Windows.Media.Imaging.Extensions.LoadJpeg(wb, sri.Stream);       &lt;br /&gt;&amp;#160; this.image1.Source = wb;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;The ID of the executing thread can be used to check if the image load computation is happening on the UI thread (the UI thread’s ID can be got from the CPU Usage analysis from the earlier Execution Profiling session). To keep the UI responsive it is essential to keep the UI thread relatively free, and if you notice that the image load computation is indeed happening on the UI thread, consider moving it to a background thread using the &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.bitmapcreateoptions(v=vs.95).aspx"&gt;BackgroundCreation&lt;/a&gt; option. From XAML, this can be done as shown below:&lt;/p&gt;  &lt;p&gt;&lt;font size="2" face="Consolas"&gt;&amp;#160; &amp;lt;Image Name=&amp;quot;image1&amp;quot;&amp;gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Image.Source&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;BitmapImage UriSource=&amp;quot;image.jpg&amp;quot; CreateOptions=&amp;quot;BackgroundCreation&amp;quot;/&amp;gt;       &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Image.Source&amp;gt;       &lt;br /&gt;&amp;#160; &amp;lt;/Image&amp;gt;&lt;/font&gt;&lt;/p&gt; &lt;font size="2" face="Consolas"&gt;&lt;/font&gt;  &lt;p&gt;An exercise to try out at this point it to memory-profile an application that loads in a large image; do you see a spike in memory usage corresponding to the image load marker? What was the duration of the image load? On what thread was it getting loaded? Try using the BackgroundCreation option; now what was the thread on which the image got loaded? Did the duration of the image load change? Let us know your experience.&lt;/p&gt;  &lt;h1&gt;GC markers&lt;/h1&gt;  &lt;p&gt;Memory is a limited resource on the phone, and although you are programming in a managed environment where the GC takes care of collecting unused memory you still wield control over allocation and referencing, and must monitor them to trim working set. The GC mediates all allocation requests from your code, and operates on a heap that it has partitioned into 2 regions (generations), with allocations happen in the ephemeral “Gen0” region and objects surviving a GC collection possibly promoted to an older “Gen1” region. The GC markers correspond to collections and a tooltip indicates it’s kind (&amp;quot;ephemeral&amp;quot;, &amp;quot;Full&amp;quot;), the point in time when it started, and how long it took to run. An “ephemeral” GC collects only from Gen0 while a “Full” GC collects from both Gen0 and Gen1. Furthermore a “Full” GC can do a “compaction” of the heap if it happens to be significantly fragmented, and even go on to empty the system’s cache of JIT compiled code.&lt;/p&gt;  &lt;p&gt;A GC is triggered using several heuristics:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;When the amount of managed memory allocated since the last GC is deemed significant (1 MB). This is typically an “ephemeral” GC. However it can turn into a “Full” GC under the following circumstances:&lt;/li&gt;    &lt;/ol&gt;&lt;ol&gt;     &lt;li&gt;When the managed memory held by objects promoted to Gen1 is deemed significant (5 MB).&lt;/li&gt;      &lt;li&gt;When the application’s total memory usage is deemed significant (i.e. close to the maximum allowed by the OS).&lt;/li&gt;      &lt;li&gt;When there is significant native-memory pressure - native-memory associated to managed objects (quite common in Silverlight) contributes to total memory usage!&lt;/li&gt;   &lt;/ol&gt;    &lt;ul&gt;&lt;li&gt;When user code calls &lt;a href="http://msdn.microsoft.com/en-us/library/xe0c2357(v=VS.95).aspx"&gt;System.GC.Collect()&lt;/a&gt;. This is always a “Full” GC.&lt;/li&gt;    &lt;li&gt;After any resource allocation failure. This is always a “Full” GC.&lt;/li&gt;    &lt;li&gt;When the system as whole is running low on free memory. This is always a “Full” GC (that will go all way to emptying the cache of JIT compiled code).&lt;/li&gt;   &lt;/ul&gt;&lt;p&gt;The GC’s decision of deeming a threshold “significant” is based on internal heuristics and mentioned here for informational purposes only. The point to note though is that a “Full” GC is much more performance intensive than an “ephemeral” GC.&lt;/p&gt;  &lt;h1&gt;Insight&lt;/h1&gt;  &lt;p&gt;Armed with the graph, the markers and your own intuition, you can now get some insight into your scenario’s appetite for memory:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Does memory usage cross the 90 MB &lt;a href="http://msdn.microsoft.com/en-us/library/hh184840(v=VS.92).aspx"&gt;technical certification requirement&lt;/a&gt; threshold?&lt;/li&gt;    &lt;li&gt;Is memory usage steadily growing?&lt;/li&gt;    &lt;li&gt;Do you see a spike in memory usage? Is there a corresponding image load marker? That could be the likely cause (are you using large sized images when a smaller sized image would do?)&lt;/li&gt;    &lt;li&gt;Are image loads taking long? (Again, this could be due to using large images).&lt;/li&gt;    &lt;li&gt;Are image loads happening on the UI thread (consider moving that to a background thread).&lt;/li&gt;    &lt;li&gt;Are there too many GCs? The GC on the Phone is a stop-the-world GC, and therefore the time taken by the GC to run is time taken away from your application! In general strive for little to no GC activity during application startup.&lt;/li&gt;    &lt;li&gt;The frequency distribution of the GC markers indicates the rate of memory allocation in the scenario, as well as the time ranges when most GC activity happened. If you are writing a game try to concentrate the GC activity during a level change.&lt;/li&gt;    &lt;li&gt;Are there multiple adjacent “ephemeral” GCs? That indicates short lived and/or temporary objects.&lt;/li&gt;    &lt;li&gt;Is memory usage not coming down even after one or more “Full” GCs? That is indicative of long lived objects.&lt;/li&gt;    &lt;li&gt;Are you explicitly causing “Full” GCs by calling &lt;a href="http://msdn.microsoft.com/en-us/library/xe0c2357(v=VS.95).aspx"&gt;System.GC.Collect()&lt;/a&gt;? That is rarely required, and often a bad idea.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;An exercise to try out at this point it to profile an application that has various memory allocations patterns; can you correlate the graph and markers with your own intuition? Let us know your experience.&lt;/p&gt;  &lt;h1&gt;Summary&lt;/h1&gt;  &lt;p&gt;The graph and markers provide basic information about your application’s memory usage and when combined with your own intuition of the application scenario, be used to infer several characteristics. Further drill down through the various Views can then be used to understand these characteristics better.&lt;/p&gt;  &lt;p&gt;Would you like to know more about the Views? Let us know.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://windowsteamblog.com/aggbug.aspx?PostID=580675" width="1" height="1"&gt;</description></item><item><title>Handle Feature Reductions</title><link>http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/04/17/handle-feature-reductions.aspx</link><pubDate>Tue, 17 Apr 2012 16:28:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:580503</guid><dc:creator>Mike Battista</dc:creator><slash:comments>6</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://windowsteamblog.com/windows_phone/b/wpdev/rsscomments.aspx?WeblogPostID=580503</wfw:commentRss><comments>http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/04/17/handle-feature-reductions.aspx#comments</comments><description>&lt;p&gt;The third of the four principles I mentioned in &lt;a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/03/07/optimizing-apps-for-lower-cost-devices.aspx"&gt;Optimizing Apps for Lower Cost Devices&lt;/a&gt; is Handle Feature Reductions.&lt;/p&gt;
&lt;p&gt;With the &lt;a href="http://channel9.msdn.com/Shows/Inside+Windows+Phone/Inside-Windows-Phone-33--Windows-Phone-75-Refresh--60-more-Opportunity"&gt;Windows Phone 7.5 Refresh&lt;/a&gt;, we refactored the OS in several areas to reduce memory usage and free up more RAM for apps. Part of this exercise included assessing the memory usage of features in the developer platform and assessing which, if any, we could afford to live without.&lt;/p&gt;
&lt;p&gt;To free up the most RAM while also being as minimally disruptive as possible, we disabled generic background agents (&lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.phone.scheduler.periodictask(v=VS.92).aspx"&gt;PeriodicTasks&lt;/a&gt;/&lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.phone.scheduler.resourceintensivetask(v=vs.92).aspx"&gt;ResourceIntensiveTasks&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;On today&amp;rsquo;s devices, users can disable background agents for an app manually via the Settings control panel, and the system can disable background agents for an app if the maximum number of supported background agents is exceeded. These conditions are surfaced to the app via an &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.phone.scheduler.scheduledactionservice.add(v=VS.92).aspx"&gt;InvalidOperationException&lt;/a&gt; which the app must handle. On 256MB devices, the app receives the same InvalidOperationException received in the maximum exceeded case above when trying to &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.phone.scheduler.scheduledactionservice.add(v=VS.92).aspx"&gt;schedule a background agent&lt;/a&gt; (since the maximum number of supported background agents is 0). This means if an app is written today to &lt;a href="http://msdn.microsoft.com/en-us/library/hh202944(v=VS.92).aspx"&gt;handle the maximum exceeded case&lt;/a&gt;, it will continue to work on 256MB devices unchanged. Make sure your apps handle this exception path and degrade gracefully when these features are unavailable. This will benefit your app experience both on today&amp;rsquo;s generation of devices as well as on new lower cost devices. The 256MB emulator introduced in the &lt;a href="http://www.microsoft.com/download/en/details.aspx?id=29233"&gt;WPSDK 7.1.1&lt;/a&gt; enables you to easily test this code path.&lt;/p&gt;
&lt;p&gt;If you're using PeriodicTasks today to power your live tiles, there are a few options available to you. The first option is to switch to &lt;a href="http://msdn.microsoft.com/en-us/library/ff402558%28v=VS.92%29.aspx"&gt;push notifications&lt;/a&gt;. A second option is to create &lt;a href="http://msdn.microsoft.com/en-us/library/ff769548(v=vs.92).aspx"&gt;ShellTileSchedules&lt;/a&gt; to update your tiles with remote images. A third option is to leverage the &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.phone.shell.shelltile(v=vs.92).aspx"&gt;ShellTile API's&lt;/a&gt; from your foreground app to update your tiles whenever the app is launched. While technically the tiles wouldn't be live in this last case, the content would be refreshed, which can give the impression of live tiles. If you allow users to flag content, for instance, you could turn your tiles into a permanent reminder space and update them to reflect the most recently flagged content (or toggle through flagged content with every app launch). If these options aren't feasible for you, then you can still always take advantage of &lt;a href="http://msdn.microsoft.com/en-us/library/hh202948(v=VS.92).aspx"&gt;secondary tiles&lt;/a&gt; to provide convenient access to deeper experiences in your apps.&lt;/p&gt;
&lt;p&gt;In addition to PeriodicTasks and ResourceIntensiveTasks being disabled, the lower cost 7x27a chipset itself has reduced media playback capabilities that may impact playback of some of your content. Attempting to playback unsupported content on the device will result in either (1) a "Sorry, we can't play this file on your phone" error, if played via the &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.phone.tasks.mediaplayerlauncher(v=VS.92).aspx"&gt;MediaPlayerLauncher&lt;/a&gt;, (2) a &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.controls.mediaelement.mediafailed(v=vs.95).aspx"&gt;MediaFailed&lt;/a&gt; event if played via &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.controls.mediaelement(v=VS.95).aspx"&gt;MediaElement&lt;/a&gt;, or (3) suboptimal video playback in some cases. While most apps in our testing during the &lt;a href="http://channel9.msdn.com/Shows/Inside+Windows+Phone/Inside-Windows-Phone-33--Windows-Phone-75-Refresh--60-more-Opportunity"&gt;Windows Phone 7.5 Refresh&lt;/a&gt; were not impacted by these reduced capabilities, you may be impacted if you do exceed them. Be sure to &lt;a href="http://msdn.microsoft.com/en-us/library/ff462087(v=VS.92).aspx"&gt;understand the new baseline&lt;/a&gt; and encode your content to work well across all Windows Phone devices. To conditionally offer higher quality vs. lower quality content depending on the device, leverage the &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.phone.info.mediacapabilities.ismultiresolutionvideosupported(v=vs.92).aspx#Y0"&gt;MediaCapabilities.IsMultiResolutionVideoSupported&lt;/a&gt; flag. This flag will be false on devices with reduced media capabilities, so be sure to fall back to the &lt;a href="http://msdn.microsoft.com/en-us/library/ff462087(v=VS.92).aspx"&gt;baseline specs&lt;/a&gt; in this case.&lt;/p&gt;
&lt;p&gt;While feature reductions are never ideal, these reductions bring with them an opportunity to reach a large new audience with your apps. Be sure to account for these reductions when targeting lower cost devices to provide the best possible experience to your users.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://windowsteamblog.com/aggbug.aspx?PostID=580503" width="1" height="1"&gt;</description><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/Performance/default.aspx">Performance</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/Best+Practices/default.aspx">Best Practices</category></item><item><title>Adjusting to rapid Marketplace growth—and preparing for the future</title><link>http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/04/12/adjusting-to-rapid-marketplace-growth-and-preparing-for-the-future.aspx</link><pubDate>Thu, 12 Apr 2012 20:56:44 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:580202</guid><dc:creator>Todd Brix</dc:creator><slash:comments>18</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://windowsteamblog.com/windows_phone/b/wpdev/rsscomments.aspx?WeblogPostID=580202</wfw:commentRss><comments>http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/04/12/adjusting-to-rapid-marketplace-growth-and-preparing-for-the-future.aspx#comments</comments><description>&lt;p&gt;Over the last several weeks some of you have reported slowdowns or delays in the app approval and publishing process. You’ve also said App Hub feels slower. We’ve been investigating, and today I want to explain why this is happening and more importantly what we’re doing about it. &lt;/p&gt;  &lt;p&gt;This is the first in a series on our evolving Marketplace service that I plan to write in the months ahead. &lt;/p&gt;  &lt;p&gt;It turns out App Hub had become less responsive. And our certification turnaround times have increased—by one business day, on average, from January through late March. Why? In short, growing pains. In three months the number of apps in Marketplace has grown by 60 percent, to nearly 80,000. During that period we’ve also nearly doubled the number of customer stores around the world, so there are now 54 markets to sell your apps. The addition of so many new markets and apps so quickly has slowed our backend systems.&lt;/p&gt;  &lt;p&gt;So what are we doing about it? There is a long-term and a short-term plan. We’re already in the process of developing a more robust and scalable Marketplace service that will address current problems and pave the way for the even more rapid growth we’re expecting in the years ahead. But engineering work this significant doesn’t happen overnight. Our plan is to have it complete by late summer. &lt;/p&gt;  &lt;p&gt;Until that work is done, we’ll be taking short-term measures to shore up the current service and relieve some of the strain on app certification and publishing. Some of these changes started rolling out about 10 days ago and include: &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Adding more server capacity to better handle the increased load.&lt;/li&gt;    &lt;li&gt;Streamlining our processes to accelerate the rate at which apps can be ingested, certified, and published.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Unfortunately, you probably won’t see dramatic results until Marketplace’s next generation service is deployed later this summer. But the average app certification wait has now fallen to 2.6 business days, or about a half-day improvement over the last 10 days. (You might experience different wait times depending on the app you’re submitting.)&lt;/p&gt;  &lt;p&gt;We’ve also deployed some bug fixes that are helping to improve App Hub responsiveness.&lt;/p&gt;  &lt;p&gt;I’m well aware there’s more work to do. But I wanted you to know that we take your feedback and concerns seriously and are attacking the problem on multiple fronts. I’ll have more to say on short-term plumbing upgrades—and planned long-term improvements to Marketplace and App Hub—in future posts. In the meantime, please let me know what’s on your mind.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://windowsteamblog.com/aggbug.aspx?PostID=580202" width="1" height="1"&gt;</description><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/Windows+Phone/default.aspx">Windows Phone</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/Marketplace/default.aspx">Marketplace</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/Apps/default.aspx">Apps</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/App+Hub/default.aspx">App Hub</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/App/default.aspx">App</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/Windows+Phone+7-5/default.aspx">Windows Phone 7.5</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/certification/default.aspx">certification</category></item><item><title>Reduce Memory Usage</title><link>http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/04/10/reduce-memory-usage.aspx</link><pubDate>Tue, 10 Apr 2012 17:16:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:580053</guid><dc:creator>Mike Battista</dc:creator><slash:comments>6</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://windowsteamblog.com/windows_phone/b/wpdev/rsscomments.aspx?WeblogPostID=580053</wfw:commentRss><comments>http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/04/10/reduce-memory-usage.aspx#comments</comments><description>&lt;p&gt;The second of the four principles I mentioned in &lt;a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/03/07/optimizing-apps-for-lower-cost-devices.aspx"&gt;Optimizing Apps for Lower Cost Devices&lt;/a&gt; is Reduce Memory Usage.&lt;/p&gt;
&lt;p&gt;Per &lt;a href="http://msdn.microsoft.com/en-us/library/hh184840(v=VS.92).aspx"&gt;certification requirement 5.2.5&lt;/a&gt;, apps should not exceed 90MB of memory usage on 256MB devices. When thinking about targeting 256MB devices, your first order of business should be to check whether your apps exceed 90MB today. If they don't, then reducing memory usage is less urgent (but still important as I'll mention later). If they do, then memory tuning will be required.&lt;/p&gt;
&lt;p&gt;Leverage the &lt;a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/02/01/memory-profiling-for-application-performance.aspx"&gt;memory profiler&lt;/a&gt; and &lt;a href="http://msdn.microsoft.com/en-us/library/ff941122(v=vs.92).aspx"&gt;memory-related API's&lt;/a&gt; to identify areas of opportunity to improve memory usage in your app. These tools can help you understand pretty quickly what the peak memory usage of your app is as well as what the breakdown of memory usage is across various states of your app.&lt;/p&gt;
&lt;p&gt;A general principle to keep in mind is that loading less will result in less memory usage. Loading less could mean loading less data at a time, loading less/smaller content, or fixing leaks which result in more objects residing in memory over the lifetime of your app.&lt;/p&gt;
&lt;p&gt;Many apps load and display lists of data (news articles, recipes, events, search results, etc.) often across several pivots on a page. If each of these pivots loads hundreds of list items (usually with images attached to each one), this can result in wasted memory usage particularly if (1) the user never views particular pivots or (2) the user never scrolls below 20 items in any given list. If several pages in your app display lists of data in this way, then memory usage can add up quickly as users navigate through your app. Wherever possible, load less data at a time. Defaulting to a small amount of items in each list and then loading more data as the user requests it can enable you to load the most relevant content in your UI at once (rather than potentially harm user interactivity by loading data in response to user input like pivot selection changes) while keeping your app's memory footprint at a reasonable level.&lt;/p&gt;
&lt;p&gt;Asset memory (for images, sound effects, etc.) can quickly add up if you're not careful about how you load assets. The more assets you load into memory at a time, the larger your memory footprint will become. Not only does the amount of content you load affect memory usage, but also does the size of the content. Memory usage of images, for instance, can be approximated by multiplying width * height * bpp (bits/pixel). Higher resolution images will naturally translate into higher memory usage. Loading a 1024x1024 image into memory only to scale it down to a 100x100 container will consume more memory than is necessary. If you're doing this for every image in a list or in a photo gallery feature, then you're using a lot more memory than you need to be. Load thumbnails where it makes sense, and load higher resolution content as the user requests it. If your content is preloaded in your app, make sure that the resolution of the content aligns with the sizes of the containers that will host the content. If you're loading images from a web service, check for options to load lower resolution images instead of higher resolution versions. &lt;a href="http://msdn.microsoft.com/en-us/library/ff708027(v=vs.92).aspx" title="PictureDecoder.DecodeJpeg"&gt;PictureDecoder.DecodeJpeg&lt;/a&gt; can generate thumbnails from high resolution image streams so use this to your advantage.&amp;nbsp;&amp;nbsp;If you're &lt;a href="http://msdn.microsoft.com/en-us/library/hh855082(v=vs.92).aspx"&gt;building a game&lt;/a&gt;, load assets for the on-screen experience only and flush those assets when they are no longer necessary. Hanging on to assets unnecessarily can result in OOM (out-of-memory) exceptions or general performance problems as the size of your game grows.&lt;/p&gt;
&lt;p&gt;Memory leaks can bloat your app footprint and should be identified and addressed. Common sources of memory leaks are building circular navigation loops and failing to deregister event handlers to long-lived objects. Apps that use a home button can result in circular navigation loops which can fill the back stack with redundant page instances. These page instances consume memory and could result in your app crashing due to an OOM (out-of-memory) exception while users navigate through your app. Avoid circular navigation loops by removing home button functionality or by leveraging the new &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.navigation.navigationservice.removebackentry(v=vs.92).aspx"&gt;back stack manipulation API&amp;rsquo;s&lt;/a&gt; exposed in Windows Phone 7.5. Neglecting to deregister event handlers to static objects can prevent objects from being reclaimed by the garbage collector. Imagine a search results page where the user navigates back and forth between the details of a search result and the search results page itself. If the details pages hold on to references to long-lived objects, they could continue to reside in memory even after the user navigates back from them. Be sure to deregister event handlers to static objects when they are no longer needed to prevent such leaks. &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.phone.controls.phoneapplicationpage.onremovedfromjournal(v=vs.92).aspx"&gt;OnRemovedFromJournal&lt;/a&gt; is the recommended place to perform this task since it handles page closure both via backward navigations as well as via the &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.navigation.navigationservice.removebackentry(v=vs.92).aspx"&gt;back stack manipulation API&amp;rsquo;s&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Additionally, you should be careful with the use of memory-intensive controls like the &lt;a href="http://msdn.microsoft.com/en-us/library/ff431812(v=VS.92).aspx"&gt;WebBrowser&lt;/a&gt; and &lt;a href="http://msdn.microsoft.com/en-us/library/ff941096(v=VS.92).aspx"&gt;Maps&lt;/a&gt; controls. IE can consume a lot of memory when rendering complex websites. This is true even today. The WebBrowser control essentially embeds IE in your app, so if you allow users to navigate to arbitrary complex websites in your app, the memory that IE uses will be attributed to your app. This could result in your app running out of memory if the sum of your app's memory usage plus IE's memory usage exceeds the recommended 90MB limit. If you'd like to use the WebBrowser control, just be mindful of the content that users are allowed to load. If the content isn't very complex, then performance/memory issues shouldn't be a concern. If users can load complex content in the control and your app footprint is already large, you may want to consider using the &lt;a href="http://msdn.microsoft.com/en-us/library/hh394020(v=vs.92).aspx"&gt;WebBrowserTask&lt;/a&gt; on 256MB devices to reduce the memory usage inside of your app. Similarly, for the Maps control, you may want to leverage the &lt;a href="http://msdn.microsoft.com/en-us/library/hh394026(v=vs.92).aspx"&gt;BingMapsTask&lt;/a&gt;/&lt;a href="http://msdn.microsoft.com/en-us/library/hh394024(v=vs.92).aspx"&gt;BingMapsDirectionsTask&lt;/a&gt; to offload map memory to a system process. If a customized map experience is critical to your app, then loading fewer overlays or otherwise simplifying your map experience can help save some memory as well.&lt;/p&gt;
&lt;p&gt;As I mentioned before, if you're exceeding 90MB today, then you're likely violating some of these principles and tuning will be required to target 256MB devices. If you're not exceeding 90MB, tuning the memory usage of your app is less urgent but still has its benefits.&lt;/p&gt;
&lt;p&gt;To enable apps to use up to 90MB on 256MB devices without jeopardizing the overall integrity of the system, we improved paging support in the OS with the &lt;a href="http://channel9.msdn.com/Shows/Inside+Windows+Phone/Inside-Windows-Phone-33--Windows-Phone-75-Refresh--60-more-Opportunity"&gt;Windows Phone 7.5 Refresh&lt;/a&gt; to better manage and distribute memory between background services/processes and the foreground app. While paging is generally abstracted from you, apps may perform slower or glitch occasionally if they push the device to its limits. Apps that use less than 60MB of memory will generally not be impacted by paging. Apps that use between 60MB and 90MB of memory will participate in paging, more so as you approach 90MB. Apps that fall in this range will be more likely to suffer from slower performance or glitches depending on the rest of the activity on the system. The smaller your app's memory footprint, the less likely it will be impacted by this variability.&lt;/p&gt;
&lt;p&gt;In addition to having better performance, apps that use less memory are more likely to &lt;a href="http://msdn.microsoft.com/en-us/library/hh202866(v=VS.92).aspx"&gt;fast resume&lt;/a&gt;. A precondition to fast resume is that the OS has enough free RAM available to keep apps dormant (in memory) in the back stack. On 256MB devices, free RAM is not as abundant as on 512MB devices, so an app that approaches 90MB of memory usage will be &lt;a href="http://msdn.microsoft.com/en-us/library/ff817008(v=VS.92).aspx"&gt;tombstoned&lt;/a&gt; immediately as it leaves the foreground to free up RAM for the incoming app. Apps that use less memory are more likely to be kept alive in the back stack. It should be noted that the Task Switcher (tap and hold Back to visualize the back stack and quickly navigate to a given app) will always be available on 256MB devices. What we're discussing here is merely the mechanism by which a 7.1 app will fast resume (the existing app instance is returned to the foreground from memory) vs. resume from tombstoning (where the app instance is torn down when it is placed in the back stack, and a new app instance is created when the app returns to the foreground). Apps that use less memory are more likely to benefit from fast resume.&lt;/p&gt;
&lt;p&gt;Tuning memory usage is a critical component of optimizing apps for 256MB devices. After becoming comfortable with these guidelines, it will become quite natural for you to build very efficient apps. It's a lot easier to build efficient apps from the beginning than to try and tack on efficiency after you've architected your app, so take comfort in knowing that the knowledge you gain tuning your existing apps (and seeing the results you achieve) will be directly applicable to your future Windows Phone projects. At the end of the day, your users will notice and appreciate the efficiency gains.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://windowsteamblog.com/aggbug.aspx?PostID=580053" width="1" height="1"&gt;</description><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/Performance/default.aspx">Performance</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/Best+Practices/default.aspx">Best Practices</category></item><item><title>Windows 8 and the Windows Phone SDK, pt. 2</title><link>http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/04/05/windows-8-and-the-windows-phone-sdk-pt-2.aspx</link><pubDate>Fri, 06 Apr 2012 00:06:53 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:579817</guid><dc:creator>Larry Lieberman</dc:creator><slash:comments>37</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://windowsteamblog.com/windows_phone/b/wpdev/rsscomments.aspx?WeblogPostID=579817</wfw:commentRss><comments>http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/04/05/windows-8-and-the-windows-phone-sdk-pt-2.aspx#comments</comments><description>&lt;p&gt;Last month, I &lt;a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/03/05/windows-8-and-the-windows-phone-sdk.aspx" target="_blank"&gt;posted&lt;/a&gt; to let developers know that we were aware of some of the challenges that were present in running the Windows Phone SDK on the Consumer Preview of Windows 8. In that post I mentioned that we were working on addressing those problems. My colleague Cliff then followed up with the &lt;a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/03/26/wpsdk-711-now-available.aspx" target="_blank"&gt;announcement&lt;/a&gt; of the release of the Windows Phone SDK 7.1.1 update, which does unblock the use of our SDK on Win 8, (although not officially supported). &lt;/p&gt;  &lt;p&gt;Lots of people are digging into the new development platform opportunities provided by Windows 8, and we understand there are a lot of questions about what they may portend for Windows Phone developers. While we aren’t yet ready to talk about our future plans, we do believe there are certain things we can tell you. In fact, we’ve already talked quite a bit about this at the //BUILD conference last September (see our sessions recorded online at &lt;a href="http://wpdev.ms/phoneatbuild" target="_blank"&gt;http://wpdev.ms/phoneatbuild&lt;/a&gt;).&lt;/p&gt;  &lt;p&gt;With regard to existing applications:&lt;strong&gt; today’s Windows Phone applications and games will run on the next major version of Windows Phone&lt;/strong&gt;. Driving application compatibility is a function of Microsoft’s commitment to its developers. Regardless of what we release in terms of new developer features and functionality, we have made a large investment in protecting your existing investments.&lt;/p&gt;  &lt;p&gt;We’ve also heard some developers express concern about the long term future of Silverlight for Windows Phone. Please don’t panic; XAML and C#/VB.NET development in Windows 8 can be viewed as a direct evolution from today’s Silverlight. All of your managed programming skills are transferrable to building applications for Windows 8, and in many cases, much of your code will be transferrable as well. Note that when targeting a tablet vs. a phone, you do of course, need to design user experiences that are appropriately tailored to each device.&lt;/p&gt;  &lt;p&gt;Microsoft is committed to creating an ecosystem that maximizes your investments. This is not an overnight endeavor, but we’re confident you’ll be pleased with where we’re going with the Windows Phone developer platform. As always, please let us know in the comments, or in our forums, if you have questions or concerns; we can’t answer every question just yet, but I hope we’ve dispelled some of your concerns.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://windowsteamblog.com/aggbug.aspx?PostID=579817" width="1" height="1"&gt;</description></item><item><title>Optimize Startup Time</title><link>http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/04/03/optimize-startup-time.aspx</link><pubDate>Tue, 03 Apr 2012 16:48:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:579689</guid><dc:creator>Mike Battista</dc:creator><slash:comments>10</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://windowsteamblog.com/windows_phone/b/wpdev/rsscomments.aspx?WeblogPostID=579689</wfw:commentRss><comments>http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/04/03/optimize-startup-time.aspx#comments</comments><description>&lt;p&gt;The first of the four principles I mentioned in &lt;a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/03/07/optimizing-apps-for-lower-cost-devices.aspx"&gt;Optimizing Apps for Lower Cost Devices&lt;/a&gt; is Optimize Startup Time.&lt;/p&gt;
&lt;p&gt;Fast startup is an essential component of any mobile application. It is the first impression a user has of your app and is the first chance you have to either impress or frustrate your users.&lt;/p&gt;
&lt;p&gt;If you're wondering just how fast your startup time can get on Windows Phone, use the VS Project Templates as a starting point. Create a new project, deploy it to the device, and experience how quickly the app starts up.&lt;/p&gt;
&lt;p&gt;A general principle to keep in mind is that any regressions in startup time from the VS Project Templates are the result of app code delaying the rendering of the first frame. The more app code you can remove or delay before the first frame is rendered, the closer your startup time will match the baseline startup time of the VS Project Templates.&lt;/p&gt;
&lt;p&gt;To fully understand the areas of opportunity for improving startup time, it's important to understand the workflow of a launching application.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The App constructor is called in App.xaml.cs.&lt;/li&gt;
&lt;li&gt;XAML in App.xaml is parsed.&lt;/li&gt;
&lt;li&gt;Application_Launching is called in App.xaml.cs.&lt;/li&gt;
&lt;li&gt;The Page constructor of your MainPage is called.&lt;/li&gt;
&lt;li&gt;XAML in your MainPage is parsed.&lt;/li&gt;
&lt;li&gt;OnNavigatedTo is called in your MainPage.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Once you understand this workflow, it is easy to conclude that any app code or XAML introduced in this workflow will result in startup time regressions from the VS Project Templates.&lt;/p&gt;
&lt;p&gt;To minimize the impact of app code in this startup path, you should either remove code from these events or &lt;a href="http://msdn.microsoft.com/en-us/library/4yd16hza(v=vs.95).aspx"&gt;execute code on background threads&lt;/a&gt; to unblock the UI thread. Only code executing on the UI thread will have a severe impact on startup performance. Deferring activity to background threads will allow your first frame to render quickly. Use &lt;a href="http://msdn.microsoft.com/en-us/library/cc190259%28v=VS.95%29.aspx"&gt;Dispatcher.BeginInvoke&lt;/a&gt; from background threads to return back to the UI thread when necessary.&lt;/p&gt;
&lt;p&gt;To minimize the impact of XAML parsing on startup time, you can simplify and remove unnecessary XAML from both your MainPage and from App.xaml.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Remove unnecessary namespaces declared in &amp;lt;phone:PhoneApplicationPage&amp;gt;. &lt;ol&gt;
&lt;li&gt;If your XAML elements aren't prefixed by a declared namespace, then the namespace declaration can be safely removed.&lt;/li&gt;
&lt;/ol&gt;&lt;/li&gt;
&lt;li&gt;Avoid explicit declarations of default attribute values. &lt;ol&gt;
&lt;li&gt;Grid.Row="0", for instance, is the default value if Grid.Row is not declared, so just don't declare it.&lt;/li&gt;
&lt;li&gt;SupportedOrientations="Portrait" and Orientation="Portrait" can be removed as well for portrait only pages since this is the default.&lt;/li&gt;
&lt;li&gt;Understand default values and remove redundant XAML.&lt;/li&gt;
&lt;/ol&gt;&lt;/li&gt;
&lt;li&gt;Avoid retemplating controls in App.xaml. &lt;ol&gt;
&lt;li&gt;Retemplating controls can require complex XAML which is expensive to parse.&lt;/li&gt;
&lt;li&gt;For Metro-style apps that are theme-aware, this is less of a concern. If you need to retemplate controls to support a branded experience, for instance, then understand what is necessary to override and what can be omitted.&lt;/li&gt;
&lt;li&gt;If templates are only needed for particular pages, consider moving the custom templates &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.frameworkelement.resources(v=vs.95).aspx"&gt;to the pages that need them&lt;/a&gt;. This will delay the cost of parsing the XAML until the necessary page is loaded rather than require the cost to be paid at startup.&lt;/li&gt;
&lt;/ol&gt;&lt;/li&gt;
&lt;li&gt;Normalize Style declarations. &lt;ol&gt;
&lt;li&gt;If you are consistently setting FontFamily, FontSize, and Foreground in a similar way on several TextBoxes, for instance, then consider &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.style(v=VS.95).aspx"&gt;using Styles instead&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;&lt;/li&gt;
&lt;li&gt;Simplify page layouts. &lt;ol&gt;
&lt;li&gt;Don't use nested Grids and StackPanels when one root container would be sufficient to &lt;a href="http://msdn.microsoft.com/en-us/library/cc645025%28v=VS.95%29.aspx#LayoutSystem_PanelsCustom"&gt;layout your page&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;&lt;/li&gt;
&lt;li&gt;Declare your app bar in code. &lt;ol&gt;
&lt;li&gt;This will be faster to process than parsing the XAML and is actually the only way to &lt;a href="http://msdn.microsoft.com/en-us/library/ff637520(v=vs.92).aspx" title="localize your app bar components"&gt;localize your app bar components&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;With your first frame rendered quickly, you can then turn your attention to indicating progress to the user while the rest of your content loads. Perceived startup time can go a long way to minimize the amount of frustration content load times can impose on users. The first frame of your app should always include the chrome of your application (system tray, app title, page title, pivot titles, app bar, etc.) as well as a &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.phone.shell.progressindicator(v=VS.92).aspx"&gt;ProgressIndicator&lt;/a&gt; to indicate that your content is loading. You'll want to use the &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.phone.shell.progressindicator(v=VS.92).aspx"&gt;ProgressIndicator&lt;/a&gt; over other progress bars as (1) the ProgressBar control has &lt;a href="http://www.jeff.wilcox.name/2010/08/performanceprogressbar/"&gt;known performance issues&lt;/a&gt; and (2) the &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.phone.shell.progressindicator(v=VS.92).aspx"&gt;ProgressIndicator&lt;/a&gt; will provide the most consistent experience with the rest of the built-in experiences on the phone.&lt;/p&gt;
&lt;p&gt;Note that the system tray and app bar are shell components and so will render more quickly than the content in your PhoneApplicationPage. You can take advantage of this to improve perceived startup time even further. You'll notice in &lt;a href="http://blogs.msdn.com/b/mikebattista/archive/2012/03/11/weather-v2-0.aspx"&gt;the Weather app&lt;/a&gt; that the system tray and app bar appear first followed by the rest of the page content. If you're using the system tray &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.phone.shell.progressindicator(v=VS.92).aspx"&gt;ProgressIndicator&lt;/a&gt; as recommended above to indicate progress, it will appear as well immediately when the system tray is rendered.&lt;/p&gt;
&lt;p&gt;A bonus to using both the system tray and app bar is that these components render together and provide a recognizable chrome for your app while it loads. Many apps hide the system tray and use only an app bar. If you've used these apps, you'll notice often that the app bar renders first before the rest of the content loads. The lack of symmetry in this case introduced by not showing the system tray actually contributes to the perception of lag that the user experiences. By adding the system tray, you can eliminate this perception while also providing a consistent chrome that is recognizable across apps. If you don't want to show the system tray but want to take advantage of it for the reasons mentioned above, show the system tray on launch with an &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.phone.shell.systemtray.opacity(v=vs.92).aspx"&gt;opacity of 0&lt;/a&gt;. Using an opacity of 0 means the system tray won't affect your page layout at all. Once the rest of your content loads, you can then &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.phone.shell.systemtray.isvisible(v=VS.92).aspx"&gt;hide the system tray&lt;/a&gt; if you'd like.&lt;/p&gt;
&lt;p&gt;Many apps &lt;a href="http://msdn.microsoft.com/en-us/library/ff769511(v=VS.92).aspx"&gt;use a splash screen&lt;/a&gt; to solve the perceived startup problem as it is cheap to implement and can promote the brand of the app. While this is a great practice, you may find that after following the guidance above, the splash screen will actually slow down your startup time. Adding a splash screen to &lt;a href="http://blogs.msdn.com/b/mikebattista/archive/2012/03/11/weather-v2-0.aspx"&gt;the Weather app&lt;/a&gt;, for instance, would actually harm its startup performance. With your startup time optimized, assess whether a splash screen is really necessary. Your apps will actually feel more like integrated experiences if they don't use a splash screen, so don't be afraid to leave it off completely. The combination of fast startup time, no splash screen, and extensibility points like &lt;a href="http://msdn.microsoft.com/en-us/library/hh202948(v=VS.92).aspx"&gt;secondary tiles&lt;/a&gt; will really make your apps shine on Windows Phone.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://windowsteamblog.com/aggbug.aspx?PostID=579689" width="1" height="1"&gt;</description><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/Performance/default.aspx">Performance</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/Best+Practices/default.aspx">Best Practices</category></item><item><title>Globalizing and Localizing a Windows Phone App</title><link>http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/04/02/globalizing-and-localizing-a-windows-phone-app.aspx</link><pubDate>Mon, 02 Apr 2012 16:05:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:579641</guid><dc:creator>Kim Cameron</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://windowsteamblog.com/windows_phone/b/wpdev/rsscomments.aspx?WeblogPostID=579641</wfw:commentRss><comments>http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/04/02/globalizing-and-localizing-a-windows-phone-app.aspx#comments</comments><description>&lt;p&gt;With Marketplace &lt;a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/03/28/marketplace-now-open-in-13-new-markets-are-your-apps-available.aspx"&gt;recently launching in 13 new markets&lt;/a&gt;, it's more important than ever to have a globalized, localized app that can reach as many of your customers as possible – but doing so can seem daunting. This blog post seeks to demystify the process and help enable you to write a truly global app.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;font color="#4f81bd" size="4"&gt;What is a globalized app?&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;A &lt;i&gt;globalized &lt;/i&gt;app displays things like dates and money in a way that's familiar to a user. If you have a calculator app, some people will expect to see a dollar sign, and others will expect a euro. Or even more important, consider a financial app where a difference between a period in one country/region and a comma in another can change the currency amount by a factor of ten! Dates also differ by country/region – sometimes the month comes before the day, sometimes after. By &lt;i&gt;globalizing&lt;/i&gt; your app, it'll feel natural to your customers, no matter where they are. &lt;/p&gt;  &lt;p&gt;Globalizing your app is fairly straightforward, and can be done using the CultureInfo class. Check out &lt;a href="http://msdn.microsoft.com/en-us/library/ff637519(v=vs.92).aspx"&gt;How to: Build a Globalized Application for Windows Phone&lt;/a&gt; for a code example of how to use it. &lt;/p&gt;  &lt;p&gt;This blog post will mostly focus on &lt;i&gt;localizing &lt;/i&gt;your app – a meaty topic that can be tricky to understand. &lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;font color="#4f81bd" size="4"&gt;What is a localized app?&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;You can think of a &lt;i&gt;localized &lt;/i&gt;app as one that's been translated into one or more languages. There's a few things you can &lt;i&gt;localize &lt;/i&gt;in your app:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;b&gt;App Text&lt;/b&gt; - menu headings, help text, etc.&lt;/li&gt;    &lt;li&gt;&lt;b&gt;App Description -&lt;/b&gt; seen in the marketplace&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;App Title -&lt;/strong&gt; appears in the application list and on the app title&lt;/li&gt;    &lt;li&gt;&lt;b&gt;Application Bar text&lt;/b&gt; - if you include an Application Bar&lt;/li&gt;  &lt;/ol&gt;  &lt;p&gt;&lt;b&gt;&lt;font color="#4f81bd" size="4"&gt;Do I have to localize my app to publish in multiple markets?&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;No – the two actions are separate.&lt;/strong&gt; When you submit your app to App Hub, you'll eventually reach a Pricing page where you can choose where your app will be published. You can either select specific markets or 'Worldwide distribution' to include them all. &lt;/p&gt;  &lt;p&gt;It's important to understand that this is the &lt;strong&gt;only way &lt;/strong&gt;you can choose where your app is published. Localizing your app is a separate process, and has no impact on where your app ships. &lt;/p&gt;  &lt;p&gt;As a note, there are certain countries/regions that have stricter than usual content guidelines. If you decide to publish your app in these marketplaces, make sure you've read requirement 3.10 listed at &lt;a href="http://msdn.microsoft.com/en-us/library/hh184842(v=vs.92).aspx"&gt;Content Policies&lt;/a&gt;. Also keep in mind that your app must pass certification for all markets you choose – this means that if you choose 'Worldwide distribution', your app must pass certification for all of the supported markets. If you have trouble passing certification for certain markets, an option is to unselect those markets on the Pricing page. &lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;font color="#4f81bd" size="4"&gt;If that's the case, why should I localize my app?&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Because you want customers around the world to enjoy – and use – your app. &lt;/p&gt;  &lt;p&gt;Let's say you write an app in English, and publish it worldwide. Even if they can physically see your app in their marketplace, someone who can speak and read only Spanish won't be able to understand your app description, and your app likely wont be useful to them. By localizing your app into the Spanish language, that customer would be able to use and understand your app.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;font color="#4f81bd" size="4"&gt;When would I &lt;i&gt;not &lt;/i&gt;want to localize my app?&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;There are a couple of cases where it might not make sense to localize: &lt;/p&gt;  &lt;p&gt;&lt;b&gt;App Title&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Localizing your app title is often a good thing. Say you've created a calculator app, and the title is something obvious like 'Calculator'. By localizing your app title into French (France) and calling it 'Calculatrice', someone in the French marketplace will easily know what your app is. &lt;/p&gt;  &lt;p&gt;On the other hand, what if your app title is your company name, such as 'Contoso App'? In this case your name is your branding – you don't necessarily want to localize that into other languages, because you're promoting your app under, and as, your company name. &lt;/p&gt;  &lt;p&gt;&lt;b&gt;Language-specific apps&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Usually, you'll want to localize your app into multiple languages so you can reach the most customers. But what if, for whatever reason, you decide you only want to ever target a certain group of customers in a certain market? For example, you've written a Spanish news app that you want to market only to Spanish-speaking customers in Spain. In this case, you can save time and energy by not localizing your app into other languages.&lt;/p&gt;  &lt;p&gt;That being said, even if your app only supports one language, it's still a good idea to structure your app so that it can be easily localized into other languages in the future. &lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;font color="#4f81bd" size="4"&gt;I'm sold – how do I localize my app?&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Localization includes multiple tasks – there are primarily four areas to consider, but we'll mostly focus on localizing app text. &lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;font size="3"&gt;App Title&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;The app title appears in the application list on the app tile. You can localize your app title by creating a resource-only DLL file for each language. &lt;a href="http://msdn.microsoft.com/en-us/library/ff967550(v=VS.92).aspx"&gt;How to: Localize an Application Title for Windows Phone&lt;/a&gt; has a full write-up of how to do this. &lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;font size="3"&gt;App Description&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;You've created an app, you've localized your app text into multiple languages, and you're ready to submit to App Hub. During the ingestion process, App Hub detects which languages you support and will prompt you to enter a language-specific description (and some other metadata) &lt;i&gt;for each language you support&lt;/i&gt;. &lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Be sure that each description matches the language in question, as otherwise you'll fail certification. For example:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/3225.locblog_5F00_eachdescrip_5F00_final_5F00_57CA2893.png"&gt;&lt;img style="display: inline; background-image: none;" title="locblog_eachdescrip_final" border="0" alt="locblog_eachdescrip_final" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/3302.locblog_5F00_eachdescrip_5F00_final_5F00_thumb_5F00_2251666E.png" width="654" height="180" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;font size="3"&gt;Application Bar&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;When it comes to localization, the Application Bar is handled differently than other controls in your app. If you include an Application Bar in your app, you can localize the text labels on each button. &lt;a href="http://msdn.microsoft.com/en-us/library/ff637520(v=vs.92).aspx"&gt;How to: Build a Localized Application for Windows Phone&lt;/a&gt; has a code example at the bottom of the page that you can use to do this. Also check out &lt;a href="http://bindableapplicationb.codeplex.com/"&gt;BindableApplicationBar&lt;/a&gt; on CodePlex for a third party solution. But before dealing with your Application Bar, you'll need to understand how to localize your app text, which brings us to…&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;font size="3"&gt;App Text&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;App text is essentially any text that appears in your app except for the app title or Application Bar text. &lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;font color="#4f81bd" size="4"&gt;How to I localize my app text?&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Let's start with the most common case, and then move on to some edge cases. Basically, rather than hard-coding your text into a specific language in XAML, we'll localize your app text by using data binding to obtain the localized values of a word or string from a resource file. &lt;/p&gt;  &lt;p&gt;To localize your app text, you'd do the following: &lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;font size="3"&gt;Specify the Neutral Language&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Decide the language you want to be the 'default' for your app. This language in Visual Studio is known as the &lt;i&gt;neutral language&lt;/i&gt;.&lt;/p&gt;  &lt;p&gt;By default, Visual Studio sets the neutral language to the language you choose when installing the SDK. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/3817.locblog_5F00_downloadlangs_5F00_01CA26BC.png"&gt;&lt;img style="display: inline; background-image: none;" title="locblog_downloadlangs" border="0" alt="locblog_downloadlangs" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/2656.locblog_5F00_downloadlangs_5F00_thumb_5F00_015DF3C7.png" width="639" height="229" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;This is important to understand because &lt;strong&gt;App Hub assumes that your neutral language is your default language&lt;/strong&gt;. If you install the SDK with language set to English, unless you change the neutral language, any app you create will have its neutral language set to English. You need to make sure you change the neutral language to whatever your default language actually is. &lt;/p&gt;  &lt;p&gt;This language has to be supported by Windows Phone, meaning it's listed in the &lt;b&gt;Display languages&lt;/b&gt; table at &lt;a href="http://msdn.microsoft.com/en-us/library/hh202918(v=vs.92).aspx"&gt;Culture and Language Support for Windows Phone&lt;/a&gt;. If you choose something else that's not listed at the Culture and Language Support topic, you'll fail certification. &lt;/p&gt;  &lt;p&gt;To set the neutral language in Visual Studio, open the project properties, click the Application tab, and then click Assembly Information.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/0636.locblog_5F00_assembly_5F00_27BFD712.png"&gt;&lt;img style="display: inline; background-image: none;" title="locblog_assembly" border="0" alt="locblog_assembly" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/4265.locblog_5F00_assembly_5F00_thumb_5F00_4E21BA5D.png" width="449" height="430" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;For in-depth coverage on how to change the neutral language, see &lt;a href="http://msdn.microsoft.com/en-us/library/ff637520(v=vs.92).aspx"&gt;How to: Build a Localized Application for Windows Phone&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;font size="3"&gt;Create Resource Files for Each Language&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Create a resource file for each language that you plan on supporting. &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;You'll first set up your default resource file, AppResources.resx. Your strings in this file have to be the same language of what you chose for your neutral language in step 1, or you'll fail certification. &lt;/li&gt;    &lt;li&gt;Every other language besides your default is set up in its own file, labeled with the correct &amp;quot;culture name&amp;quot;. For example, if you plan on supporting Spanish (Spain), you'd name your AppResources file 'AppResources.es-ES.resx'. For a full list of culture names you can use, see &lt;a href="http://msdn.microsoft.com/en-us/library/hh202918(v=vs.92).aspx"&gt;Culture and Language Support for Windows Phone&lt;/a&gt;. To learn more about how culture names are constructed, see the &lt;a href="http://msdn.microsoft.com/en-us/library/system.globalization.cultureinfo.aspx"&gt;CultureInfo class&lt;/a&gt;. Put your language strings into each resource file, translated into that language. &lt;/li&gt;  &lt;/ol&gt;  &lt;p&gt;&lt;b&gt;&lt;font size="3"&gt;Replace Hard-coded Text with Data Binding&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Replace hard-coded text in your app and use data binding to reference values from your resource files. &lt;/p&gt;  &lt;p&gt;&lt;font face="Consolas"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#c0504d"&gt;TextBlock&lt;/font&gt; &lt;font color="#ff0000"&gt;x&lt;/font&gt;&lt;font color="#0000ff"&gt;:&lt;/font&gt;&lt;font color="#ff0000"&gt;Name&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&lt;font color="#0000ff"&gt;&amp;quot;PageTitle&amp;quot;&lt;/font&gt; &lt;font color="#ff0000"&gt;Text&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;{&lt;/font&gt;&lt;font color="#c0504d"&gt;Binding&lt;/font&gt; &lt;font color="#ff0000"&gt;Path&lt;/font&gt;&lt;font color="#0000ff"&gt;=AppResources.String1,&lt;/font&gt; &lt;font color="#ff0000"&gt;Source&lt;/font&gt;&lt;font color="#0000ff"&gt;={&lt;/font&gt;&lt;font color="#c0504d"&gt;StaticResource&lt;/font&gt; &lt;font color="#ff0000"&gt;LocalizedStrings&lt;/font&gt;&lt;font color="#0000ff"&gt;}}&amp;quot; &lt;/font&gt;&lt;font color="#ff0000"&gt;Margin&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;9,-7,0,0&amp;quot;&lt;/font&gt; &lt;font color="#ff0000"&gt;Style&lt;/font&gt;&lt;font color="#0000ff"&gt;=&amp;quot;{&lt;/font&gt;&lt;font color="#c0504d"&gt;StaticResource&lt;/font&gt; &lt;font color="#ff0000"&gt;PhoneTextTitle1Style&lt;/font&gt;&lt;font color="#0000ff"&gt;}&amp;quot;/&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;For in-depth coverage on how to create these resource files, see &lt;a href="http://msdn.microsoft.com/en-us/library/ff637520(v=vs.92).aspx"&gt;How to: Build a Localized Application for Windows Phone&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;font size="3"&gt;What happens if I don't localize in some languages? Can those users read my app?&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Yes.&lt;/b&gt; For example, let's say you've written an app in French (France). You want all of your text to be in French most of the time, but there's one or two strings you want to be different just for people with the Spanish (Spain) display language set.&lt;/p&gt;  &lt;p&gt;You'd do the following:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Set your neutral language to 'French (France)'&lt;/li&gt;    &lt;li&gt;Create a default AppResources.resx file and put your strings, in French, in the file&lt;/li&gt;    &lt;li&gt;Create a AppResources.es-ES.resx file (es-ES is the culture name of Spanish (Spain))&lt;/li&gt;    &lt;li&gt;Put only the selective strings in there that you want to be different for people with the Spanish (Spain) display language setting&lt;/li&gt;  &lt;/ol&gt;  &lt;p&gt;So, what happens if someone with the Spanish (Spain) display language setting opens up your app? What about someone who is using English (United States) or any other display language?&lt;/p&gt;  &lt;p&gt;Windows Phone uses the following algorithm to determine what text to display: &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;What display language is set on the device?&lt;/li&gt;    &lt;li&gt;Is there a resource file in the app that matches that display languages?&lt;/li&gt;  &lt;/ol&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; a.&amp;#160; If yes:&lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; A.&amp;#160; Is the string in the app located in the resource file?&lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; i.&amp;#160; If yes: &lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; I. Show the translated string&lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; ii.&amp;#160; If no: &lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; I. 'Fall back' to the default language, in this example, 'French (France)', and show that string instead. In our example, this means that someone with English (United States) set will see the &lt;b&gt;French (France) &lt;/b&gt;string, because there is no AppResources.en-US.resx file with a corresponding string. &lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; a.&amp;#160; If no: &lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; A.&amp;#160; 'Fall back' to the default language, in this example, 'French (France)', and show that string instead.&lt;/p&gt;  &lt;/blockquote&gt;  &lt;p&gt;Notice that the same fall back behavior happens if either the resource file is missing entirely, or if the string isn't found in the file. &lt;/p&gt;  &lt;p&gt;Based on the above algorithm, someone with the Spanish (Spain) display language set will only see a Spanish string if you've set that string up in the AppResources.es-ES.resx file. If not, you'll see the default (French) equivalent since it's set as the neutral language.&lt;/p&gt;  &lt;p&gt;Likewise, if someone has English (United States) or any other display language set, they will only ever see the French strings, since there are no resource files or strings set up for those display languages.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;font color="#4f81bd" size="4"&gt;How do I localize for specific regions?&lt;/font&gt; &lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Most languages have multiple &lt;i&gt;regions &lt;/i&gt;associated with them. For example, there's the Spanish language, but there's different versions of it depending on region, such as Spain and Mexico. Each display language supported on Windows Phone is a specific combination of language and region, such as Spanish (Spain) or French (France). Where it gets tricky is that a user can control both their display language and the 'Region format' – and Region format shows far more options than &lt;a href="http://msdn.microsoft.com/en-us/library/hh202918(v=vs.92).aspx"&gt;the supported display languages&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/0552.locblog_5F00_regionformat_5F00_788DEB7A.png"&gt;&lt;img style="display: inline; background-image: none;" title="locblog_regionformat" border="0" alt="locblog_regionformat" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/5857.locblog_5F00_regionformat_5F00_thumb_5F00_3F0ADB83.png" width="292" height="269" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Since not all strings are the same between language regions, what if you have an app that you want to localize for both the supported display language Spanish (Spain), and the unsupported Spanish (Mexico)? &lt;/p&gt;  &lt;p&gt;Technically, you can do this by following steps similar to what you did in the previous example: &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Choose Spanish (Spain) for your neutral language since it's the supported display language of the two, and add those strings in your default AppResources.resx file&lt;/li&gt;    &lt;li&gt;Create a new resource file for Spanish (Mexico), which has a culture code of es-MX. You'd create AppResources.es-MX.resx, and put your Spanish (Mexico) strings in there. &lt;/li&gt;  &lt;/ol&gt;  &lt;p&gt;Note: You can find a large list of culture codes at the &lt;a href="http://msdn.microsoft.com/en-us/goglobal/bb896001.aspx"&gt;National Language Support (NLS) API Reference&lt;/a&gt; page. &lt;/p&gt;  &lt;p&gt;Seems like it would work, right? The problem is, even if the user has set their Region format to Spanish (Mexico), &lt;b&gt;your AppResources.es-MX.resx file will not load&lt;/b&gt;. This is because Windows Phone will look for a resource file that matches whatever the user has selected for their &lt;i&gt;display language&lt;/i&gt;, it will &lt;i&gt;not &lt;/i&gt;look for a file based on the Region format. &lt;/p&gt;  &lt;p&gt;There's a workaround that lets you get around this, you'll just need to add one line of code to the Application_Launching method of App.xaml.cs: &lt;/p&gt;  &lt;p&gt;&lt;font face="Consolas"&gt;&lt;font color="#4bacc6"&gt;AppResources&lt;/font&gt;.Culture = &lt;font color="#4bacc6"&gt;CultureInfo&lt;/font&gt;.CurrentCulture;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;By using this code, your app will show text from the resource file matching the &lt;i&gt;Region format&lt;/i&gt; of the phone, not the display language. Like always, if you don't have a resource file that matches, the fall back process happens. &lt;/p&gt;  &lt;p&gt;You can use this workaround to target any language region, as long as a user is able to select it on the settings page. &lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;font size="3"&gt;Make sure you choose the right neutral language!&lt;/font&gt; &lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Even with this workaround, for certification reasons, you need to make sure that the neutral language you choose is a &lt;b&gt;supported&lt;/b&gt; display language. &lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;font size="3"&gt;Are regional descriptions supported on App Hub?&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Let's say you submit the Spanish app we've been talking about to App Hub – you have Spanish (Spain) set up as your neutral language, you've created a regional file for Spanish (Mexico), and you have the right code in your app so the regional strings will display. &lt;/p&gt;  &lt;p&gt;App Hub will only detect &lt;i&gt;one &lt;/i&gt;language – Spanish. It maps this language to the display language we support, in this case, Spanish (Spain). You'll notice on App Hub that on the Pricing page, you'll be prompted to add a description and metadata for 'Spanish (Spain)', with no option to input different info for Spanish (Mexico). &lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;font color="#4f81bd" size="4"&gt;How do I localize for a language that isn't supported?&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;We've talked through localizing for a region that a user can select on the phone, using Region format. But what about cases where you can't select the language or region at all? &lt;/p&gt;  &lt;p&gt;For example, you decide to write an Icelandic news reader app. Even though Icelandic isn't officially supported on Windows Phone, the text would display in Icelandic to the user, &lt;a href="http://msdn.microsoft.com/en-us/library/hh202920(v=vs.92).aspx"&gt;because the phone supports the right fonts&lt;/a&gt;. But your app will fail certification because it must be localized in at least one supported display language. What to do?&lt;/p&gt;  &lt;p&gt;There's a workaround for this, too. If you plan on shipping an app that is written in a language we don't support, and it's not available in Region format, you can do the following:&lt;/p&gt;  &lt;p&gt;1.&amp;#160; &lt;strong&gt;Hard code your app to be written in the unsupported language&lt;/strong&gt;, if you don't plan on supporting more languages in the future. &lt;b&gt;OR&lt;/b&gt;, create your default AppResources.resx file and put your unsupported language strings in there, if you plan on supporting more languages in the future or will support additional languages in your submission.&lt;/p&gt;  &lt;p&gt;2.&amp;#160; &lt;strong&gt;Set your neutral language to &lt;/strong&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/hh202918(v=vs.92).aspx"&gt;&lt;strong&gt;one of the supported display languages&lt;/strong&gt;&lt;/a&gt;. For example, 'English (United States)'. &lt;/p&gt;  &lt;p&gt;3.&amp;#160; &lt;strong&gt;On App Hub, you will be prompted to input metadata and a description&lt;/strong&gt; for the neutral language you chose (for the above example, you'll be prompted for English). You must include the following three items in the 'Detailed description' field to pass certification: &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;A note, such as ‘The language of this application is [unsupported language name]’. This note must be written in the same language as the neutral language. For example, if you chose 'English (United States)' as your neutral language, the note must be written in English (United States). &lt;b&gt;This note must be the first item&lt;/b&gt; in the ‘Detailed description’ field.&lt;/li&gt;    &lt;li&gt;Your app description, in the same language as the neutral language.&lt;/li&gt;    &lt;li&gt;Your app description, in the unsupported language.&amp;#160; &lt;/li&gt;  &lt;/ul&gt;  &lt;p&gt;At the risk of making things sound even more complicated, you can technically do this one other way. Let's say you already have a news reader app that's localized into many languages, and you want to add support for Icelandic (an unsupported language). You can still do this, you'll just need to set up an additional resource file, using any one of the supported display languages you don't plan on localizing for, and go through the same metadata/description steps on App Hub. &lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;font color="#4f81bd" size="4"&gt;Other localization resources&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;If you're porting an app from Windows Phone OS 7.0, take a look at &lt;a href="http://blogs.msdn.com/b/wpukcoe/archive/2012/01/20/common-marketplace-ingestion-errors-and-how-to-avoid-them.aspx"&gt;this blog post by Mike Francis&lt;/a&gt;. He calls out some common errors you might run into when submitting your app to App Hub.&lt;/li&gt;    &lt;li&gt;If you're localizing for any English variant, be aware that App Hub refers to them by different names than what's listed in the supported display languages table. &lt;a href="http://forums.create.msdn.com/forums/t/87638.aspx"&gt;See this Support post&lt;/a&gt; for more info. &lt;/li&gt;    &lt;li&gt;And of course, &lt;a href="http://msdn.microsoft.com/en-us/library/ff637522(v=vs.92).aspx"&gt;there are also the MSDN docs&lt;/a&gt;. &lt;/li&gt;  &lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://windowsteamblog.com/aggbug.aspx?PostID=579641" width="1" height="1"&gt;</description><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/Windows+Phone/default.aspx">Windows Phone</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/Developers/default.aspx">Developers</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/App+Hub/default.aspx">App Hub</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/Application+Certification+Requirements/default.aspx">Application Certification Requirements</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/Localization/default.aspx">Localization</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/Globalization/default.aspx">Globalization</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/Certification+Requirements/default.aspx">Certification Requirements</category></item><item><title>Marketplace now open in 13 new markets. Are your apps available?</title><link>http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/03/28/marketplace-now-open-in-13-new-markets-are-your-apps-available.aspx</link><pubDate>Wed, 28 Mar 2012 21:55:12 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:579359</guid><dc:creator>Todd Brix</dc:creator><slash:comments>8</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://windowsteamblog.com/windows_phone/b/wpdev/rsscomments.aspx?WeblogPostID=579359</wfw:commentRss><comments>http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/03/28/marketplace-now-open-in-13-new-markets-are-your-apps-available.aspx#comments</comments><description>&lt;p&gt;Marketplace opened for customers today in 13 new markets—a milestone my colleague Mazhar &lt;a href="http://windowsteamblog.com/windows_phone/b/windowsphone/archive/2012/03/28/marketplace-arrives-in-13-new-countries.aspx"&gt;talks about&lt;/a&gt; on our consumer blog. &lt;/p&gt;  &lt;p&gt;&lt;a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/03/22/app-hub-now-open-for-new-markets.aspx"&gt;As I’ve written&lt;/a&gt;, the news is just another reminder that if you haven’t started cross-submitting your apps for publishing &lt;a href="http://create.msdn.com/news/reach-new-markets-publish-existing-apps-to-new-markets"&gt;(here's how)&lt;/a&gt;, now’s the time so phone owners in these new markets can start downloading them.&lt;/p&gt;  &lt;p&gt;Before signing off, I wanted to quickly address a question I often get: Why isn’t the developer &lt;a href="http://create.msdn.com/" target="_blank"&gt;App Hub&lt;/a&gt; expanding at the same pace as the consumer Marketplace? It’s a great question with a complicated answer. Simply put, it takes a lot of legal and engineering work to bring App Hub to new markets. We know you want to see App Hub expand, and we’re working hard to do that while guaranteeing a good experience for you. Setting up registration and payment infrastructure, complying with local laws and regulations, and doing all the other work necessary to ensure you have the tools you need to publish free and paid apps—and get compensated properly—takes time to put into place. &lt;/p&gt;  &lt;p&gt;That’s one reason why we created our &lt;a href="http://msdn.microsoft.com/en-us/library/hh286410(v=vs.92).aspx"&gt;global publisher program&lt;/a&gt;, which lets you publish apps in markets not yet supported by App Hub.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://windowsteamblog.com/aggbug.aspx?PostID=579359" width="1" height="1"&gt;</description><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/Windows+Phone/default.aspx">Windows Phone</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/Marketplace/default.aspx">Marketplace</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/App+Hub/default.aspx">App Hub</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/AppHub/default.aspx">AppHub</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/Global+Publisher+Program/default.aspx">Global Publisher Program</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/Windows+Phone+7-5/default.aspx">Windows Phone 7.5</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/certification/default.aspx">certification</category></item><item><title>Windows Phone SDK 7.1.1 Update Now Available</title><link>http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/03/26/wpsdk-711-now-available.aspx</link><pubDate>Mon, 26 Mar 2012 17:00:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:579088</guid><dc:creator>Cliff Simpkins</dc:creator><slash:comments>34</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://windowsteamblog.com/windows_phone/b/wpdev/rsscomments.aspx?WeblogPostID=579088</wfw:commentRss><comments>http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/03/26/wpsdk-711-now-available.aspx#comments</comments><description>&lt;p&gt;I&amp;rsquo;m pleased to announce that the &lt;a href="http://go.microsoft.com/fwlink/?LinkID=244021"&gt;Windows Phone SDK 7.1.1 Update is now available for your download&lt;/a&gt;; it&amp;rsquo;s the final version of the CTP we released last month, and enables Windows Phone developers to do two things:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Develop apps that work well on the new 256 MB devices&lt;/li&gt;
&lt;li&gt;Use the WPSDK 7.1 to develop on machines running Windows 8&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;While I&amp;rsquo;ll circle back to these two points in a moment, I&amp;rsquo;d like to take a moment and highlight what&amp;rsquo;s actually in this update. &lt;/p&gt;
&lt;p&gt;The 7.1.1 Update is really just that &amp;ndash; it&amp;rsquo;s an update to the existing WPSDK: it doesn&amp;rsquo;t add much in the way of new features to your WPSDK installation; it updates your existing install to do a few new tricks:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The Visual Studio IDE is patched to enable selection from a list of emulators, and launching it (note that the WPSDK can only support connecting to one at a time, though)&lt;/li&gt;
&lt;li&gt;The Windows Phone [512 MB device] emulator image is updated to use build 8773&lt;/li&gt;
&lt;li&gt;A second, new emulator device image is included, allowing you to emulate running your app on a 256 MB device&lt;/li&gt;
&lt;li&gt;The Microsoft Advertising SDK is updated to the latest version (previously only available as &lt;a href="http://www.microsoft.com/download/en/details.aspx?id=8729"&gt;a separate install&lt;/a&gt;), which fixes some issues devs were encountering at runtime&lt;/li&gt;
&lt;li&gt;IntelliSense now supports specifying the 512 MB device requirement in your manifest file, should you choose to opt your app out from running on the new 256 MB devices&lt;/li&gt;
&lt;li&gt;Language support is again consistent both in the IDE (the 7.1.1 Update supports all 10 of the WPSDK 7.1 languages) and in the emulator OS (Malay and Indonesian have been added)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Installing the patch is pretty straightforward process, with a standard three-step install process (accept; install; finish). Because the patch contains two virtual OS images (256 MB device image; 512 MB device image), the patch is pretty beefy (weighing in at just under 300 MB) and it can take time to install as it initializes each image as part of the installation. During the virtual image initialization process, each Windows Phone OS device image is booted up and then paused at the point where the OS is ready to accept an app install; while the initialization process adds some pain up front, it saves you lots of time in the long-run as you don&amp;rsquo;t have to watch the OS boot-up screen every time you start up the emulator to deploy/debug your code. &lt;/p&gt;
&lt;p&gt;On my machine, I was looking at the following screen for about 15 minutes:&lt;/p&gt;
&lt;p&gt;&lt;img height="253" width="270" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/7318.clip_5F00_image0021_5F00_20935FD7.jpg" alt="clip_image002[1]" border="0" title="clip_image002[1]" style="background-image: none; margin: 20px auto 25px; padding-left: 0px; padding-right: 0px; display: block; padding-top: 0px; border: 0px;" /&gt;&lt;/p&gt;
&lt;p&gt;After you&amp;rsquo;ve installed the update, the most noticeable change for most folks is you&amp;rsquo;ll now see a couple nifty entries in your target selection drop-down box:&lt;/p&gt;
&lt;p&gt;&lt;img height="132" width="275" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/5353.clip_5F00_image0031_5F00_3518AF55.png" alt="clip_image003[1]" border="0" title="clip_image003[1]" style="background-image: none; margin: 20px auto 25px; padding-left: 0px; padding-right: 0px; display: block; padding-top: 0px; border: 0px;" /&gt;&lt;/p&gt;
&lt;p&gt;Selecting one of these will launch the selected emulator, just as you would expect. Something that you may try to do (well, the first thing I did) is launch your app in the 512 MB emulator and then also launch it also in the 256 MB emulator, so that you can compare your WP app running in both emulators, side-by-side, to compare performance; needless to say, running both emulators at the same time doesn&amp;rsquo;t work. &lt;img src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/3730.wlEmoticon_2D00_smile_5F00_00D67266.png" alt="Smile" class="wlEmoticon wlEmoticon-smile" style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" /&gt;&lt;/p&gt;
&lt;h2&gt;&lt;b&gt;Running the Windows Phone SDK 7.1 on Windows 8&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;As &lt;a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/03/05/windows-8-and-the-windows-phone-sdk.aspx"&gt;Larry discussed earlier this month&lt;/a&gt;, the WPSDK 7.1 didn&amp;rsquo;t run on the Windows 8 Consumer Preview release. The issue involved three elements: an issue with XNA Game Studio, an issue with the Windows Phone emulator, and a requirement for .NET 3.5. The only remaining blocker for folks successfully developing for Windows Phone on Windows 8 was the emulator. I&amp;rsquo;m happy to report that this patch removes that final roadblock, and enables our mobile developer community to bring their WPSDK with them as they evaluate the new OS.&lt;/p&gt;
&lt;p&gt;There are two caveats I should provide around running the WPSDK 7.1.1 on your Windows 8 machine:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Running the WPSDK 7.1.1 on Windows 8 works, but it is not officially supported until the RTM release of Windows&lt;/li&gt;
&lt;li&gt;You are likely to see a performance degradation in the emulator if you have Hyper-V enabled&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;That being said, this update goes a long way to making it easier for folks to build apps that target both Windows Phone and Windows 8; the WPSDK 7.1.1 runs quite well side-by-side with Visual Studio &amp;lsquo;11&amp;rsquo;. Particularly with the Consumer Preview out, the ability to run the IDEs side-by-side has been a major request from our developer community. As you are starting to evaluate your strategy of targeting both platforms, we still continue to believe that code reuse via XAML and C#/VB.NET will continue to be your best strategy; and this side-by-side support should help make your life much easier as you can develop and debug side-by-side, as well. Look for information on this topic from Larry in the coming weeks.&lt;/p&gt;
&lt;h2&gt;&lt;b&gt;Developing Apps for 256 MB Devices&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;I won&amp;rsquo;t drill into this topic too much given it has been covered on this blog and others; not to mention you probably already have a good understanding of this topic already if you installed the CTP.&lt;/p&gt;
&lt;p&gt;If you haven&amp;rsquo;t yet looked what to keep in mind as you tailor your apps for 256 MB devices, here are a couple good starting points:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Mike Battista&amp;rsquo;s &lt;a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/03/07/optimizing-apps-for-lower-cost-devices.aspx"&gt;Optimizing Apps for Lower Cost Devices&lt;/a&gt; blog post&lt;/li&gt;
&lt;li&gt;Nokia Dev Wiki&amp;rsquo;s &lt;a href="http://www.developer.nokia.com/Community/Wiki/Best_practice_tips_for_delivering_apps_to_Windows_Phone_with_256_MB"&gt;Best Practice Tips for Delivering Apps to 256 MB Devices&lt;/a&gt; &lt;a&gt;article&lt;/a&gt;&lt;a name="_msoanchor_1" href="file:///C:/Users/cliffsim/Desktop/Temp/#_msocom_1"&gt;[CRS1]&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Inside Windows Phone &lt;a href="http://channel9.msdn.com/Shows/Inside+Windows+Phone/Inside-Windows-Phone-33--Windows-Phone-75-Refresh--60-more-Opportunity"&gt;episode on building for the Windows Phone 7.5 Refresh&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As &lt;a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/03/15/app-hub-accepting-submissions-for-new-markets-soon.aspx"&gt;Todd mentioned a couple weeks ago&lt;/a&gt;, these new devices, coupled with the &lt;a href="http://windowsteamblog.com/windows_phone/b/wpdev/archive/2012/03/22/app-hub-now-open-for-new-markets.aspx"&gt;23 new markets that went live last week&lt;/a&gt;, account for a nearly 60% increase in total addressable market for your apps. If you haven&amp;rsquo;t already returned to the App Hub and opted into the new markets, it&amp;rsquo;s a great time to do so. Just sayin&amp;rsquo;&amp;hellip;&lt;/p&gt;
&lt;h2&gt;&lt;b&gt;Other Random Tidbits&lt;/b&gt;&lt;/h2&gt;
&lt;h5&gt;&lt;i&gt;Can I update my CTP patch or do I have to reinstall?&lt;/i&gt;&lt;/h5&gt;
&lt;p&gt;Yes, in fact you can update without having to uninstall the CTP! The engineering team tells me that you should be able to install the RTW release of this patch (the one I&amp;rsquo;m announcing here; RTW being &amp;lsquo;Release to Web&amp;rsquo; since these tools don&amp;rsquo;t ever really go to &amp;lsquo;manufacturing&amp;rsquo;) either on a pristine install of the WPSDK 7.1 or one that had been previously updated using the CTP release of this update (no need to uninstall the CTP version of the 7.1.1 Update before running the RTW patch).&lt;/p&gt;
&lt;h5&gt;&lt;i&gt;How will I know if I have it installed? And would I uninstall/repair the Update?&lt;/i&gt;&lt;/h5&gt;
&lt;p&gt;An important note to make about this update is that it is, in fact, an update, and not a full installation. As such, you won&amp;rsquo;t find it listed in the &amp;lsquo;Add/Remove Programs&amp;rsquo; area of your Windows developer machine. To locate the installation, you&amp;rsquo;ll need to go to the &amp;lsquo;View Installed Updates&amp;rsquo; section of your Windows Control Panel (screen shot below, for your convenience).&lt;/p&gt;
&lt;p&gt;&lt;img height="239" width="453" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/3146.clip_5F00_image0051_5F00_4D3C19B0.jpg" alt="clip_image005[1]" border="0" title="clip_image005[1]" style="background-image: none; margin: 20px auto 25px; padding-left: 0px; padding-right: 0px; display: block; padding-top: 0px; border: 0px;" /&gt;&lt;/p&gt;
&lt;p&gt;Once in the Installed Updates section of the Control Panel, you&amp;rsquo;ll see a very very long list (at least my list is lengthy &lt;img src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/3730.wlEmoticon_2D00_smile_5F00_00D67266.png" alt="Smile" class="wlEmoticon wlEmoticon-smile" style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" /&gt;) of updates that you&amp;rsquo;ve installed to applications over time. For the WPSDK 7.1.1 update, you&amp;rsquo;ll find it listed under a variety of headers (because it touches a variety of installed components), but the primary entry will be found under Windows Phone SDK 7.1 (screen shot below again, for your convenience; because I have the English localization, the actual listing is &amp;lsquo;Windows Phone SDK 7.1 &amp;ndash; ENU). &lt;/p&gt;
&lt;p&gt;&lt;img height="292" width="513" src="http://windowsteamblog.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-53-84-metablogapi/6114.clip_5F00_image0071_5F00_65CBB700.jpg" alt="clip_image007[1]" border="0" title="clip_image007[1]" style="background-image: none; margin: 20px auto 25px; padding-left: 0px; padding-right: 0px; display: block; padding-top: 0px; border: 0px;" /&gt;&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s also noteworthy to point out that the update&amp;rsquo;s installation entry uses the KB entry to denote the installation (for English: KB2669191) instead of the actual patch name; and, if you&amp;rsquo;re comparing notes with me after you&amp;rsquo;ve installed the 7.1.1 Update for a different locale, you&amp;rsquo;ll also notice that your KB number is a bit different. Have no fear, everything is good in the world as each patch binary is required to have its own KB entry, and so this is just the way of the world [of patches].&lt;/p&gt;
&lt;h5&gt;&lt;i&gt;Why is this thing 7.1.1?&lt;/i&gt;&lt;/h5&gt;
&lt;p&gt;Lastly, returning to the &amp;lsquo;what&amp;rsquo;s in a name&amp;rsquo; point; which is invariably the second question I frequently get when discussing this patch. As you look at what is contained in this patch, it really is a patch that updates and improves the capabilities that have previously been delivered in the WPSDK instead of a big release with lots of net-new features. Furthermore, since the OS isn&amp;rsquo;t incrementing (the OS is still 7.10.8773 under the covers), a couple options had been considered: either the WPSDK 7.1.1 Update and WPSDK 7.1 March 2012 Update. Given the choice between those two options and the feedback we received last year around patch naming (for the WPDT, we released two updates: the Oct 2010 Update and the Jan 2011 Update), we went with WPSDK 7.1.1 Update. We think it clearly communicates what the Update does and it&amp;rsquo;s relation to the WPSDK 7.1.&lt;/p&gt;
&lt;h2&gt;&lt;b&gt;All of That Being Said&lt;/b&gt;&lt;/h2&gt;
&lt;p&gt;So, all of that being said, it&amp;rsquo;s a great update, and well worth the time to download and install. Go grab it, and let us know what you think. If you have any issues, definitely poke your head into the &lt;a href="http://forums.create.msdn.com/forums/99.aspx"&gt;&amp;lsquo;Tools for WP7&amp;rsquo; App Hub forum&lt;/a&gt; and give our most excellent support guys a holler. 
&lt;hr width="33%" size="1" align="left" /&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://windowsteamblog.com/aggbug.aspx?PostID=579088" width="1" height="1"&gt;</description><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/Developer/default.aspx">Developer</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/Developers/default.aspx">Developers</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/SDK/default.aspx">SDK</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/wp7dev/default.aspx">wp7dev</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/Tools/default.aspx">Tools</category><category domain="http://windowsteamblog.com/windows_phone/b/wpdev/archive/tags/Windows+Phone+7-5/default.aspx">Windows Phone 7.5</category></item></channel></rss>
