<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <channel>
    <title>WindowsPhoneGeek Articles</title>
    <link>http://www.windowsphonegeek.com/articles-feed</link>
    <description>windowsphonegeek.com articles feed</description>
    <language>en-us</language>
    <pubDate>2010-09-27T16:44:00.0000000+03:00</pubDate>
    <lastBuildDate>5/17/2012 6:48:48 PM</lastBuildDate>
    <generator>N2 CMS</generator>
    <managingEditor>windowsphonegeek.com</managingEditor>
    <item>
      <title>Electric Effect on Windows Phone 7 using XNA</title>
      <link>http://www.windowsphonegeek.com/articles/Electric-Effect-on-Windows-Phone-7-using-XNA</link>
      <description>&lt;p&gt;&lt;strong&gt;&lt;font size="5"&gt;Introduction&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Electric effect, like other effects such as flame, smoke, explosion, is one of the most common visual effects used in game development. However, not too many examples are found, even fewer were proved ready for mobile application. So let's talk about how to &amp;quot;invent&amp;quot; one.&lt;/p&gt;  &lt;p&gt;The image below shows the final electric effect implemented on Windows Phone 7 using XNA:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://windowsphonegeek.com/upload/articles/ElectricEffects_CatmullRom_2.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="ElectricEffects_CatmullRom" border="0" alt="ElectricEffects_CatmullRom" src="http://windowsphonegeek.com/upload/articles/ElectricEffects_CatmullRom_thumb.jpg" width="477" height="292" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:e4db0b9a-6330-4d4a-b96f-17c0dc965b21" class="wlWriterEditableSmartContent"&gt;&lt;p&gt;Download the source code &lt;a href="http://windowsphonegeek.com/upload/articles/JasonElectricEffectDemo_v1.1.zip" target="_blank"&gt;here&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;  &lt;p&gt;You can also follow the project on &lt;a href="http://xnaelectriceffect.codeplex.com/" target="_blank"&gt;Codeplex&lt;/a&gt;.&lt;/p&gt;    &lt;p&gt;&lt;b&gt;&lt;font size="5"&gt;Abstraction of electric effect&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;At first, I reached out for Particle System. But after several days of work, I found it's not the right solution for an electric effect. Here's why:&lt;/p&gt;  &lt;p&gt;Despite the complexity of a particle system, its core logic is all about spreading particles (sprites, or small glowing textures) in random directions, at random speeds, and sometimes including an environmental force in a fixed direction (gravity). Therefore a particle system is especially appropriate for effects such as flame, smoke, and explosion. There is one significant difference between flame and electric flow: points (particles) in a flame are distributed and move along radial direction, while points in an electric flow are distributed and move along a linear curve.&lt;/p&gt;  &lt;p&gt;An electric flow can be abstracted as follows:&lt;/p&gt;  &lt;p&gt;Each electric flow consists of a series of points. At any given moment, these points are distributed along a certain curve. The &amp;quot;wriggling&amp;quot; movement of an electric flow can be simulated by choosing a number of &lt;b&gt;control points &lt;/b&gt;and moving them continually. &lt;/p&gt;  &lt;p&gt;The figure below shows a blue line connecting the starting point and finishing point. The five red points are selected &lt;b&gt;control points&lt;/b&gt;.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://windowsphonegeek.com/upload/articles/ElectricEffect_1_2.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="ElectricEffect_1" border="0" alt="ElectricEffect_1" src="http://windowsphonegeek.com/upload/articles/ElectricEffect_1_thumb.jpg" width="495" height="27" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Try to imagine, at any certain moment, the five control points are located away from the original position by a random amount of distance, like this:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://windowsphonegeek.com/upload/articles/ElectricEffect_2_2.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="ElectricEffect_2" border="0" alt="ElectricEffect_2" src="http://windowsphonegeek.com/upload/articles/ElectricEffect_2_thumb.jpg" width="494" height="96" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;In the figure above, the red lines indicate the actual distribution of all points. Connecting control points using straight lines is the simplest approach, however, it doesn't feel realistic enough. We can improve it by applying different curve algorithms. The figure below shows the result of an electric flow using &lt;b&gt;Catmull Rom&lt;/b&gt; function:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://windowsphonegeek.com/upload/articles/ElectricEffect_3_2.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="ElectricEffect_3" border="0" alt="ElectricEffect_3" src="http://windowsphonegeek.com/upload/articles/ElectricEffect_3_thumb.jpg" width="495" height="96" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Notice: &lt;b&gt;Catmull Rom&lt;/b&gt; function is included in XNA's Vector2 class. You can find more information about Catmull Rom algorithm &lt;a href="http://en.wikipedia.org/wiki/Cubic_Hermite_spline#Catmull.E2.80.93Rom_spline" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;font size="5"&gt;&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;font size="5"&gt;Further improvement&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;In order to make the effect more vivid, the movement of the control points should be constrained within certain ranges rather than being boundless:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://windowsphonegeek.com/upload/articles/ElectricEffect_4_2.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="ElectricEffect_4" border="0" alt="ElectricEffect_4" src="http://windowsphonegeek.com/upload/articles/ElectricEffect_4_thumb.jpg" width="497" height="121" /&gt;&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;In the figure above, translucent blue areas indicate the range of movement for the control points. Each control point starts from the original (center) position, and moves toward a certain direction (randomly picked at starting point), at a certain speed (also random). When it's going to move out of the range, the control point jumps back to the original position, and starts another round of random movement. By putting all these control points' wriggling movement together, we are able to simulate a realistic electric flow effect.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;font size="4"&gt;Tip:&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;You can also google for key words &amp;quot;Plasma Ball&amp;quot; and look at the animations, the electric curve bends to some extent and bounces back. That's why we are making the flow &lt;strong&gt;jump&lt;/strong&gt; back from time to time.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;font size="5"&gt;Flicker effect&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;The wriggling movement is implemented, but we are not done yet. Take another look at the &amp;quot;Plasma Ball&amp;quot;, you will find the electric flow not only wriggles, but also flickers. Here's a simple and quick solution: repeatedly change the opacity of the points. Unfortunately, human eyes are too sharp to trick, any mechanical repeat feels artificial to us. Therefore, we also need to update the points with different glowing point textures, randomly of course. The basic principle is that these textures should be slightly different from each other, otherwise the result can get &amp;quot;messy&amp;quot;.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;font size="5"&gt;&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;font size="5"&gt;The &amp;quot;Windfall&amp;quot;&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Thanks to the independent movement of the control points, there are always some points that are closer to each other, while others are loosely distributed. Such a diverse density produces smooth transition of luminance. What makes it even more interesting is that, during the wriggling movement, the unevenness of the luminance flows wildly back and forth, amusing our picky eyes.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;font size="5"&gt;&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;font size="5"&gt;Source code description&lt;/font&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;In the demo code, &lt;b&gt;JasonElectricEffect&lt;/b&gt; project is a distributable Windows Phone 7 Library, in which:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;b&gt;ElectricEffect&lt;/b&gt; class is used to hold an electric effect, which may include one or more &lt;b&gt;ElectricFlow&lt;/b&gt;s. &lt;/li&gt;    &lt;li&gt;&lt;b&gt;ElectricFlow&lt;/b&gt; class, as its name implies, indicates an electric flow, which consists of a number of control points. These control points are described by ElectricNode class. Notice that though, ElectricNode class is used to describe &lt;b&gt;control points&lt;/b&gt; only, not all the glowing points within the electric flow. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;ElectricEffectType&lt;/strong&gt; enum is used to specify the curve function that connects the control points, including: Line, Bezier and CatmullRom. Different curve functions generate different effects. &lt;/li&gt;    &lt;li&gt;&lt;b&gt;Density&lt;/b&gt; property of &lt;b&gt;ElectricEffect&lt;/b&gt; class is used to specify the density of the glowing points that fill in between two adjacent control points. &lt;/li&gt;    &lt;li&gt;&lt;b&gt;LifeSpan&lt;/b&gt; property of &lt;b&gt;ElectricFlow&lt;/b&gt; class is used to specify the interval at which the texture is changed. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;For how to quickly generate an electric effect, please refer to &lt;b&gt;InitElectricEffect()&lt;/b&gt; method in &lt;b&gt;GamePage.xaml.cs&lt;/b&gt; in &lt;b&gt;JasonElectricEffectDemo&lt;/b&gt; project.&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:cdd4b715-d407-46b1-8bff-9aae1c97e3b2" class="wlWriterEditableSmartContent"&gt;&lt;p&gt;Download the source code &lt;a href="http://windowsphonegeek.com/upload/articles/JasonElectricEffectDemo_v1.1.zip" target="_blank"&gt;here&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;  &lt;p&gt;You can also follow the project on &lt;a href="http://xnaelectriceffect.codeplex.com/" target="_blank"&gt;Codeplex&lt;/a&gt;.&lt;/p&gt;</description>
      <pubDate>2012-04-08T18:30:08.0000000+03:00</pubDate>
    </item>
    <item>
      <title>LongListSelector walkthrough</title>
      <link>http://www.windowsphonegeek.com/articles/LongListSelector-walkthrough</link>
      <description>&lt;p&gt;&lt;strong&gt;by JustAnotherAppDeveloper&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Dedicated to Elizabeth&lt;/p&gt;  &lt;p&gt;Welcome to the LongListSelector walkthrough! This covers the very basics of LongListSelector, and by the end you'll have a small enough codebase that you should be able to go back through each line of the code and figure out what it does. The basic half of the walkthrough takes around half an hour; the full walkthrough, less than two hours.    &lt;br /&gt;Oh, and by the way, your code should compile after each step. (And you should compile after every step to make sure you're still on track.)&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;span style="font-size: medium"&gt;Contents&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Basic&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;A.&lt;a href="#installing-toolkit"&gt;Installing the Silverlight toolkit&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;B.&lt;a href="#creating-project"&gt;Creating a project&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;C.&lt;a href="#add-toolkit-reference"&gt;Adding a reference to the Silverlight toolkit&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;D.&lt;a href="#add-longlistselector"&gt;Adding a LongListSelector&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;E.&lt;a href="#make-model"&gt;Making a model&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;F.&lt;a href="#connect-model"&gt;Connecting the model and the LongListSelector&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;G.&lt;a href="#jumplist-functionality"&gt;Adding jumplist functionality&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Intermediate&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;H.&lt;a href="#prettifying"&gt;Prettifying&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I.&lt;a href="#update-at-runtime"&gt;Updating the LongListSelector at runtime&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;J.&lt;a href="#item-tap-action"&gt;Doing something when the user taps an item&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;K.&lt;a href="#touch-feedback"&gt;Touch feedback&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;L.&lt;a href="#separate-model-view"&gt;Separating model and view&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;M.&lt;a href="#designer"&gt;Leveraging the designer&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;N.&lt;a href="#binding-unrelated-properties"&gt;Extra topic: Binding unrelated properties&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Advanced&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;O.&lt;a href="#tombstone-recovery"&gt;Advanced topic: Recovering from a tombstone&lt;/a&gt;&lt;/p&gt;    &lt;h4 id="installing-toolkit"&gt;Installing the Silverlight toolkit&lt;/h4&gt;  &lt;ol&gt;   &lt;li&gt;If you haven't already, download and install the Silverlight toolkit for Windows Phone from &lt;a href="http://silverlight.codeplex.com/releases/view/75888"&gt;here&lt;/a&gt;. &lt;/li&gt; &lt;/ol&gt;  &lt;h4 id="creating-project"&gt;Creating a project&lt;/h4&gt;  &lt;p&gt;2.Open Visual Studio 2010. &lt;/p&gt;  &lt;p&gt;3. File -&amp;gt; New -&amp;gt; Project... &lt;/p&gt;  &lt;p&gt;4. In the left pane, under &amp;quot;Visual C#&amp;quot;, select &amp;quot;Silverlight for Windows Phone&amp;quot;. &lt;/p&gt;  &lt;p&gt;5. In the main center pane, select &amp;quot;Windows Phone Application&amp;quot; (top-most choice). &lt;/p&gt;  &lt;p&gt;6. Give the project a name at the bottom, eg &amp;quot;LongListSelectorDemo&amp;quot;, then click &amp;quot;OK&amp;quot;. &lt;/p&gt;  &lt;p&gt;7. Select &amp;quot;Windows Phone OS 7.1&amp;quot; as the target version, then click &amp;quot;OK&amp;quot;. &lt;/p&gt;  &lt;p&gt;The project will load up, and will look like this:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough1%5B1%5D.png"&gt;&lt;img title="LongListSelectorWalkthrough1[1]" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; padding-top: 0px; border-right-width: 0px" height="148" alt="LongListSelectorWalkthrough1[1]" src="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough1%5B1%5D_thumb.png" width="244" border="0" /&gt; &lt;/a&gt;&lt;/p&gt;  &lt;h4 id="add-toolkit-reference"&gt;Adding a reference to the Silverlight toolkit&lt;/h4&gt;  &lt;p&gt;8. Project -&amp;gt; Add Reference... &lt;/p&gt;  &lt;p&gt;9. Click on the &amp;quot;Browse&amp;quot; tab, then navigate to &amp;quot;C:\Program Files\Microsoft SDKs\Windows Phone\v7.1\Toolkit\Oct11\Bin&amp;quot;. If you're on a 64-bit system, the &amp;quot;Microsoft SDKs&amp;quot; folder will be in &amp;quot;Program Files (x86)&amp;quot;. &lt;/p&gt;  &lt;p&gt;10. Click on &amp;quot;Microsoft.Phone.Controls.Toolkit.dll&amp;quot; to add the reference to the project. &lt;/p&gt;  &lt;p&gt;11. Add the following line among the other xmlns declarations at the top of MainPage.xaml:    &lt;br /&gt;&lt;code&gt;xmlns:toolkit=&amp;quot;clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit&amp;quot;&lt;/code&gt; &lt;/p&gt;  &lt;p&gt;Now your screen should look something like this:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough2%5B1%5D.png"&gt;&lt;img title="LongListSelectorWalkthrough2[1]" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; padding-top: 0px; border-right-width: 0px" height="148" alt="LongListSelectorWalkthrough2[1]" src="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough2%5B1%5D_thumb.png" width="244" border="0" /&gt; &lt;/a&gt;&lt;/p&gt;  &lt;h4 id="add-longlistselector"&gt;Adding a LongListSelector&lt;/h4&gt;  &lt;p&gt;12. Add a LongListSelector in MainPage.xaml by adding this XAML within the ContentPanel: &lt;/p&gt;  &lt;pre&gt;&amp;lt;toolkit:LongListSelector Name=&amp;quot;GroupedList&amp;quot;&amp;gt;
&amp;lt;/toolkit:LongListSelector&amp;gt;
			&lt;/pre&gt;

&lt;p&gt;So you should now see this: 
  &lt;br /&gt;&lt;a href="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough3%5B1%5D.png"&gt;&lt;img title="LongListSelectorWalkthrough3[1]" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; padding-top: 0px; border-right-width: 0px" height="148" alt="LongListSelectorWalkthrough3[1]" src="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough3%5B1%5D_thumb.png" width="244" border="0" /&gt; &lt;/a&gt;&lt;/p&gt;

&lt;p&gt;13. Let's now tell the LongListSelector how to display items. Add this code within the LongListSelector tags we added in the last step: &lt;/p&gt;

&lt;pre&gt;&amp;lt;toolkit:LongListSelector.ItemTemplate&amp;gt;
	&amp;lt;DataTemplate&amp;gt;
		&amp;lt;TextBlock Text=&amp;quot;{Binding Name}&amp;quot; /&amp;gt;
	&amp;lt;/DataTemplate&amp;gt;
&amp;lt;/toolkit:LongListSelector.ItemTemplate&amp;gt;
			&lt;/pre&gt;

&lt;p&gt;14. And we also want to see text for groups, so add this code in right below the ItemTemplate code: &lt;/p&gt;

&lt;pre&gt;&amp;lt;toolkit:LongListSelector.GroupHeaderTemplate&amp;gt;
	&amp;lt;DataTemplate&amp;gt;
		&amp;lt;TextBlock Text=&amp;quot;{Binding Name}&amp;quot; FontSize=&amp;quot;32&amp;quot; Foreground=&amp;quot;Green&amp;quot; /&amp;gt;
	&amp;lt;/DataTemplate&amp;gt;
&amp;lt;/toolkit:LongListSelector.GroupHeaderTemplate&amp;gt;
			&lt;/pre&gt;

&lt;p&gt;We've asked the group text to show up in green so we can differentiate it. &lt;/p&gt;

&lt;p&gt;Now your screen should look something like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough4%5B1%5D.png"&gt;&lt;img title="LongListSelectorWalkthrough4[1]" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; padding-top: 0px; border-right-width: 0px" height="148" alt="LongListSelectorWalkthrough4[1]" src="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough4%5B1%5D_thumb.png" width="244" border="0" /&gt; &lt;/a&gt;&lt;/p&gt;

&lt;h4 id="make-model"&gt;Making a model&lt;/h4&gt;

&lt;p&gt;15. In the Solution Explorer (Ctrl-Alt-L), right-click on the project name (*not* the item that says &amp;quot;Solution '&amp;lt;solution name&amp;gt;'&amp;quot;), Add -&amp;gt; New Folder. Name the folder Model. &lt;/p&gt;

&lt;p&gt;16. In the Solution Explorer, right-click on &amp;quot;Model&amp;quot;, Add -&amp;gt; New Item..., select &amp;quot;Class&amp;quot; from the dialog (should be sixth from the top), write in &amp;quot;FoodItem.cs&amp;quot; as the name, then click &amp;quot;Add&amp;quot;. 
  &lt;br /&gt;Your screen should now look something like this: 

  &lt;br /&gt;&lt;a href="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough5%5B1%5D.png"&gt;&lt;img title="LongListSelectorWalkthrough5[1]" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; padding-top: 0px; border-right-width: 0px" height="148" alt="LongListSelectorWalkthrough5[1]" src="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough5%5B1%5D_thumb.png" width="244" border="0" /&gt; &lt;/a&gt;&lt;/p&gt;

&lt;p&gt;17. And then add a Name property and a constructor to FoodItem like so: &lt;/p&gt;

&lt;pre&gt;public string Name { get; private set; }

public FoodItem(string foodName)
{
	Name = foodName;
}
			&lt;/pre&gt;

&lt;p&gt;18. One class done, one more to go! Create another class in Model, just like we did with FoodItem in step 15, but name this class FoodCategory. &lt;/p&gt;

&lt;p&gt;19. Let's flesh out FoodCategory with a Name property, a List of FoodItems, a constructor, and a method to add items: &lt;/p&gt;

&lt;pre&gt;public string Name { get; private set; }
public System.Collections.Generic.List&amp;lt;FoodItem&amp;gt; Items { get; private set; }

public FoodCategory(string categoryName)
{
	Name = categoryName;
	Items = new System.Collections.Generic.List&amp;lt;FoodItem&amp;gt;();
}

public void AddFoodItem(FoodItem foodItem)
{
	Items.Add(foodItem);
}
			&lt;/pre&gt;

&lt;p&gt;So you should now see this: 
  &lt;br /&gt;&lt;a href="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough6%5B1%5D.png"&gt;&lt;img title="LongListSelectorWalkthrough6[1]" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; padding-top: 0px; border-right-width: 0px" height="148" alt="LongListSelectorWalkthrough6[1]" src="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough6%5B1%5D_thumb.png" width="244" border="0" /&gt; &lt;/a&gt;&lt;/p&gt;

&lt;p&gt;20. In addition, FoodCategory needs to implement IEnumerable since it's the &amp;quot;group class&amp;quot; for the LongListSelector; this allows the LongListSelector to see the items within the group. So change this line: 
  &lt;br /&gt;&lt;tt&gt;public class FoodCategory&lt;/tt&gt; 

  &lt;br /&gt;to this (to indicate the &amp;quot;implements&amp;quot; relationship): 

  &lt;br /&gt;&lt;tt&gt;public class FoodCategory : System.Collections.IEnumerable&lt;/tt&gt; 

  &lt;br /&gt;And add the following method to FoodCategory: &lt;/p&gt;

&lt;pre&gt;public System.Collections.IEnumerator GetEnumerator()
{
	return this.Items.GetEnumerator();
}
			&lt;/pre&gt;

&lt;h4 id="connect-model"&gt;Connecting the model and the LongListSelector&lt;/h4&gt;

&lt;p&gt;21. Almost there! In MainPage.xaml.cs, add the following method. This will populate the LongListSelector with our data when the app starts. &lt;/p&gt;

&lt;pre&gt;protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
{
	base.OnNavigatedTo(e);
	if (GroupedList.ItemsSource == null)
	{
		System.Collections.Generic.List&amp;lt;Model.FoodCategory&amp;gt; foodCategories =
				new System.Collections.Generic.List&amp;lt;Model.FoodCategory&amp;gt;();
		
		/*---Make burger items---*/
		Model.FoodCategory burgers = new Model.FoodCategory(&amp;quot;Burgers&amp;quot;);
		burgers.AddFoodItem(new Model.FoodItem(&amp;quot;Hamburger&amp;quot;));
		burgers.AddFoodItem(new Model.FoodItem(&amp;quot;Chicken burger&amp;quot;));
		burgers.AddFoodItem(new Model.FoodItem(&amp;quot;Turkey burger&amp;quot;));
		burgers.AddFoodItem(new Model.FoodItem(&amp;quot;Black bean burger&amp;quot;));

		/*---Make fryer items---*/
		Model.FoodCategory fryer = new Model.FoodCategory(&amp;quot;Fryer&amp;quot;);
		fryer.AddFoodItem(new Model.FoodItem(&amp;quot;Fries&amp;quot;));
		fryer.AddFoodItem(new Model.FoodItem(&amp;quot;Onion rings&amp;quot;));
		fryer.AddFoodItem(new Model.FoodItem(&amp;quot;Tater tots&amp;quot;));
		fryer.AddFoodItem(new Model.FoodItem(&amp;quot;Mozzarella sticks&amp;quot;));

		/*---Make fish items---*/
		Model.FoodCategory fish = new Model.FoodCategory(&amp;quot;Fish&amp;quot;);
		fish.AddFoodItem(new Model.FoodItem(&amp;quot;Salmon&amp;quot;));
		fish.AddFoodItem(new Model.FoodItem(&amp;quot;Rainbow trout&amp;quot;));
		fish.AddFoodItem(new Model.FoodItem(&amp;quot;Grilled tilapia&amp;quot;));

		foodCategories.Add(burgers);
		foodCategories.Add(fryer);
		foodCategories.Add(fish);

		GroupedList.ItemsSource = foodCategories;
	}
}
			&lt;/pre&gt;

&lt;p&gt;22. Build and run your code! You should see this: 
  &lt;br /&gt;&lt;a href="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough7%5B1%5D.png"&gt;&lt;img title="LongListSelectorWalkthrough7[1]" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; padding-top: 0px; border-right-width: 0px" height="244" alt="LongListSelectorWalkthrough7[1]" src="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough7%5B1%5D_thumb.png" width="148" border="0" /&gt; &lt;/a&gt;&lt;/p&gt;

&lt;h4 id="jumplist-functionality"&gt;Adding jumplist functionality&lt;/h4&gt;

&lt;p&gt;We've made a LongListSelector, but nothing happens when the user taps on one of the group headers :( Let's fix that.&lt;/p&gt;

&lt;p&gt;23. Go back to MainPage.xaml where we added the ItemTemplate and GroupHeader template. Add a GroupItemTemplate like so: &lt;/p&gt;

&lt;pre&gt;&amp;lt;toolkit:LongListSelector.GroupItemTemplate&amp;gt;
	&amp;lt;DataTemplate&amp;gt;
		&amp;lt;TextBlock Text=&amp;quot;{Binding Name}&amp;quot; FontSize=&amp;quot;32&amp;quot; Foreground=&amp;quot;Green&amp;quot; /&amp;gt;
	&amp;lt;/DataTemplate&amp;gt;
&amp;lt;/toolkit:LongListSelector.GroupItemTemplate&amp;gt;
			&lt;/pre&gt;

&lt;p&gt;(Yep, this is the same template we used for the GroupHeaderTemplate.) &lt;/p&gt;

&lt;p&gt;24. Build and run your code! Now when you tap on a group header, you should see this: 
  &lt;br /&gt;&lt;a href="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough8%5B1%5D.png"&gt;&lt;img title="LongListSelectorWalkthrough8[1]" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; padding-top: 0px; border-right-width: 0px" height="244" alt="LongListSelectorWalkthrough8[1]" src="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough8%5B1%5D_thumb.png" width="148" border="0" /&gt; &lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This marks the end of the basic walkthrough. Make sure you understand everything up to this point; after this it gets more complicated.&lt;/p&gt;

&lt;h4 id="prettifying"&gt;Prettifying&lt;/h4&gt;

&lt;p&gt;By now you probably think I have no aesthetic sense (and I'm not denying it), so let's try to make things look a tad sleeker.&lt;/p&gt;

&lt;p&gt;25. Change the innards of the ItemTemplate to this: &lt;/p&gt;

&lt;pre&gt;&amp;lt;DataTemplate&amp;gt;
	&amp;lt;TextBlock Text=&amp;quot;{Binding Name}&amp;quot; Padding=&amp;quot;{StaticResource PhoneTouchTargetOverhang}&amp;quot; 
			FontSize=&amp;quot;{StaticResource PhoneFontSizeMediumLarge}&amp;quot; /&amp;gt;
&amp;lt;/DataTemplate&amp;gt;
			&lt;/pre&gt;

&lt;p&gt;26. Change the innards of the GroupHeaderTemplate to this: &lt;/p&gt;

&lt;pre&gt;&amp;lt;DataTemplate&amp;gt;
	&amp;lt;Border Background=&amp;quot;{StaticResource PhoneAccentBrush}&amp;quot; 
			Padding=&amp;quot;{StaticResource PhoneTouchTargetOverhang}&amp;quot;&amp;gt;
		&amp;lt;TextBlock Text=&amp;quot;{Binding Name}&amp;quot; Style=&amp;quot;{StaticResource PhoneTextGroupHeaderStyle}&amp;quot;/&amp;gt;
	&amp;lt;/Border&amp;gt;
&amp;lt;/DataTemplate&amp;gt;
			&lt;/pre&gt;

&lt;p&gt;27. And change the innards of the GroupItemTemplate to this: &lt;/p&gt;

&lt;pre&gt;&amp;lt;DataTemplate&amp;gt;
	&amp;lt;Border Background=&amp;quot;{StaticResource PhoneAccentBrush}&amp;quot; 
			Padding=&amp;quot;{StaticResource PhoneTouchTargetOverhang}&amp;quot;
			Margin=&amp;quot;{StaticResource PhoneTouchTargetOverhang}&amp;quot;&amp;gt;
		&amp;lt;TextBlock Text=&amp;quot;{Binding Name}&amp;quot; Style=&amp;quot;{StaticResource PhoneTextGroupHeaderStyle}&amp;quot;/&amp;gt;
	&amp;lt;/Border&amp;gt;
&amp;lt;/DataTemplate&amp;gt;
			&lt;/pre&gt;

&lt;p&gt;28. (Optional: this might look worse to you) Now let's add a GroupItemsPanel below the GroupHeaderTemplate; this will arrange the group items in the &amp;quot;jump&amp;quot; view: &lt;/p&gt;

&lt;pre&gt;&amp;lt;toolkit:LongListSelector.GroupItemsPanel&amp;gt;
	&amp;lt;ItemsPanelTemplate&amp;gt;
		&amp;lt;toolkit:WrapPanel Orientation=&amp;quot;Horizontal&amp;quot;/&amp;gt;
	&amp;lt;/ItemsPanelTemplate&amp;gt;
&amp;lt;/toolkit:LongListSelector.GroupItemsPanel&amp;gt;
			&lt;/pre&gt;

&lt;p&gt;29. Build and run your code! The app should now look like this: 
  &lt;br /&gt;&lt;a href="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough9%5B1%5D.png"&gt;&lt;img title="LongListSelectorWalkthrough9[1]" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; padding-top: 0px; border-right-width: 0px" height="244" alt="LongListSelectorWalkthrough9[1]" src="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough9%5B1%5D_thumb.png" width="148" border="0" /&gt; &lt;/a&gt;&lt;/p&gt;

&lt;h4 id="update-at-runtime"&gt;Updating the LongListSelector at runtime&lt;/h4&gt;

&lt;p&gt;The LongListSelector works (and now looks) fine with the data we add in when the app starts. But if we try to add something while the app is running, the changes don't show up in the LongListSelector :(&lt;/p&gt;

&lt;p&gt;(If you don't care about this, &lt;a href="#item-tap-action"&gt;skip&lt;/a&gt; this section; it makes things more confusing)&lt;/p&gt;

&lt;p&gt;30. Let's tackle the groups first. In OnNavigatedTo(), change foodCategories to a &lt;tt&gt;System.Collections.ObjectModel.ObservableCollection&amp;lt;Model.FoodCategory&amp;gt;&lt;/tt&gt;. Now LongListSelector can &amp;quot;observe&amp;quot; the collection of food categories, so whenever we add a food category, the LongListSelector will update. &lt;/p&gt;

&lt;p&gt;31. Now let's tackle the items. Currently FoodCategory implements IEnumerable; let's make FoodCategory inherit from ObservableCollection so whever we add a food item, LongListSelector is automatically notified of the change. Replace this line: 
  &lt;br /&gt;&lt;tt&gt;public class FoodCategory : System.Collections.IEnumerable&lt;/tt&gt; 

  &lt;br /&gt;with this: 

  &lt;br /&gt;&lt;tt&gt;public class FoodCategory : System.Collections.ObjectModel.ObservableCollection&amp;lt;FoodItem&amp;gt;&lt;/tt&gt; 

  &lt;br /&gt;and remove the Items property of FoodCategory and the line in the constructor that sets Items. Keep AddFoodItem() intact. 

  &lt;br /&gt;FoodCategory.cs should now look like this: 

  &lt;br /&gt;&lt;a href="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough10%5B1%5D.png"&gt;&lt;img title="LongListSelectorWalkthrough10[1]" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; padding-top: 0px; border-right-width: 0px" height="148" alt="LongListSelectorWalkthrough10[1]" src="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough10%5B1%5D_thumb.png" width="244" border="0" /&gt; &lt;/a&gt;&lt;/p&gt;

&lt;p&gt;32. We're finished with the data binding part; let's add some data! In MainPage.xaml, place the LongListSelector inside a StackPanel. However, LongListSelector and StackPanel don't much like each other, so hardcode LongListSelector's Height as 535 (the more elegant solution is to create another Grid). Add a second StackPanel above the LongListSelector within the StackPanel we just added; set the Orientation property of this StackPanel to &amp;quot;Horizontal&amp;quot;. Add a TextBox named BurgerInput to the horizontal StackPanel with a Height of 270. Below the TextBox (still within the horizontal StackPanel) add a Button with the text &amp;quot;add burger&amp;quot;. 
  &lt;br /&gt;MainPage.xaml should look something like this: 

  &lt;br /&gt;&lt;a href="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough11%5B1%5D.png"&gt;&lt;img title="LongListSelectorWalkthrough11[1]" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; padding-top: 0px; border-right-width: 0px" height="148" alt="LongListSelectorWalkthrough11[1]" src="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough11%5B1%5D_thumb.png" width="244" border="0" /&gt; &lt;/a&gt;&lt;/p&gt;

&lt;p&gt;33. We need to make foodCategories visible to the button's click event handler, so let's pull foodCategories into MainPage as an instance variable like so: 
  &lt;br /&gt;&lt;a href="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough12%5B1%5D.png"&gt;&lt;img title="LongListSelectorWalkthrough12[1]" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; padding-top: 0px; border-right-width: 0px" height="148" alt="LongListSelectorWalkthrough12[1]" src="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough12%5B1%5D_thumb.png" width="244" border="0" /&gt; &lt;/a&gt;&lt;/p&gt;

&lt;p&gt;34. Now we're ready to make the button's event handler. Double-click on the button to generate it, then add these lines of code: &lt;/p&gt;

&lt;pre&gt;if (BurgerInput.Text != &amp;quot;&amp;quot;)
{
	foodCategories[0].Add(new Model.FoodItem(BurgerInput.Text));
	BurgerInput.Text = &amp;quot;&amp;quot;;
}
			&lt;/pre&gt;

&lt;p&gt;We're using ObservableCollection's Add() instead of the AddFoodItem() we made so that ObservableCollection can notify LongListSelector of the change. &lt;/p&gt;

&lt;p&gt;35. Build and run your code! When you put &amp;quot;Steakburger&amp;quot; in the TextBox and click on the button, the app should look like this: 
  &lt;br /&gt;&lt;a href="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough13%5B1%5D.png"&gt;&lt;img title="LongListSelectorWalkthrough13[1]" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; padding-top: 0px; border-right-width: 0px" height="244" alt="LongListSelectorWalkthrough13[1]" src="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough13%5B1%5D_thumb.png" width="148" border="0" /&gt; &lt;/a&gt;&lt;/p&gt;

&lt;h4 id="item-tap-action"&gt;Doing something when the user taps an item&lt;/h4&gt;

&lt;p&gt;We've got a handy LongListSelector now, but the user can't interact with it besides adding an item. Let's tweak our app so the LongListSelector reacts when the user taps an item.&lt;/p&gt;

&lt;p&gt;36. First off, add a Tap event to the LongListSelector. In the XAML, within the top LongListSelector XAML node next to its name, type in &lt;tt&gt;Tap=&amp;quot;&lt;/tt&gt;. Press tab and Visual Studio will automatically create the tap event handler. &lt;/p&gt;

&lt;p&gt;37. In the tap event handler, add these lines: &lt;/p&gt;

&lt;pre&gt;if (GroupedList.SelectedItem is Model.FoodItem)
{
	MessageBox.Show(&amp;quot;You tapped on the food item &amp;quot; + ((Model.FoodItem)GroupedList.SelectedItem).Name);
}
			&lt;/pre&gt;

&lt;p&gt;This triggers a popup whenever the user taps on an item (but not when the user taps on one of the group categories). &lt;/p&gt;

&lt;p&gt;38. Build and run your code! When you tap on an item, the app should look like this: 
  &lt;br /&gt;&lt;a href="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough14%5B1%5D.png"&gt;&lt;img title="LongListSelectorWalkthrough14[1]" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; padding-top: 0px; border-right-width: 0px" height="244" alt="LongListSelectorWalkthrough14[1]" src="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough14%5B1%5D_thumb.png" width="148" border="0" /&gt; &lt;/a&gt;&lt;/p&gt;

&lt;h4 id="touch-feedback"&gt;Touch feedback&lt;/h4&gt;

&lt;p&gt;If you fiddle around in the People hub (where they have a grouped list), you'll notice that items &amp;quot;move&amp;quot; when you press them, as if the item is physically reacting to your touch. It's the little things like this that make Windows Phone so appealing to its users. Let's mimic this in our LongListSelector.&lt;/p&gt;

&lt;p&gt;39. Find the TextBlock within the LongListSelector's ItemTemplate, and add a ManipulationStarted and a ManipulationCompleted event handler (like we did for the Tap event) to the TextBlock. ManipulationStarted is fired when the user starts pressing an object, and ManipulationCompleted is fired when the user stops pressing the object. 
  &lt;br /&gt;MainPage.xaml should look something like this now: 

  &lt;br /&gt;&lt;a href="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough15%5B1%5D.png"&gt;&lt;img title="LongListSelectorWalkthrough15[1]" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; padding-top: 0px; border-right-width: 0px" height="148" alt="LongListSelectorWalkthrough15[1]" src="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough15%5B1%5D_thumb.png" width="244" border="0" /&gt; &lt;/a&gt;&lt;/p&gt;

&lt;p&gt;40. Add this code to the ManipulationStarted event handler to shift the item down and to the right by 2 pixels when the user presses it: &lt;/p&gt;

&lt;pre&gt;((UIElement)sender).RenderTransform = new System.Windows.Media.TranslateTransform() { X = 2, Y = 2 };
			&lt;/pre&gt;

&lt;p&gt;41. Then add this code to the ManipulationCompleted event handler to shift the item back to its original spot when the user stops pressing it: &lt;/p&gt;

&lt;pre&gt;((UIElement)sender).RenderTransform = null;
			&lt;/pre&gt;

&lt;p&gt;42. Build and run your code! When you tap on an item, before you let go the app should look like this: 
  &lt;br /&gt;&lt;a href="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough16%5B1%5D.png"&gt;&lt;img title="LongListSelectorWalkthrough16[1]" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; padding-top: 0px; border-right-width: 0px" height="244" alt="LongListSelectorWalkthrough16[1]" src="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough16%5B1%5D_thumb.png" width="148" border="0" /&gt; &lt;/a&gt;

  &lt;br /&gt;(You can't really tell that I've tapped &amp;quot;Hamburger&amp;quot; from the screenshot; this one you have to see in action.) &lt;/p&gt;

&lt;h4 id="separate-model-view"&gt;Separating model and view&lt;/h4&gt;

&lt;p&gt;In our simple LongListSelector, both the view and the model code are in MainPage. Let's put a controller class in charge of the interaction between the view and the model.&lt;/p&gt;

&lt;p&gt;43. In the Solution Explorer (Ctrl-Alt-L), right-click on the project name, Add -&amp;gt; New Folder. Name the folder Controller. &lt;/p&gt;

&lt;p&gt;44. In the Solution Explorer, right-click on &amp;quot;Controller&amp;quot;, Add -&amp;gt; New Item..., select &amp;quot;Class&amp;quot; from the dialog (should be sixth from the top), write in &amp;quot;FoodController.cs&amp;quot; as the name, then click &amp;quot;Add&amp;quot;. &lt;/p&gt;

&lt;p&gt;45. Add the following code into FoodController. (For the curious, this is an implementation of the Singleton design pattern.) &lt;/p&gt;

&lt;pre&gt;private static FoodController foodController;

public static FoodController GetInstance()
{
	if (foodController == null)
	{
		foodController = new FoodController();
	}
	return foodController;
}
			&lt;/pre&gt;

&lt;p&gt;46. Then add a FoodCategories property to the FoodController by adding this line: &lt;/p&gt;

&lt;pre&gt;public System.Collections.ObjectModel.ObservableCollection&amp;lt;Model.FoodCategory&amp;gt;
		FoodCategories { get; private set; }
			&lt;/pre&gt;

&lt;p&gt;47. Add this method into FoodController so the user can still add burger items: &lt;/p&gt;

&lt;pre&gt;public void AddBurgerItem(string name)
{
	FoodCategories[0].Add(new Model.FoodItem(name));
}
			&lt;/pre&gt;

&lt;p&gt;48. Now for the main jump: create a constructor for FoodController, and move all of the data initialization (currently in MainPage's OnNavigatedTo()) into the constructor. 
  &lt;br /&gt;FoodController should now look something like this: 

  &lt;br /&gt;&lt;a href="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough17%5B1%5D.png"&gt;&lt;img title="LongListSelectorWalkthrough17[1]" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; padding-top: 0px; border-right-width: 0px" height="148" alt="LongListSelectorWalkthrough17[1]" src="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough17%5B1%5D_thumb.png" width="244" border="0" /&gt; &lt;/a&gt;

  &lt;br /&gt;&lt;a href="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough18%5B1%5D.png"&gt;&lt;img title="LongListSelectorWalkthrough18[1]" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; padding-top: 0px; border-right-width: 0px" height="148" alt="LongListSelectorWalkthrough18[1]" src="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough18%5B1%5D_thumb.png" width="244" border="0" /&gt; &lt;/a&gt;&lt;/p&gt;

&lt;p&gt;49. Replace the code in MainPage's button click event handler with this: 
  &lt;br /&gt;&lt;tt&gt;Controller.FoodController.GetInstance().AddBurgerItem(BurgerInput.Text);&lt;/tt&gt; 

  &lt;br /&gt;Then replace the code in MainPage's OnNavigatedTo() with this: &lt;/p&gt;

&lt;pre&gt;base.OnNavigatedTo(e);
if (this.DataContext == null)
{
	this.DataContext = Controller.FoodController.GetInstance();
}
			&lt;/pre&gt;

&lt;p&gt;And now you can (and should) remove MainPage's foodCategories variable. 
  &lt;br /&gt;After all that, MainPage.xaml.cs should look like this: 

  &lt;br /&gt;&lt;a href="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough19%5B1%5D.png"&gt;&lt;img title="LongListSelectorWalkthrough19[1]" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; padding-top: 0px; border-right-width: 0px" height="148" alt="LongListSelectorWalkthrough19[1]" src="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough19%5B1%5D_thumb.png" width="244" border="0" /&gt; &lt;/a&gt;

  &lt;br /&gt;Make *sure* your code compiles at this point! &lt;/p&gt;

&lt;p&gt;50. Now let's add the last link: in MainPage.xaml, find the LongListSelector tag, and add &lt;tt&gt;ItemsSource=&amp;quot;{Binding FoodCategories}&amp;quot;&lt;/tt&gt;. This tells the LongListSelector to find its items in the &lt;tt&gt;FoodCategories&lt;/tt&gt; property of its Binding - in this case, its Binding is inherited from the DataContext of MainPage, which we've set to be the FoodController instance. MainPage.xaml should look something like this: 

  &lt;br /&gt;&lt;a href="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough20%5B1%5D.png"&gt;&lt;img title="LongListSelectorWalkthrough20[1]" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; padding-top: 0px; border-right-width: 0px" height="148" alt="LongListSelectorWalkthrough20[1]" src="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough20%5B1%5D_thumb.png" width="244" border="0" /&gt; &lt;/a&gt;&lt;/p&gt;

&lt;p&gt;51. Build and run your code! If everything went as planned, the app's behavior should be the exact same as before. &lt;/p&gt;

&lt;h4 id="designer"&gt;Leveraging the designer&lt;/h4&gt;

&lt;p&gt;So far when we view MainPage.xaml in Visual Studio, the designer on the left side doesn't show anything for the LongListSelector. Let's try to make something useful show up so it's easier to fine-tune the looks.&lt;/p&gt;

&lt;p&gt;52. Create a new folder (like before) and name it SampleData. Add a new XML file named SampleFoodData.xml. Go to SampleFoodData's properties (right-click on SampleFoodData -&amp;gt; Properties) and set its &lt;tt&gt;Build Action&lt;/tt&gt; to &lt;tt&gt;Resource&lt;/tt&gt;. &lt;/p&gt;

&lt;p&gt;53. Add this code in SampleFoodData.xml; we're essentially making a FoodController in XML: &lt;/p&gt;

&lt;pre&gt;&amp;lt;controller:FoodController
    xmlns:controller=&amp;quot;clr-namespace:LongListSelectorDemo.Controller&amp;quot;&amp;gt;

&amp;lt;/controller:FoodController&amp;gt;
			&lt;/pre&gt;

&lt;p&gt;(If you didn't name the project &lt;tt&gt;LongListSelectorDemo&lt;/tt&gt;, replace it with the project name). &lt;/p&gt;

&lt;p&gt;54. In MainPage.xaml, add this line to the first XAML element: 
  &lt;br /&gt;&lt;tt&gt;d:DataContext=&amp;quot;{d:DesignData SampleData/SampleFoodData.xml}&amp;quot;&lt;/tt&gt; 

  &lt;br /&gt;This is the equivalent of &lt;tt&gt;this.DataContext = Controller.FoodController.GetInstance();&lt;/tt&gt; for the designer. &lt;/p&gt;

&lt;p&gt;55. Build your code! Without even running the app, the designer in Visual Studio should show your LongListSelector, like so: 
  &lt;br /&gt;&lt;a href="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough21%5B1%5D.png"&gt;&lt;img title="LongListSelectorWalkthrough21[1]" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; padding-top: 0px; border-right-width: 0px" height="148" alt="LongListSelectorWalkthrough21[1]" src="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough21%5B1%5D_thumb.png" width="244" border="0" /&gt; &lt;/a&gt;&lt;/p&gt;

&lt;h4 id="binding-unrelated-properties"&gt;Extra topic: Binding unrelated properties&lt;/h4&gt;

&lt;p&gt;Let's say we want to italicize all vegetarian items in our app. We'll store the &amp;quot;vegetarian-ness&amp;quot; of each item in a boolean, but how do we translate that into a font style? Use a converter!&lt;/p&gt;

&lt;p&gt;56. First off, let's add an IsVegetarian property on FoodItem, right below Name. Tweak the constructor to take in a Boolean paramater and use it to set the IsVegetarian property. Then go to FoodController's constructor and mark things as vegetarian, or not. Also tweak AddBurgerItem() to make added burger items non-vegetarian. FoodItem and FoodController should now look something like this: 
  &lt;br /&gt;&lt;a href="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough22%5B1%5D.png"&gt;&lt;img title="LongListSelectorWalkthrough22[1]" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; padding-top: 0px; border-right-width: 0px" height="148" alt="LongListSelectorWalkthrough22[1]" src="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough22%5B1%5D_thumb.png" width="244" border="0" /&gt; &lt;/a&gt;&lt;a href="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough23%5B1%5D.png"&gt;&lt;img title="LongListSelectorWalkthrough23[1]" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; padding-top: 0px; border-right-width: 0px" height="148" alt="LongListSelectorWalkthrough23[1]" src="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough23%5B1%5D_thumb.png" width="244" border="0" /&gt; &lt;/a&gt;&lt;/p&gt;

&lt;p&gt;57. Let's make a converter. Add a folder named Converter to the project, and add a class called VegetarianFormattingConverter to that folder. &lt;/p&gt;

&lt;p&gt;58. Make VegetarianFormattingConverter implement System.Windows.Data.IValueConverter, and add these two methods to complete the implementation: &lt;/p&gt;

&lt;pre&gt;public object Convert(object value, Type targetType, 
		object parameter, System.Globalization.CultureInfo culture)
{
	return null;
}

public object ConvertBack(object value, Type targetType, 
		object parameter, System.Globalization.CultureInfo culture)
{
	return null;
}
			&lt;/pre&gt;

&lt;p&gt;59. Replace the code in Convert() with this code: &lt;/p&gt;

&lt;pre&gt;bool vegetarian = (bool)value;
if (vegetarian) return FontStyles.Italic;
else            return FontStyles.Normal;
			&lt;/pre&gt;

&lt;p&gt;This code simply says we want vegetarian things italicized and everything else normal. The converter should look like this: 
  &lt;br /&gt;&lt;a href="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough24%5B1%5D.png"&gt;&lt;img title="LongListSelectorWalkthrough24[1]" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; padding-top: 0px; border-right-width: 0px" height="148" alt="LongListSelectorWalkthrough24[1]" src="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough24%5B1%5D_thumb.png" width="244" border="0" /&gt; &lt;/a&gt;&lt;/p&gt;

&lt;p&gt;60. Now that we have a converter class, we need to put a converter somewhere accessible by the MainPage's XAML. Let's add an instance of the converter to MainPage's resource dictionary. First add this line underneath the toolkit declaration line we added in MainPage.xaml: &lt;/p&gt;

&lt;pre&gt;xmlns:converter=&amp;quot;clr-namespace:LongListSelectorDemo.Converter&amp;quot;
			&lt;/pre&gt;

&lt;p&gt;Then add these lines in MainPage.xaml above the LayoutRoot code to put the converter in the page's resources so we can later access the converter using the &lt;tt&gt;StaticResource&lt;/tt&gt; syntax: &lt;/p&gt;

&lt;pre&gt;&amp;lt;phone:PhoneApplicationPage.Resources&amp;gt;
	&amp;lt;converter:VegetarianFormattingConverter x:Key=&amp;quot;VegetarianConverter&amp;quot; /&amp;gt;
&amp;lt;/phone:PhoneApplicationPage.Resources&amp;gt;
			&lt;/pre&gt;

&lt;p&gt;61. Let's use our converter! In MainPage.xaml, find the TextBlock corresponding to each item (it'll be in the ItemTemplate). Add this line to the TextBlock XAML element: &lt;/p&gt;

&lt;pre&gt;FontStyle=&amp;quot;{Binding IsVegetarian, Converter={StaticResource VegetarianConverter}}&amp;quot;
			&lt;/pre&gt;

&lt;p&gt;MainPage.xaml should look something like this: 
  &lt;br /&gt;&lt;a href="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough25%5B1%5D.png"&gt;&lt;img title="LongListSelectorWalkthrough25[1]" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; padding-top: 0px; border-right-width: 0px" height="148" alt="LongListSelectorWalkthrough25[1]" src="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough25%5B1%5D_thumb.png" width="244" border="0" /&gt; &lt;/a&gt;&lt;/p&gt;

&lt;p&gt;62. Build and run your code! If everything worked, the app should look like this: 
  &lt;br /&gt;&lt;a href="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough26%5B1%5D.png"&gt;&lt;img title="LongListSelectorWalkthrough26[1]" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; padding-top: 0px; border-right-width: 0px" height="244" alt="LongListSelectorWalkthrough26[1]" src="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough26%5B1%5D_thumb.png" width="148" border="0" /&gt; &lt;/a&gt;

  &lt;br /&gt;(You may have noticed the designer already showed the changes before running the app.) &lt;/p&gt;

&lt;h4 id="tombstone-recovery"&gt;Advanced topic: Recovering from a tombstone&lt;/h4&gt;

&lt;p&gt;What in the world is tombstoning? On Windows Phone, there are 3 states an app can be in: running, dormant, and tombstoned (&lt;a href="http://msdn.microsoft.com/en-us/library/ff817008.aspx"&gt;link&lt;/a&gt;). Running is what you'd expect; the app is actually doing something. Dormant is when the user goes off and does something else; the 5 most recently used apps stay in main memory (hold down the back button to see them; this is called Fast App Switching). But if the phone is running low on memory, the operating system starts tombstoning dormant apps; this is similar to swapping out a process to hard disk on computer operating systems. When an app is tombstoned, it loses just about all of the data in its variables. 

  &lt;br /&gt;The user can still access a tombstoned app by tapping the back button until they've entered the app again. The user expects the app to look the same as when they left it. 

  &lt;br /&gt;From a developer's standpoint, the trick is to make the app appear as if nothing changed, when nearly everything was demolished and rebuilt.&lt;/p&gt;

&lt;p&gt;63. Let's test the app to see if it already tombstones correctly. Go to Project -&amp;gt; LongListSelectorDemo Properties... -&amp;gt; Debug (one of the tabs on the left). Check &amp;quot;Tombstone upon deactivation while debugging.&amp;quot; &lt;/p&gt;

&lt;p&gt;64. Press F5 to start debugging the app. Once the app has loaded, add a Steakburger, and enter &amp;quot;Flamethrower&amp;quot; in the TextBox (but don't press the button!). Then press the phone's start button, and after a few seconds (5 is enough), press the back button. &amp;quot;Resuming...&amp;quot; should flash on the screen before the app reappears (if you don't see the resuming text make sure the tombstone box has been checked in the Debug properties). &lt;/p&gt;

&lt;p&gt;The app shows up and the list is populated, but our steakburger has disappeared, and the text in the TextBox is gone :( Let's fix this. 
  &lt;br /&gt;Tombstoning is usually fairly straightforward, but we'll have to go through some contortions to get our food categories to save and restore correctly. 

  &lt;br /&gt;Let's tackle the easy one first to get our feet wet: the text in the TextBox. There are two main spots to save and restore state. At the page level, save state in OnNavigatedFrom() and restore state in OnNavigatedTo(). At the app level, save state in Application_Deactivated() and restore state in Application_Activated(). The TextBox's text is only relevant at the page level, so let's tweak OnNavigatedFrom() and OnNavigatedTo().&lt;/p&gt;

&lt;p&gt;65. Add the OnNavigatedFrom method to MainPage.xaml.cs: &lt;/p&gt;

&lt;pre&gt;protected override void OnNavigatedFrom(System.Windows.Navigation.NavigationEventArgs e)
{
	// if the user is navigating backwards, there's no way to return to this page instance
	if (e.NavigationMode != System.Windows.Navigation.NavigationMode.Back)
	{
		State[&amp;quot;CustomBurgerText&amp;quot;] = BurgerInput.Text;
	}
}
			&lt;/pre&gt;

&lt;p&gt;This saves the text in the page's State dictionary, which is automatically saved and restored by the operating system, even if a tombstone occurs. &lt;/p&gt;

&lt;p&gt;66. And now let's add the corresponding restore. Add this code to the end of MainPage's OnNavigatedTo method: &lt;/p&gt;

&lt;pre&gt;if (State.ContainsKey(&amp;quot;CustomBurgerText&amp;quot;))
{
	BurgerInput.Text = (string)State[&amp;quot;CustomBurgerText&amp;quot;];
}
			&lt;/pre&gt;

&lt;p&gt;Now if you run the app, input text, then tombstone (like before), the text looks untouched! &lt;/p&gt;

&lt;p&gt;67. On to the tougher stuff! We'll need to save and restore food data, but the program doesn't know how to save a FoodItem instance. Change the Name and IsVegetarian properties of FoodItem to be publicly settable so the program can restore them automatically (do this by changing &lt;tt&gt;private set;&lt;/tt&gt; to just &lt;tt&gt;set;&lt;/tt&gt;). &lt;/p&gt;

&lt;p&gt;68. Then add a reference to &amp;quot;System.Runtime.Serialization&amp;quot;. (Similar to how we added a reference to the Toolkit, except you should find the dll in the .NET tab instead of browsing for it.) Now we can add &lt;tt&gt;[System.Runtime.Serialization.DataContract]&lt;/tt&gt; just above &lt;tt&gt;public class FoodItem&lt;/tt&gt;. Similarly add &lt;tt&gt;[System.Runtime.Serialization.DataMember]&lt;/tt&gt; just above both the Name property and the IsVegetarian property. These markers tell the app that we want FoodItem to be serializable (&amp;quot;save-able&amp;quot;), and specifically we want Name and IsVegetarian to be serialized (&amp;quot;saved&amp;quot;). 

  &lt;br /&gt;FoodItem.cs should now look like this: 

  &lt;br /&gt;&lt;a href="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough27%5B1%5D.png"&gt;&lt;img title="LongListSelectorWalkthrough27[1]" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; padding-top: 0px; border-right-width: 0px" height="148" alt="LongListSelectorWalkthrough27[1]" src="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough27%5B1%5D_thumb.png" width="244" border="0" /&gt; &lt;/a&gt;

  &lt;br /&gt;Now the app knows how to save a FoodItem! &lt;/p&gt;

&lt;p&gt;69. On to FoodCategory! As-is, FoodCategory looks like a collection, so if we try to save and restore it, we only get the list part of the FoodCategory back (the Name will disappear). So we need to make a separate class that contains the collection and the Name instead of itself looking like a collection. 
  &lt;br /&gt;In FoodCategory.cs, add the following code to make an inner class: &lt;/p&gt;

&lt;pre&gt;public class FoodCategory_SerializationWrapper
{
	public string Name { get; set; }
	public System.Collections.Generic.IList&amp;lt;FoodItem&amp;gt; FoodItems { get; set; }
}
			&lt;/pre&gt;

&lt;p&gt;70. Now we need a way to get a FoodCategory into its wrapper form. Add this method to FoodCategory to generate a wrapper: &lt;/p&gt;

&lt;pre&gt;public FoodCategory_SerializationWrapper ToWrapper()
{
	return new FoodCategory_SerializationWrapper() { Name = this.Name, FoodItems = this.Items };
}
			&lt;/pre&gt;

&lt;p&gt;71. We also need to generate a FoodCategory from the wrapper object, so add this method to the wrapper class: &lt;/p&gt;

&lt;pre&gt;public FoodCategory Unwrap()
{
	FoodCategory foodCategory = new FoodCategory(this.Name);
	foreach (FoodItem foodItem in this.FoodItems)
	{
		foodCategory.AddFoodItem(foodItem);
	}
	return foodCategory;
}
			&lt;/pre&gt;

&lt;p&gt;After all that, FoodCategory.cs should look like this: 
  &lt;br /&gt;&lt;a href="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough28%5B1%5D.png"&gt;&lt;img title="LongListSelectorWalkthrough28[1]" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; padding-top: 0px; border-right-width: 0px" height="148" alt="LongListSelectorWalkthrough28[1]" src="http://www.windowsphonegeek.com/upload/articles/LongListSelectorWalkthrough28%5B1%5D_thumb.png" width="244" border="0" /&gt; &lt;/a&gt;&lt;/p&gt;

&lt;p&gt;72. When we restore the food data, we'll have a collection of FoodCategorys and nowhere to put it. Let's add this method on FoodController so we can generate a FoodController with the given collection: &lt;/p&gt;

&lt;pre&gt;public static void CreateInstance(
		System.Collections.ObjectModel.ObservableCollection&amp;lt;Model.FoodCategory&amp;gt; foodCategories)
{
	if (foodController == null)
	{
		foodController = new FoodController() { FoodCategories = foodCategories };
	}
}
			&lt;/pre&gt;

&lt;p&gt;(For those who noticed this is inefficient, feel free to optimize it :) ) &lt;/p&gt;

&lt;p&gt;73. Let's start bringing all the pieces together. Open App.xaml.cs and add this code in Application_Deactivated: &lt;/p&gt;

&lt;pre&gt;List&amp;lt;Model.FoodCategory.FoodCategory_SerializationWrapper&amp;gt; foodCategoriesToBeSaved =
	   new List&amp;lt;Model.FoodCategory.FoodCategory_SerializationWrapper&amp;gt;();
foreach (Model.FoodCategory foodCategory in Controller.FoodController.GetInstance().FoodCategories)
{
	foodCategoriesToBeSaved.Add(foodCategory.ToWrapper());
}
PhoneApplicationService.Current.State[&amp;quot;FoodCategories&amp;quot;] = foodCategoriesToBeSaved;
			&lt;/pre&gt;

&lt;p&gt;This wraps each food category and saves it to the app-wide State dictionary. Like each page's State dictionary, the app-wide State dictionary is automatically saved and restored by the operating system. &lt;/p&gt;

&lt;p&gt;74. And for the final step, add this code in Application_Activated: &lt;/p&gt;

&lt;pre&gt;System.Collections.Generic.IDictionary&amp;lt;string, object&amp;gt; State = PhoneApplicationService.Current.State;
List&amp;lt;Model.FoodCategory.FoodCategory_SerializationWrapper&amp;gt; foodCategoriesSaved =
		(List&amp;lt;Model.FoodCategory.FoodCategory_SerializationWrapper&amp;gt;)State[&amp;quot;FoodCategories&amp;quot;];

System.Collections.ObjectModel.ObservableCollection&amp;lt;Model.FoodCategory&amp;gt; foodCategories =
		new System.Collections.ObjectModel.ObservableCollection&amp;lt;Model.FoodCategory&amp;gt;();
foreach (Model.FoodCategory.FoodCategory_SerializationWrapper wrapper in foodCategoriesSaved)
{
	foodCategories.Add(wrapper.Unwrap());
}

Controller.FoodController.CreateInstance(foodCategories);
			&lt;/pre&gt;

&lt;p&gt;This code retrieves the saved food data, unwraps each category, and then creates a FoodController with the restored (and unwrapped) data. &lt;/p&gt;

&lt;p&gt;75. Build and test your code! (Make sure the tombstoning box is checked in the project properties!) If everything went as planned, any custom burgers you add should still be there after a tombstone :) &lt;/p&gt;

&lt;p&gt;This is just one method of many to recover from a tombstone in an app that contains a grouped LongListSelector. As always, weigh the pros and cons of various approaches before choosing one. For example, if your LongListSelector contains a lot of data, you want to consider maintaining a SQL database and immediately updating the database when the user adds data instead of writing out all of the data to disk during the app lifecycle methods.&lt;/p&gt;

&lt;p&gt;Congrats, now you know a whole ton about LongListSelectors, from data binding to touch feedback to tombstone handling! Hopefully you learned a lot; send any feedback (positive or negative) to JustAnotherAppDeveloper&amp;lt;at&amp;gt;live&amp;lt;dot&amp;gt;com. Happy coding!&lt;/p&gt;

&lt;p&gt;P.S. The source code is&lt;/p&gt;

&lt;div class="wlWriterEditableSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:897f1f3b-84a4-4a3b-a211-6f489bc10aa5" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;p&gt; &lt;a href="http://www.windowsphonegeek.com/upload/articles/LongListSelectorDemo_1.zip" target="_blank"&gt;here&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;

&lt;p&gt;(zip file).&lt;/p&gt;

&lt;p&gt;The source assumes you have the Windows Phone 7.1 SDK and the Oct/Nov Silverlight toolkit.&lt;/p&gt;</description>
      <pubDate>2012-03-20T12:21:58.0000000+02:00</pubDate>
    </item>
    <item>
      <title>Windows Phone Local Database Schema Upgrade Part1 - Adding new columns</title>
      <link>http://www.windowsphonegeek.com/articles/Windows-Phone-Local-Database-Schema-Upgrade-Part1---Adding-new-columns</link>
      <description>&lt;p&gt;by WindowsPhoneGeek&lt;/p&gt;  &lt;p&gt;In this article I am going to talk about how to update your database schema when updating your app. The problem is that if you change the database schema(for.ex: add new columns or tables) in a future version of your app, then when users that use the old version of your app update to the new one an exception occurs. So in practice if there is no additional code to change the database so that it is compatible with the latest version of the app the following exception occurs:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.windowsphonegeek.com/upload/articles/image_4_1_2_3_4_5_6_7_8_9_10_11_12_13_14_15_16_17_18_19_20_21_22_23_24.png"&gt;&lt;img title="image" style="border-right: 0px; padding-right: 0px; border-top: 0px; display: inline; padding-left: 0px; background-image: none; margin: 10px 0px; border-left: 0px; padding-top: 0px; border-bottom: 0px" height="138" alt="image" src="http://www.windowsphonegeek.com/upload/articles/image_thumb_1_1_2_3_4_5_6_7_8_9_10_11_12_13_14_15_16_17_18_19_20_21_22_23_24.png" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;So in this series of posts I will explain how to prevent this exception from happening.&lt;/p&gt;    &lt;p&gt;To begin with lets first create a new Windows Phone application project, next follow the steps.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Step1.&lt;/strong&gt; Add a new class &lt;em&gt;Person &lt;/em&gt;to the project with the following properties:&lt;/p&gt;  &lt;pre class="brush: csharp;"&gt;[Table(Name = &amp;quot;People&amp;quot;)]
public class Person
{
    [Column(IsPrimaryKey = true, IsDbGenerated = true)]
    public int ID
    {
        get;
        set;
    }

    [Column(CanBeNull = false)]
    public string FirstName
    {
        get;
        set;
    }

    [Column(CanBeNull = true)]
    public string LastName
    {
        get;
        set;
    }

    [Column(CanBeNull = false)]
    public int Age
    {
        get;
        set;
    }
    public override string ToString()
    {
        return string.Format(&amp;quot;{0} {1}, Age: {2}&amp;quot;,
            this.FirstName, this.LastName, this.Age);
    }
}&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Step2.&lt;/strong&gt; Next add a new class &lt;em&gt;PeopleDataContext &lt;/em&gt;to the project which will be our data context:&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;public class PeopleDataContext : DataContext
{
    public PeopleDataContext(string connectionString)
        : base(connectionString)
    {
    }

    public Table&amp;lt;Person&amp;gt; People
    {
        get
        {
            return this.GetTable&amp;lt;Person&amp;gt;();
        }
    }
}&lt;/pre&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step3.&lt;/strong&gt; Next we will add a new button that will be used to initialize the database:&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;private void btnInitialize_Click(object sender, RoutedEventArgs e)
{
    using (PeopleDataContext context = new PeopleDataContext(ConnectionString))
    {
        if (!context.DatabaseExists())
        {
            // create database if it does not exist
            context.CreateDatabase();
            this.WritePeople(context);
        }
    }
}&lt;/pre&gt;

&lt;p&gt;Where &lt;em&gt;WritePeople&lt;/em&gt; is the following method:&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;public void WritePeople(PeopleDataContext context)
{
    for (int i = 0; i &amp;lt; 10; i++)
    {
        Person person = new Person()
        {
            FirstName = string.Format(&amp;quot;FirstName#{0}&amp;quot;, i),
            LastName = string.Format(&amp;quot;LastName#{0}&amp;quot;, i),
            Age = i
        };
        context.People.InsertOnSubmit(person);
    }
    context.SubmitChanges();
}&lt;/pre&gt;

&lt;pre class="brush: csharp;"&gt;public void WritePeople()
{
    using (PeopleDataContext context = new PeopleDataContext(ConnectionString))
    {
        this.WritePeople(context);
    }
}&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Step4.&lt;/strong&gt; We will add one more button that we will use to read the data from the database(this is only for&amp;#160; testing purposes to prove that the database is functioning properly):&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;private void btnReadPeople_Click(object sender, RoutedEventArgs e)
{
    this.lbPeople.ItemsSource = this.ReadPeople();
}

public IEnumerable&amp;lt;Person&amp;gt; ReadPeople()
{
    IEnumerable&amp;lt;Person&amp;gt; people = null;
    using (PeopleDataContext context = new PeopleDataContext(ConnectionString))
    {
        people = context.People.ToList();
    }

    return people;
}&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;NOTE: &lt;/strong&gt;All that the above code does is read the Person records from the database and show them in a ListBox.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step5.&lt;/strong&gt; If we run the application now and press the &lt;em&gt;initialize button &lt;/em&gt;and after that the &lt;em&gt;read people button&lt;/em&gt; we should see the following screen.I.e. this is the first version of our database:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.windowsphonegeek.com/upload/articles/image_6_1_2_3_4_5_6_7_8_9_10_11_12_13_14_15_16_17.png"&gt;&lt;img title="image" style="border-right: 0px; padding-right: 0px; border-top: 0px; display: inline; padding-left: 0px; background-image: none; margin: 0px; border-left: 0px; padding-top: 0px; border-bottom: 0px" height="244" alt="image" src="http://www.windowsphonegeek.com/upload/articles/image_thumb_2_1_2_3_4_5_6_7_8_9_10_11_12_13_14_15_16_17_18_19_20.png" width="133" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step6.&lt;/strong&gt; For the next version of our app we will update the &lt;em&gt;Person&lt;/em&gt; class with two additional properties:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: It is important to notice that in the snippet below&amp;#160; the &lt;strong&gt;Address&lt;/strong&gt; and the &lt;strong&gt;Email&lt;/strong&gt; properties are added in the second version of the schema.&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;[Table(Name = &amp;quot;People&amp;quot;)]
public class Person
{
   //...

#if DB_VERSION_1
    [Column(CanBeNull = true)]
    public string Address
    {
        get;
        set;
    }

    [Column(CanBeNull = true)]
    public string Email
    {
        get;
        set;
    }
#endif

    public override string ToString()
    {
#if DB_VERSION_1
        return string.Format(&amp;quot;{0} {1}, Age: {2}, Email: {3}&amp;quot;,
            this.FirstName, this.LastName, this.Age, this.Email);
#else
        return string.Format(&amp;quot;{0} {1}, Age: {2}&amp;quot;,
            this.FirstName, this.LastName, this.Age);
#endif
    }
}&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; We will use the &lt;em&gt;DB_VERSION_1&lt;/em&gt; conditional compilation symbol in order to turn on code related to the second version of the database schema.&amp;#160; &lt;/p&gt;

&lt;p&gt;To turn the sections of the code marked with the &lt;em&gt;DB_VERSION_1&lt;/em&gt; symbol just add it to the conditional compilation symbols in the project`s Build properties:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.windowsphonegeek.com/upload/articles/image_8_1_2_3_4_5_6_7_8_9_10_11_12_13.png"&gt;&lt;img title="image" style="border-right: 0px; padding-right: 0px; border-top: 0px; display: inline; padding-left: 0px; background-image: none; margin: 10px 0px; border-left: 0px; padding-top: 0px; border-bottom: 0px" height="204" alt="image" src="http://www.windowsphonegeek.com/upload/articles/image_thumb_3_1_2_3_4_5_6_7_8_9_10_11_12_13_14_15.png" width="582" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step7.&lt;/strong&gt; If we were to run the application now without writing any additional code we will get the following exception:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.windowsphonegeek.com/upload/articles/image_11_1_2.png"&gt;&lt;img title="image" style="border-right: 0px; padding-right: 0px; border-top: 0px; display: inline; padding-left: 0px; background-image: none; margin: 0px; border-left: 0px; padding-top: 0px; border-bottom: 0px" height="138" alt="image" src="http://www.windowsphonegeek.com/upload/articles/image_thumb_4_1_2_3_4_5_6_7_8_9_10.png" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To prevent this from happening we will add some code to update the database schema to include the &lt;em&gt;Address&lt;/em&gt; and &lt;em&gt;Email&lt;/em&gt; columns. Here is how our initialize database method should look like now:&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;private void btnInitialize_Click(object sender, RoutedEventArgs e)
{
    using (PeopleDataContext context = new PeopleDataContext(ConnectionString))
    {
        if (!context.DatabaseExists())
        {
            // create database if it does not exist
            context.CreateDatabase();
            this.WritePeople(context);
        }
        else
        {
            // create an instance of DatabaseSchemaUpdater
            DatabaseSchemaUpdater schemaUpdater = context.CreateDatabaseSchemaUpdater();
            // get current database schema version
            // if not changed the version is 0 by default
            int version = schemaUpdater.DatabaseSchemaVersion;

            // if current version of database schema is old
            if (version == 0)
            {
                // add Address column to the table corresponding to the Person class
                schemaUpdater.AddColumn&amp;lt;Person&amp;gt;(&amp;quot;Address&amp;quot;);
                // add Email column to the table corresponding to the Person class
                schemaUpdater.AddColumn&amp;lt;Person&amp;gt;(&amp;quot;Email&amp;quot;);
                // IMPORTANT: update database schema version before calling Execute
                schemaUpdater.DatabaseSchemaVersion = 1;
                // execute changes to database schema
                schemaUpdater.Execute();
            }
        }
    }
}&lt;/pre&gt;

&lt;p&gt;What will happen when the application is ran is the following:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;for an updated application, since the database probably already exists the code in the &lt;em&gt;else&lt;/em&gt; branch will execute. Here we create a new instance of the &lt;em&gt;DatabaseSchemaUpdater&lt;/em&gt; class. Then we retrieve the current version of the database schema and if it is the older version we update the schema with the new columns, increase the schema version and execute the schema changes.&lt;/li&gt;

  &lt;li&gt;for a newly installed application a new database will be created&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Step8.&lt;/strong&gt; To verify that the schema upgrade code works properly we will add a new button and will use the new properties added with the second version of the database schema:&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;private void btnUpdatePeople_Click(object sender, RoutedEventArgs e)
{
#if DB_VERSION_1
    using (PeopleDataContext context = new PeopleDataContext(ConnectionString))
    {
        // for version 1 - update people records with email address
        List&amp;lt;Person&amp;gt; people = context.People.ToList();
        int count = people.Count;
        for (int i = 0; i &amp;lt; count; i++)
        {
            Person person = people[i];
            person.Email = string.Format(&amp;quot;person{0}@domain.com&amp;quot;, i);
        }
        context.SubmitChanges();
    }
#endif
}&lt;/pre&gt;

&lt;p&gt;Step9.Finally if we run the application and press the Initialize, Update and Read buttons we should see the following screen:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.windowsphonegeek.com/upload/articles/image_13_1_2_3.png"&gt;&lt;img title="image" style="border-right: 0px; padding-right: 0px; border-top: 0px; display: inline; padding-left: 0px; background-image: none; margin: 0px; border-left: 0px; padding-top: 0px; border-bottom: 0px" height="244" alt="image" src="http://www.windowsphonegeek.com/upload/articles/image_thumb_5_1_2_3_4_5_6_7_8_9.png" width="134" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That`s it for now. In the next article we will discuss more complex changes to the database schema. Stay tuned.&lt;/p&gt;

&lt;p&gt;You may also find helpful the following articles:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href="http://windowsphonegeek.com/tips/Windows-Phone-Mango-Local-Database%28SQL-CE%29-Introduction"&gt;Windows Phone Mango Local Database(SQL CE)&lt;/a&gt;&lt;/li&gt;

  &lt;li&gt;&lt;a href="http://windowsphonegeek.com/articles/Windows-Phone-Mango-Local-Database-mapping-and-database-operations"&gt;Windows Phone Mango Local Database: mapping and database operations&lt;/a&gt;&lt;/li&gt;

  &lt;li&gt;&lt;a href="http://windowsphonegeek.com/articles/Using-SqlMetal-to-generate-Windows-Phone-Mango-Local-Database-classes"&gt;Using SqlMetal to generate Windows Phone Mango Local Database classes&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here is the full source code:&lt;/p&gt;

&lt;div class="wlWriterEditableSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:58d45aef-fe9e-4990-bdf1-379620d7f1d3" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;p&gt; &lt;a href="http://www.windowsphonegeek.com/upload/articles/WPLocalDatabaseUpgrade-part1.zip" target="_blank"&gt;WPLocalDBUpdateP1.zip&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;

&lt;p&gt;Hole the post was helpful.&lt;/p&gt;</description>
      <pubDate>2012-02-20T13:50:01.0000000+02:00</pubDate>
    </item>
    <item>
      <title>Programmatically changing Visual States of HubTile controls used as ListBox Items</title>
      <link>http://www.windowsphonegeek.com/articles/Programmatically-changing-Visual-States-of-HubTile-controls-used-as-ListBox-Items</link>
      <description>&lt;p&gt;by WindowsPhoneGeek&lt;/p&gt;  &lt;p&gt;In this post I am going to talk about how to programmatically change the visual states of a HubTile control inside a ListBox(or any ItemsControl).&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.windowsphonegeek.com/upload/articles/image_12_1_2_3_4_5.png"&gt;&lt;img title="image" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; padding-top: 0px; border-right-width: 0px" height="129" alt="image" src="http://www.windowsphonegeek.com/upload/articles/image_thumb_4_1_2_3_4_5_6_7_8_9.png" width="137" border="0" /&gt;&lt;/a&gt;&lt;a href="http://www.windowsphonegeek.com/upload/articles/image_13_1_2.png"&gt;&lt;img title="image" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; padding-top: 0px; border-right-width: 0px" height="136" alt="image" src="http://www.windowsphonegeek.com/upload/articles/image_thumb_5_1_2_3_4_5_6_7_8.png" width="136" border="0" /&gt;&lt;/a&gt;&lt;a href="http://www.windowsphonegeek.com/upload/articles/image_14_1_2_3_4_5_6_7.png"&gt;&lt;img title="image" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; padding-top: 0px; border-right-width: 0px" height="133" alt="image" src="http://www.windowsphonegeek.com/upload/articles/image_thumb_6_1_2_3_4_5_6_7_8_9.png" width="132" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;NOTE&lt;/em&gt;: For more information about the HubTile control take a look at:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://windowsphonegeek.com/WPToolkitBook2nd"&gt;&amp;quot;Windows Phone Toolkit In Depth 2nd edition&amp;quot; FREE e-book&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.windowsphonegeek.com/articles/Windows-Phone-HubTile-in-depth-Part1-key-concepts-and-API"&gt;Windows Phone HubTile in depth| Part1: key concepts and API&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;We will use as a base a previous article that looks at the simpler case of changing the visual state of a single HubTile control: &lt;a title="http://www.windowsphonegeek.com/articles/How-to-Programmatically-switch-the-HubTile-Visual-States" href="http://www.windowsphonegeek.com/articles/How-to-Programmatically-switch-the-HubTile-Visual-States"&gt;http://www.windowsphonegeek.com/articles/How-to-Programmatically-switch-the-HubTile-Visual-States&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;So let`s create a new Windows Phone application project and add a reference to &lt;em&gt;Microsoft.Phone.Controls.Toolkit.dll.&lt;/em&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Step1.&lt;/strong&gt; First we will add a ListBox control and will place a HubTile control inside its ItemTemplate. Next we will add 4 buttons that will be used to change the Visual State of the HubTile control to: Expanded, Semiexpanded, Flipped and Collapsed correspondingly.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: "&lt;em&gt;toolkit&lt;/em&gt;" namespace is defined in the page class in this way:&lt;/p&gt;  &lt;pre class="brush: xml;"&gt;&amp;lt;phone:PhoneApplicationPage
x:Class=&amp;quot;HubTileDemo.MainPage&amp;quot;
...
xmlns:toolkit=&amp;quot;clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit&amp;quot;&amp;gt;&lt;/pre&gt;

&lt;pre class="brush: xml;"&gt;&amp;lt;Grid x:Name=&amp;quot;LayoutRoot&amp;quot; Background=&amp;quot;Transparent&amp;quot;&amp;gt;
    &amp;lt;Grid.RowDefinitions&amp;gt;
        &amp;lt;RowDefinition Height=&amp;quot;*&amp;quot;/&amp;gt;
        &amp;lt;RowDefinition Height=&amp;quot;auto&amp;quot;/&amp;gt;
    &amp;lt;/Grid.RowDefinitions&amp;gt;

    &amp;lt;!--ContentPanel - place additional content here--&amp;gt;
    &amp;lt;ListBox Grid.Row=&amp;quot;0&amp;quot; x:Name=&amp;quot;listBox&amp;quot;&amp;gt;
        &amp;lt;ListBox.ItemTemplate&amp;gt;
            &amp;lt;DataTemplate&amp;gt;
                &amp;lt;toolkit:HubTile GroupTag=&amp;quot;ListTiles&amp;quot; Background=&amp;quot;Green&amp;quot; Source=&amp;quot;wpglogo.png&amp;quot; Title=&amp;quot;Hold Here&amp;quot; Message=&amp;quot;This is HubTile message!&amp;quot; Margin=&amp;quot;10&amp;quot;/&amp;gt;
            &amp;lt;/DataTemplate&amp;gt;
        &amp;lt;/ListBox.ItemTemplate&amp;gt;
    &amp;lt;/ListBox&amp;gt;
    &amp;lt;StackPanel x:Name=&amp;quot;ContentPanel&amp;quot; Grid.Row=&amp;quot;1&amp;quot; Margin=&amp;quot;12,0,12,0&amp;quot; Orientation=&amp;quot;Vertical&amp;quot;&amp;gt;
            &amp;lt;Button x:Name=&amp;quot;btnGoToExpanded&amp;quot; Content=&amp;quot; Go To Expanded State&amp;quot; Click=&amp;quot;btnGoToExpanded_Click&amp;quot; /&amp;gt;
            &amp;lt;Button x:Name=&amp;quot;btnGoToSemiexpanded&amp;quot; Content=&amp;quot;Go To Semiexpanded State&amp;quot; Click=&amp;quot;btnGoToSemiexpanded_Click&amp;quot; /&amp;gt;
            &amp;lt;Button x:Name=&amp;quot;btnGoToFlipped&amp;quot; Content=&amp;quot;Go To Flipped State&amp;quot; Click=&amp;quot;btnGoToFlipped_Click&amp;quot; /&amp;gt;
            &amp;lt;Button x:Name=&amp;quot;btnGoToCollapsed&amp;quot; Content=&amp;quot;Go To Collapsed State&amp;quot; Click=&amp;quot;btnGoToCollapsed_Click&amp;quot; /&amp;gt;
    &amp;lt;/StackPanel&amp;gt;
&amp;lt;/Grid&amp;gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Step2.&lt;/strong&gt; Next we will set a dummy data source to the ListBox control in order to show some hub tiles:&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;public MainPage()
{
    InitializeComponent();

    // use a dummy data source, just to get some tiles displayed in the list box
    this.dataSource = new List&amp;lt;string&amp;gt;() { &amp;quot;item1&amp;quot;, &amp;quot;item2&amp;quot;, &amp;quot;item3&amp;quot; };
    this.listBox.ItemsSource = this.dataSource;
}&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Step3.&lt;/strong&gt; From a &lt;a href="http://www.windowsphonegeek.com/tips/how-to-access-a-control-placed-inside-listbox-itemtemplate-in-wp7"&gt;previous&lt;/a&gt; article we will use a method to find a visual child of a given type:&lt;/p&gt;

&lt;p&gt;NOTE: For reference take a look at: &lt;a href="http://www.windowsphonegeek.com/tips/how-to-access-a-control-placed-inside-listbox-itemtemplate-in-wp7"&gt;http://www.windowsphonegeek.com/tips/how-to-access-a-control-placed-inside-listbox-itemtemplate-in-wp7&lt;/a&gt;&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;private T FindFirstElementInVisualTree&amp;lt;T&amp;gt;(DependencyObject parentElement) where T : DependencyObject
{
    var count = VisualTreeHelper.GetChildrenCount(parentElement);
    if (count == 0)
        return null;

    for (int i = 0; i &amp;lt; count; i++)
    {
        var child = VisualTreeHelper.GetChild(parentElement, i);

        if (child != null &amp;amp;&amp;amp; child is T)
        {
            return (T)child;
        }
        else
        {
            var result = FindFirstElementInVisualTree&amp;lt;T&amp;gt;(child);
            if (result != null)
                return result;

        }
    }
    return null;
}&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Step4&lt;/strong&gt;. Next, we will use that method to find the HubTile control that corresponds to a given data item in a bound list box control:&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;private void ChangeTileState(ItemsControl itemsControl, object dataItem, string state)
{
    DependencyObject containerElement = itemsControl.ItemContainerGenerator.ContainerFromItem(dataItem);
    HubTile hubTile = this.FindFirstElementInVisualTree&amp;lt;HubTile&amp;gt;(containerElement);
    if (hubTile != null)
    {
        VisualStateManager.GoToState(hubTile, state, true);
    }
}&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Step5.&lt;/strong&gt; We will also create an overload of the above method to set the visual state of all hub tiles in a list box control:&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;private void ChangeTileState(ItemsControl itemsControl, string state)
{
    IEnumerable itemsSource = itemsControl.ItemsSource;
    if (itemsSource == null)
    {
        return;
    }
    foreach (object dataItem in itemsSource)
    {
        this.ChangeTileState(this.listBox, dataItem, state);
    }
}&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Step6.&lt;/strong&gt; Finally, we can implement the button handlers using the ChangeTileState method in order to switch between different Visual States(Expanded, Semiexpanded, Flipped and Collapsed ):&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;private void btnGoToExpanded_Click(object sender, RoutedEventArgs e)
{
    string expandedStateName = &amp;quot;Expanded&amp;quot;;
    this.ChangeTileState(this.listBox, expandedStateName);
}

private void btnGoToFlipped_Click(object sender, RoutedEventArgs e)
{
    string flippedStateName = &amp;quot;Flipped&amp;quot;;
    this.ChangeTileState(this.listBox, flippedStateName);
}

private void btnGoToCollapsed_Click(object sender, RoutedEventArgs e)
{
    string collapsedStateName = &amp;quot;Collapsed&amp;quot;;
    this.ChangeTileState(this.listBox, collapsedStateName);
}

private void btnGoToSemiexpanded_Click(object sender, RoutedEventArgs e)
{
    string semiexpandedStateName = &amp;quot;Semiexpanded&amp;quot;;
    this.ChangeTileState(this.listBox, semiexpandedStateName);
}&lt;/pre&gt;

&lt;p&gt;That was all about how to programmatically change the visual states of a HubTile control placed inside a ListBox(or any ItemsControl). The full source code is available here:&lt;/p&gt;

&lt;div class="wlWriterEditableSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:c622c2fb-b154-44ae-9084-7aca55145321" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;p&gt; &lt;a href="http://www.windowsphonegeek.com/upload/articles/HubTileVisualStatesSample_1.zip" target="_blank"&gt;ListBoxHubTileVisualStates&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;

&lt;p&gt;I hope that the article was helpful.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;You may also find interesting the following resources:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href="http://windowsphonegeek.com/WPToolkitBook2nd"&gt;&amp;quot;Windows Phone Toolkit In Depth 2nd edition&amp;quot; FREE e-book&lt;/a&gt; &lt;/li&gt;

  &lt;li&gt;&lt;a href="http://windowsphonegeek.com/ArticleIndex"&gt;More HubTile articles in our ArticleIndex&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;</description>
      <pubDate>2012-02-07T13:22:22.0000000+02:00</pubDate>
    </item>
    <item>
      <title>MetroGrid component for Windows Phone</title>
      <link>http://www.windowsphonegeek.com/articles/MetroGrid-component-for-Windows-Phone</link>
      <description>&lt;p&gt;by &lt;a href="http://www.windowsphonegeek.com/UserProfile/View?userName=sparky76"&gt;Rudi Ferrarin&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;In this article, based and inspired by Jeff Wilcox &lt;a href="http://www.jeff.wilcox.name/2011/10/metrogridhelper/"&gt;metrogridhelper&lt;/a&gt;, I would like to show you how I modified the base Grid control class so it can show me the &amp;quot;metro squares&amp;quot; at design time inside Visual Studio editor.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Step1:&lt;/strong&gt; lets create a custom control, named metroGrid, which derives from System.Windows.Controls.Grid&lt;/p&gt;  &lt;pre class="brush: csharp;"&gt;using System.ComponentModel;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;


namespace wp7Library
{
    public class metroGrid : Grid
    {
    }
}&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Step3:&lt;/strong&gt; add a protected member of type Brush which we'll use to store the actual design background of the grid so we can restore it when we hide the metro squares&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt; protected Brush oldBrush;&lt;/pre&gt;



&lt;p&gt;&lt;strong&gt;Step4:&lt;/strong&gt; add some dependencyproperites which will define how the metrogrid squares will look like (visibility, padding, square size, square h/v distance from each other, square color, properties callbacks)&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;[Category(&amp;quot;Metro Guides&amp;quot;)]
[Description(&amp;quot;Show/Hides grid Metro guides&amp;quot;)]
public bool MetroVisible
{
    get { return (bool)GetValue(MetroVisibleProperty); }
    set { SetValue(MetroVisibleProperty, value); }
}  
 
[Category(&amp;quot;Metro Guides&amp;quot;)]
[Description(&amp;quot;Padding&amp;quot;)]
public Thickness MetroPadding
{
    get { return (Thickness)GetValue(MetroPaddingProperty); }
    set { SetValue(MetroPaddingProperty, value); }
}

[Category(&amp;quot;Metro Guides&amp;quot;)]
[Description(&amp;quot;Horizontal spacing&amp;quot;)]
public int HSpacing
{
    get { return (int)GetValue(HSpacingProperty); }
    set { SetValue(HSpacingProperty, value); }
}
 
[Category(&amp;quot;Metro Guides&amp;quot;)]
[Description(&amp;quot;Vertical spacing&amp;quot;)]
public int VSpacing
{
    get { return (int)GetValue(VSpacingProperty); }
    set { SetValue(VSpacingProperty, value); }
}
 
[Category(&amp;quot;Metro Guides&amp;quot;)]
[Description(&amp;quot;Rectangle width&amp;quot;)]
public int RectWidth
{
    get { return (int)GetValue(RectWidthProperty); }
    set { SetValue(RectWidthProperty, value); }
}

[Category(&amp;quot;Metro Guides&amp;quot;)]
[Description(&amp;quot;Rectangle height&amp;quot;)]
public int RectHeight
{
    get { return (int)GetValue(RectHeightProperty); }
    set { SetValue(RectHeightProperty, value); }
}

[Category(&amp;quot;Metro Guides&amp;quot;)]
[Description(&amp;quot;Rectangle color&amp;quot;)]
public Color RectColor
{
    get { return (Color)GetValue(RectColorProperty); }
    set { SetValue(RectColorProperty, value); }
}

public static readonly DependencyProperty MetroVisibleProperty = DependencyProperty.Register(&amp;quot;MetroVisible&amp;quot;, typeof(bool), typeof(metroGrid), new PropertyMetadata(false, OnMetroGuidesVisiblePropertyChanged));
public static readonly DependencyProperty MetroPaddingProperty = DependencyProperty.Register(&amp;quot;MetroPadding&amp;quot;, typeof(Thickness), typeof(metroGrid), new PropertyMetadata(new Thickness(24, 24, 0, 0), OnMetroGuidesPropertyChanged));

public static readonly DependencyProperty HSpacingProperty = DependencyProperty.Register(&amp;quot;HSpacing&amp;quot;, typeof(int), typeof(metroGrid), new PropertyMetadata(12, OnMetroGuidesPropertyChanged));
public static readonly DependencyProperty VSpacingProperty = DependencyProperty.Register(&amp;quot;VSpacing&amp;quot;, typeof(int), typeof(metroGrid), new PropertyMetadata(12, OnMetroGuidesPropertyChanged));

public static readonly DependencyProperty RectWidthProperty = DependencyProperty.Register(&amp;quot;RectWidth&amp;quot;, typeof(int), typeof(metroGrid), new PropertyMetadata(25, OnMetroGuidesPropertyChanged));
public static readonly DependencyProperty RectHeightProperty = DependencyProperty.Register(&amp;quot;RectHeight&amp;quot;, typeof(int), typeof(metroGrid), new PropertyMetadata(25, OnMetroGuidesPropertyChanged));

public static readonly DependencyProperty RectColorProperty = DependencyProperty.Register(&amp;quot;RectColor&amp;quot;, typeof(Color), typeof(metroGrid), new PropertyMetadata(Color.FromArgb(255, 255, 0, 0), OnMetroGuidesPropertyChanged));&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Step5:&lt;/strong&gt; add the property callback for the MetroVisibleProperty which will show/hide the metro squares and will save/restore the proper design background for the grid&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;private static void OnMetroGuidesVisiblePropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args)
{
    metroGrid grid = sender as metroGrid;

    if (grid.MetroVisible)
        grid.oldBrush = grid.Background;
    else
    {
        grid.Background = grid.oldBrush;
    }  

    grid.ShowMetroGuides();
}&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Step6:&lt;/strong&gt; add the only property callback for all the others dependencyproperties which will just redraw the squares properly&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;private static void OnMetroGuidesPropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args)
{
    metroGrid grid = sender as metroGrid;
    grid.ShowMetroGuides();
}&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Step7:&lt;/strong&gt; this is the method the grid uses for checking if squares need to be drawed&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;private void ShowMetroGuides()
{
    if (DesignerProperties.IsInDesignTool &amp;amp;&amp;amp; this.MetroVisible)
        this.Background = CreateMetroBackground();
}&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Step8:&lt;/strong&gt; and this is the method who actually draws the squares based on the propertydependencies we defined before&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;private Brush CreateMetroBackground()
{
    Canvas canvas = new Canvas();
    canvas.Width = this.ActualWidth;
    canvas.Height = this.ActualHeight;  

    for (double top = this.MetroPadding.Top; top &amp;lt; canvas.Height; top += this.HSpacing + RectHeight)
        for (double left = this.MetroPadding.Left; left &amp;lt; canvas.Width; left += this.VSpacing + RectWidth)
        {
            Rectangle rect = new Rectangle();
            rect.Width = RectWidth;
            rect.Height = RectHeight;
            rect.Fill = new SolidColorBrush(RectColor);
            rect.SetValue(Canvas.LeftProperty, left);
            rect.SetValue(Canvas.TopProperty, top);
            rect.IsHitTestVisible = false;

            canvas.Children.Add(rect);
        }

    var wb = new WriteableBitmap(canvas, null);
    var brush = new ImageBrush();
    brush.ImageSource = wb;

    return brush;
}&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Step9:&lt;/strong&gt; override the OnApplyTemplate method&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;public override void OnApplyTemplate()
{
    base.OnApplyTemplate();

    ShowMetroGuides();
}&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Step10:&lt;/strong&gt; now just create a new application page and change the main grid with the fresh metroGrid and you should see something like this in your Visual Studio&lt;/p&gt;

&lt;p&gt;&lt;a href="http://windowsphonegeek.com/upload/articles/image_2_1_2_3_4_5_6_7_8_9_10_11_12_13_14_15_16_17_18_19_20_21_22_23_24_25_26.png"&gt;&lt;img title="image" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="523" alt="image" src="http://windowsphonegeek.com/upload/articles/image_thumb_1_2_3_4_5_6_7_8_9_10_11_12_13_14_15_16_17_18_19_20_21_22_23_24_25_26_27.png" width="586" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step11:&lt;/strong&gt; enabling the MetroVisible check the grid will now look like this&lt;/p&gt;

&lt;p&gt;&lt;a href="http://windowsphonegeek.com/upload/articles/image_4_1_2_3_4_5_6_7_8_9_10_11_12_13_14_15_16_17_18_19_20_21_22_23.png"&gt;&lt;img title="image" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="402" alt="image" src="http://windowsphonegeek.com/upload/articles/image_thumb_1_1_2_3_4_5_6_7_8_9_10_11_12_13_14_15_16_17_18_19_20_21_22_23.png" width="583" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can then change the Metro Guides parameters as you may whish.&lt;/p&gt;

&lt;p&gt;Here is the full source code:&lt;/p&gt;

&lt;div class="wlWriterSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:98ca7e2f-3102-4e14-8035-457265b042bf" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;
  &lt;p&gt;&lt;a href="http://windowsphonegeek.com/upload/articles/MetroGrid.zip"&gt;MetroGrid&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;

&lt;p&gt;I hope this post will be helpful.&lt;/p&gt;

&lt;p&gt;Feel free to contact me for any suggestion / thoughts&lt;/p&gt;</description>
      <pubDate>2012-02-02T13:52:25.0000000+02:00</pubDate>
    </item>
    <item>
      <title>Getting latest Tweets in Windows Phone apps using Twitter REST API and JSON.NET</title>
      <link>http://www.windowsphonegeek.com/articles/Getting-latest-Tweets-in-Windows-Phone-apps-using-Twitter-REST-API-and-JSON-NET</link>
      <description>&lt;p&gt;by WindowsPhoneGeek&lt;/p&gt;  &lt;p&gt;In this article I am going to talk about using the Twitter Rest API and JSON.NET in Windows Phone apps to show the latest 10 tweets from a particular Twitter account.&lt;/p&gt;  &lt;p&gt;Before we begin, make sure that you have took a look at the Twitter Rest API Documentation:&lt;/p&gt;  &lt;p&gt;&lt;a title="https://dev.twitter.com/docs/api/1/get/statuses/user_timeline" href="https://dev.twitter.com/docs/api/1/get/statuses/user_timeline"&gt;https://dev.twitter.com/docs/api/1/get/statuses/user_timeline&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Is short we will use the following uri to get winphonegeek's latest tweets:&lt;/p&gt;  &lt;p&gt;&lt;a href="https://api.twitter.com/1/statuses/user_timeline.json?trim_user=true&amp;amp;screen_name=winphonegeek&amp;amp;count=10"&gt;https://api.twitter.com/1/statuses/user_timeline.json?trim_user=true&amp;amp;screen_name=winphonegeek&amp;amp;count=10&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;The above url returns data about tweets in JSON format that looks like this:&lt;/p&gt;  &lt;pre class="brush: csharp;"&gt;{
    possibly_sensitive: false,
    in_reply_to_screen_name: &amp;quot;@WPAppInfo&amp;quot;,
    truncated: false,
    retweeted: false,
    in_reply_to_user_id: 171279759,
    in_reply_to_status_id_str: null,
    coordinates: null,
    in_reply_to_user_id_str: &amp;quot;171279759&amp;quot;,
    user: {
        id_str: &amp;quot;198796409&amp;quot;,
        id: 198796409
    },
    id_str: &amp;quot;164047529783209984&amp;quot;,
    place: null,
    geo: null,
    contributors: null,
    source: &amp;quot;web&amp;quot;,
    retweet_count: 0,
    favorited: false,
    id: 164047529783210000,
    in_reply_to_status_id: null,
    text: &amp;quot;tweet text&amp;quot;,
    created_at: &amp;quot;Mon Jan 30 18:09:13 +0000 2012&amp;quot;
}&lt;/pre&gt;

&lt;p&gt;We will also use Json.NET: a popular free high-performance JSON framework for .NET available on &lt;a href="http://json.codeplex.com/"&gt;CodePlex&lt;/a&gt;. To summarize we will use Json.NET to deserialize (read) the Json formatted Twitter data into .NET objects.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step1.&lt;/strong&gt; Add reference to "&lt;em&gt;Newtonsoft.Json.dll&lt;/em&gt;" from Json.NET&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.windowsphonegeek.com/upload/articles/image_2_1_2_3_4_5_6_7_8_9_10_11_12_13_14_15_16_17_18_19_20_21_22_23_24_25.png"&gt;&lt;img title="image" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; padding-top: 0px; border-right-width: 0px" height="244" alt="image" src="http://www.windowsphonegeek.com/upload/articles/image_thumb_1_2_3_4_5_6_7_8_9_10_11_12_13_14_15_16_17_18_19_20_21_22_23_24_25_26.png" width="154" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step2.&lt;/strong&gt; Next, we will create a simple class that will be used to deserialize the Twitter data into objects.&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;public class Tweet
{
    public string Text
    {
        get;
        set;
    }

    [JsonProperty(&amp;quot;created_at&amp;quot;)]
    public string CreatedAt
    {
        get;
        set;
    }

    public string Source
    {
        get;
        set;
    }

    [JsonProperty(&amp;quot;retweet_count&amp;quot;)]
    public int RetweetCount
    {
        get;
        set;
    }
}&lt;/pre&gt;

&lt;p&gt;NOTE: You will also have to add the following using statement: &lt;/p&gt;

&lt;p&gt;&lt;em&gt;using Newtonsoft.Json;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step3.&lt;/strong&gt; After that, we will add a ListBox and a button to the MainPage.xaml&lt;/p&gt;

&lt;pre class="brush: xml;"&gt;&amp;lt;Grid x:Name=&amp;quot;ContentPanel&amp;quot; Grid.Row=&amp;quot;1&amp;quot; Margin=&amp;quot;12,0,12,0&amp;quot;&amp;gt;
    &amp;lt;Grid.RowDefinitions&amp;gt;
        &amp;lt;RowDefinition Height=&amp;quot;*&amp;quot; /&amp;gt;
        &amp;lt;RowDefinition Height=&amp;quot;Auto&amp;quot; /&amp;gt;
    &amp;lt;/Grid.RowDefinitions&amp;gt;
    
    &amp;lt;ListBox x:Name=&amp;quot;lbTweets&amp;quot;&amp;gt;
        &amp;lt;ListBox.ItemTemplate&amp;gt;
            &amp;lt;DataTemplate&amp;gt;
                &amp;lt;StackPanel Orientation=&amp;quot;Vertical&amp;quot;&amp;gt;
                    &amp;lt;TextBlock Text=&amp;quot;{Binding Text}&amp;quot; TextWrapping=&amp;quot;Wrap&amp;quot; /&amp;gt;
                    &amp;lt;TextBlock Text=&amp;quot;{Binding CreatedAt}&amp;quot; Style=&amp;quot;{StaticResource PhoneTextSubtleStyle}&amp;quot; /&amp;gt;
                &amp;lt;/StackPanel&amp;gt;
            &amp;lt;/DataTemplate&amp;gt;
        &amp;lt;/ListBox.ItemTemplate&amp;gt;
    &amp;lt;/ListBox&amp;gt;
    
    &amp;lt;Button x:Name=&amp;quot;btnRefreshTweets&amp;quot; Grid.Row=&amp;quot;1&amp;quot; 
            Content=&amp;quot;Refresh tweets&amp;quot;
            Click=&amp;quot;btnRefreshTweets_Click&amp;quot;/&amp;gt;
&amp;lt;/Grid&amp;gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Step4.&lt;/strong&gt; Finally, in the button click event handler, we start an async download using the above url to download the latest Twitter data:&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;private void btnRefreshTweets_Click(object sender, RoutedEventArgs e)
{
    string winPhoneGeekTweetsUrl = @&amp;quot;https://api.twitter.com/1/statuses/user_timeline.json?trim_user=true&amp;amp;screen_name=winphonegeek&amp;amp;count=10&amp;quot;;

    WebClient webClient = new WebClient();
    webClient.DownloadStringCompleted += new DownloadStringCompletedEventHandler(webClient_DownloadStringCompleted);
    webClient.DownloadStringAsync(new Uri(winPhoneGeekTweetsUrl));
}&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: In the above string URl "&lt;em&gt;screen_name&lt;/em&gt;" is the name of the Twitter account that you want to get data for and "&lt;em&gt;count" &lt;/em&gt;is the number of the tweets you want to get.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step4.&lt;/strong&gt; When the download completes, we use JSON.NET to deserialize the json data into a list of Tweet object and set it as the items source of the list box.(NOTE: Tweet is the class created in Step2 above):&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;void webClient_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
{
    if (e.Error != null)
    {
        return;
    }
    List&amp;lt;Tweet&amp;gt; tweets = JsonConvert.DeserializeObject&amp;lt;List&amp;lt;Tweet&amp;gt;&amp;gt;(e.Result);
    this.lbTweets.ItemsSource = tweets;
}&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Step5.&lt;/strong&gt; That`s it. just build and run the project to see the result:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.windowsphonegeek.com/upload/articles/image_4_1_2_3_4_5_6_7_8_9_10_11_12_13_14_15_16_17_18_19_20_21_22.png"&gt;&lt;img title="image" style="border-right: 0px; padding-right: 0px; border-top: 0px; display: inline; padding-left: 0px; background-image: none; margin: 0px; border-left: 0px; padding-top: 0px; border-bottom: 0px" height="244" alt="image" src="http://www.windowsphonegeek.com/upload/articles/image_thumb_1_1_2_3_4_5_6_7_8_9_10_11_12_13_14_15_16_17_18_19_20_21_22.png" width="130" border="0" /&gt;&lt;/a&gt;&amp;#160;&lt;a href="http://www.windowsphonegeek.com/upload/articles/image_6_1_2_3_4_5_6_7_8_9_10_11_12_13_14_15_16.png"&gt;&lt;img title="image" style="border-right: 0px; padding-right: 0px; border-top: 0px; display: inline; padding-left: 0px; background-image: none; margin: 0px; border-left: 0px; padding-top: 0px; border-bottom: 0px" height="61" alt="image" src="http://www.windowsphonegeek.com/upload/articles/image_thumb_2_1_2_3_4_5_6_7_8_9_10_11_12_13_14_15_16_17_18_19.png" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is the full source code:&lt;/p&gt;

&lt;div class="wlWriterEditableSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:ad354e36-622b-49f8-ac96-93727a2707ec" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;p&gt; &lt;a href="http://www.windowsphonegeek.com/upload/articles/WPJsonSample.zip" target="_blank"&gt;WPJsonSample.zip&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;

&lt;p&gt;I hope that the post was helpful.&lt;/p&gt;</description>
      <pubDate>2012-01-31T10:55:56.0000000+02:00</pubDate>
    </item>
    <item>
      <title>How to get the Tapped Item in a MultiselectList control</title>
      <link>http://www.windowsphonegeek.com/articles/How-to-get-the-Tapped-Item-in-a-MultiselectList-control</link>
      <description>&lt;p&gt;by WindowsPhoneGeek&lt;/p&gt;  &lt;p&gt;In this article I am going to talk about how to get a reference to the item that has been tapped in a MultiselectList. At first look this task may look pretty simple but in fact it is not. The problem here is that the SelectedItems collection is empty when the MultiselectList is not in a selection mode.&lt;/p&gt;  &lt;p&gt;To begin with, lets first create a new Windows Phone application project and add the necessary reference to the Windows Phone Toolkit. For more information about the MultiselectList control, take a look at the previous in depth posts:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://windowsphonegeek.com/articles/Windows-Phone-Toolkit-MultiselectList-in-depth--Part1-key-concepts-and-API"&gt;Windows Phone Toolkit MultiselectList in depth | Part1: key concepts and API&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="http://windowsphonegeek.com/articles/Windows-Phone-Toolkit-MultiselectList-in-depth-Part2-Data-Binding"&gt;Windows Phone Toolkit MultiselectList in depth| Part2: Data Binding&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;    &lt;p&gt;&lt;strong&gt;Step1:&lt;/strong&gt; Add a MultiselectList control to your page:&lt;/p&gt;  &lt;pre class="brush: xml;"&gt;&amp;lt;Grid x:Name=&amp;quot;ContentPanel&amp;quot; Grid.Row=&amp;quot;1&amp;quot; Margin=&amp;quot;12,0,12,0&amp;quot;&amp;gt;
    &amp;lt;toolkit:MultiselectList x:Name=&amp;quot;multiselectList&amp;quot;&amp;gt;
        
    &amp;lt;/toolkit:MultiselectList&amp;gt;
&amp;lt;/Grid&amp;gt;&lt;/pre&gt;

&lt;p&gt;where "toolkit" is the following included namespace: &lt;/p&gt;

&lt;pre class="brush: xml;"&gt;&amp;lt;phone:PhoneApplicationPage     
    xmlns:toolkit=&amp;quot;clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit&amp;quot;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Step2:&lt;/strong&gt; Add the following code to create a data source for the multi-select list:&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;public class ListItem
{
    public string Title
    {
        get;
        set;
    }

    public string SubTitle
    {
        get;
        set;
    }
}&lt;/pre&gt;

&lt;pre class="brush: csharp;"&gt;public IEnumerable&amp;lt;ListItem&amp;gt; CreateListItem()
{
    List&amp;lt;ListItem&amp;gt; listItems = new List&amp;lt;ListItem&amp;gt;();
    int count = 10;
    for (int i = 0; i &amp;lt; count; i++)
    {
        ListItem listItem = new ListItem()
        {
            Title = string.Format(&amp;quot;Item {0} title&amp;quot;, i),
            SubTitle = string.Format(&amp;quot;Item {0} sub-title&amp;quot;, i)
        };
        listItems.Add(listItem);
    }

    return listItems;
}&lt;/pre&gt;

&lt;p&gt;Next set the data source in this way:&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;// Constructor
public MainPage()
{
    InitializeComponent();

    // set data source
    this.multiselectList.ItemsSource = this.CreateListItem();
}&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Step3:&lt;/strong&gt; Add the following MultiselectList&amp;#160; ItemTemplate and bindings:&lt;/p&gt;

&lt;pre class="brush: xml;"&gt;&amp;lt;toolkit:MultiselectList x:Name=&amp;quot;multiselectList&amp;quot; toolkit:TiltEffect.IsTiltEnabled=&amp;quot;True&amp;quot;&amp;gt;
    &amp;lt;toolkit:MultiselectList.ItemTemplate&amp;gt;
        &amp;lt;DataTemplate&amp;gt;
            &amp;lt;StackPanel Orientation=&amp;quot;Vertical&amp;quot; Margin=&amp;quot;0,5,0,5&amp;quot;&amp;gt;
                &amp;lt;TextBlock Text=&amp;quot;{Binding Title}&amp;quot; Style=&amp;quot;{StaticResource PhoneTextTitle3Style}&amp;quot; /&amp;gt;
                &amp;lt;TextBlock Text=&amp;quot;{Binding SubTitle}&amp;quot; Style=&amp;quot;{StaticResource PhoneTextSmallStyle}&amp;quot;/&amp;gt;
            &amp;lt;/StackPanel&amp;gt;
        &amp;lt;/DataTemplate&amp;gt;
    &amp;lt;/toolkit:MultiselectList.ItemTemplate&amp;gt;
&amp;lt;/toolkit:MultiselectList&amp;gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Step4:&lt;/strong&gt; Subscribe to the MultiselectList Tap event:&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;public MainPage()
{
    InitializeComponent();
    //...

    // subscribe to Tap event
    this.multiselectList.Tap+=new EventHandler&amp;lt;System.Windows.Input.GestureEventArgs&amp;gt;(multiselectList_Tap);
}&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Step5:&lt;/strong&gt; Add the following code inside the tap handler:&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;void multiselectList_Tap(object sender, System.Windows.Input.GestureEventArgs e)
{
    if (this.multiselectList.IsSelectionEnabled)
    {
        // do not show message box if in selection mode
        return;
    }

    DependencyObject tappedElement = e.OriginalSource as UIElement;
    // find parent UI element of type MultiselectItem
    MultiselectItem tappedItem = this.FindParentOfType&amp;lt;MultiselectItem&amp;gt;(tappedElement);
    ListItem selectedItem = null;
    if (tappedItem != null)
    {
        // DataContext contains reference to data item
        selectedItem = tappedItem.DataContext as ListItem;
    }

    // if selected data item is not null
    if (selectedItem != null)
    {
        // then multiselect list item was tapped - show message box
        MessageBox.Show(string.Format(&amp;quot;Item with title '{0}' was tapped&amp;quot;, selectedItem.Title));
    }
}&lt;/pre&gt;

&lt;p&gt;The tap handler above, uses the FindParentOfType method from the snipped below. This method uses the VisualTreeHelper class to find a parent UI element of a particular type given a starting element.&lt;/p&gt;

&lt;pre class="brush: csharp;"&gt;private T FindParentOfType&amp;lt;T&amp;gt;(DependencyObject element) where T : DependencyObject
{
    T result = null;
    DependencyObject currentElement = element;
    while (currentElement != null)
    {
        result = currentElement as T;
        if (result != null)
        {
            break;
        }
        currentElement = VisualTreeHelper.GetParent(currentElement);
    }

    return result;
}&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Step6:&lt;/strong&gt; That's it, build and run the project.&lt;/p&gt;

&lt;p&gt;Here is the full source code:&lt;/p&gt;

&lt;div class="wlWriterEditableSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:6f87aa2a-f7a8-4460-ab70-4be075d001f0" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;p&gt; &lt;a href="http://www.windowsphonegeek.com/upload/articles/MultiselectListItemTap_1.zip" target="_blank"&gt;MultiselectListTap&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;

&lt;p&gt;I hope that the post was helpful.&lt;/p&gt;</description>
      <pubDate>2012-01-19T00:25:14.0000000+02:00</pubDate>
    </item>
    <item>
      <title>Windows Phone Application Icons and Tiles</title>
      <link>http://www.windowsphonegeek.com/articles/Windows-Phone-Application-Icons-and-Tiles</link>
      <description>&lt;p&gt;by &lt;a href="http://www.windowsphonegeek.com/UserProfile/View?userName=gergelyjanos"&gt;Janos Gergely&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;In this article I will show you the icons what you need for publishing Silverlight for Windows Phone applications to the marketplace.&lt;/p&gt;  &lt;p&gt;This information is not a big secret (you can find it: &lt;a href="http://http://msdn.microsoft.com/en-us/library/hh394033(v=VS.92).aspx" target="_blank"&gt;Msdn Application Artwork&lt;/a&gt;) but every time I submit a new application to the marketplace I have to find out&amp;#160; the meaning of the icons. The icons filename are not mandatory but for easy understanding I use the default names.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://windowsphonegeek.com/upload/articles/image_28_1.png"&gt;&lt;img title="image" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="328" alt="image" src="http://windowsphonegeek.com/upload/articles/image_thumb_13_1_2.png" width="286" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="5"&gt;Application Tiles&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Application tiles are the main icons. This show your application on the list of installed applications on the phone. &lt;/p&gt;  &lt;p&gt;You must set the icons size to the predefined size. Transparent background is changed to match the theme color of the phone.&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;ApplicationIcon.png&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://windowsphonegeek.com/upload/articles/ApplicationIcon_6.png"&gt;&lt;img title="ApplicationIcon" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="66" alt="ApplicationIcon" src="http://windowsphonegeek.com/upload/articles/ApplicationIcon_thumb_2.png" width="66" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Image size: 62x62 pixels&lt;/p&gt;  &lt;p&gt;File type: png&lt;/p&gt;  &lt;p&gt;Property build action: Content&lt;/p&gt;  &lt;p&gt;This icon is represent your application in the list of the installed applications on the phone.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://windowsphonegeek.com/upload/articles/image_6_1_2_3_4_5_6_7_8_9_10_11_12_13_14_15.png"&gt;&lt;img title="image" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; padding-top: 0px; border-right-width: 0px" height="148" alt="image" src="http://windowsphonegeek.com/upload/articles/image_thumb_2_1_2_3_4_5_6_7_8_9_10_11_12_13_14_15_16_17_18.png" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;You can change the icon from the default one on the project properties page.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://windowsphonegeek.com/upload/articles/image_12_1_2_3_4.png"&gt;&lt;img title="image" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="329" alt="image" src="http://windowsphonegeek.com/upload/articles/image_thumb_5_1_2_3_4_5_6_7.png" width="452" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Or you can replace the icon file name in the WMAppManifest.xml file. When you set project properties you editing the WMAppManifest.xml file.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://windowsphonegeek.com/upload/articles/image_14_1_2_3_4_5_6.png"&gt;&lt;img title="image" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="250" alt="image" src="http://windowsphonegeek.com/upload/articles/image_thumb_6_1_2_3_4_5_6_7_8.png" width="522" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Background.png&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://windowsphonegeek.com/upload/articles/Background_2_1.png"&gt;&lt;img title="Background" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="177" alt="Background" src="http://windowsphonegeek.com/upload/articles/Background_thumb_1.png" width="177" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Image size: 173x173 pixels&lt;/p&gt;  &lt;p&gt;File type: png&lt;/p&gt;  &lt;p&gt;Property build action: Content&lt;/p&gt;  &lt;p&gt;This icon represents your application on the start screen of the phone. The phone user can pin an application tile to the start screen.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://windowsphonegeek.com/upload/articles/image_16_1_2_3_4_5_6.png"&gt;&lt;img title="image" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; padding-top: 0px; border-right-width: 0px" height="120" alt="image" src="http://windowsphonegeek.com/upload/articles/image_thumb_7_1_2_3_4_5_6.png" width="244" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Transparent background is replaced with the phone theme color (red). The phone writes some information in from of the icon, so keep enough place for text messages.&lt;/p&gt;  &lt;p&gt;You can change the icon from the default one on the project properties page.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://windowsphonegeek.com/upload/articles/image_18_1_2_3_4_5.png"&gt;&lt;img title="image" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="446" alt="image" src="http://windowsphonegeek.com/upload/articles/image_thumb_8_1_2_3_4_5_6_7.png" width="446" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Or you can replace the icon filename in the WMAppManifest.xml file.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://windowsphonegeek.com/upload/articles/image_20_1_2_3_4.png"&gt;&lt;img title="image" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="246" alt="image" src="http://windowsphonegeek.com/upload/articles/image_thumb_9_1_2_3_4_5.png" width="509" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="5"&gt;Marketplace tiles&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Marketplace tiles represent your application on marketplace catalog on the phone and on the PC. This is the most important point of your application because customer see this icons when browsing the catalog before buying it.&lt;/p&gt;  &lt;p&gt;You must set the icons size to the predefined size. Transparent background doesn't look well on the marketplace catalog.&lt;/p&gt;  &lt;p&gt;You upload the icons to the marketplace when you submit the application.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;SmallAppTile.png&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://windowsphonegeek.com/upload/articles/SmallAppTile_2.png"&gt;&lt;img title="SmallAppTile" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="103" alt="SmallAppTile" src="http://windowsphonegeek.com/upload/articles/SmallAppTile_thumb.png" width="103" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Image size: 99x99 pixels&lt;/p&gt;  &lt;p&gt;File type: png&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;LargeAppTile.png&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://windowsphonegeek.com/upload/articles/LargeAppTile_2.png"&gt;&lt;img title="LargeAppTile" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="177" alt="LargeAppTile" src="http://windowsphonegeek.com/upload/articles/LargeAppTile_thumb.png" width="177" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Image size: 173x173 pixels&lt;/p&gt;  &lt;p&gt;File type: png&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;MarketplaceTile.png&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://windowsphonegeek.com/upload/articles/MarketplaceTile_2.png"&gt;&lt;img title="MarketplaceTile" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="204" alt="MarketplaceTile" src="http://windowsphonegeek.com/upload/articles/MarketplaceTile_thumb.png" width="204" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Image size: 200x200&lt;/p&gt;  &lt;p&gt;File type: png&lt;/p&gt;  &lt;p&gt;Visual Studio Marketplace Test Kit has a capability to check this icons. Open the Marketplace Test Kit (in release configuration) and on the Application Details page upload the icons to the test kit.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://windowsphonegeek.com/upload/articles/image_2_1_2_3_4_5_6_7_8_9_10_11_12_13_14_15_16_17_18_19_20_21_22_23_24.png"&gt;&lt;img title="image" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; margin: 10px 0px; padding-top: 0px; border-right-width: 0px" height="321" alt="image" src="http://windowsphonegeek.com/upload/articles/image_thumb_1_2_3_4_5_6_7_8_9_10_11_12_13_14_15_16_17_18_19_20_21_22_23_24_25.png" width="660" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Run the Iconography test on the Automated Test page and see the result.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://windowsphonegeek.com/upload/articles/image_4_1_2_3_4_5_6_7_8_9_10_11_12_13_14_15_16_17_18_19_20_21.png"&gt;&lt;img title="image" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="256" alt="image" src="http://windowsphonegeek.com/upload/articles/image_thumb_1_1_2_3_4_5_6_7_8_9_10_11_12_13_14_15_16_17_18_19_20_21.png" width="500" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="5"&gt;Screenshots&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;You must upload one or more screenshots to the marketplace. Customer can see this screenshots when browsing the catalog.&lt;/p&gt;  &lt;p&gt;The easiest way to take screenshots is to use the phone emulator capture tool.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://windowsphonegeek.com/upload/articles/image_24_1_2.png"&gt;&lt;img title="image" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="471" alt="image" src="http://windowsphonegeek.com/upload/articles/image_thumb_11_1_2_3_4.png" width="551" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Image size: 480x800&lt;/p&gt;  &lt;p&gt;File type: png&lt;/p&gt;  &lt;p&gt;Save up to eight screens. &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="5"&gt;Splash Screen Image&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;This image isn't necessary for your application. If you have this image you have more time to initialize the application at startup time. Without a splash screen image your application must start very fast. &lt;/p&gt;  &lt;p&gt;The filename must be 'SplashScreenImage.jpg' because the OS displays this file before starting the application. This file is part of the xap package file.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;SplashScreenImage.jpg&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://windowsphonegeek.com/upload/articles/SplashScreenImage_4.jpg"&gt;&lt;img title="SplashScreenImage" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="244" alt="SplashScreenImage" src="http://windowsphonegeek.com/upload/articles/SplashScreenImage_thumb_1.jpg" width="148" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Image size: 480x800&lt;/p&gt;  &lt;p&gt;File type: jpeg&lt;/p&gt;  &lt;p&gt;Property build action: Content&lt;/p&gt;  &lt;p&gt;There are other techniques to make animated splash screen but it's more difficult and need more CPU time on the phone.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="5"&gt;Build&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;After all you build the application and the xap package file contains the application icons.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://windowsphonegeek.com/upload/articles/image_30_1.png"&gt;&lt;img title="image" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="192" alt="image" src="http://windowsphonegeek.com/upload/articles/image_thumb_14_1_2.png" width="465" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>2012-01-11T14:36:54.0000000+02:00</pubDate>
    </item>
    <item>
      <title>Getting Started with Coding4Fun Button Controls</title>
      <link>http://www.windowsphonegeek.com/articles/Getting-Started-with-Coding4Fun-Button-Controls</link>
      <description>&lt;p&gt;by WindowsPhoneGeek&lt;/p&gt;  &lt;p&gt;In this article I am going to talk about the &lt;a href="http://coding4fun.codeplex.com/"&gt;Coding4fun Toolkit&lt;/a&gt; button controls in details. I will explain everything about the main features, available public API, and will&amp;#160; give lots of examples in different scenarios.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;NOTE&lt;/em&gt;: About an year ago we posted the "&lt;a href="http://windowsphonegeek.com/articles/WP7-RoundToggleButton-and-RoundButton-in-depth"&gt;WP7 RoundToggleButton and RoundButton in depth&lt;/a&gt;" article, however this post is not relevant any more since things have changed significantly during the last few releases of the toolkit!&lt;/p&gt;  &lt;p&gt;Basically Coding4Fun toolkit offers RoundButton and RoundToggleButton controls. RoundToggleButton&amp;#160; is an UI component that derives from CheckBox and exposes several additional dependency properties. As its name says it is some kind of extended toggle button with round shape and automatic inverted image support. RoundButton is a kind of extended button which derives from Button, has a round shape and offers automatic inverted image support.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.windowsphonegeek.com/upload/articles/image_4_1_2_3_4_5_6_7_8_9_10_11_12_13_14_15_16_17_18_19_20.png"&gt;&lt;img title="image" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; padding-top: 0px; border-right-width: 0px" height="63" alt="image" src="http://www.windowsphonegeek.com/upload/articles/image_thumb_1_1_2_3_4_5_6_7_8_9_10_11_12_13_14_15_16_17_18_19_20.png" width="123" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;&lt;strong&gt;&lt;font size="4"&gt;Getting Started&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;To begin using RoundButton and RoundToggleButton first&amp;#160; add a reference to&amp;#160; the &lt;em&gt;Coding4Fun.Phone.Controls.dll &lt;/em&gt;assembly.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;NOTE&lt;/em&gt;: You can download this assembly from here: &lt;a href="http://coding4fun.codeplex.com/"&gt;Coding4Fun Toolkit&lt;/a&gt; .&lt;/p&gt;  &lt;p&gt;The next step is to add the &amp;quot;c4f&amp;quot; prefix declaration. Make sure that your page declaration includes the &amp;quot;c4fToolkit&amp;quot; namespace:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&amp;#160;&amp;#160;&amp;#160; xmlns:c4f=&amp;quot;clr-namespace:Coding4Fun.Phone.Controls;assembly=Coding4Fun.Phone.Controls&amp;quot;&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;The sample code should looks like:&lt;/p&gt;  &lt;pre class="brush: xml;"&gt;&amp;lt;c4f:RoundButton/&amp;gt;
&amp;lt;c4f:RoundToggleButton/&amp;gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;font size="4"&gt;Key Properties&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The RoundToggleButton control derives all properties and events from the CheckBox class. The RoundButton&amp;#160; control derives all properties and events from the Button class. &lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Content&lt;/strong&gt; &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This property comes from the parent class and is used to set the content of the RoundToggleButton / RoundButton.&lt;/p&gt;

&lt;p&gt;Both button controls expose the following additional public properties:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;ImageSource&lt;/strong&gt; &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;ImageSource is a dependency property of type ImageSource. It gets or sets the Image of the RoundToggleButton / RoundButton&amp;#160; controls.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Orientation&lt;/strong&gt; &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Orientation is a dependency property of type Orientation. It gets or sets the content orientation of the RoundToggleButton / RoundButton.&lt;/p&gt;

&lt;ul&gt;&lt;strong&gt;&lt;font size="4"&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/ul&gt;

&lt;ul&gt;&lt;strong&gt;&lt;font size="4"&gt;Examples&lt;/font&gt;&lt;/strong&gt;&lt;/ul&gt;

&lt;p&gt;In the below examples we will use the following two icons:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.windowsphonegeek.com/upload/articles/image_13_1.png"&gt;&lt;img title="image" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; padding-top: 0px; border-right-width: 0px" height="152" alt="image" src="http://www.windowsphonegeek.com/upload/articles/image_thumb_5_1_2_3_4_5_6.png" width="244" border="0" /&gt;&lt;/a&gt;&lt;a href="http://www.windowsphonegeek.com/upload/articles/image_15_1.png"&gt;&lt;img title="image" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; padding-top: 0px; border-right-width: 0px" height="145" alt="image" src="http://www.windowsphonegeek.com/upload/articles/image_thumb_6_1_2_3_4_5_6_7.png" width="240" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;font color="#ff0000"&gt;&lt;em&gt;NOTE&lt;/em&gt;: Icons will automatically change appropriately in Light theme, you do not need to do anything else!&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example1&lt;/strong&gt;: &lt;strong&gt;RoundButton sample usage&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This example demonstrates how to set the common RoundButton properties.Just add the following code in the XAML part of your page:&lt;/p&gt;

&lt;pre class="brush: xml;"&gt;&amp;lt;StackPanel Orientation=&amp;quot;Horizontal&amp;quot;&amp;gt;
    &amp;lt;c4f:RoundButton
                    FontSize=&amp;quot;18&amp;quot;
                    Content=&amp;quot;OK&amp;quot;
                    BorderBrush=&amp;quot;CornflowerBlue&amp;quot; /&amp;gt;
    &amp;lt;c4f:RoundButton
                    FontSize=&amp;quot;48&amp;quot;
                    Content=&amp;quot;48&amp;quot;
                    Background=&amp;quot;CornflowerBlue&amp;quot; /&amp;gt;
    &amp;lt;c4f:RoundButton 
                    Foreground=&amp;quot;CornflowerBlue&amp;quot;
                    FontSize=&amp;quot;36&amp;quot;
                    Content=&amp;quot;36&amp;quot; /&amp;gt;
    &amp;lt;c4f:RoundButton 
                    ImageSource=&amp;quot;Images/appbar.delete.rest.png&amp;quot;
                    Content=&amp;quot;Delete&amp;quot; /&amp;gt;
&amp;lt;/StackPanel&amp;gt;&lt;/pre&gt;

&lt;p&gt;Here is how the result should look like in Dark and Light themes:&lt;/p&gt;
&lt;a href="http://www.windowsphonegeek.com/upload/articles/image_9_1.png"&gt;&lt;img title="image" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; padding-top: 0px; border-right-width: 0px" height="89" alt="image" src="http://www.windowsphonegeek.com/upload/articles/image_thumb_3_1_2_3_4_5_6_7_8_9_10_11_12_13_14.png" width="221" border="0" /&gt;&lt;/a&gt;&lt;a href="http://www.windowsphonegeek.com/upload/articles/image_11_1.png"&gt;&lt;img title="image" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; padding-top: 0px; border-right-width: 0px" height="86" alt="image" src="http://www.windowsphonegeek.com/upload/articles/image_thumb_4_1_2_3_4_5_6_7_8.png" width="234" border="0" /&gt;&lt;/a&gt; 

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example2&lt;/strong&gt;: &lt;strong&gt;RoundButton Orientation and ImageSource usage.&lt;/strong&gt;&lt;/p&gt;

&lt;pre class="brush: xml;"&gt;&amp;lt;c4f:RoundButton 
Orientation=&amp;quot;Horizontal&amp;quot;
ImageSource=&amp;quot;Images/appbar.feature.search.rest.png&amp;quot; 
Content=&amp;quot;horizontal text&amp;quot; /&amp;gt;&lt;/pre&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.windowsphonegeek.com/upload/articles/image_19.png"&gt;&lt;img title="image" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; padding-top: 0px; border-right-width: 0px" height="62" alt="image" src="http://www.windowsphonegeek.com/upload/articles/image_thumb_8_1_2_3_4_5_6.png" width="118" border="0" /&gt;&lt;/a&gt;&lt;a href="http://www.windowsphonegeek.com/upload/articles/image_17.png"&gt;&lt;img title="image" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; padding-top: 0px; border-right-width: 0px" height="56" alt="image" src="http://www.windowsphonegeek.com/upload/articles/image_thumb_7_1_2_3_4_5.png" width="116" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example3. &lt;strong&gt;RoundToggleButton sample usage&lt;/strong&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This example demonstrates how to set the common RoundToggleButton properties. Just add the following code in the XAML part of your page:&lt;/p&gt;

&lt;pre class="brush: xml;"&gt;&amp;lt;StackPanel Orientation=&amp;quot;Horizontal&amp;quot;&amp;gt;
    &amp;lt;c4f:RoundToggleButton
                FontSize=&amp;quot;18&amp;quot;
                Content=&amp;quot;ok&amp;quot;
                BorderBrush=&amp;quot;CornflowerBlue&amp;quot; /&amp;gt;
    &amp;lt;c4f:RoundToggleButton
                FontSize=&amp;quot;48&amp;quot;
                Content=&amp;quot;48&amp;quot;
                Background=&amp;quot;CornflowerBlue&amp;quot; /&amp;gt;
    &amp;lt;c4f:RoundToggleButton 
                Foreground=&amp;quot;CornflowerBlue&amp;quot;
                FontSize=&amp;quot;36&amp;quot;
                Content=&amp;quot;36&amp;quot; /&amp;gt;
    &amp;lt;c4f:RoundToggleButton 
                ImageSource=&amp;quot;Images/appbar.delete.rest.png&amp;quot;
                Content=&amp;quot;DELETE&amp;quot; /&amp;gt;
&amp;lt;/StackPanel&amp;gt;&lt;/pre&gt;

&lt;p&gt;&lt;a href="http://www.windowsphonegeek.com/upload/articles/image_21.png"&gt;&lt;img title="image" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; padding-top: 0px; border-right-width: 0px" height="74" alt="image" src="http://www.windowsphonegeek.com/upload/articles/image_thumb_9_1_2_3_4.png" width="208" border="0" /&gt;&lt;/a&gt;&lt;a href="http://www.windowsphonegeek.com/upload/articles/image_23_1.png"&gt;&lt;img title="image" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; padding-top: 0px; border-right-width: 0px" height="74" alt="image" src="http://www.windowsphonegeek.com/upload/articles/image_thumb_10_1_2_3_4.png" width="207" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example4&lt;/strong&gt;: &lt;strong&gt;RoundToggleButton Orientation and ImageSource usage.&lt;/strong&gt;&lt;/p&gt;

&lt;pre class="brush: xml;"&gt;&amp;lt;c4f:RoundToggleButton 
Orientation=&amp;quot;Horizontal&amp;quot;
ImageSource=&amp;quot;Images/appbar.feature.search.rest.png&amp;quot; 
Content=&amp;quot;horizontal text&amp;quot; /&amp;gt;&lt;/pre&gt;

&lt;p&gt;&lt;a href="http://www.windowsphonegeek.com/upload/articles/image_27_1_2.png"&gt;&lt;img title="image" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; padding-top: 0px; border-right-width: 0px" height="51" alt="image" src="http://www.windowsphonegeek.com/upload/articles/image_thumb_12_1_2_3.png" width="111" border="0" /&gt;&lt;/a&gt;&lt;a href="http://www.windowsphonegeek.com/upload/articles/image_25_1.png"&gt;&lt;img title="image" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; border-right-width: 0px" height="52" alt="image" src="http://www.windowsphonegeek.com/upload/articles/image_thumb_11_1_2_3.png" width="110" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example5&lt;/strong&gt;: &lt;strong&gt;RoundButton and&lt;/strong&gt; &lt;strong&gt;RoundToggleButton disable.&lt;/strong&gt;&lt;/p&gt;

&lt;pre class="brush: xml;"&gt;&amp;lt;c4f:RoundButton 
x:Name=&amp;quot;btn&amp;quot;
IsEnabled=&amp;quot;False&amp;quot;
Orientation=&amp;quot;Horizontal&amp;quot;
ImageSource=&amp;quot;Images/appbar.delete.rest.png&amp;quot;
Content=&amp;quot;disabled button&amp;quot; /&amp;gt;&lt;/pre&gt;

&lt;p&gt;&lt;a href="http://www.windowsphonegeek.com/upload/articles/image_33_1.png"&gt;&lt;img title="image" style="border-top-width: 0px; padding-right: 0px; display: inline; padding-left: 0px; border-left-width: 0px; background-image: none; border-bottom-width: 0px; margin: 0px; padding-top: 0px; border-right-width: 0px" height="46" alt="image" src="http://www.windowsphonegeek.com/upload/articles/image_thumb_15_1_2.png" width="131" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That was all about the RoundButton&amp;#160; /RoundToggleButton controls from the &lt;a href="http://coding4fun.codeplex.com/"&gt;Coding4fun Toolkit&lt;/a&gt; in depth.&amp;#160; You can find the full source code here:&lt;/p&gt;

&lt;div class="wlWriterEditableSmartContent" id="scid:fb3a1972-4489-4e52-abe7-25a00bb07fdf:0c06a713-9986-46d2-bc8d-40ce3b93f666" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;&lt;p&gt; &lt;a href="http://www.windowsphonegeek.com/upload/articles/C4FButtons.zip" target="_blank"&gt;C4FButtons&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;

&lt;p&gt;I hope that the article was helpful.&lt;/p&gt;</description>
      <pubDate>2012-01-11T14:33:15.0000000+02:00</pubDate>
    </item>
    <item>
      <title>Advanced ApplicationBar for Windows Phone</title>
      <link>http://www.windowsphonegeek.com/articles/Advanced-ApplicationBar-for-Windows-Phone</link>
      <description>&lt;p&gt;by &lt;a href="http://www.windowsphonegeek.com/UserProfile/View?userName=Atreides07"&gt;Sheriev Akhmed&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I have released an AdvancedApplicationBar library recently, enhancing the standard ApplicationBar in WP7.    &lt;br /&gt;It's a wrapper over the standard ApplicationBar which adds DataBinding support, Visibility property and Panorama / Pivot elements support.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;span style="font-size: medium"&gt;Supporting DataBinding, ICommand, Visibility&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;pre class="brush: xml;"&gt;&amp;lt;Sh:AdvancedApplicationBar&amp;gt;
    &amp;lt;Sh:AdvancedApplicationBarIconButton 
        IsEnabled=&amp;quot;{Binding AppBarIconButtonEnabled}&amp;quot;
        Text=&amp;quot;{Binding AppBarIconButtonText}&amp;quot;
        IconUri=&amp;quot;{Binding IconUri}&amp;quot;
        Click=&amp;quot;AdvancedApplicationBarIconButton_Click&amp;quot;
        /&amp;gt;

    &amp;lt;Sh:AdvancedApplicationBarIconButton 
        Text=&amp;quot;{Binding AppBarIconButtonText}&amp;quot;
        IconUri=&amp;quot;{Binding AppBarIconButtonText}&amp;quot;
        Visibility=&amp;quot;{Binding Visibility}&amp;quot;
        Command=&amp;quot;{Binding DeleteCommand}&amp;quot;
        CommandParameter=&amp;quot;42&amp;quot;
        /&amp;gt;
    &amp;lt;Sh:AdvancedApplicationBarIconButton 
        Text=&amp;quot;static text&amp;quot;
        IconUri=&amp;quot;/Images/appbar.feature.settings.rest.png&amp;quot;
        /&amp;gt;
    &amp;lt;Sh:AdvancedApplicationBarMenuItem Text=&amp;quot;MenuItemTxt&amp;quot; /&amp;gt;
&amp;lt;/Sh:AdvancedApplicationBar&amp;gt;&lt;/pre&gt;



&lt;p&gt;&lt;strong&gt;&lt;span style="font-size: medium"&gt;Supporting Panorama/Pivot&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In order to show some elements in specific Panoram tabs only, you just have to move Buttons and Menu Elements into that Tab. 
  &lt;br /&gt;The elements that should be shown before the Panoram/Pivot buttons, should be placed before the Panoram element in XAML.&lt;/p&gt;

&lt;pre class="brush: xml;"&gt;&amp;lt;Grid x:Name=&amp;quot;ContentPanel&amp;quot;&amp;gt;
  &amp;lt;Sh:AdvancedApplicationBarIconButton ... /&amp;gt;
      &amp;lt;controls:Panorama&amp;gt;
          &amp;lt;controls:PanoramaItem&amp;gt;
              &amp;lt;Grid&amp;gt;
                   ...
                   &amp;lt;Sh:AdvancedApplicationBarIconButton .../&amp;gt;
                  &amp;lt;Sh:AdvancedApplicationBarIconButton ... /&amp;gt;
                  &amp;lt;Sh:AdvancedApplicationBarMenuItem ... /&amp;gt;
              &amp;lt;/Grid&amp;gt;
          &amp;lt;/controls:PanoramaItem&amp;gt;
          &amp;lt;controls:PanoramaItem&amp;gt;
              &amp;lt;Grid&amp;gt;
                  &amp;lt;Sh:AdvancedApplicationBarIconButton ... /&amp;gt;
              &amp;lt;/Grid&amp;gt;
          &amp;lt;/controls:PanoramaItem&amp;gt;
      &amp;lt;/controls:Panorama&amp;gt;
   &amp;lt;Sh:AdvancedApplicationBar&amp;gt;
       &amp;lt;Sh:AdvancedApplicationBarIconButton ... /&amp;gt;
   &amp;lt;/Sh:AdvancedApplicationBar&amp;gt;
&amp;lt;/Grid&amp;gt; &lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;&lt;span style="font-size: medium"&gt;How to use: 
      &lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;- Download the library here:&amp;#160; &lt;a href="http://shwp.codeplex.com/releases/view/76914"&gt;http://shwp.codeplex.com/releases/view/76914&lt;/a&gt; 

  &lt;br /&gt;- Add reference to &amp;quot;sh.dll&amp;quot; to your Project 

  &lt;br /&gt;- Add namespace in your Page:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;xmlns:Sh=&amp;quot;clr-namespace:Sh;assembly=Sh&amp;quot;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Attention&lt;/strong&gt;: This library wraps the ApplicationBar, it does not substitute it. 

  &lt;br /&gt;AdvancedApplicationBar should be placed inside the main Panel (usually a Grid).&lt;/p&gt;

&lt;pre class="brush: xml;"&gt;&amp;lt;Grid x:Name=&amp;quot;ContentPanel&amp;quot;&amp;gt;
   &amp;lt;Sh:AdvancedApplicationBar . /&amp;gt;
&amp;lt;/Grid&amp;gt; &lt;/pre&gt;

&lt;p&gt;&lt;span style="font-size: medium"&gt;Demo Video:&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;iframe src="http://www.youtube.com/embed/NlVT39B8Xvs" width="420" height="315"&gt;&lt;/iframe&gt;&lt;/p&gt;

&lt;p&gt;Download sample code &lt;a href="http://shwp.codeplex.com/releases/76914/download/307868"&gt;here&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>2012-01-03T13:16:12.0000000+02:00</pubDate>
    </item>
  </channel>
</rss>
