<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US"><title type="html">Pla.NET Southeast!</title><subtitle type="html">Developer happenings in Georgia, Alabama and Mississippi</subtitle><id>http://blogs.msdn.com/b/glengordon/atom.aspx</id><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/glengordon/" /><link rel="self" type="application/atom+xml" href="http://blogs.msdn.com/b/glengordon/atom.aspx" /><generator uri="http://telligent.com" version="5.6.50428.7875">Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><updated>2012-08-01T12:39:00Z</updated><entry><title>The next big adventure for Glen</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/glengordon/archive/2012/11/28/the-next-big-adventure-for-glen.aspx" /><id>http://blogs.msdn.com/b/glengordon/archive/2012/11/28/the-next-big-adventure-for-glen.aspx</id><published>2012-11-28T20:52:00Z</published><updated>2012-11-28T20:52:00Z</updated><content type="html">&lt;p&gt;As with any great adventure, the beginning is sometimes the hardest part, and so is the end.&lt;/p&gt;
&lt;p&gt;As of this week, I am no longer with Microsoft. It's been a fantastic 9 years though, and I am grateful for all the friends I made, the knowledge I gained, and all the adventures along the way. All of this has paved the way for me to begin the next phase of my life and career.&lt;/p&gt;
&lt;p&gt;I am still gathering my ideas for what I want to do next, as my true passion lies with helping others learn and be successful. I'll be checking out a few opportunities that I have heard of so far, but if you know of anything exciting, don't hesitate to toss it my way!&lt;/p&gt;
&lt;p&gt;Soon I'll have my new blog set up at &lt;a href="http://glengordon.name"&gt;http://glengordon.name&lt;/a&gt; and you can always reach me through twitter as @glengordon&lt;/p&gt;
&lt;p&gt;And, away we go!!! As a famous scientist once said "Roads? Where we're going, we don't need roads!"&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10372817" width="1" height="1"&gt;</content><author><name>GlenGordon</name><uri>http://blogs.msdn.com/glengordon/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>Windows 8 Wednesday in Atlanta for November 13</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/glengordon/archive/2012/11/13/windows-8-wednesday-in-atlanta-for-november-13.aspx" /><id>http://blogs.msdn.com/b/glengordon/archive/2012/11/13/windows-8-wednesday-in-atlanta-for-november-13.aspx</id><published>2012-11-13T14:47:03Z</published><updated>2012-11-13T14:47:03Z</updated><content type="html">&lt;p&gt;Wednesday, November 13 I’ll be in the &lt;a href="http://www.bing.com/local/details.aspx?lid=YN203x401054120&amp;amp;qt=yp&amp;amp;what=microsoft&amp;amp;where=Alpharetta%2c+Georgia&amp;amp;s_cid=ansPhBkYp02&amp;amp;mkt=en-us&amp;amp;q=microsoft+alpharetta&amp;amp;FORM=LARE"&gt;Microsoft Alpharetta office&lt;/a&gt; from noon-2. Stop by and chat about Windows 8 apps – moving existing apps from other platforms, ideas for new apps, coaching on an app you already have under development, or test your app on a Surface PC.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10368054" width="1" height="1"&gt;</content><author><name>GlenGordon</name><uri>http://blogs.msdn.com/glengordon/ProfileUrlRedirect.ashx</uri></author><category term="W8W" scheme="http://blogs.msdn.com/b/glengordon/archive/tags/W8W/" /></entry><entry><title>Free online Windows Azure conference on November 14</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/glengordon/archive/2012/11/12/free-online-windows-azure-conference-on-november-14.aspx" /><id>http://blogs.msdn.com/b/glengordon/archive/2012/11/12/free-online-windows-azure-conference-on-november-14.aspx</id><published>2012-11-12T21:00:00Z</published><updated>2012-11-12T21:00:00Z</updated><content type="html">&lt;p&gt;Sometimes the best way to learn how to be successful with a technology is to hear from your peers about what they are doing with it, and to get their insights and tips.&lt;/p&gt;
&lt;p&gt;The Windows Azure community is doing just that on November 14 with the Windows AzureConf, a free online event. With a keynote by Scott Guthrie and sessions by Azure experts in the community, this promises to be an excellent event. Learn to master the cloud from the best and the brightest sharing their own ideas and experiences.&lt;/p&gt;
&lt;p&gt;Sign up today at &lt;a title="http://www.windowsazureconf.net/" href="http://www.windowsazureconf.net/"&gt;http://www.windowsazureconf.net/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And remember you can get started with your own &lt;a href="http://www.microsoft.com/click/services/Redirect2.ashx?CR_CC=200115762"&gt;free 90 day trial of Windows Azure&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10367879" width="1" height="1"&gt;</content><author><name>GlenGordon</name><uri>http://blogs.msdn.com/glengordon/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>Startup Weekend Atlanta is November 9!</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/glengordon/archive/2012/11/07/startup-weekend-atlanta-is-november-9.aspx" /><id>http://blogs.msdn.com/b/glengordon/archive/2012/11/07/startup-weekend-atlanta-is-november-9.aspx</id><published>2012-11-08T03:48:00Z</published><updated>2012-11-08T03:48:00Z</updated><content type="html">&lt;p&gt;If you have the itch and the idea to start a new company, there&amp;rsquo;s no better event to come to than &lt;a href="http://atlanta.startupweekend.org/"&gt;Startup Weekend Atlanta&lt;/a&gt; starting November 9.&lt;/p&gt;
&lt;p&gt;This weekend marathon is a fantastic place to pitch an idea for a company, rally some teammates, build a business plan and a prototype, and pitch your nascent company to a board of judges who will pick the most viable ones to win prizes.&lt;/p&gt;
&lt;p&gt;With Windows 8 gaining tremendous traction in the marketplace, it makes sense to create a Windows Store app as the premier experience for customers of your new business.&lt;/p&gt;
&lt;p&gt;Because of this, we are running a free Windows 8 bootcamp on the morning before Startup Weekend. That way you can get the technology under your belt, and then spend the rest of the weekend building the business and your app.&lt;/p&gt;
&lt;p&gt;Register for the &lt;a href="https://www.facebook.com/events/374022136020059/"&gt;bootcamp&lt;/a&gt; and &lt;a href="http://swatlanta1112.eventbrite.com/"&gt;Startup Weekend&lt;/a&gt; separately.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10366763" width="1" height="1"&gt;</content><author><name>GlenGordon</name><uri>http://blogs.msdn.com/glengordon/ProfileUrlRedirect.ashx</uri></author><category term="Community" scheme="http://blogs.msdn.com/b/glengordon/archive/tags/Community/" /></entry><entry><title>Next Windows 8 Office Hours – Thursday, November 8</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/glengordon/archive/2012/11/06/next-windows-8-office-hours-thursday-november-8.aspx" /><id>http://blogs.msdn.com/b/glengordon/archive/2012/11/06/next-windows-8-office-hours-thursday-november-8.aspx</id><published>2012-11-06T18:23:24Z</published><updated>2012-11-06T18:23:24Z</updated><content type="html">&lt;p&gt;This week as you try to deal with the absence of political tweets and Facebook posts, why not swing by the &lt;a href="http://www.bing.com/local/details.aspx?lid=YN203x401054120&amp;amp;qt=yp&amp;amp;what=Microsoft&amp;amp;where=Alpharetta%2c+Georgia&amp;amp;s_cid=ansPhBkYp02&amp;amp;mkt=en-us&amp;amp;q=Microsoft+alpharetta&amp;amp;FORM=LARE"&gt;Microsoft Alpharetta office&lt;/a&gt; and chat about or test out your Windows 8 apps? &lt;/p&gt;  &lt;p&gt;The Windows 8 “Wednesday” will be Thursday this week, I’ll be there from 11 AM until 2 pm. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10366271" width="1" height="1"&gt;</content><author><name>GlenGordon</name><uri>http://blogs.msdn.com/glengordon/ProfileUrlRedirect.ashx</uri></author><category term="W8W" scheme="http://blogs.msdn.com/b/glengordon/archive/tags/W8W/" /></entry><entry><title>Windows 8 Hackathon (with prizes) in Birmingham on November 13</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/glengordon/archive/2012/11/02/windows-8-hackathon-with-prizes-in-birmingham-on-november-13.aspx" /><id>http://blogs.msdn.com/b/glengordon/archive/2012/11/02/windows-8-hackathon-with-prizes-in-birmingham-on-november-13.aspx</id><published>2012-11-02T15:48:28Z</published><updated>2012-11-02T15:48:28Z</updated><content type="html">&lt;p&gt;Hey Alabama developers! Are you itching to get started building Windows 8 apps? Now that the OS has been released along with some amazing new devices, end users are going to be hungry for apps and games. Why not get in on the action?&lt;/p&gt;  &lt;p&gt;Here’s an amazing opportunity to get started. A few enterprising folks in the Birmingham developer community have organized a &lt;a href="http://eventbrite.com/event/4652445590"&gt;Windows 8 hackathon&lt;/a&gt;. After a few hour of training, roll up your sleeves and start building an app onsite! By the time dinner rolls around, you’ll have an opportunity to show of your app to other hackers as well as a special meeting of the Birmingham .NET Users Group!&lt;/p&gt;  &lt;p&gt;The winners will receive hundreds of dollars in gift cards, and event a Windows Tablet PC!&lt;/p&gt;  &lt;p&gt;To prepare for the event, make sure you have &lt;a href="http://aka.ms/gowin8"&gt;Windows 8&lt;/a&gt; and &lt;a href="http://www.microsoft.com/click/services/Redirect2.ashx?CR_CC=200115764"&gt;Visual Studio 2012&lt;/a&gt; installed. If you want to get a head start on learning Windows 8 development, check out our &lt;a href="http://www.microsoft.com/click/services/Redirect2.ashx?CR_CC=200115765"&gt;GenerationApp&lt;/a&gt; program.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10365273" width="1" height="1"&gt;</content><author><name>GlenGordon</name><uri>http://blogs.msdn.com/glengordon/ProfileUrlRedirect.ashx</uri></author><category term="Community" scheme="http://blogs.msdn.com/b/glengordon/archive/tags/Community/" /><category term="Windows 8" scheme="http://blogs.msdn.com/b/glengordon/archive/tags/Windows+8/" /></entry><entry><title>Windows 8 Wednesday schedule for October 31 in ATL</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/glengordon/archive/2012/10/30/windows-8-wednesday-schedule-for-october-31-in-atl.aspx" /><id>http://blogs.msdn.com/b/glengordon/archive/2012/10/30/windows-8-wednesday-schedule-for-october-31-in-atl.aspx</id><published>2012-10-30T16:09:40Z</published><updated>2012-10-30T16:09:40Z</updated><content type="html">&lt;p&gt;Once again it’s about to be Wednesday, so that means it’s about to be Windows 8 Wednesday, another opportunity to come discuss app and game ideas, get help with your app in development, talk about monetization strategies, and more.&lt;/p&gt;  &lt;p&gt;Join me in the &lt;a href="http://www.bing.com/local/details.aspx?lid=YN203x401054120&amp;amp;qt=yp&amp;amp;what=microsoft&amp;amp;where=Alpharetta%2c+Georgia&amp;amp;s_cid=ansPhBkYp02&amp;amp;mkt=en-us&amp;amp;q=alpharetta+microsoft&amp;amp;FORM=LARE"&gt;Alpharetta Microsoft office&lt;/a&gt; between 11 AM and 2 PM on Wednesday, October 31. And since it’s Halloween, if you come in wearing a costume and get your picture taken with a Windows 8 machine (with hopefully your app running) I’ve got a special gift for you!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10364081" width="1" height="1"&gt;</content><author><name>GlenGordon</name><uri>http://blogs.msdn.com/glengordon/ProfileUrlRedirect.ashx</uri></author><category term="Windows 8" scheme="http://blogs.msdn.com/b/glengordon/archive/tags/Windows+8/" /><category term="W8W" scheme="http://blogs.msdn.com/b/glengordon/archive/tags/W8W/" /></entry><entry><title>Developer sessions at the Microsoft Store in Atlanta starting October 29</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/glengordon/archive/2012/10/26/developer-sessions-at-the-microsoft-store-in-atlanta-starting-october-29.aspx" /><id>http://blogs.msdn.com/b/glengordon/archive/2012/10/26/developer-sessions-at-the-microsoft-store-in-atlanta-starting-october-29.aspx</id><published>2012-10-26T21:29:36Z</published><updated>2012-10-26T21:29:36Z</updated><content type="html">&lt;p&gt;We’re putting together some great sessions for developers at the Microsoft store in Lenox Square. Come out each Monday night from 5 to 8, learn about Windows 8 development, do a hands on lab on your own machine, and get started building apps today!&lt;/p&gt;  &lt;p&gt;Sign up for the sessions here! &lt;a title="http://www.msdnevents.com/workshops/" href="http://www.msdnevents.com/workshops/"&gt;http://www.msdnevents.com/workshops/&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10363228" width="1" height="1"&gt;</content><author><name>GlenGordon</name><uri>http://blogs.msdn.com/glengordon/ProfileUrlRedirect.ashx</uri></author><category term="Community" scheme="http://blogs.msdn.com/b/glengordon/archive/tags/Community/" /><category term="Windows 8" scheme="http://blogs.msdn.com/b/glengordon/archive/tags/Windows+8/" /></entry><entry><title>Windows 8 *Monday* on October 22</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/glengordon/archive/2012/10/19/windows-8-monday-on-october-22.aspx" /><id>http://blogs.msdn.com/b/glengordon/archive/2012/10/19/windows-8-monday-on-october-22.aspx</id><published>2012-10-19T18:16:40Z</published><updated>2012-10-19T18:16:40Z</updated><content type="html">&lt;p&gt;Next week I have a conflict on Wednesday, so I’m changing Windows 8 Wednesday to a Windows 8 Monday. Since I’m in charge of it I can do that.&lt;/p&gt;  &lt;p&gt;Please join me between 11 AM and 2 PM at the &lt;a href="http://www.bing.com/local/details.aspx?lid=YN203x401054120&amp;amp;qt=yp&amp;amp;what=microsoft&amp;amp;where=Alpharetta%2c+Georgia&amp;amp;s_cid=ansPhBkYp02&amp;amp;mkt=en-us&amp;amp;q=microsoft+alpharetta&amp;amp;FORM=LARE"&gt;Microsoft office in Alpharetta&lt;/a&gt; to chat about Windows 8 apps, get your in-development app running on a slate so you can test out multi touch and accelerometer support, or talk about porting an app.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10361267" width="1" height="1"&gt;</content><author><name>GlenGordon</name><uri>http://blogs.msdn.com/glengordon/ProfileUrlRedirect.ashx</uri></author><category term="Windows 8" scheme="http://blogs.msdn.com/b/glengordon/archive/tags/Windows+8/" /><category term="W8W" scheme="http://blogs.msdn.com/b/glengordon/archive/tags/W8W/" /></entry><entry><title>ReMIX South 2012 designer developer conference is this weekend</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/glengordon/archive/2012/10/18/remix-south-2012-designer-developer-conference-is-this-weekend.aspx" /><id>http://blogs.msdn.com/b/glengordon/archive/2012/10/18/remix-south-2012-designer-developer-conference-is-this-weekend.aspx</id><published>2012-10-18T16:28:34Z</published><updated>2012-10-18T16:28:34Z</updated><content type="html">&lt;p&gt;&lt;a href="http://www.remixsouth.com/"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="remix2012[1]" border="0" alt="remix2012[1]" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-31-52-metablogapi/6470.remix2012_5B00_1_5D005F00_3.jpg" width="640" height="362" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;There’s still time to sign up for THE designer and developer conference in the Southeast – &lt;a href="http://www.remixsouth.com/"&gt;ReMIX&lt;/a&gt;! Lots of fantastic sessions, great tutorials, opportunities to network and meet experts in various areas.&lt;/p&gt;  &lt;p&gt;I’ll be at the conference on Saturday giving one-on-one help to folks who want to learn about Windows 8 development and design.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10360873" width="1" height="1"&gt;</content><author><name>GlenGordon</name><uri>http://blogs.msdn.com/glengordon/ProfileUrlRedirect.ashx</uri></author><category term="Community" scheme="http://blogs.msdn.com/b/glengordon/archive/tags/Community/" /></entry><entry><title>Windows 8 Wednesday Office Hours for October 17</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/glengordon/archive/2012/10/16/windows-8-wednesday-office-hours-for-october-17.aspx" /><id>http://blogs.msdn.com/b/glengordon/archive/2012/10/16/windows-8-wednesday-office-hours-for-october-17.aspx</id><published>2012-10-16T19:01:13Z</published><updated>2012-10-16T19:01:13Z</updated><content type="html">&lt;p&gt;On Wednesday October 17 I’ll be at the &lt;a href="http://www.bing.com/local/details.aspx?lid=YN203x401054120&amp;amp;qt=yp&amp;amp;what=microsoft&amp;amp;where=Alpharetta%2c+Georgia&amp;amp;s_cid=ansPhBkYp02&amp;amp;mkt=en-us&amp;amp;q=microsoft+alpharetta&amp;amp;FORM=LARE"&gt;Microsoft office in Alpharetta&lt;/a&gt; from 11 AM until 2:00 PM.&lt;/p&gt;  &lt;p&gt;Bring your Windows 8 app in development or your game or app on other platforms&amp;#160; you want to discuss porting. I’ll have a slate device we can test your app on if you like.&lt;/p&gt;  &lt;p&gt;See you there!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10360106" width="1" height="1"&gt;</content><author><name>GlenGordon</name><uri>http://blogs.msdn.com/glengordon/ProfileUrlRedirect.ashx</uri></author><category term="Windows 8" scheme="http://blogs.msdn.com/b/glengordon/archive/tags/Windows+8/" /><category term="W8W" scheme="http://blogs.msdn.com/b/glengordon/archive/tags/W8W/" /></entry><entry><title>Windows 8–Are you developing for it? Why or why not?</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/glengordon/archive/2012/10/15/windows-8-are-you-developing-for-it-why-or-why-not.aspx" /><id>http://blogs.msdn.com/b/glengordon/archive/2012/10/15/windows-8-are-you-developing-for-it-why-or-why-not.aspx</id><published>2012-10-15T23:47:13Z</published><updated>2012-10-15T23:47:13Z</updated><content type="html">&lt;p&gt;Windows 8 is coming. And with it, huge developer opportunities.&lt;/p&gt;  &lt;p&gt;Lots of developers are getting their apps ready for the store. Are you one of them? Are you considering it? Answer these questions and let me know where you stand on Windows 8 development. If you live in Georgia, Alabama and Mississippi, I’ll pick 3 random winners from those who send feedback by Wednesday, October 17 at noon to win a $20 Xbox live points card. And if you have an app in the store, I’ll pick 3 to award a $50 Xbox live points card just for telling me about your experience.&lt;/p&gt;  &lt;p&gt;Here are the questions:&lt;/p&gt;  &lt;p&gt;If you have created any Windows 8 apps:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;What do they do?&lt;/li&gt;    &lt;li&gt;When do you expect them to be published? If they are published, please send me the link. If not, what’s the reason?&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;If you have not created any Windows 8 apps:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Why not? Are you waiting for something in particular? If so, what?&lt;/li&gt;    &lt;li&gt;When do you think you might start?&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Do you do development for other platforms/phones? Is Windows 8 more or less appealing? Why?&lt;/p&gt;  &lt;p&gt;Send me the responses using the &lt;a title="http://blogs.msdn.com/b/glengordon/contact.aspx" href="http://blogs.msdn.com/b/glengordon/contact.aspx"&gt;contact me&lt;/a&gt; form (I have to do that to track the responses received via this blog post).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10359839" width="1" height="1"&gt;</content><author><name>GlenGordon</name><uri>http://blogs.msdn.com/glengordon/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>PowerShell Saturday Atlanta is October 27</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/glengordon/archive/2012/10/10/powershell-saturday-atlanta-is-october-27.aspx" /><id>http://blogs.msdn.com/b/glengordon/archive/2012/10/10/powershell-saturday-atlanta-is-october-27.aspx</id><published>2012-10-10T15:30:10Z</published><updated>2012-10-10T15:30:10Z</updated><content type="html">&lt;p&gt;PowerShell Saturday #003 will bring together developers, IT professionals, DBAs, and developers from Atlanta and the surrounding areas for a full day of intense learning and fun on October 27, 2012. With fifteen sessions covering a milieu of topics like Windows 8, Exchange, SQL Server, and of course PowerShell, this event offers a unique opportunity to participate in a diverse community.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Chance to learn Windows PowerShell from experts in the field like Ed Wilson ”The Microsoft Scripting Guy” – the person who has written 5 books on Windows PowerShell and taught literally thousands of people in person.&lt;/li&gt;    &lt;li&gt;The event will be great fun – a chance to interact with 200 other people who LOVE Windows PowerShell so much, and realize the value of Windows PowerShell that they are willing to give up their Saturday to learn the stuff.&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;It will be of immediate value – with three tracks of information – Introductory PowerShell, Advanced PowerShell, and Applied PowerShell, there will be plenty of new things to learn!&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;The second official Iron Scripter event – put your scripting skills to the test and take home the Iron Scripter badge for PowerShell Saturday #003!&lt;/li&gt;    &lt;li&gt;You will have an opportunity to meet and learn about some of our sponsors and their products&lt;/li&gt;    &lt;li&gt;There will be great prizes handed out.&lt;/li&gt;    &lt;li&gt;This will be a UNIQUE opportunity for some great networking. Bring your business cards to the event, and be prepared to make new friends, establish new contacts, and find great support.&lt;/li&gt;    &lt;li&gt;It is a great chance to find out information about the Atlanta PowerShell Users Group.&lt;/li&gt;    &lt;li&gt;The nominal fee covers lunch and snacks.&lt;/li&gt;    &lt;li&gt;You can also meet the Scripting Wife!&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;For more information visit &lt;a href="http://powershellsaturday.com/003/"&gt;http://powershellsaturday.com/003/&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Check out the latest session list at &lt;/strong&gt;&lt;a href="http://powershellsaturday.com/003/presentations/"&gt;&lt;strong&gt;http://powershellsaturday.com/003/presentations/ &lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10358314" width="1" height="1"&gt;</content><author><name>GlenGordon</name><uri>http://blogs.msdn.com/glengordon/ProfileUrlRedirect.ashx</uri></author><category term="Community" scheme="http://blogs.msdn.com/b/glengordon/archive/tags/Community/" /></entry><entry><title>DotNetRocks Roadshow coming to Atlanta on October 22</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/glengordon/archive/2012/10/09/dotnetrocks-roadshow-coming-to-atlanta-on-october-22.aspx" /><id>http://blogs.msdn.com/b/glengordon/archive/2012/10/09/dotnetrocks-roadshow-coming-to-atlanta-on-october-22.aspx</id><published>2012-10-09T19:10:26Z</published><updated>2012-10-09T19:10:26Z</updated><content type="html">&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-31-52-metablogapi/8244.DNRRoadTripWeb_5F00_2.jpg"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="DNRRoadTripWeb" border="0" alt="DNRRoadTripWeb" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-31-52-metablogapi/3343.DNRRoadTripWeb_5F00_thumb.jpg" width="244" height="220" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Carl Franklin and Richard Campbell are hitting the road in the USA with the traveling edition of their &lt;a href="http://www.dotnetrocks.com/Default.aspx"&gt;DotNetRocks show&lt;/a&gt;. These guys are always a blast to hear live, you never know what’s going to happen. &lt;/p&gt;  &lt;p&gt;Their &lt;a href="http://www.dotnetrocks.com/roadtrip.aspx"&gt;DotNetRocks Visual Studio 2012 Road Trip&lt;/a&gt; will be stopping in Atlanta on Monday, October 22 featuring a special guest – author and awesome person &lt;a href="http://thedatafarm.com/blog/"&gt;Julie Lerman&lt;/a&gt;!&lt;/p&gt;  &lt;p&gt;This show is always packed, so &lt;a href="http://www.microsoft.com/click/services/Redirect2.ashx?CR_CC=200141036&amp;amp;CR_EAC=300056106"&gt;register today&lt;/a&gt; to save your spot! &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10357933" width="1" height="1"&gt;</content><author><name>GlenGordon</name><uri>http://blogs.msdn.com/glengordon/ProfileUrlRedirect.ashx</uri></author><category term="Community" scheme="http://blogs.msdn.com/b/glengordon/archive/tags/Community/" /></entry><entry><title>New Windows 8 app meetup starting in Atlanta</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/glengordon/archive/2012/10/08/new-windows-8-app-meetup-starting-in-atlanta.aspx" /><id>http://blogs.msdn.com/b/glengordon/archive/2012/10/08/new-windows-8-app-meetup-starting-in-atlanta.aspx</id><published>2012-10-08T20:08:15Z</published><updated>2012-10-08T20:08:15Z</updated><content type="html">&lt;p&gt;If you are in the Atlanta area and want to get started (or have already started) building Windows 8 apps, this meetup is for you!&lt;/p&gt;  &lt;p&gt;&lt;a title="http://www.meetup.com/Atlanta-Windows-Apps/" href="http://www.meetup.com/Atlanta-Windows-Apps/"&gt;http://www.meetup.com/Atlanta-Windows-Apps/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;The organizers are taking a fresh approach to technical meetups. In addition to presentations, there will be a lot of peer sharing, networking, collaboration, support, contests, social events, and more.&lt;/p&gt;  &lt;p&gt;Another spin on the group is the audience. In addition to people who architect and code Windows Store apps, we want to attract a lot of designers to the group. Many times experienced coders have a great idea for a Windows Store app, but no good design skills. So we hope to foster a community of Windows app designers, too.&lt;/p&gt;  &lt;p&gt;At one point, there were no good web designers. Nowadays, web design is quite a widespread skill.&amp;#160; I’m hoping that there are designers in the Atlanta area who want to take on the challenge of becoming well known for modern Microsoft design with Windows 8 apps, either through blogging and publications and samples, or on a consulting basis. Lots of money to be made in both!&lt;/p&gt;  &lt;p&gt;If you have it in you to be on the cutting edge of design, this group is a great place to do it.&lt;/p&gt;  &lt;p&gt;So join &lt;a title="http://www.meetup.com/Atlanta-Windows-Apps/" href="http://www.meetup.com/Atlanta-Windows-Apps/"&gt;http://www.meetup.com/Atlanta-Windows-Apps/&lt;/a&gt; and tell your friends! The first meeting will be a doozy, it will be a recap of Microsoft’s upcoming &lt;a href="http://www.buildwindows.com/"&gt;BUILD&lt;/a&gt; conference. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10357486" width="1" height="1"&gt;</content><author><name>GlenGordon</name><uri>http://blogs.msdn.com/glengordon/ProfileUrlRedirect.ashx</uri></author><category term="Community" scheme="http://blogs.msdn.com/b/glengordon/archive/tags/Community/" /><category term="Windows 8" scheme="http://blogs.msdn.com/b/glengordon/archive/tags/Windows+8/" /></entry><entry><title>Windows 8 Game Hackathon October 3-4 in ATL</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/glengordon/archive/2012/10/01/windows-8-game-hackathon-october-3-4-in-atl.aspx" /><id>http://blogs.msdn.com/b/glengordon/archive/2012/10/01/windows-8-game-hackathon-october-3-4-in-atl.aspx</id><published>2012-10-01T18:22:06Z</published><updated>2012-10-01T18:22:06Z</updated><content type="html">&lt;p&gt;Think you have the chops to create a game for Windows 8 in 2 days? Come learn, build and win at this hackathon in ATL! &lt;/p&gt;  &lt;p&gt;In conjunction with SIEGEcon, Microsoft is sponsoring a game development contest. Come learn about Windows 8, team up, create games and win. Full details are at &lt;a href="http://hackathon.siegecon.net"&gt;http://hackathon.siegecon.net&lt;/a&gt; so sign up today!&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;u&gt;When&lt;/u&gt;:&lt;/b&gt; WED OCT 3 - THU OCT 4    &lt;br /&gt;&lt;b&gt;&lt;u&gt;Where&lt;/u&gt;: &lt;/b&gt;Atlanta Marriott Northwest, Atlanta GA    &lt;br /&gt;&lt;b&gt;&lt;u&gt;How to get involved&lt;/u&gt;: &lt;/b&gt;&lt;/p&gt;  &lt;li&gt;&lt;b&gt;Sign Up: &lt;/b&gt;Register for your FREE admission to the Hackathon: &lt;a href="http://register.siegecon.net"&gt;http://register.siegecon.net&lt;/a&gt;&lt;/li&gt;  &lt;li&gt;&lt;b&gt;Shout Out: &lt;/b&gt;Share this link with friends: &lt;a href="http://hackathon.siegecon.net"&gt;http://hackathon.siegecon.net&lt;/a&gt;&lt;/li&gt;  &lt;li&gt;&lt;b&gt;Square Off:&lt;/b&gt; Come as a team, or come as an individual and we’ll help individuals get together into teams.    &lt;br /&gt;&lt;b&gt;&lt;u&gt;Who should come&lt;/u&gt;: &lt;/b&gt;Game developers – professionals, students and hobbyists – who want to join a team, build a game in 24 hours, and compete for great prizes in an atmosphere of fun, collaboration, and competition.     &lt;br /&gt;&lt;b&gt;&lt;u&gt;What&lt;/u&gt;:&lt;/b&gt; Nothing fosters creativity and productivity like a competition with awesome prizes. The 2012 SIEGE Hackathon is a two day event that brings together game developers eager to find out what they can build on a deadline.     &lt;br /&gt;Judges include representatives from several local game dev studios.    &lt;br /&gt;Professional participants, take a break from your day-to-day and experiment with something new and refreshing – something that might become a seed for a future project. Plus, of course, a chance to meet the most enthusiastic and energetic young developers. Student participants will get a great chance to showcase their skills and get feedback from local professionals.&lt;/li&gt;  &lt;li&gt;&lt;b&gt;&lt;u&gt;Training&lt;/u&gt;:&lt;/b&gt; Windows 8 is poised to provide the single largest developer opportunity in history. With over 650 million licenses of Windows out there today, a reimagined user experience, the new windows Store for apps, and a slew of exciting new devices and form factors, now is the time to create apps for Windows 8. Casual and serious gaming will make up a huge portion of that opportunity, and now is the time to take advantage of the launch wave of Windows 8 by learning the options for game development on Windows 8. In this session, you’ll learn about the Windows 8 platform, how to building games in HTML, C#, DirectX, and other platforms like Xamarin and Unity, and how to publish to and get the most out of the Windows Store. Plus you’ll get tons of resources for being successful with your game development ventures.&lt;b&gt;&lt;u&gt;&lt;/u&gt;&lt;/b&gt;&lt;/li&gt;  &lt;li&gt;&lt;b&gt;&lt;u&gt;Schedule: &lt;/u&gt;&lt;/b&gt;This FREE event includes training, the chance to form a long-lasting team, and coaching to help you on your path to success! All events are at the SIEGE hotel, the Marriott NW Atlanta. We'll have space where you can work around the clock. We have extended our room block to these nights, so take advantage of our discounted rates early!    &lt;br /&gt;Wednesday, Oct. 3    &lt;br /&gt;9:00-10:00, meet and greet, find teams    &lt;br /&gt;10:00-12:00, Windows 8 Training Session pt.1    &lt;br /&gt;12:00-12:30, Break    &lt;br /&gt;12:30-2:30, Windows 8 Training Session pt.2    &lt;br /&gt;2:30-3:00, Finalize Teams    &lt;br /&gt;3pm+ Hackathon    &lt;br /&gt;Thursday, Oct. 4    &lt;br /&gt;7pm, Stop    &lt;br /&gt;7:00-7:30, Dinner    &lt;br /&gt;7:30-8:30, Demos and Judging&lt;/li&gt;  &lt;li&gt;&lt;b&gt;&lt;u&gt;Who will be there&lt;/u&gt;: &lt;/b&gt;Game industry professionals and students with a passion for game development and a desire to get a game done. &lt;/li&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10354854" width="1" height="1"&gt;</content><author><name>GlenGordon</name><uri>http://blogs.msdn.com/glengordon/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>Windows 8 Wednesdays in Atlanta starting this week</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/glengordon/archive/2012/09/25/windows-8-wednesdays-in-atlanta-starting-this-week.aspx" /><id>http://blogs.msdn.com/b/glengordon/archive/2012/09/25/windows-8-wednesdays-in-atlanta-starting-this-week.aspx</id><published>2012-09-25T15:53:00Z</published><updated>2012-09-25T15:53:00Z</updated><content type="html">&lt;p&gt;Hopefully by now everyone has seen that the Windows Store is &lt;a href="http://blogs.msdn.com/b/windowsstore/archive/2012/09/11/windows-store-now-open-to-all-developers.aspx"&gt;accepting app submissions&lt;/a&gt; from every developer. This is another huge step on the road to general availability of Windows 8 to all of our customers. I want every developer to be successful with his or her apps, so I’m trying a new way to help developers out with what I’m calling Windows 8 Wednesdays.&lt;/p&gt;  &lt;h1&gt;*W8W*&lt;/h1&gt;  &lt;p&gt;Windows 8 Wednesdays will give you the opportunity to sit down with either me or my colleague &lt;a href="http://blogs.msdn.com/b/tarawalker/"&gt;Tara Walker&lt;/a&gt; and get specific help with developing your Windows 8 apps. Whether you’re just starting out, thinking of porting an app from another platform, looking for advice on how to incorporate Windows 8 features like Live Tiles, Sharing and Search, or running into challenges with specific areas of development, we’ll be here to help.&lt;/p&gt;  &lt;p&gt;If you live on the north side, come on over to the &lt;a href="http://www.bing.com/maps/#bGlkPXluMjAzeDQwMTA1NDEyMA=="&gt;Microsoft office in Alpharetta&lt;/a&gt; anytime between 10 AM and 2. Double check my &lt;a href="http://twitter.com/glengordon"&gt;Twitter feed&lt;/a&gt; to make sure I haven’t been called away to something else.&lt;/p&gt;  &lt;p&gt;For those of you not on the north side of Atlanta, fear not! Tara is working on establishing the same Windows 8 Wednesday “office hours” in conjunction with an excellent co-working facility in Atlanta – &lt;a href="http://strongboxwest.com/"&gt;Strongbox West&lt;/a&gt;. Check Tara’s &lt;a href="http://blogs.msdn.com/b/tarawalker/"&gt;blog&lt;/a&gt; for information.&lt;/p&gt;  &lt;p&gt;See you on September 26!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10353074" width="1" height="1"&gt;</content><author><name>GlenGordon</name><uri>http://blogs.msdn.com/glengordon/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>Managing Settings in Windows Phone and Windows 8 Store apps</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/glengordon/archive/2012/09/17/managing-settings-in-windows-phone-and-windows-8-store-apps.aspx" /><id>http://blogs.msdn.com/b/glengordon/archive/2012/09/17/managing-settings-in-windows-phone-and-windows-8-store-apps.aspx</id><published>2012-09-17T05:04:30Z</published><updated>2012-09-17T05:04:30Z</updated><content type="html">&lt;p&gt;I received a few questions at an event recently as to how to handle application settings in a Windows 8 Store app and how it is different from doing so in a Windows Store app. Turns out there is a lot of similarity, in the code as well as the platform offering for storing them, but Windows 8 does have some unique capabilities and challenges. &lt;/p&gt;  &lt;p&gt;A settings page in a Windows Phone app is pretty easy. You basically create an additional XAML page in your app to provide the UI for the user to view and change settings. If you use the &lt;a href="http://msdn.microsoft.com/en-us/library/cc626492(v=vs.95)"&gt;IsolatedStorageSettings&lt;/a&gt; class you get a nice, simple way to store name/value pairs of settings associated with your application.&lt;/p&gt;  &lt;p&gt;Here’s a simple example of managing settings in a Windows Phone project. In this app we’re storing a boolean for whether the customer is tax exempt, the state they live in, their preferred shipping speed, and their email address. The class AppSettings (below) manages saving and retrieving our sample settings. &lt;/p&gt;  &lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;   &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;p&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Diagnostics;&lt;/p&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.IO.IsolatedStorage;&lt;br /&gt;&lt;p&gt;&lt;span style="color: #0000ff"&gt;namespace&lt;/span&gt; SettingsDemo&lt;br /&gt;{&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; AppSettings&lt;br /&gt;    {&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;// Our isolated storage settings&lt;/span&gt;&lt;br /&gt;        IsolatedStorageSettings isolatedStore;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;// The isolated storage key names of our settings&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;const&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; TaxExemptSettingKeyName = &lt;span style="color: #006080"&gt;&amp;quot;TaxExemptSetting&amp;quot;&lt;/span&gt;;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;const&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; StateSettingKeyName = &lt;span style="color: #006080"&gt;&amp;quot;StateSetting&amp;quot;&lt;/span&gt;;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;const&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; NextDayShippingSettingKeyName = &lt;span style="color: #006080"&gt;&amp;quot;NextDayShippingSetting&amp;quot;&lt;/span&gt;;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;const&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; TwoDayShippingSettingKeyName = &lt;span style="color: #006080"&gt;&amp;quot;TwoDayShippingSetting&amp;quot;&lt;/span&gt;;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;const&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; GroundShippingSettingKeyName = &lt;span style="color: #006080"&gt;&amp;quot;GroundShippingSetting&amp;quot;&lt;/span&gt;;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;const&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; EmailSettingKeyName = &lt;span style="color: #006080"&gt;&amp;quot;UsernameSetting&amp;quot;&lt;/span&gt;;&lt;br /&gt;        &lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;// The default value of our settings&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;const&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; TaxExemptSettingDefault = &lt;span style="color: #0000ff"&gt;true&lt;/span&gt;;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;const&lt;/span&gt; &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; StateSettingDefault = 0;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;const&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; NextDayShippingSettingDefault = &lt;span style="color: #0000ff"&gt;true&lt;/span&gt;;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;const&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; TwoDayShippingSettingDefault = &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;const&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; GroundShippingSettingDefault = &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;const&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; EmailSettingDefault = &lt;span style="color: #006080"&gt;&amp;quot;&amp;quot;&lt;/span&gt;;&lt;br /&gt;        &lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// Constructor that gets the application settings.&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; AppSettings()&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;try&lt;/span&gt;&lt;br /&gt;            {&lt;br /&gt;                &lt;span style="color: #008000"&gt;// Get the settings for this application.&lt;/span&gt;&lt;br /&gt;                isolatedStore = IsolatedStorageSettings.ApplicationSettings;&lt;br /&gt;&lt;br /&gt;            }&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;catch&lt;/span&gt; (Exception e)&lt;br /&gt;            {&lt;br /&gt;                Debug.WriteLine(&lt;span style="color: #006080"&gt;&amp;quot;Exception while using IsolatedStorageSettings: &amp;quot;&lt;/span&gt; + e.ToString());&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// Update a setting value for our application. If the setting does not&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// exist, then add the setting.&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;param name=&amp;quot;Key&amp;quot;&amp;gt;&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;param name=&amp;quot;value&amp;quot;&amp;gt;&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; AddOrUpdateValue(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; Key, Object &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;)&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; valueChanged = &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #008000"&gt;// If the key exists&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (isolatedStore.Contains(Key))&lt;br /&gt;            {&lt;br /&gt;                &lt;span style="color: #008000"&gt;// If the value has changed&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (isolatedStore[Key] != &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;)&lt;br /&gt;                {&lt;br /&gt;                    &lt;span style="color: #008000"&gt;// Store the new value&lt;/span&gt;&lt;br /&gt;                    isolatedStore[Key] = &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;;&lt;br /&gt;                    valueChanged = &lt;span style="color: #0000ff"&gt;true&lt;/span&gt;;&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;            &lt;span style="color: #008000"&gt;// Otherwise create the key.&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;else&lt;/span&gt;&lt;br /&gt;            {&lt;br /&gt;                isolatedStore.Add(Key, &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;);&lt;br /&gt;                valueChanged = &lt;span style="color: #0000ff"&gt;true&lt;/span&gt;;&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; valueChanged;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// Get the current value of the setting, or if it is not found, set the &lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// setting to the default setting.&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;typeparam name=&amp;quot;valueType&amp;quot;&amp;gt;&amp;lt;/typeparam&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;param name=&amp;quot;Key&amp;quot;&amp;gt;&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;param name=&amp;quot;defaultValue&amp;quot;&amp;gt;&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; valueType GetValueOrDefault&amp;lt;valueType&amp;gt;(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; Key, valueType defaultValue)&lt;br /&gt;        {&lt;br /&gt;            valueType &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #008000"&gt;// If the key exists, retrieve the value.&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (isolatedStore.Contains(Key))&lt;br /&gt;            {&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;value&lt;/span&gt; = (valueType)isolatedStore[Key];&lt;br /&gt;            }&lt;br /&gt;            &lt;span style="color: #008000"&gt;// Otherwise, use the default value.&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;else&lt;/span&gt;&lt;br /&gt;            {&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;value&lt;/span&gt; = defaultValue;&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// Save the settings.&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; Save()&lt;br /&gt;        {&lt;br /&gt;            isolatedStore.Save();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// Property to get and set a CheckBox Setting Key.&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; TaxExemptSetting&lt;br /&gt;        {&lt;br /&gt;            get&lt;br /&gt;            {&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; GetValueOrDefault&amp;lt;&lt;span style="color: #0000ff"&gt;bool&lt;/span&gt;&amp;gt;(TaxExemptSettingKeyName, TaxExemptSettingDefault);&lt;br /&gt;            }&lt;br /&gt;            set&lt;br /&gt;            {&lt;br /&gt;                AddOrUpdateValue(TaxExemptSettingKeyName, &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;);&lt;br /&gt;                Save();&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// Property to get and set a ListBox Setting Key.&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; StateSetting&lt;br /&gt;        {&lt;br /&gt;            get&lt;br /&gt;            {&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; GetValueOrDefault&amp;lt;&lt;span style="color: #0000ff"&gt;int&lt;/span&gt;&amp;gt;(StateSettingKeyName, StateSettingDefault);&lt;br /&gt;            }&lt;br /&gt;            set&lt;br /&gt;            {&lt;br /&gt;                AddOrUpdateValue(StateSettingKeyName, &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;);&lt;br /&gt;                Save();&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// Property to get and set a RadioButton Setting Key.&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; NextDayShippingSetting&lt;br /&gt;        {&lt;br /&gt;            get&lt;br /&gt;            {&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; GetValueOrDefault&amp;lt;&lt;span style="color: #0000ff"&gt;bool&lt;/span&gt;&amp;gt;(NextDayShippingSettingKeyName, NextDayShippingSettingDefault);&lt;br /&gt;            }&lt;br /&gt;            set&lt;br /&gt;            {&lt;br /&gt;                AddOrUpdateValue(NextDayShippingSettingKeyName, &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;);&lt;br /&gt;                Save();&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// Property to get and set a RadioButton Setting Key.&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; TwoDayShippingSetting&lt;br /&gt;        {&lt;br /&gt;            get&lt;br /&gt;            {&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; GetValueOrDefault&amp;lt;&lt;span style="color: #0000ff"&gt;bool&lt;/span&gt;&amp;gt;(TwoDayShippingSettingKeyName, TwoDayShippingSettingDefault);&lt;br /&gt;            }&lt;br /&gt;            set&lt;br /&gt;            {&lt;br /&gt;                AddOrUpdateValue(TwoDayShippingSettingKeyName, &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;);&lt;br /&gt;                Save();&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// Property to get and set a RadioButton Setting Key.&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; GroundShippingSetting&lt;br /&gt;        {&lt;br /&gt;            get&lt;br /&gt;            {&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; GetValueOrDefault&amp;lt;&lt;span style="color: #0000ff"&gt;bool&lt;/span&gt;&amp;gt;(GroundShippingSettingKeyName, GroundShippingSettingDefault);&lt;br /&gt;            }&lt;br /&gt;            set&lt;br /&gt;            {&lt;br /&gt;                AddOrUpdateValue(GroundShippingSettingKeyName, &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;);&lt;br /&gt;                Save();&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// Property to get and set a Username Setting Key.&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; EmailSetting&lt;br /&gt;        {&lt;br /&gt;            get&lt;br /&gt;            {&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; GetValueOrDefault&amp;lt;&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;&amp;gt;(EmailSettingKeyName, EmailSettingDefault);&lt;br /&gt;            }&lt;br /&gt;            set&lt;br /&gt;            {&lt;br /&gt;                AddOrUpdateValue(EmailSettingKeyName, &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;);&lt;br /&gt;                Save();&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;      &lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/p&gt;&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;

&lt;p&gt;Notice that we need to call the .Save() method on the IsolatedStorageSettings instance when the properties are updated.&lt;/p&gt;

&lt;p&gt;This settingsPage.xaml gives us the UI for the user to change the app’s settings.&lt;/p&gt;

&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;phone:PhoneApplicationPage&lt;/span&gt; &lt;br /&gt;    &lt;span style="color: #ff0000"&gt;x:Class&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;SettingsDemo.settingsPage&amp;quot;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #ff0000"&gt;xmlns&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #ff0000"&gt;xmlns:x&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #ff0000"&gt;xmlns:phone&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone&amp;quot;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #ff0000"&gt;xmlns:shell&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone&amp;quot;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #ff0000"&gt;xmlns:d&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;http://schemas.microsoft.com/expression/blend/2008&amp;quot;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #ff0000"&gt;xmlns:mc&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;http://schemas.openxmlformats.org/markup-compatibility/2006&amp;quot;&lt;/span&gt;&lt;br /&gt;    &lt;br /&gt;    &lt;span style="color: #ff0000"&gt;xmlns:local&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;clr-namespace:SettingsDemo&amp;quot;&lt;/span&gt;&lt;br /&gt;    &lt;br /&gt;    &lt;span style="color: #ff0000"&gt;FontFamily&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{StaticResource PhoneFontFamilyNormal}&amp;quot;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #ff0000"&gt;FontSize&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{StaticResource PhoneFontSizeNormal}&amp;quot;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #ff0000"&gt;Foreground&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{StaticResource PhoneForegroundBrush}&amp;quot;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #ff0000"&gt;SupportedOrientations&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Portrait&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Orientation&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Portrait&amp;quot;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #ff0000"&gt;mc:Ignorable&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;d&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;d:DesignHeight&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;768&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;d:DesignWidth&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;480&amp;quot;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #ff0000"&gt;shell:SystemTray&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;IsVisible&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;True&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;phone:PhoneApplicationPage.Resources&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;local:AppSettings&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Key&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;appSettings&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;local:AppSettings&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;phone:PhoneApplicationPage.Resources&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #008000"&gt;&amp;lt;!--LayoutRoot is the root grid where all page content is placed--&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;LayoutRoot&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Background&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Transparent&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid.RowDefinitions&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;RowDefinition&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Height&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Auto&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;RowDefinition&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Height&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;*&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid.RowDefinitions&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;&amp;lt;!--TitlePanel contains the name of the application and page title--&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;StackPanel&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;TitlePanel&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Grid&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;Row&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Margin&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;12,17,0,28&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBlock&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;ApplicationTitle&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;SETTINGS DEMO&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Style&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{StaticResource PhoneTextNormalStyle}&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBlock&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;PageTitle&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;settings&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Margin&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;9,-7,0,0&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Style&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{StaticResource PhoneTextTitle1Style}&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;StackPanel&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;&amp;lt;!--ContentPanel - place additional content here--&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;ContentPanel&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Grid&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;Row&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;1&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Margin&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;12,0,12,0&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;StackPanel&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Margin&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;30,0,0,0&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;CheckBox&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Content&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Tax Exempt&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Height&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Auto&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;HorizontalAlignment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Left&amp;quot;&lt;/span&gt;  &lt;span style="color: #ff0000"&gt;Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;TaxExemptSetting&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;VerticalAlignment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Top&amp;quot;&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #ff0000"&gt;IsChecked&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{Binding Source={StaticResource appSettings}, Path=TaxExemptSetting, Mode=TwoWay}&amp;quot;&lt;/span&gt;  &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBlock&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Margin&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0,25, 0, 0&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;State:&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;TextWrapping&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Wrap&amp;quot;&lt;/span&gt;  &lt;span style="color: #ff0000"&gt;HorizontalAlignment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Left&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ListBox&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Margin&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0,7, 0, 0&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;HorizontalAlignment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Left&amp;quot;&lt;/span&gt;&lt;br /&gt;                                  &lt;span style="color: #ff0000"&gt;SelectedIndex&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{Binding Source={StaticResource appSettings}, Path=StateSetting, Mode=TwoWay}&amp;quot;&lt;/span&gt;&lt;br /&gt;                                  &lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ListBoxItem&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Content&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Georgia&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ListBoxItem&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Content&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Alabama&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ListBoxItem&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Content&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Florida&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ListBox&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBlock&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Margin&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0,25, 0, 0&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Shipping speed:&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;TextWrapping&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Wrap&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;HorizontalAlignment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Left&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;RadioButton&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Content&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Overnight&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Height&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Auto&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;HorizontalAlignment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Left&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Margin&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0,0,0,0&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;NextDayShipping&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;VerticalAlignment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Top&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;GroupName&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;GroupOne&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;IsChecked&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{Binding Source={StaticResource appSettings}, Path=NextDayShippingSetting, Mode=TwoWay}&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;RadioButton&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Content&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Two day&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Height&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Auto&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;HorizontalAlignment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Left&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Margin&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0,0,0,0&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;TwoDayShipping&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;VerticalAlignment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Top&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;GroupName&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;GroupOne&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;IsChecked&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{Binding Source={StaticResource appSettings}, Path=TwoDayShippingSetting, Mode=TwoWay}&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;RadioButton&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Content&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Ground&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Height&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Auto&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;HorizontalAlignment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Left&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Margin&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0,0,0,0&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;GroundShipping&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;VerticalAlignment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Top&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;GroupName&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;GroupOne&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;IsChecked&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{Binding Source={StaticResource appSettings}, Path=GroundShippingSetting, Mode=TwoWay}&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBlock&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Height&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;36&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;HorizontalAlignment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Left&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Margin&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0,0,0,0&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;textBlock1&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;email address&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;VerticalAlignment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Top&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Width&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;169&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBox&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;textBoxEmail&amp;quot;&lt;/span&gt;  &lt;span style="color: #ff0000"&gt;HorizontalAlignment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Left&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Margin&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0,0,0,0&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;VerticalAlignment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Top&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Width&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;274&amp;quot;&lt;/span&gt;  &lt;br /&gt;                     &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{Binding Source={StaticResource appSettings}, Path=EmailSetting, Mode=OneWay}&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;StackPanel&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;    &lt;br /&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;phone:PhoneApplicationPage&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;

&lt;p&gt;In here we’re data binding the visual elements to the properties in the AppSettings class. We’ve declared an instance of that class in the Resources section of the file. Our controls are data bound two-way so when the user updates them, they write back to the class. We don’t do that for the textbox, because that’s a lot of writes while the user is typing. Instead, when the page is navigated away from, we update the class. Here’s the code behind where that happens.&lt;/p&gt;

&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Collections.Generic;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Linq;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Net;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Windows;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Windows.Controls;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Windows.Documents;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Windows.Input;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Windows.Media;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Windows.Media.Animation;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Windows.Shapes;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; Microsoft.Phone.Controls;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Windows.Navigation;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;namespace&lt;/span&gt; SettingsDemo&lt;br /&gt;{&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;partial&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; settingsPage : PhoneApplicationPage&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; settingsPage()&lt;br /&gt;        {&lt;br /&gt;            InitializeComponent();&lt;br /&gt;        }&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;protected&lt;/span&gt; &lt;span style="color: #0000ff"&gt;override&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; OnNavigatedFrom(NavigationEventArgs e)&lt;br /&gt;        {  &lt;br /&gt;            &lt;span style="color: #0000ff"&gt;base&lt;/span&gt;.OnNavigatedFrom(e);&lt;br /&gt;            AppSettings settings = (AppSettings)&lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.Resources[&lt;span style="color: #006080"&gt;&amp;quot;appSettings&amp;quot;&lt;/span&gt;];&lt;br /&gt;          &lt;br /&gt;            settings.EmailSetting = textBoxEmail.Text;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;

&lt;p&gt;Here’s a screenshot of the thing running.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-31-52-metablogapi/5383.settingsscreen_5F00_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="settingsscreen" border="0" alt="settingsscreen" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-31-52-metablogapi/2335.settingsscreen_5F00_thumb.png" width="292" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One thing you’ll notice about this approach is that it conforms to the UI paradigm for modern apps. That is, there is no “OK/Cancel” button for settings, as was in the past. When the user makes setting changes, they should both be saved right away, and also take effect in the app right away. The former is accomplished by simply calling .Save() on the underlying IsolatedStorageSettings.&lt;/p&gt;

&lt;p&gt;OK, so what about the concept of settings in a Windows Store app? We’ll need to save them, and in that regard, Windows Store is very similar to Windows Phone. Our AppSettings class above comes over to a Windows Store project with very few changes.&lt;/p&gt;

&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Diagnostics;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; Windows.Storage;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;namespace&lt;/span&gt; WPMigrateSettingsDemo&lt;br /&gt;{&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; AppSettings&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: #008000"&gt;// Our isolated storage settings&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;//IsolatedStorageSettings isolatedStore;&lt;/span&gt;&lt;br /&gt;        ApplicationDataContainer localSettings;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;// The isolated storage key names of our settings&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;const&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; TaxExemptSettingKeyName = &lt;span style="color: #006080"&gt;&amp;quot;TaxExemptSetting&amp;quot;&lt;/span&gt;;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;const&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; StateSettingKeyName = &lt;span style="color: #006080"&gt;&amp;quot;StateSetting&amp;quot;&lt;/span&gt;;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;const&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; NextDayShippingSettingKeyName = &lt;span style="color: #006080"&gt;&amp;quot;NextDayShippingSetting&amp;quot;&lt;/span&gt;;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;const&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; TwoDayShippingSettingKeyName = &lt;span style="color: #006080"&gt;&amp;quot;TwoDayShippingSetting&amp;quot;&lt;/span&gt;;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;const&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; GroundShippingSettingKeyName = &lt;span style="color: #006080"&gt;&amp;quot;GroundShippingSetting&amp;quot;&lt;/span&gt;;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;const&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; EmailSettingKeyName = &lt;span style="color: #006080"&gt;&amp;quot;UsernameSetting&amp;quot;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;// The default value of our settings&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;const&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; TaxExemptSettingDefault = &lt;span style="color: #0000ff"&gt;true&lt;/span&gt;;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;const&lt;/span&gt; &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; StateSettingDefault = 0;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;const&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; NextDayShippingSettingDefault = &lt;span style="color: #0000ff"&gt;true&lt;/span&gt;;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;const&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; TwoDayShippingSettingDefault = &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;const&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; GroundShippingSettingDefault = &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;const&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; EmailSettingDefault = &lt;span style="color: #006080"&gt;&amp;quot;&amp;quot;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// Constructor that gets the application settings.&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; AppSettings()&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;try&lt;/span&gt;&lt;br /&gt;            {&lt;br /&gt;                localSettings = ApplicationData.Current.LocalSettings;&lt;br /&gt;                &lt;span style="color: #008000"&gt;// Get the settings for this application.&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #008000"&gt;//isolatedStore = IsolatedStorageSettings.ApplicationSettings;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;            }&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;catch&lt;/span&gt; (Exception e)&lt;br /&gt;            {&lt;br /&gt;                            &lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// Update a setting value for our application. If the setting does not&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// exist, then add the setting.&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;param name=&amp;quot;Key&amp;quot;&amp;gt;&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;param name=&amp;quot;value&amp;quot;&amp;gt;&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; AddOrUpdateValue(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; Key, Object &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;)&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; valueChanged = &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #008000"&gt;// If the key exists&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #008000"&gt;//if (localSettings.Contains(Key))&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (localSettings.Values.ContainsKey(Key))&lt;br /&gt;            {&lt;br /&gt;                &lt;span style="color: #008000"&gt;// If the value has changed&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (localSettings.Values[Key] != &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;)&lt;br /&gt;                {&lt;br /&gt;                    &lt;span style="color: #008000"&gt;// Store the new value&lt;/span&gt;&lt;br /&gt;                    localSettings.Values[Key] = &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;;&lt;br /&gt;                    valueChanged = &lt;span style="color: #0000ff"&gt;true&lt;/span&gt;;&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;            &lt;span style="color: #008000"&gt;// Otherwise create the key.&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;else&lt;/span&gt;&lt;br /&gt;            {&lt;br /&gt;                localSettings.Values.Add(Key, &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;);&lt;br /&gt;                valueChanged = &lt;span style="color: #0000ff"&gt;true&lt;/span&gt;;&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; valueChanged;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// Get the current value of the setting, or if it is not found, set the &lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// setting to the default setting.&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;typeparam name=&amp;quot;valueType&amp;quot;&amp;gt;&amp;lt;/typeparam&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;param name=&amp;quot;Key&amp;quot;&amp;gt;&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;param name=&amp;quot;defaultValue&amp;quot;&amp;gt;&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;returns&amp;gt;&amp;lt;/returns&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; valueType GetValueOrDefault&amp;lt;valueType&amp;gt;(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; Key, valueType defaultValue)&lt;br /&gt;        {&lt;br /&gt;            valueType &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #008000"&gt;// If the key exists, retrieve the value.&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (localSettings.Values.ContainsKey(Key))&lt;br /&gt;            {&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;value&lt;/span&gt; = (valueType)localSettings.Values[Key];&lt;br /&gt;            }&lt;br /&gt;            &lt;span style="color: #008000"&gt;// Otherwise, use the default value.&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;else&lt;/span&gt;&lt;br /&gt;            {&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;value&lt;/span&gt; = defaultValue;&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// Save the settings.&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; Save()&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: #008000"&gt;//isolatedStore.Save();&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// Property to get and set a CheckBox Setting Key.&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; TaxExemptSetting&lt;br /&gt;        {&lt;br /&gt;            get&lt;br /&gt;            {&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; GetValueOrDefault&amp;lt;&lt;span style="color: #0000ff"&gt;bool&lt;/span&gt;&amp;gt;(TaxExemptSettingKeyName, TaxExemptSettingDefault);&lt;br /&gt;            }&lt;br /&gt;            set&lt;br /&gt;            {&lt;br /&gt;                AddOrUpdateValue(TaxExemptSettingKeyName, &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;);&lt;br /&gt;                Save();&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// Property to get and set a ListBox Setting Key.&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; StateSetting&lt;br /&gt;        {&lt;br /&gt;            get&lt;br /&gt;            {&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; GetValueOrDefault&amp;lt;&lt;span style="color: #0000ff"&gt;int&lt;/span&gt;&amp;gt;(StateSettingKeyName, StateSettingDefault);&lt;br /&gt;            }&lt;br /&gt;            set&lt;br /&gt;            {&lt;br /&gt;                AddOrUpdateValue(StateSettingKeyName, &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;);&lt;br /&gt;                Save();&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// Property to get and set a RadioButton Setting Key.&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; NextDayShippingSetting&lt;br /&gt;        {&lt;br /&gt;            get&lt;br /&gt;            {&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; GetValueOrDefault&amp;lt;&lt;span style="color: #0000ff"&gt;bool&lt;/span&gt;&amp;gt;(NextDayShippingSettingKeyName, NextDayShippingSettingDefault);&lt;br /&gt;            }&lt;br /&gt;            set&lt;br /&gt;            {&lt;br /&gt;                AddOrUpdateValue(NextDayShippingSettingKeyName, &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;);&lt;br /&gt;                Save();&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// Property to get and set a RadioButton Setting Key.&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; TwoDayShippingSetting&lt;br /&gt;        {&lt;br /&gt;            get&lt;br /&gt;            {&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; GetValueOrDefault&amp;lt;&lt;span style="color: #0000ff"&gt;bool&lt;/span&gt;&amp;gt;(TwoDayShippingSettingKeyName, TwoDayShippingSettingDefault);&lt;br /&gt;            }&lt;br /&gt;            set&lt;br /&gt;            {&lt;br /&gt;                AddOrUpdateValue(TwoDayShippingSettingKeyName, &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;);&lt;br /&gt;                Save();&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// Property to get and set a RadioButton Setting Key.&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;bool&lt;/span&gt; GroundShippingSetting&lt;br /&gt;        {&lt;br /&gt;            get&lt;br /&gt;            {&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; GetValueOrDefault&amp;lt;&lt;span style="color: #0000ff"&gt;bool&lt;/span&gt;&amp;gt;(GroundShippingSettingKeyName, GroundShippingSettingDefault);&lt;br /&gt;            }&lt;br /&gt;            set&lt;br /&gt;            {&lt;br /&gt;                AddOrUpdateValue(GroundShippingSettingKeyName, &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;);&lt;br /&gt;                Save();&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// Property to get and set a Username Setting Key.&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #008000"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; EmailSetting&lt;br /&gt;        {&lt;br /&gt;            get&lt;br /&gt;            {&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; GetValueOrDefault&amp;lt;&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;&amp;gt;(EmailSettingKeyName, EmailSettingDefault);&lt;br /&gt;            }&lt;br /&gt;            set&lt;br /&gt;            {&lt;br /&gt;                AddOrUpdateValue(EmailSettingKeyName, &lt;span style="color: #0000ff"&gt;value&lt;/span&gt;);&lt;br /&gt;                Save();&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;

&lt;p&gt;We use the &lt;strong&gt;Windows.Storage&lt;/strong&gt; namespace instead of &lt;strong&gt;System.IO.IsolatedStorage &lt;/strong&gt;and we use &lt;strong&gt;ApplicationData.Current.LocalSettings&lt;/strong&gt; (an &lt;strong&gt;ApplicationDataContainer&lt;/strong&gt;) instead of &lt;strong&gt;IsolatedStorageSettings.ApplicationSettings&lt;/strong&gt;. The rest of the code refers to &lt;strong&gt;localSettings.Values&lt;/strong&gt; instead of &lt;strong&gt;isolatedStore &lt;/strong&gt;but the rest is the same.&lt;/p&gt;

&lt;p&gt;In this sample I sought to mimic the Windows Phone settings capabilities, but it’s worth noting that in Windows Store apps, you can keep settings local (to the app on that machine) or roaming (with the user’s Microsoft ID automatically). Here are some good &lt;a title="http://msdn.microsoft.com/en-us/library/windows/apps/hh465094.aspx" href="http://msdn.microsoft.com/en-us/library/windows/apps/hh465094.aspx"&gt;guidelines on using roaming app data&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;How about the user interface aspect? Well, this requires us to connect into the Settings charm to display the settings screen for our app. So instead of simply navigating to a Settings.xaml page, we have to work with the &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.applicationsettings.settingspane.aspx"&gt;SettingsPane&lt;/a&gt;. It is a little tricky to set up, but it creates a better experience for accessing settings within Windows Store apps for users.&lt;/p&gt;

&lt;p&gt;First, we have to create a user control in our Windows Store project that’s going to contain the UI elements similar to the settings page in our Windows Phone app. We add a new User Control called SettingsFlyout to the project and use this XAML.&lt;/p&gt;

&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;UserControl&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #ff0000"&gt;x:Class&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;WPMigrateSettingsDemo.SettingsFlyout&amp;quot;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #ff0000"&gt;xmlns&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&amp;quot;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #ff0000"&gt;xmlns:x&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;http://schemas.microsoft.com/winfx/2006/xaml&amp;quot;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #ff0000"&gt;xmlns:local&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;using:WPMigrateSettingsDemo&amp;quot;&lt;/span&gt;&lt;br /&gt;    &lt;br /&gt;  &lt;br /&gt;    &lt;span style="color: #ff0000"&gt;xmlns:d&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;http://schemas.microsoft.com/expression/blend/2008&amp;quot;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #ff0000"&gt;xmlns:mc&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;http://schemas.openxmlformats.org/markup-compatibility/2006&amp;quot;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #ff0000"&gt;mc:Ignorable&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;d&amp;quot;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #ff0000"&gt;d:DesignHeight&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;300&amp;quot;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #ff0000"&gt;d:DesignWidth&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;400&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;UserControl.Resources&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;local:AppSettings&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Key&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;appSettings&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;local:AppSettings&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Style&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Key&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;SettingsBackButtonStyle&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;TargetType&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Button&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Setter&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Property&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;MinWidth&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Value&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Setter&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Property&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;FontFamily&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Value&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Segoe UI Symbol&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Setter&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Property&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;FontWeight&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Value&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Normal&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Setter&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Property&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;FontSize&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Value&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;26.66667&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Setter&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Property&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;AutomationProperties.AutomationId&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Value&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;BackButton&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Setter&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Property&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;AutomationProperties.Name&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Value&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Back&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Setter&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Property&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;AutomationProperties.ItemType&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Value&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Navigation Button&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Setter&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Property&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Template&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Setter.Value&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ControlTemplate&lt;/span&gt; &lt;span style="color: #ff0000"&gt;TargetType&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Button&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;RootGrid&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Width&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;30&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Height&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;30&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Margin&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;-6,-6,0,0&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                                &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBlock&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;BackgroundGlyph&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;&amp;amp;#xE0D4;&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Foreground&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Transparent&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                                &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBlock&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;NormalGlyph&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{StaticResource BackButtonSnappedGlyph}&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Foreground&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;White&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                                &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBlock&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;ArrowGlyph&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;&amp;amp;#xE0C4;&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Foreground&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;#00b2f0&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Opacity&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                            &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Rectangle&lt;/span&gt;&lt;br /&gt;                                &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;FocusVisualWhite&amp;quot;&lt;/span&gt;&lt;br /&gt;                                &lt;span style="color: #ff0000"&gt;IsHitTestVisible&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;False&amp;quot;&lt;/span&gt;&lt;br /&gt;                                &lt;span style="color: #ff0000"&gt;Stroke&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{StaticResource FocusVisualWhiteStrokeThemeBrush}&amp;quot;&lt;/span&gt; &lt;br /&gt;                                &lt;span style="color: #ff0000"&gt;StrokeEndLineCap&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Square&amp;quot;&lt;/span&gt;&lt;br /&gt;                                &lt;span style="color: #ff0000"&gt;StrokeDashArray&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;1,1&amp;quot;&lt;/span&gt;&lt;br /&gt;                                &lt;span style="color: #ff0000"&gt;Opacity&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt;&lt;br /&gt;                                &lt;span style="color: #ff0000"&gt;StrokeDashOffset&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;1.5&amp;quot;&lt;/span&gt;&lt;br /&gt;                                &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;                            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Rectangle&lt;/span&gt;&lt;br /&gt;                                &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;FocusVisualBlack&amp;quot;&lt;/span&gt;&lt;br /&gt;                                &lt;span style="color: #ff0000"&gt;IsHitTestVisible&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;False&amp;quot;&lt;/span&gt;&lt;br /&gt;                                &lt;span style="color: #ff0000"&gt;Stroke&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{StaticResource FocusVisualBlackStrokeThemeBrush}&amp;quot;&lt;/span&gt; &lt;br /&gt;                                &lt;span style="color: #ff0000"&gt;StrokeEndLineCap&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Square&amp;quot;&lt;/span&gt;&lt;br /&gt;                                &lt;span style="color: #ff0000"&gt;StrokeDashArray&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;1,1&amp;quot;&lt;/span&gt;&lt;br /&gt;                                &lt;span style="color: #ff0000"&gt;Opacity&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt;&lt;br /&gt;                                &lt;span style="color: #ff0000"&gt;StrokeDashOffset&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0.5&amp;quot;&lt;/span&gt;&lt;br /&gt;                                &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;                            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;VisualStateManager.VisualStateGroups&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                                &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;VisualStateGroup&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;CommonStates&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                                    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;VisualState&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Normal&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                                    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;VisualState&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;PointerOver&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                                        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Storyboard&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                                            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ObjectAnimationUsingKeyFrames&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Storyboard&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;TargetName&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;BackgroundGlyph&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Storyboard&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;TargetProperty&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Foreground&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                                                &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;DiscreteObjectKeyFrame&lt;/span&gt; &lt;span style="color: #ff0000"&gt;KeyTime&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Value&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{StaticResource BackButtonPointerOverBackgroundThemeBrush}&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                                            &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ObjectAnimationUsingKeyFrames&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                                        &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Storyboard&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                                    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;VisualState&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                                    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;VisualState&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Pressed&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                                        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Storyboard&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                                            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ObjectAnimationUsingKeyFrames&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Storyboard&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;TargetName&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;BackgroundGlyph&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Storyboard&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;TargetProperty&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Foreground&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                                                &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;DiscreteObjectKeyFrame&lt;/span&gt; &lt;span style="color: #ff0000"&gt;KeyTime&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Value&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;White&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                                            &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ObjectAnimationUsingKeyFrames&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                                            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;DoubleAnimation&lt;/span&gt;&lt;br /&gt;                                            &lt;span style="color: #ff0000"&gt;Storyboard&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;TargetName&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;ArrowGlyph&amp;quot;&lt;/span&gt;&lt;br /&gt;                                            &lt;span style="color: #ff0000"&gt;Storyboard&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;TargetProperty&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Opacity&amp;quot;&lt;/span&gt;&lt;br /&gt;                                            &lt;span style="color: #ff0000"&gt;To&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;1&amp;quot;&lt;/span&gt;&lt;br /&gt;                                            &lt;span style="color: #ff0000"&gt;Duration&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                                            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;DoubleAnimation&lt;/span&gt;&lt;br /&gt;                                            &lt;span style="color: #ff0000"&gt;Storyboard&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;TargetName&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;NormalGlyph&amp;quot;&lt;/span&gt;&lt;br /&gt;                                            &lt;span style="color: #ff0000"&gt;Storyboard&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;TargetProperty&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Opacity&amp;quot;&lt;/span&gt;&lt;br /&gt;                                            &lt;span style="color: #ff0000"&gt;To&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt;&lt;br /&gt;                                            &lt;span style="color: #ff0000"&gt;Duration&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                                        &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Storyboard&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                                    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;VisualState&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                                    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;VisualState&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Disabled&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                                        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Storyboard&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                                            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ObjectAnimationUsingKeyFrames&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Storyboard&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;TargetName&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;RootGrid&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Storyboard&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;TargetProperty&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Visibility&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                                                &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;DiscreteObjectKeyFrame&lt;/span&gt; &lt;span style="color: #ff0000"&gt;KeyTime&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Value&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Collapsed&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                                            &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ObjectAnimationUsingKeyFrames&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                                        &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Storyboard&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                                    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;VisualState&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                                &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;VisualStateGroup&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                                &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;VisualStateGroup&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;FocusStates&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                                    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;VisualState&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Focused&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                                        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Storyboard&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                                            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;DoubleAnimation&lt;/span&gt;&lt;br /&gt;                                            &lt;span style="color: #ff0000"&gt;Storyboard&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;TargetName&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;FocusVisualWhite&amp;quot;&lt;/span&gt;&lt;br /&gt;                                            &lt;span style="color: #ff0000"&gt;Storyboard&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;TargetProperty&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Opacity&amp;quot;&lt;/span&gt;&lt;br /&gt;                                            &lt;span style="color: #ff0000"&gt;To&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;1&amp;quot;&lt;/span&gt;&lt;br /&gt;                                            &lt;span style="color: #ff0000"&gt;Duration&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                                            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;DoubleAnimation&lt;/span&gt;&lt;br /&gt;                                            &lt;span style="color: #ff0000"&gt;Storyboard&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;TargetName&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;FocusVisualBlack&amp;quot;&lt;/span&gt;&lt;br /&gt;                                            &lt;span style="color: #ff0000"&gt;Storyboard&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;TargetProperty&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Opacity&amp;quot;&lt;/span&gt;&lt;br /&gt;                                            &lt;span style="color: #ff0000"&gt;To&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;1&amp;quot;&lt;/span&gt;&lt;br /&gt;                                            &lt;span style="color: #ff0000"&gt;Duration&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                                        &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Storyboard&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                                    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;VisualState&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                                    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;VisualState&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Unfocused&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                                    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;VisualState&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;PointerFocused&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                                &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;VisualStateGroup&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                            &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;VisualStateManager.VisualStateGroups&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                        &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ControlTemplate&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Setter.Value&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Setter&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Style&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;UserControl.Resources&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Border&lt;/span&gt; &lt;span style="color: #ff0000"&gt;BorderBrush&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;#00b2f0&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;BorderThickness&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;1,0,0,0&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Background&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;DarkBlue&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;VerticalAlignment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Stretch&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #008000"&gt;&amp;lt;!-- Root grid definition --&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid.RowDefinitions&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;RowDefinition&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Height&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;80&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;RowDefinition&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Height&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;*&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid.RowDefinitions&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #008000"&gt;&amp;lt;!-- Header area for panel --&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Background&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;#00b2f0&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Grid&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;Row&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid.ColumnDefinitions&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ColumnDefinition&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Width&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;*&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid.ColumnDefinitions&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;StackPanel&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Orientation&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Horizontal&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Grid&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;Column&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Margin&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;40, 32, 17, 13&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Button&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Click&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;MySettingsBackClicked&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Margin&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;6,3,0,0&amp;quot;&lt;/span&gt;  &lt;span style="color: #ff0000"&gt;Style&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{StaticResource SettingsBackButtonStyle}&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBlock&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Margin&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;10,0,0,0&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;FontFamily&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Segoe UI&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;FontWeight&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;SemiLight&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;FontSize&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;24.6667&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Options&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Foreground&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;White&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Image&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Source&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Assets/smalltile-sdk.png&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Margin&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;400,0,6,0&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;StackPanel&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #008000"&gt;&amp;lt;!-- Settings Panel Content --&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ScrollViewer&lt;/span&gt; &lt;span style="color: #ff0000"&gt;VerticalScrollBarVisibility&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Auto&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Grid&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;Row&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;1&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Margin&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;40,33,40,39&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;VerticalAlignment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Top&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Grid&lt;/span&gt;.&lt;span style="color: #ff0000"&gt;RowSpan&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;3&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;StackPanel&lt;/span&gt; &lt;span style="color: #ff0000"&gt;x:Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;FlyoutContent&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;CheckBox&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Content&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Tax Exempt&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Height&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Auto&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;HorizontalAlignment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Left&amp;quot;&lt;/span&gt;  &lt;span style="color: #ff0000"&gt;Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;TaxExemptSetting&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;VerticalAlignment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Top&amp;quot;&lt;/span&gt;&lt;br /&gt;                    &lt;span style="color: #ff0000"&gt;IsChecked&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{Binding Source={StaticResource appSettings}, Path=TaxExemptSetting, Mode=TwoWay}&amp;quot;&lt;/span&gt;  &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;                        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBlock&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Margin&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0,25, 0, 0&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;State:&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;TextWrapping&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Wrap&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Style&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{StaticResource BasicTextStyle}&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;HorizontalAlignment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Left&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ComboBox&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Margin&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0,7, 0, 0&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;HorizontalAlignment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Left&amp;quot;&lt;/span&gt;&lt;br /&gt;                                  &lt;span style="color: #ff0000"&gt;SelectedIndex&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{Binding Source={StaticResource appSettings}, Path=StateSetting, Mode=TwoWay}&amp;quot;&lt;/span&gt;&lt;br /&gt;                                  &lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ComboBoxItem&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Content&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Georgia&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ComboBoxItem&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Content&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Alabama&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ComboBoxItem&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Content&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Florida&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                        &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ComboBox&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBlock&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Margin&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0,25, 0, 0&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Shipping speed:&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;TextWrapping&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Wrap&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Style&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{StaticResource BasicTextStyle}&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;HorizontalAlignment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Left&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;RadioButton&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Content&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Overnight&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Height&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Auto&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;HorizontalAlignment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Left&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Margin&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0,20,0,0&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;NextDayShipping&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;VerticalAlignment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Top&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;GroupName&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;GroupOne&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;IsChecked&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{Binding Source={StaticResource appSettings}, Path=NextDayShippingSetting, Mode=TwoWay}&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;RadioButton&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Content&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Two day&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Height&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Auto&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;HorizontalAlignment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Left&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Margin&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0,20,0,0&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;TwoDayShipping&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;VerticalAlignment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Top&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;GroupName&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;GroupOne&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;IsChecked&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{Binding Source={StaticResource appSettings}, Path=TwoDayShippingSetting, Mode=TwoWay}&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;RadioButton&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Content&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Ground&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Height&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Auto&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;HorizontalAlignment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Left&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Margin&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0,20,0,0&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;GroundShipping&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;VerticalAlignment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Top&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;GroupName&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;GroupOne&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;IsChecked&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{Binding Source={StaticResource appSettings}, Path=GroundShippingSetting, Mode=TwoWay}&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBlock&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Height&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;60&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;HorizontalAlignment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Left&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Margin&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0,20,0,0&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;textBlock1&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;email address&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;VerticalAlignment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Top&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Width&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;169&amp;quot;&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;                        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;TextBox&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;textBoxEmail&amp;quot;&lt;/span&gt;  &lt;span style="color: #ff0000"&gt;HorizontalAlignment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Left&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Margin&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;0,10,0,0&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;VerticalAlignment&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;Top&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Width&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;274&amp;quot;&lt;/span&gt;  &lt;br /&gt;                     &lt;span style="color: #ff0000"&gt;Text&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;{Binding Source={StaticResource appSettings}, Path=EmailSetting, Mode=OneWay}&amp;quot;&lt;/span&gt; &lt;span style="color: #ff0000"&gt;LostFocus&lt;/span&gt;&lt;span style="color: #0000ff"&gt;=&amp;quot;textBoxEmail_LostFocus_1&amp;quot;&lt;/span&gt;&lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;StackPanel&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ScrollViewer&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Grid&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Border&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;UserControl&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;

&lt;p&gt;When the settings screen is accessed from the app, it will look like this.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-31-52-metablogapi/7450.screenshot_5F00_09162012_5F00_233118_5F00_4.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="screenshot_09162012_233118" border="0" alt="screenshot_09162012_233118" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-31-52-metablogapi/1754.screenshot_5F00_09162012_5F00_233118_5F00_thumb_5F00_1.png" width="247" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There’s a &amp;lt;resources&amp;gt; section at the top that is related to the behavior and appearance of the back button at the top, which closes the settings pane. The rest of the XAML defines the controls on the page, almost the same way they do in Windows Phone (except I changed the list box to a combo box). The same data binding is used to an instance of the AppSettings class declared the same way at the top of the XAML file.&lt;/p&gt;

&lt;p&gt;The user control has some code to deal with saving the data in the text box when it loses focus, as well as some UI things for when the user navigates away from the panel, or clicks the back button with the app snapped.&lt;/p&gt;

&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Collections.Generic;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.IO;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Linq;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; Windows.Foundation;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; Windows.Foundation.Collections;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; Windows.UI.ApplicationSettings;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; Windows.UI.Xaml;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; Windows.UI.Xaml.Controls;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; Windows.UI.Xaml.Controls.Primitives;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; Windows.UI.Xaml.Data;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; Windows.UI.Xaml.Input;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; Windows.UI.Xaml.Media;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; Windows.UI.Xaml.Media.Animation;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; Windows.UI.Xaml.Navigation;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #008000"&gt;// The User Control item template is documented at http://go.microsoft.com/fwlink/?LinkId=234236&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;namespace&lt;/span&gt; WPMigrateSettingsDemo&lt;br /&gt;{&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;sealed&lt;/span&gt; &lt;span style="color: #0000ff"&gt;partial&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; SettingsFlyout : UserControl&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: #008000"&gt;// The guidelines recommend using 100px offset for the content animation.&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;const&lt;/span&gt; &lt;span style="color: #0000ff"&gt;int&lt;/span&gt; ContentAnimationOffset = 100;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; SettingsFlyout()&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.InitializeComponent();&lt;br /&gt;            FlyoutContent.Transitions = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; TransitionCollection();&lt;br /&gt;            FlyoutContent.Transitions.Add(&lt;span style="color: #0000ff"&gt;new&lt;/span&gt; EntranceThemeTransition()&lt;br /&gt;            {&lt;br /&gt;                FromHorizontalOffset = (SettingsPane.Edge == SettingsEdgeLocation.Right) ? ContentAnimationOffset : (ContentAnimationOffset * -1)&lt;br /&gt;            });&lt;br /&gt;        }&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; MySettingsBackClicked(&lt;span style="color: #0000ff"&gt;object&lt;/span&gt; sender, RoutedEventArgs e)&lt;br /&gt;        {&lt;br /&gt;           &lt;br /&gt;            &lt;span style="color: #008000"&gt;// First close our Flyout.&lt;/span&gt;&lt;br /&gt;            Popup parent = &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.Parent &lt;span style="color: #0000ff"&gt;as&lt;/span&gt; Popup;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (parent != &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;)&lt;br /&gt;            {&lt;br /&gt;                parent.IsOpen = &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;;&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #008000"&gt;// If the app is not snapped, then the back button shows the Settings pane again.&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (Windows.UI.ViewManagement.ApplicationView.Value != Windows.UI.ViewManagement.ApplicationViewState.Snapped)&lt;br /&gt;            {&lt;br /&gt;                SettingsPane.Show();&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; textBoxEmail_LostFocus_1(&lt;span style="color: #0000ff"&gt;object&lt;/span&gt; sender, RoutedEventArgs e)&lt;br /&gt;        {&lt;br /&gt;            AppSettings settings = (AppSettings)&lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.Resources[&lt;span style="color: #006080"&gt;&amp;quot;appSettings&amp;quot;&lt;/span&gt;];&lt;br /&gt;            settings.EmailSetting = textBoxEmail.Text;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;

&lt;p&gt;The biggest difference in the setting system between Windows Phone and Windows 8 is how this app settings UI ties into the Settings charm. There are a few ways to go about this, but I chose to connect the settings capability to the MainPage.xaml. In that page’s constructor, I added an event handler for the CommandsRequested event from the settings pane, so when the user invokes the Settings charm, we can add choices in the list. In that handler, we tell the system to add an Options command to the settings pane, and give it some code to run when that Options command is invoked. In this example I used a lambda expression to define a new Popup and fill the popup with an instance of the user control I defined above. We do a few other things to position the Popup and the user control properly based on screen resolution. Here’s the code behind for the mainpage.xaml file.&lt;/p&gt;

&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Collections.Generic;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.IO;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; System.Linq;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; Windows.Foundation;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; Windows.Foundation.Collections;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; Windows.UI.ApplicationSettings;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; Windows.UI.Xaml;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; Windows.UI.Xaml.Controls;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; Windows.UI.Xaml.Controls.Primitives;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; Windows.UI.Xaml.Data;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; Windows.UI.Xaml.Input;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; Windows.UI.Xaml.Media;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;using&lt;/span&gt; Windows.UI.Xaml.Navigation;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #008000"&gt;// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;namespace&lt;/span&gt; WPMigrateSettingsDemo&lt;br /&gt;{&lt;br /&gt;    &lt;span style="color: #008000"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #008000"&gt;/// An empty page that can be used on its own or navigated to within a Frame.&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #008000"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;sealed&lt;/span&gt; &lt;span style="color: #0000ff"&gt;partial&lt;/span&gt; &lt;span style="color: #0000ff"&gt;class&lt;/span&gt; MainPage : Page&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; Rect _windowBounds;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; Popup _settingsPopup;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;double&lt;/span&gt; _settingsWidth = 346;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; MainPage()&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.InitializeComponent();&lt;br /&gt;&lt;br /&gt;            _windowBounds = Window.Current.Bounds;&lt;br /&gt;&lt;br /&gt;            SettingsPane.GetForCurrentView().CommandsRequested += myCommandsRequested;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; myCommandsRequested(SettingsPane sender, SettingsPaneCommandsRequestedEventArgs args)&lt;br /&gt;        {&lt;br /&gt;&lt;br /&gt;            SettingsCommand cmd = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; SettingsCommand(&lt;span style="color: #006080"&gt;&amp;quot;options&amp;quot;&lt;/span&gt;, &lt;span style="color: #006080"&gt;&amp;quot;Options&amp;quot;&lt;/span&gt;,&lt;br /&gt;&lt;br /&gt;                 (x) =&amp;gt;&lt;br /&gt;                 {&lt;br /&gt;                     _settingsPopup = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Popup();&lt;br /&gt;                     _settingsPopup.Closed += OnPopupClosed;&lt;br /&gt;                     Window.Current.Activated += OnWindowActivated;&lt;br /&gt;                     _settingsPopup.IsLightDismissEnabled = &lt;span style="color: #0000ff"&gt;true&lt;/span&gt;;&lt;br /&gt;                     _settingsPopup.Width = _settingsWidth;&lt;br /&gt;                     _settingsPopup.Height = _windowBounds.Height;&lt;br /&gt;&lt;br /&gt;                     SettingsFlyout mypane = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; SettingsFlyout();&lt;br /&gt;                     mypane.Width = _settingsWidth;&lt;br /&gt;                     mypane.Height = _windowBounds.Height;&lt;br /&gt;&lt;br /&gt;                     _settingsPopup.Child = mypane;&lt;br /&gt;                     _settingsPopup.SetValue(Canvas.LeftProperty, _windowBounds.Width - _settingsWidth);&lt;br /&gt;                     _settingsPopup.SetValue(Canvas.TopProperty, 0);&lt;br /&gt;                     _settingsPopup.IsOpen = &lt;span style="color: #0000ff"&gt;true&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;                 });&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;            args.Request.ApplicationCommands.Add(cmd);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;private&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; OnWindowActivated(&lt;span style="color: #0000ff"&gt;object&lt;/span&gt; sender, Windows.UI.Core.WindowActivatedEventArgs e)&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (e.WindowActivationState == Windows.UI.Core.CoreWindowActivationState.Deactivated)&lt;br /&gt;            {&lt;br /&gt;                _settingsPopup.IsOpen = &lt;span style="color: #0000ff"&gt;false&lt;/span&gt;;&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; OnPopupClosed(&lt;span style="color: #0000ff"&gt;object&lt;/span&gt; sender, &lt;span style="color: #0000ff"&gt;object&lt;/span&gt; e)&lt;br /&gt;        {&lt;br /&gt;            Window.Current.Activated -= OnWindowActivated;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;

&lt;p&gt;One more note on roaming settings. Right now, settings don’t roam between Windows Phones (because users generally have only one phone anyway) or between Windows 8 and Windows Phone apps. If you wanted to accomplish something like that, you’d have to roll your own cloud-based settings system.&lt;/p&gt;

&lt;p&gt;Fundamentally, the approach for handling settings in a Windows Phone app and a Windows 8 app are quite similar. Hooking into the settings charm is a great way to integrate with the Windows 8 user experience, but the underlying way to set and retrieve them is the same. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10350007" width="1" height="1"&gt;</content><author><name>GlenGordon</name><uri>http://blogs.msdn.com/glengordon/ProfileUrlRedirect.ashx</uri></author><category term="Windows Phone 7" scheme="http://blogs.msdn.com/b/glengordon/archive/tags/Windows+Phone+7/" /><category term="Windows 8" scheme="http://blogs.msdn.com/b/glengordon/archive/tags/Windows+8/" /></entry><entry><title>Windows 8 apps for the PhoneGap developer-Files</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/glengordon/archive/2012/09/04/windows-8-apps-for-the-phonegap-developer-files.aspx" /><id>http://blogs.msdn.com/b/glengordon/archive/2012/09/04/windows-8-apps-for-the-phonegap-developer-files.aspx</id><published>2012-09-04T20:48:04Z</published><updated>2012-09-04T20:48:04Z</updated><content type="html">&lt;p&gt;(This is part 5 in my series on Windows 8 apps for the PhoneGap developer.)&lt;/p&gt;  &lt;p&gt;Most applications save and read data. That can be just something as simple as a counter, the users credentials, or game high score. Or it can be complex sets of data the user manipulates as “documents” or all the data your application manages as a big set. At some point, you have to persist that data to the user’s device, whether it’s as a cache of cloud stored information or not.&lt;/p&gt;  &lt;p&gt;PhoneGap provides file access in a few different ways. Let’s start with the simplest scenario and work up from there.&lt;/p&gt;  &lt;p&gt;If you are managing application data in a PhoneGap app, chances are you are writing to and reading to a file on the local file system. The name and location of the file are controlled by you, and you’re saving that file in an application specific location on the system. You might be serializing JSON data to it or otherwise saving name/value pairs as settings for your app.&lt;/p&gt;  &lt;p&gt;With Windows 8 JavaScript apps, you can store settings in a couple of different ways. The dead easy way is to just to do this.&lt;/p&gt;  &lt;div id="codeSnippetWrapper"&gt;   &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;var&lt;/span&gt; localSettings = Windows.Storage.ApplicationData.current.localSettings;&lt;br /&gt;localSettings.values[&lt;span style="color: #006080"&gt;&amp;quot;my setting&amp;quot;&lt;/span&gt;] = &lt;span style="color: #006080"&gt;&amp;quot;this is a setting&amp;quot;&lt;/span&gt;;&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;

&lt;p&gt;That’s it! Now you have a setting stored for the app locally. If the app is uninstalled and reinstalled, the setting is cleared. No other app can access this app’s settings. You can store strings and integers and such this way. Reading it is easy too.&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;br /&gt;&lt;span style="color: #008000"&gt;// Simple setting&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;var&lt;/span&gt; value = localSettings.values[&lt;span style="color: #006080"&gt;&amp;quot;my setting&amp;quot;&lt;/span&gt;];&lt;br /&gt;        &lt;br /&gt;&lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (!value)&lt;br /&gt;{&lt;br /&gt;    &lt;span style="color: #008000"&gt;// No data&lt;/span&gt;&lt;br /&gt;}&lt;br /&gt;&lt;span style="color: #0000ff"&gt;else&lt;/span&gt;&lt;br /&gt;{&lt;br /&gt;    &lt;span style="color: #008000"&gt;// Access data in value&lt;/span&gt;&lt;br /&gt;}&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;

&lt;p&gt;You can also collect several values together as a composite value to make them easy to pass around as arguments if needed.&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #008000"&gt;// Composite setting&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;var&lt;/span&gt; composite = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Windows.Storage.ApplicationDataCompositeValue();&lt;br /&gt;composite[&lt;span style="color: #006080"&gt;&amp;quot;loginAttemptCount&amp;quot;&lt;/span&gt;] = 1;&lt;br /&gt;composite[&lt;span style="color: #006080"&gt;&amp;quot;lastUserName&amp;quot;&lt;/span&gt;] = &lt;span style="color: #006080"&gt;&amp;quot;johndoe123&amp;quot;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;localSettings.values[&lt;span style="color: #006080"&gt;&amp;quot;loginAttempts&amp;quot;&lt;/span&gt;] = composite;&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;

&lt;p&gt;You can also have &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/br241599.aspx"&gt;settings containers&lt;/a&gt; for more complex scenarios. &lt;/p&gt;

&lt;p&gt;In addition to local settings, you can have roaming settings. These are tied to a combination of the user’s Microsoft account (formerly Live ID) and your application. So if I run your app on multiple computers on which I have an account, anything you save to roaming settings is automatically synchronized between computers. This is great for high scores and furthest level reached in games – it shouldn’t matter which machine I unlock the berzerker level on, I should have access to that on every machine with my credentials and your app. These are so simple to use, and you don’t have to set up any cloud services or anything! Here are the example above changed to be roaming.&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;var&lt;/span&gt; roamingSettings = Windows.Storage.ApplicationData.current.roamingSettings;&lt;br /&gt;roamingSettings.values[&lt;span style="color: #006080"&gt;&amp;quot;my setting&amp;quot;&lt;/span&gt;] = &lt;span style="color: #006080"&gt;&amp;quot;this is a setting&amp;quot;&lt;/span&gt;;&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;

&lt;p&gt;There is a pretty non-intrusive synching engine running to handle roaming profile. But sometimes you need stuff to sync very quickly. To do that, simply create a roaming setting (or composite) named HighPriority. That will sync within a minute!&lt;/p&gt;

&lt;p&gt;If your app is running and you want to see if new roaming data is available that was saved on &lt;em&gt;another&lt;/em&gt; machine, you can subscribe to the data updated event. Then you can update your app without the user even having to hit a refresh button.&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;var&lt;/span&gt; applicationData = Windows.Storage.ApplicationData.current;&lt;br /&gt; &lt;br /&gt;&lt;span style="color: #0000ff"&gt;function&lt;/span&gt; initialize() &lt;br /&gt;{&lt;br /&gt;    applicationData.addEventListener(&lt;span style="color: #006080"&gt;&amp;quot;datachanged&amp;quot;&lt;/span&gt;, datachangeHandler);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;function&lt;/span&gt; dataChangeHandler(eventArgs)&lt;br /&gt;{&lt;br /&gt;    &lt;span style="color: #008000"&gt;// TODO: Refresh your data&lt;/span&gt;&lt;br /&gt;}&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;

&lt;p&gt;Be sure to read the &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/hh465094.aspx"&gt;guidelines for roaming application data&lt;/a&gt; for best practices on size, the user experience, size limits, and more.&lt;/p&gt;

&lt;p&gt;Another great feature about setting is you can &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/windows.storage.applicationdata.version.aspx"&gt;version&lt;/a&gt; them. That is, if version 1 of&amp;#160; your app uses a certain set of settings data, and in version 2 of your app, you change that around (add or remove settings, change data types, whatever) you can have your app check the version of the settings on the user’s machine. That way you know if you can just rely on them as is or if you need to update them.&lt;/p&gt;

&lt;p&gt;If you have more than simple settings to save, say, files like pictures or something, you can use the &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/windows.storage.applicationdata.localfolder.aspx"&gt;localFolder&lt;/a&gt; (or &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/windows.storage.applicationdata.roamingfolder.aspx"&gt;roamingFolder&lt;/a&gt; if you want that) property of application data. This saves in a specific location for each app. You write and read files using&amp;#160; methods in the &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/windows.storage.fileio.aspx"&gt;Windows.Storage.FileIO&lt;/a&gt; class, like so.&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;function&lt;/span&gt; writeSpeech() {&lt;br /&gt;   localFolder.createFileAsync(&lt;span style="color: #006080"&gt;&amp;quot;gettysburg.txt&amp;quot;&lt;/span&gt;, Windows.Storage.CreationCollisionOption.replaceExisting)&lt;br /&gt;      .then(&lt;span style="color: #0000ff"&gt;function&lt;/span&gt; (sampleFile) {&lt;br /&gt;         &lt;span style="color: #0000ff"&gt;var&lt;/span&gt; speechText = &lt;span style="color: #006080"&gt;&amp;quot;Four score and seven years ago, etc...&amp;quot;&lt;/span&gt;;&lt;br /&gt;         &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; Windows.Storage.FileIO.writeTextAsync(sampleFile, speechText );&lt;br /&gt;      }).done(&lt;span style="color: #0000ff"&gt;function&lt;/span&gt; () {      &lt;br /&gt;      });&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;

&lt;p&gt;Note the writing is asynchronous using the Promise pattern with .then syntax.&lt;/p&gt;

&lt;p&gt;Reading is easy too.&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;function&lt;/span&gt; readSpeech() {&lt;br /&gt;   localFolder.getFileAsync(&lt;span style="color: #006080"&gt;&amp;quot;gettysburg.txt&amp;quot;&lt;/span&gt;)&lt;br /&gt;      .then(&lt;span style="color: #0000ff"&gt;function&lt;/span&gt; (sampleFile) {&lt;br /&gt;         &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; Windows.Storage.FileIO.readTextAsync(sampleFile);&lt;br /&gt;      }).done(&lt;span style="color: #0000ff"&gt;function&lt;/span&gt; (speechText) {&lt;br /&gt;         &lt;span style="color: #008000"&gt;// Data is contained in speechText&lt;/span&gt;&lt;br /&gt;      }, &lt;span style="color: #0000ff"&gt;function&lt;/span&gt; () {&lt;br /&gt;         &lt;span style="color: #008000"&gt;// speechText not found, grab an envelope and start writing again!&lt;/span&gt;&lt;br /&gt;      });&lt;br /&gt;}&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;

&lt;p&gt;These are the same reading and writing techniques used for another option for saving data, which is managing things as files the user interacts with. This could be an image file the make with your app and want to save, or a checking account register that’s saved as a complete data file. The point is, in this technique, the user specifies the file name when saving or opening. Just like when working with Word, Excel or PowerPoint for example. You can access these files either directly with code, or with a File picker.&lt;/p&gt;

&lt;p&gt;In code, you can use classes in the &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/br227346.aspx"&gt;Windows.Storage&lt;/a&gt; namespace. This is probably most similar to a PhoneGap application in that you can request directories and/or files, create them, read them, move them, etc. For example, if you want to get to files the user has stored in their My Documents folder, you can use the &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/windows.storage.knownfolders.documentslibrary.aspx"&gt;documentsLibrary&lt;/a&gt; property of the &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/windows.storage.knownfolders.aspx"&gt;Windows.Storage.KnownFolders&lt;/a&gt; class to get to those. That is, assuming you’ve specified the right capability in your app’s manifest. You did remember to do that. Right?&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-31-52-metablogapi/0576.DocumentsLibraryAccess.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="DocumentsLibraryAccess" border="0" alt="DocumentsLibraryAccess" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-31-52-metablogapi/3617.DocumentsLibraryAccess_5F00_thumb.png" width="660" height="370" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You use methods like &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/br208094.aspx"&gt;getItemsAsync&lt;/a&gt; to get a collection you can .forEach over and process. You can &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/br230580.aspx"&gt;search for files and create folder queries&lt;/a&gt; with some &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/windows.storage.search.commonfolderquery.aspx"&gt;interesting options&lt;/a&gt; as well, like grouping pictures by month, grouping music by artist, etc. &lt;/p&gt;

&lt;p&gt;If you don’t want to iterate, list and manage all the file names yourself, take a look at the file picker technique. With that approach, the user uses a Windows 8 common set of screens, selection and navigation paradigms to specify a file name or folder name to your app for it to save to, or to open. Here’s an example letting the user pick a file and then having your app write data to it.&lt;/p&gt;

&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #008000"&gt;// Create the picker object and set options&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;var&lt;/span&gt; savePicker = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Windows.Storage.Pickers.FileSavePicker();&lt;br /&gt;savePicker.suggestedStartLocation = Windows.Storage.Pickers.PickerLocationId.documentsLibrary;&lt;br /&gt;&lt;span style="color: #008000"&gt;// Dropdown of file types the user can save the file as&lt;/span&gt;&lt;br /&gt;savePicker.fileTypeChoices.insert(&lt;span style="color: #006080"&gt;&amp;quot;Plain Text&amp;quot;&lt;/span&gt;, [&lt;span style="color: #006080"&gt;&amp;quot;.txt&amp;quot;&lt;/span&gt;]);&lt;br /&gt;&lt;span style="color: #008000"&gt;// Default file name if the user does not type one in or select a file to replace&lt;/span&gt;&lt;br /&gt;savePicker.suggestedFileName = &lt;span style="color: #006080"&gt;&amp;quot;New Document&amp;quot;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;savePicker.pickSaveFileAsync().then(&lt;span style="color: #0000ff"&gt;function&lt;/span&gt; (file) {&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (file) {&lt;br /&gt;        &lt;span style="color: #008000"&gt;// Prevent updates to the remote version of the file until we finish making changes and call CompleteUpdatesAsync.&lt;/span&gt;&lt;br /&gt;        Windows.Storage.CachedFileManager.deferUpdates(file);&lt;br /&gt;        &lt;span style="color: #008000"&gt;// write to file&lt;/span&gt;&lt;br /&gt;        Windows.Storage.FileIO.writeTextAsync(file, &lt;span style="color: #006080"&gt;&amp;quot;windows 8 rocks!&amp;quot;&lt;/span&gt;).done(&lt;span style="color: #0000ff"&gt;function&lt;/span&gt; () {&lt;br /&gt;            &lt;span style="color: #008000"&gt;// Let Windows know that we're finished changing the file so the other app can update the remote version of the file.&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #008000"&gt;// Completing updates may require Windows to ask for user input.&lt;/span&gt;&lt;br /&gt;            Windows.Storage.CachedFileManager.completeUpdatesAsync(file).done(&lt;span style="color: #0000ff"&gt;function&lt;/span&gt; (updateStatus) {&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (updateStatus === Windows.Storage.Provider.FileUpdateStatus.complete) {&lt;br /&gt;                  &lt;span style="color: #008000"&gt;//success!&lt;/span&gt;&lt;br /&gt;                } &lt;span style="color: #0000ff"&gt;else&lt;/span&gt; {&lt;br /&gt;                  &lt;span style="color: #008000"&gt;//epic fail&lt;/span&gt;&lt;br /&gt;                }&lt;br /&gt;            });&lt;br /&gt;        });&lt;br /&gt;    } &lt;span style="color: #0000ff"&gt;else&lt;/span&gt; {&lt;br /&gt;        &lt;span style="color: #008000"&gt;//user cancelled&lt;/span&gt;&lt;br /&gt;    }&lt;br /&gt;});&lt;br /&gt;   }&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;

&lt;p&gt;Interestingly, with this approach you don’t need the Documents Library Access capability enabled, because it’s the user who ultimately chooses the file. Here’s what the file picker looks like.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-31-52-metablogapi/7506.filepicker_5F00_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="filepicker" border="0" alt="filepicker" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-31-52-metablogapi/4762.filepicker_5F00_thumb.png" width="660" height="380" /&gt;&lt;/a&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;What you might not realize is that in addition to being able to use the file pickers to allow the user to choose files on their computer, they can also choose files for reading or saving to that are provided by other apps on the system. For example, I have SkyDrive app installed on mine, so I can tell the app to save there.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-31-52-metablogapi/4278.skydrive-picker_5F00_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="skydrive picker" border="0" alt="skydrive picker" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-31-52-metablogapi/2781.skydrive-picker_5F00_thumb.png" width="660" height="380" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Your app just receives a reference to the file to read/write from. It doesn’t need to have any knowledge of how SkyDrive works or what my credentials are in order to have access to the file. All the user has to do is have the SkyDrive app (or any other app that provides files) installed on their system and have logged into it previously. Quite a powerful capability!&lt;/p&gt;

&lt;p&gt;Browse through all these &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/hh465199.aspx"&gt;quickstarts&lt;/a&gt; for working with data and files, and you’ll uncover great programming capabilities enabling scenarios you’ve never even thought about!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10346320" width="1" height="1"&gt;</content><author><name>GlenGordon</name><uri>http://blogs.msdn.com/glengordon/ProfileUrlRedirect.ashx</uri></author><category term="PhoneGap" scheme="http://blogs.msdn.com/b/glengordon/archive/tags/PhoneGap/" /><category term="Windows 8" scheme="http://blogs.msdn.com/b/glengordon/archive/tags/Windows+8/" /></entry><entry><title>Windows 8 apps for the PhoneGap developer-Contacts</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/glengordon/archive/2012/08/28/windows-8-apps-for-the-phonegap-developer-contacts.aspx" /><id>http://blogs.msdn.com/b/glengordon/archive/2012/08/28/windows-8-apps-for-the-phonegap-developer-contacts.aspx</id><published>2012-08-28T13:03:46Z</published><updated>2012-08-28T13:03:46Z</updated><content type="html">&lt;p&gt;This is part 4 in my series on Windows 8 apps for the PhoneGap developer. &lt;/p&gt;  &lt;p&gt;It’s time to make contact with a user’s contacts! Since a user’s device is very personal to them, it often has their list of contacts. And it’s very common to build functionality into phone apps for interacting with a user’s contacts. PhoneGap certainly lets you do that!&lt;/p&gt;  &lt;p&gt;The PhoneGap api provides a way for your app to get a single contact by searching for it, or get a list of contacts. The general pattern is to retrieve the contacts and display them in a UI so the user can pick one or more. Be warned, however – don’t try this if your phone has a lot of contacts, it will likely crash the app due to memory constraints. Below is the typical example you’ll see on how to get a list of contacts from the user’s phone. Note that it’s an asynchronous operation and as such has callback specified – one for success and one for failure - as well as some parameters to filter the returned results (which can be used to get around the memory limitations I mentioned above).&lt;/p&gt;  &lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;   &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;function&lt;/span&gt; getContacts() {&lt;br /&gt;&lt;br /&gt;    obj = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; ContactFindOptions();&lt;br /&gt;    obj.filter = &lt;span style="color: #006080"&gt;&amp;quot;&amp;quot;&lt;/span&gt;; &lt;span style="color: #008000"&gt;//Brooks&amp;quot;;&lt;/span&gt;&lt;br /&gt;    obj.multiple = &lt;span style="color: #0000ff"&gt;true&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    navigator.contacts.find([&lt;span style="color: #006080"&gt;&amp;quot;displayName&amp;quot;&lt;/span&gt;, &lt;span style="color: #006080"&gt;&amp;quot;name&amp;quot;&lt;/span&gt;, &lt;span style="color: #006080"&gt;&amp;quot;phoneNumbers&amp;quot;&lt;/span&gt;, &lt;span style="color: #006080"&gt;&amp;quot;emails&amp;quot;&lt;/span&gt;, &lt;span style="color: #006080"&gt;&amp;quot;urls&amp;quot;&lt;/span&gt;, &lt;span style="color: #006080"&gt;&amp;quot;note&amp;quot;&lt;/span&gt;],&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;function&lt;/span&gt;(contacts)&lt;br /&gt;&lt;br /&gt;        {&lt;br /&gt;&lt;br /&gt;            console.log(&lt;span style="color: #006080"&gt;&amp;quot;received contacts :: &amp;quot;&lt;/span&gt; + contacts.length);&lt;br /&gt;&lt;br /&gt;            console.log(&lt;span style="color: #006080"&gt;&amp;quot;contacts[0] = &amp;quot;&lt;/span&gt; + contacts[0]);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;var&lt;/span&gt; s = &lt;span style="color: #006080"&gt;&amp;quot;&amp;quot;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (contacts.length == 0)&lt;br /&gt;&lt;br /&gt;            {&lt;br /&gt;&lt;br /&gt;                s = &lt;span style="color: #006080"&gt;&amp;quot;No contacts found&amp;quot;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;else&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;            {&lt;br /&gt;&lt;br /&gt;                s = &lt;span style="color: #006080"&gt;&amp;quot;Number of contacts: &amp;quot;&lt;/span&gt;+contacts.length+&lt;span style="color: #006080"&gt;&amp;quot;&amp;lt;br/&amp;gt;&amp;lt;table width='100%'&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Name&amp;lt;/th&amp;gt;&amp;lt;td&amp;gt;Phone&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Email&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;quot;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;for&lt;/span&gt; (&lt;span style="color: #0000ff"&gt;var&lt;/span&gt; i=0; i &amp;lt; contacts.length; i++)&lt;br /&gt;&lt;br /&gt;                {&lt;br /&gt;&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;try&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;                    {&lt;br /&gt;&lt;br /&gt;                        &lt;span style="color: #0000ff"&gt;var&lt;/span&gt; contact = JSON.parse(contacts[i]);&lt;br /&gt;&lt;br /&gt;                    }&lt;br /&gt;&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;catch&lt;/span&gt;(e)&lt;br /&gt;&lt;br /&gt;                    {&lt;br /&gt;&lt;br /&gt;                        console.log(e.message + &lt;span style="color: #006080"&gt;&amp;quot; &amp;quot;&lt;/span&gt; + contacts[i]);&lt;br /&gt;&lt;br /&gt;                        &lt;span style="color: #0000ff"&gt;continue&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;                    }&lt;br /&gt;&lt;br /&gt;                    s = s + &lt;span style="color: #006080"&gt;&amp;quot;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;quot;&lt;/span&gt; + contact.displayName + &lt;span style="color: #006080"&gt;&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;quot;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (contact.phoneNumbers &amp;amp;&amp;amp; contact.phoneNumbers.length &amp;gt; 0)&lt;br /&gt;&lt;br /&gt;                    {&lt;br /&gt;&lt;br /&gt;                        s = s + contact.phoneNumbers[0];&lt;br /&gt;&lt;br /&gt;                    }&lt;br /&gt;&lt;br /&gt;                    s = s + &lt;span style="color: #006080"&gt;&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;quot;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (contact.emails &amp;amp;&amp;amp; contact.emails.length &amp;gt; 0)&lt;br /&gt;&lt;br /&gt;                    {&lt;br /&gt;&lt;br /&gt;                        s = s + contact.emails[0];&lt;br /&gt;&lt;br /&gt;                    }&lt;br /&gt;&lt;br /&gt;                    s = s + &lt;span style="color: #006080"&gt;&amp;quot;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;quot;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;                }&lt;br /&gt;&lt;br /&gt;                s = s + &lt;span style="color: #006080"&gt;&amp;quot;&amp;lt;/table&amp;gt;&amp;quot;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;document.getElementById(&lt;span style="color: #006080"&gt;'contacts_results'&lt;/span&gt;).innerHTML = s;&lt;br /&gt;},&lt;br /&gt;&lt;span style="color: #0000ff"&gt;function&lt;/span&gt;(e)&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;document.getElementById(&lt;span style="color: #006080"&gt;'contacts_results'&lt;/span&gt;).innerHTML = &lt;span style="color: #006080"&gt;&amp;quot;Error: &amp;quot;&lt;/span&gt;+e.code;&lt;br /&gt;},&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;obj);&lt;br /&gt;&lt;br /&gt;};&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;

&lt;p&gt;Windows 8 employs a different mechanism for selecting contacts. You write code that lets your app invoke what’s known as the &lt;em&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.contacts.contactpicker.aspx"&gt;contact picker&lt;/a&gt;&lt;/em&gt;. This displays an interactive selection box that allows the user to select one or more contacts (your choice) to be returned to the app.&lt;/p&gt;

&lt;p&gt;Here is code that invokes the Contact picker and processes the returned results.&lt;/p&gt;

&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;function&lt;/span&gt; pickContact() {&lt;br /&gt;       &lt;br /&gt;       &lt;span style="color: #008000"&gt;// Verify that we are unsnapped or can unsnap to open the picker&lt;/span&gt;&lt;br /&gt;       &lt;span style="color: #0000ff"&gt;var&lt;/span&gt; viewState = Windows.UI.ViewManagement.ApplicationView.value;&lt;br /&gt;       &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (viewState === Windows.UI.ViewManagement.ApplicationViewState.snapped &amp;amp;&amp;amp;&lt;br /&gt;           !Windows.UI.ViewManagement.ApplicationView.tryUnsnap()) {&lt;br /&gt;           &lt;span style="color: #008000"&gt;// Fail silently if we can't unsnap&lt;/span&gt;&lt;br /&gt;           &lt;span style="color: #0000ff"&gt;return&lt;/span&gt;;&lt;br /&gt;       };&lt;br /&gt;&lt;br /&gt;       &lt;span style="color: #008000"&gt;// Create the picker&lt;/span&gt;&lt;br /&gt;       &lt;span style="color: #0000ff"&gt;var&lt;/span&gt; picker = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Windows.ApplicationModel.Contacts.ContactPicker();&lt;br /&gt;       picker.commitButtonText = &lt;span style="color: #006080"&gt;&amp;quot;Select&amp;quot;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;       &lt;span style="color: #008000"&gt;// Open the picker for the user to select a contact&lt;/span&gt;&lt;br /&gt;       picker.pickSingleContactAsync().done(&lt;span style="color: #0000ff"&gt;function&lt;/span&gt; (contact) {&lt;br /&gt;           &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (contact !== &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;) {&lt;br /&gt;               &lt;span style="color: #008000"&gt;// Create UI to display the contact information for the selected contact&lt;/span&gt;&lt;br /&gt;               &lt;span style="color: #0000ff"&gt;var&lt;/span&gt; contactElement = document.createElement(&lt;span style="color: #006080"&gt;&amp;quot;div&amp;quot;&lt;/span&gt;);&lt;br /&gt;               contactElement.className = &lt;span style="color: #006080"&gt;&amp;quot;contact&amp;quot;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;               &lt;span style="color: #008000"&gt;// Display the name&lt;/span&gt;&lt;br /&gt;               contactElement.appendChild(createTextElement(&lt;span style="color: #006080"&gt;&amp;quot;h3&amp;quot;&lt;/span&gt;, contact.name));&lt;br /&gt;&lt;br /&gt;               &lt;span style="color: #008000"&gt;// Add the different types of contact data&lt;/span&gt;&lt;br /&gt;               appendFields(&lt;span style="color: #006080"&gt;&amp;quot;Emails:&amp;quot;&lt;/span&gt;, contact.emails, contactElement);&lt;br /&gt;               appendFields(&lt;span style="color: #006080"&gt;&amp;quot;Phone Numbers:&amp;quot;&lt;/span&gt;, contact.phoneNumbers, contactElement);&lt;br /&gt;               appendFields(&lt;span style="color: #006080"&gt;&amp;quot;Addresses:&amp;quot;&lt;/span&gt;, contact.locations, contactElement);&lt;br /&gt;&lt;br /&gt;               &lt;span style="color: #008000"&gt;// Add the contact element to the page&lt;/span&gt;&lt;br /&gt;               document.getElementById(&lt;span style="color: #006080"&gt;&amp;quot;output&amp;quot;&lt;/span&gt;).appendChild(contactElement);&lt;br /&gt;           } &lt;span style="color: #0000ff"&gt;else&lt;/span&gt; {&lt;br /&gt;               &lt;span style="color: #008000"&gt;// The picker was dismissed without selecting a contact&lt;/span&gt;&lt;br /&gt;           }&lt;br /&gt;       });&lt;br /&gt;   }&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;

&lt;p&gt;In this code, we make sure the Windows 8 JavaScript app is not in a &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/hh465371.aspx"&gt;snapped state&lt;/a&gt;, which is the view where the app takes up a narrow column on the screen. Picker dialog boxes won’t display properly if their host is in a snapped view. Fill or full screen view is acceptable though. The user will probably be picking a contact from their People app. Keep in mind that contacts in the People app come from a variety of sources that the user has set up on their machine – Windows Live, Facebook, Outlook, LinkedIn, etc. So not all of them have all the contact data that you might be looking for in your code. But the nice thing about the Contacts system is they will all have the same fields, identified in &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.contacts.contact.aspx#properties"&gt;this documentation&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;After the user chooses a contact and clicks the Submit button (the title is controlled by the &lt;em&gt;commitButtonText&lt;/em&gt; property of the contactPicker), the contact data is returned to the app, which we then parse and display on the screen. There’s a helper method in this example called &lt;em&gt;appendFields&lt;/em&gt; that formats things nicely for us.&lt;/p&gt;

&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;function&lt;/span&gt; appendFields(title, fields, container) {&lt;br /&gt;    &lt;span style="color: #008000"&gt;// Creates UI for a list of contact fields of the same type, e.g. emails or phones&lt;/span&gt;&lt;br /&gt;    fields.forEach(&lt;span style="color: #0000ff"&gt;function&lt;/span&gt; (field) {&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (field.value) {&lt;br /&gt;            &lt;span style="color: #008000"&gt;// Append the title once we have a non-empty contact field&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (title) {&lt;br /&gt;                container.appendChild(createTextElement(&lt;span style="color: #006080"&gt;&amp;quot;h4&amp;quot;&lt;/span&gt;, title));&lt;br /&gt;                title = &lt;span style="color: #006080"&gt;&amp;quot;&amp;quot;&lt;/span&gt;;&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            &lt;span style="color: #008000"&gt;// Display the category next to the field value&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff"&gt;switch&lt;/span&gt; (field.category) {&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;case&lt;/span&gt; Windows.ApplicationModel.Contacts.ContactFieldCategory.home:&lt;br /&gt;                    container.appendChild(createTextElement(&lt;span style="color: #006080"&gt;&amp;quot;div&amp;quot;&lt;/span&gt;, field.value + &lt;span style="color: #006080"&gt;&amp;quot; (home)&amp;quot;&lt;/span&gt;));&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;break&lt;/span&gt;;&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;case&lt;/span&gt; Windows.ApplicationModel.Contacts.ContactFieldCategory.work:&lt;br /&gt;                    container.appendChild(createTextElement(&lt;span style="color: #006080"&gt;&amp;quot;div&amp;quot;&lt;/span&gt;, field.value + &lt;span style="color: #006080"&gt;&amp;quot; (work)&amp;quot;&lt;/span&gt;));&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;break&lt;/span&gt;;&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;case&lt;/span&gt; Windows.ApplicationModel.Contacts.ContactFieldCategory.mobile:&lt;br /&gt;                    container.appendChild(createTextElement(&lt;span style="color: #006080"&gt;&amp;quot;div&amp;quot;&lt;/span&gt;, field.value + &lt;span style="color: #006080"&gt;&amp;quot; (mobile)&amp;quot;&lt;/span&gt;));&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;break&lt;/span&gt;;&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;case&lt;/span&gt; Windows.ApplicationModel.Contacts.ContactFieldCategory.other:&lt;br /&gt;                    container.appendChild(createTextElement(&lt;span style="color: #006080"&gt;&amp;quot;div&amp;quot;&lt;/span&gt;, field.value + &lt;span style="color: #006080"&gt;&amp;quot; (other)&amp;quot;&lt;/span&gt;));&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;break&lt;/span&gt;;&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;case&lt;/span&gt; Windows.ApplicationModel.Contacts.ContactFieldCategory.none:&lt;br /&gt;                &lt;span style="color: #0000ff"&gt;default&lt;/span&gt;:&lt;br /&gt;                    container.appendChild(createTextElement(&lt;span style="color: #006080"&gt;&amp;quot;div&amp;quot;&lt;/span&gt;, field.value));&lt;br /&gt;                    &lt;span style="color: #0000ff"&gt;break&lt;/span&gt;;&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    });&lt;br /&gt;}&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;

&lt;p&gt;Now that you know the different technique for accessing contacts from a Windows 8 JavaScript app, you’ll simply need to rewrite the contact selecting portion of your PhoneGap app. Fortunately, if you planned it well, your contact picker is a separate screen, invoked via a button or link on the screen that needs the contacts. So instead of showing that screen, simply put in calls to the Contact Picker API.&lt;/p&gt;

&lt;p&gt;A side effect of the design of the Windows 8 Contact picker is that you can’t programmatically add contacts to the People app. Now, you might be saying “Hey I have a lot of contacts my app needs to manage. How can I get those contacts added to the user’s contact list so they can work with them?”&lt;/p&gt;

&lt;p&gt;Well, an interesting thing about Windows 8 is that when the user goes to pick things like contacts (or files or pictures for that matter), they have the option to select different applications as the source of contacts. This means if your application manages or retrieves information that provides “contact” like data (your company’s personnel database, some online list like the user’s Pinterest friends, or perhaps collaborators in a github project) you can have your application be a &lt;em&gt;source&lt;/em&gt; of contacts for any other application on the user’s machine from which they could pick contacts. That means if they’re in the mail app and want to email someone from a contact list you application provides, when they go to pick a contact in their email app, your app’s “contact picker page” that you have defined in your manifest file.&lt;/p&gt;

&lt;p&gt;The &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/hh464939.aspx"&gt;quickstart for managing contacts&lt;/a&gt; has the full sample, but the main things you do is create a contact picker page that other apps (or even your app) will use, then register your app as a contact extension. Here’s what the custom Contact Picker screen from that sample app provides. Keep in mind that now, any other app that wants to pick contacts can use this sample app as its source.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-31-52-metablogapi/8875.customcontactpicker.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="customcontactpicker" border="0" alt="customcontactpicker" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-31-52-metablogapi/3005.customcontactpicker_5F00_thumb.png" width="644" height="363" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Certainly you’d pretty it up a bit, but being able to show this type of cool selection box and return one or more contacts is pretty powerful. &lt;/p&gt;

&lt;p&gt;In the above screenshot, the blue bars at the top and bottom are system provided. The user can switch between contact providers by clicking at the top where it now says ContactPicker JS sample. The Select and Cancel buttons at the bottom live in the &lt;em&gt;collection area. &lt;/em&gt;The way this code is written, as the user clicks the checkbox next to each name, it is added to the collection of contacts to be returned, and displayed in the collection area.&lt;/p&gt;

&lt;p&gt;In the project’s manifest file (below), you can see that we’ve declared our app a Contact Picker itself, and when it’s invoked in that way, the start page will be the contactPicker.html page.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-31-52-metablogapi/4571.contactdeclaration.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="contactdeclaration" border="0" alt="contactdeclaration" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-31-52-metablogapi/1351.contactdeclaration_5F00_thumb.png" width="644" height="308" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That’s it! Integrating contacts with a Windows 8 app is slightly different from how you do it in a PhoneGap app,&amp;#160; but it’s still programmable with JavaScript and designable with HTML so it’s pretty easy to adopt it into your overall application.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10344141" width="1" height="1"&gt;</content><author><name>GlenGordon</name><uri>http://blogs.msdn.com/glengordon/ProfileUrlRedirect.ashx</uri></author><category term="PhoneGap" scheme="http://blogs.msdn.com/b/glengordon/archive/tags/PhoneGap/" /><category term="Windows 8" scheme="http://blogs.msdn.com/b/glengordon/archive/tags/Windows+8/" /></entry><entry><title>Windows 8 apps for the PhoneGap developer–Motion and orientation</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/glengordon/archive/2012/08/20/windows-8-apps-for-the-phonegap-developer-motion-and-orientation.aspx" /><id>http://blogs.msdn.com/b/glengordon/archive/2012/08/20/windows-8-apps-for-the-phonegap-developer-motion-and-orientation.aspx</id><published>2012-08-20T20:36:21Z</published><updated>2012-08-20T20:36:21Z</updated><content type="html">&lt;p&gt;This is part 3 in my series on Windows 8 apps for the PhoneGap developer. Here we are going to focus on writing apps that respond to the various ways a user can move the device around.&lt;/p&gt;  &lt;p&gt;The basic accelerometer code in PhoneGap is generally used to determine the orientation of the device with respect to gravity. This lets you create tilting games like marble mazes. It also can be used to test in what orientation the device is being held. To a small degree it can detect motion – but since it’s based on acceleration and not velocity, it’s not nearly as responsive as it needs to be to create something like, say, an augmented reality type application. &lt;/p&gt;  &lt;p&gt;With PhoneGap you can obtain the accelerometer reading (x,y,z) at a given moment or you can set up a watcher with a callback, and specify the frequency of callbacks to occur. This usually gives you code that looks something like this:&lt;/p&gt;  &lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;   &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;p&gt;&lt;span style="color: #0000ff"&gt;var&lt;/span&gt; watchAccelID;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;var&lt;/span&gt; watchAccel = &lt;span style="color: #0000ff"&gt;function&lt;/span&gt; () {&lt;br /&gt;&lt;br /&gt;     &lt;span style="color: #008000"&gt;// Success callback&lt;/span&gt;&lt;br /&gt;     &lt;span style="color: #0000ff"&gt;var&lt;/span&gt; success = &lt;span style="color: #0000ff"&gt;function&lt;/span&gt; (a) {&lt;br /&gt;         document.getElementById(&lt;span style="color: #006080"&gt;'x'&lt;/span&gt;).innerHTML = roundNumber(a.x);&lt;br /&gt;         document.getElementById(&lt;span style="color: #006080"&gt;'y'&lt;/span&gt;).innerHTML = roundNumber(a.y);&lt;br /&gt;         document.getElementById(&lt;span style="color: #006080"&gt;'z'&lt;/span&gt;).innerHTML = roundNumber(a.z);&lt;br /&gt;     };&lt;br /&gt;&lt;br /&gt;     &lt;span style="color: #008000"&gt;// Fail callback&lt;/span&gt;&lt;br /&gt;     &lt;span style="color: #0000ff"&gt;var&lt;/span&gt; fail = &lt;span style="color: #0000ff"&gt;function&lt;/span&gt; (e) {&lt;br /&gt;         &lt;span style="color: #008000"&gt;//display some error message&lt;/span&gt;&lt;br /&gt;     };&lt;br /&gt;&lt;br /&gt;     &lt;span style="color: #008000"&gt;// Update acceleration every 1 sec&lt;/span&gt;&lt;br /&gt;     &lt;span style="color: #0000ff"&gt;var&lt;/span&gt; opt = {};&lt;br /&gt;     opt.frequency = 50;&lt;br /&gt;     watchAccelId = navigator.accelerometer.watchAcceleration(success, fail, opt);&lt;br /&gt;&lt;br /&gt; };&lt;/p&gt;&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;

&lt;p&gt;The equivalent in Windows 8 is to call &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/windows.devices.sensors.accelerometer.getcurrentreading.aspx"&gt;GetCurrentReading&lt;/a&gt; for a single check of the accelerometer readings, or to add an eventListener for the &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/windows.devices.sensors.accelerometer.readingchanged.aspx"&gt;ReadingChanged&lt;/a&gt; event on the accelerometer with a suitable &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/windows.devices.sensors.accelerometer.reportinterval.aspx"&gt;ReportInterval&lt;/a&gt; to control the frequency of the callbacks. An interesting point is that in Windows 8 you can determine the &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/windows.devices.sensors.accelerometer.minimumreportinterval.aspx"&gt;MinimumReportInterval&lt;/a&gt; from the hardware so you can make sure you’re not asking for something the hardware/os can’t provide. Here’s an example of that.&lt;/p&gt;

&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;var&lt;/span&gt; accelerometer;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;function&lt;/span&gt; onDataChanged(e) {&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;var&lt;/span&gt; reading = e.reading;&lt;br /&gt;&lt;br /&gt;    document.getElementById(&lt;span style="color: #006080"&gt;'x'&lt;/span&gt;).innerHTML = reading.accelerationX.toFixed(2);&lt;br /&gt;    document.getElementById(&lt;span style="color: #006080"&gt;'y'&lt;/span&gt;).innerHTML = reading.accelerationY.toFixed(2);&lt;br /&gt;    document.getElementById(&lt;span style="color: #006080"&gt;'z'&lt;/span&gt;).innerHTML = reading.accelerationZ.toFixed(2);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;function&lt;/span&gt; watchAccel() {&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (accelerometer) {&lt;br /&gt;         &lt;span style="color: #0000ff"&gt;return&lt;/span&gt;;&lt;br /&gt;    }&lt;br /&gt;    accelerometer = Windows.Devices.Sensors.Accelerometer.getDefault();&lt;br /&gt;   &lt;br /&gt;    &lt;br /&gt;    &lt;span style="color: #008000"&gt;// Choose a report interval supported by the sensor&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;var&lt;/span&gt; minimumReportInterval = accelerometer.minimumReportInterval;&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;var&lt;/span&gt; reportInterval = minimumReportInterval &amp;gt; 16 ? minimumReportInterval : 16;&lt;br /&gt;    accelerometer.reportInterval = reportInterval;&lt;br /&gt;&lt;br /&gt;    accelerometer.addEventListener(&lt;span style="color: #006080"&gt;&amp;quot;readingchanged&amp;quot;&lt;/span&gt;, onDataChanged);&lt;br /&gt;    &lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;

&lt;p&gt;There are some differences in the values returned to PhoneGap apps and Windows 8 apps. PhoneGap’s values for X,Y and Z are reported with the actual acceleration numbers (as in 9.8 m/s&lt;sup&gt;2&lt;/sup&gt; (1g) and positive values meaning &amp;quot;down”), whereas Windows 8 reports 1g pull towards the earth as the value -1. In addition, on a phone, X,Y and Z are based on &lt;em&gt;portrait&lt;/em&gt; orientation and on a Windows 8 device, X, Y and Z are based on &lt;em&gt;landscape&lt;/em&gt; orientation. Confused? I thought so. Here’s a table to help. &lt;/p&gt;

&lt;p&gt;
  &lt;table border="1" cellspacing="0" cellpadding="2" width="496"&gt;&lt;tbody&gt;
      &lt;tr&gt;
        &lt;td valign="top" width="133"&gt;&amp;#160;&lt;/td&gt;

        &lt;td valign="top" width="177"&gt;X,Y,Z PhoneGap&lt;/td&gt;

        &lt;td valign="top" width="184"&gt;X,Y,Z Windows 8&lt;/td&gt;
      &lt;/tr&gt;

      &lt;tr&gt;
        &lt;td valign="top" width="133"&gt;Portrait&lt;/td&gt;

        &lt;td valign="top" width="177"&gt;0, 9.8, 0&lt;/td&gt;

        &lt;td valign="top" width="184"&gt;1, 0, 0 (rotated clockwise)&lt;/td&gt;
      &lt;/tr&gt;

      &lt;tr&gt;
        &lt;td valign="top" width="133"&gt;Landscape&lt;/td&gt;

        &lt;td valign="top" width="177"&gt;-9.8, 0, 0 (rotated clockwise)&lt;/td&gt;

        &lt;td valign="top" width="184"&gt;0, –1, 0&lt;/td&gt;
      &lt;/tr&gt;

      &lt;tr&gt;
        &lt;td valign="top" width="133"&gt;Flat on a desk&lt;/td&gt;

        &lt;td valign="top" width="177"&gt;0, 0, 9.8&lt;/td&gt;

        &lt;td valign="top" width="184"&gt;0, 0, –1&lt;/td&gt;
      &lt;/tr&gt;
    &lt;/tbody&gt;&lt;/table&gt;
&lt;/p&gt;

&lt;p&gt;Pretty simple to accommodate the differences in your code though.&lt;/p&gt;

&lt;p&gt;Another thing to consider is the fact that typical phone and Windows 8 UI rotates to stay upright as the user rotates the device – but the XYZ coordinate system does not. Meaning if you have a physics type game calculating movement of something on the screen based on X&amp;amp;Y, those will swap if the device is rotated. Y becomes left and right and X becomes up and down (assuming you hold the device more or less straight up in front of you). You basically have two choices. The easiest is to prevent the app from reorienting itself upon device rotation. That’s super simple in Windows 8. Just go into the app manifest file and check the box under the orientation you want to support. If all the boxes are unchecked, the app supports all orientations and will rotate automatically to stay upright to the user.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-31-52-metablogapi/7875.OrientationSettings.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="OrientationSettings" border="0" alt="OrientationSettings" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-31-52-metablogapi/5238.OrientationSettings_5F00_thumb.png" width="660" height="288" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you do want to allow the app to orient to the user, you can put some tests in your code processing the accelerometer values to test the orientation of the device, and together with that information, update your UI correctly. Here’s how you can have your app notified when the user changes the device orientation. &lt;/p&gt;

&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;var&lt;/span&gt; orientationSensor;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;function&lt;/span&gt; init() {&lt;br /&gt;    orientationSensor = Windows.Devices.Sensors.SimpleOrientationSensor.getDefault();&lt;br /&gt;    orientationSensor.addEventListener(&lt;span style="color: #006080"&gt;&amp;quot;orientationchanged&amp;quot;&lt;/span&gt;, onDataChanged);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #008000"&gt;//Possible values for orientation are notRotated, rotated90DegreesCounterclockwise, &lt;/span&gt;&lt;br /&gt;&lt;span style="color: #008000"&gt;//rotated180DegreesCounterclockwise, rotated270DegreesCounterclockwise,&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #008000"&gt;//faceup or facedown&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;var&lt;/span&gt; currentOrientation = Windows.Devices.Sensors.SimpleOrientation.notRotated;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;function&lt;/span&gt; onDataChanged(e) {&lt;br /&gt;    currentOrientation = e.orientation;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;

&lt;p&gt;Use the value saved in currentOrientation in your accelerometer calculations. Or, even if you’re not using accelerometer data in your application, use it to rearrange the UI as needed if the user rotates the device. However, use that only as a last resort because one of the cool things about Windows 8 JavaScript apps is you can use &lt;a href="http://msdn.microsoft.com/en-us/library/ie/hh673536(v=vs.85).aspx"&gt;media queries&lt;/a&gt; in style sheets to do most of that rearranging for you. Media queries is a great topic, and in fact is great for IE browser apps as well as Windows 8 JavaScript apps on rotatable devices. They’re well explained in this &lt;a href="http://stephenwalther.com/archive/2012/02/29/metro-understanding-css-media-queries.aspx"&gt;blog post by Stephen Walther&lt;/a&gt;, but I digress…&lt;/p&gt;

&lt;p&gt;A final useful tidbit while we’re talking about accelerometers is the availability in the WinJS library of a &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/windows.devices.sensors.accelerometer.shaken.aspx"&gt;shaken&lt;/a&gt; event. Using that event, you can have the OS determine when a shake gesture has occurred, so you don’t have to calculate it from a bunch of accelerometer changes. &lt;/p&gt;

&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;var&lt;/span&gt; accelerometer;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;var&lt;/span&gt; shakeCount = 0;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #008000"&gt;//Init Accelerometer&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;function&lt;/span&gt; initAccel() {&lt;br /&gt;     accelerometer = Windows.Devices.Sensors.Accelerometer.getDefault();&lt;br /&gt;     &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (accelerometer) {&lt;br /&gt;         accelerometer.addEventListener(&lt;span style="color: #006080"&gt;&amp;quot;shaken&amp;quot;&lt;/span&gt;, onShaken);&lt;br /&gt;     } &lt;span style="color: #0000ff"&gt;else&lt;/span&gt; {&lt;br /&gt;         document.getElementById(&lt;span style="color: #006080"&gt;&amp;quot;shakeOutput&amp;quot;&lt;/span&gt;).innerHTML = &lt;span style="color: #006080"&gt;&amp;quot;No accelerometer found&amp;quot;&lt;/span&gt;;&lt;br /&gt;     }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #0000ff"&gt;function&lt;/span&gt; onShaken(e){&lt;br /&gt;     &lt;br /&gt;         shakeCount++;&lt;br /&gt;         document.getElementById(&lt;span style="color: #006080"&gt;&amp;quot;shakeOutput&amp;quot;&lt;/span&gt;).innerHTML = shakeCount;&lt;br /&gt;     };&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;

&lt;p&gt;Another sensor PhoneGap lets you tap into is the compass (if the device has one) to get the current heading of the device. There’s also a watching event for the compass to get continuous readings. Combining these with the accelerometer can give you some sense of the devices position is space, but it can be tricky to calculate.&lt;/p&gt;

&lt;p&gt;In Windows 8 JavaScript apps, you can get the &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/hh465244.aspx"&gt;compass heading&lt;/a&gt; as well, either one time through the &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/windows.devices.sensors.compass.getcurrentreading.aspx"&gt;GetCurrentReading&lt;/a&gt; method, or by subscribing to the &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/windows.devices.sensors.compass.readingchanged.aspx"&gt;Readingchanged&lt;/a&gt; event.&lt;/p&gt;

&lt;p align="left"&gt;Some Windows 8 devices coming out will have more advanced sensors like &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/windows.devices.sensors.gyrometer.aspx"&gt;gyroscopes&lt;/a&gt; and &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/windows.devices.sensors.inclinometer.aspx"&gt;inclinometers&lt;/a&gt; in them. There are some great possibilities there for advanced gaming or augmented reality apps. Check out the whole &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/hh465278.aspx"&gt;quickstart&lt;/a&gt; series on them for more information.&lt;/p&gt;

&lt;p align="left"&gt;The last tip I’ll leave you with is around power optimization. All those callbacks to your app from the sensors can nibble into battery life. So it’s a good idea to remove the event handlers and dispose of the sensors when you don’t need them. The more optimized and better performing your app is on Windows 8, the more users will love the experiences you create for them.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10341767" width="1" height="1"&gt;</content><author><name>GlenGordon</name><uri>http://blogs.msdn.com/glengordon/ProfileUrlRedirect.ashx</uri></author><category term="PhoneGap" scheme="http://blogs.msdn.com/b/glengordon/archive/tags/PhoneGap/" /><category term="Windows 8" scheme="http://blogs.msdn.com/b/glengordon/archive/tags/Windows+8/" /></entry><entry><title>Windows 8 app dev for the PhoneGap developer–Location</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/glengordon/archive/2012/08/14/windows-8-app-dev-for-the-phonegap-developer-location.aspx" /><id>http://blogs.msdn.com/b/glengordon/archive/2012/08/14/windows-8-app-dev-for-the-phonegap-developer-location.aspx</id><published>2012-08-14T21:02:22Z</published><updated>2012-08-14T21:02:22Z</updated><content type="html">&lt;p&gt;In my &lt;a href="http://blogs.msdn.com/b/glengordon/archive/2012/08/06/windows-8-apps-for-the-phonegap-developer.aspx"&gt;previous post about PhoneGap to Windows 8 migration&lt;/a&gt;, I used the location API as comparison point about how similar the programming approaches were. In this post I’m going to examine location in a bit more detail.&lt;/p&gt;  &lt;p&gt;Location information in Windows 8, as in PhoneGap, can be accessed either in single requests, or can be subscribed to as the device moves around. The location information is the same in both platforms (latitude, longitude, altitude, etc) so that’s an easy match. Another interesting point about location data in a Windows 8 JavaScript app is the fact that you can either use the &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/hh465129.aspx"&gt;WinJS library&lt;/a&gt; to get the location, or if you want to stick strictly to HTML, you can use the &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/hh452746.aspx"&gt;W3C Geolocation API available in HTML5&lt;/a&gt;. For this post I’m going to show the WinJS technique.&lt;/p&gt;  &lt;p&gt;To get continuous updates of the device’s location, rather than PhoneGap’s callback model of &lt;a href="http://docs.phonegap.com/en/1.9.0/cordova_geolocation_geolocation.md.html#geolocation.watchPosition"&gt;geolocation.watchPosition&lt;/a&gt;, Windows 8 uses an event handler model. Thus, the PhoneGap line&lt;/p&gt;  &lt;div id="codeSnippetWrapper"&gt;   &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;var&lt;/span&gt; watchID = navigator.geolocation.watchPosition(onSuccess, onError);&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;

&lt;p&gt;becomes&lt;/p&gt;

&lt;div id="codeSnippetWrapper"&gt;
  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;var &lt;/span&gt;loc = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Windows.Devices.Geolocation.Geolocator();&lt;br /&gt;loc.addEventListener(&lt;span style="color: #006080"&gt;&amp;quot;positionchanged&amp;quot;&lt;/span&gt;, onPositionChanged);&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;

&lt;p&gt;When you no longer want to receive location updates, you simply &lt;em&gt;removeEventListener&lt;/em&gt; in the same way. It’s a good idea in general to turn off sensors when you don’t need them, to maximize battery power and application responsiveness. Another way to maximize battery life is to obtain the location information without needing the accuracy of GPS – in a lot of scenarios like weather and local events, you just need a general idea of the user’s location, which Windows 8 can determine by WiFi triangulation. In fact, a lot of devices out there that will be running Windows 8 (at least initially) will likely not even &lt;em&gt;have&lt;/em&gt; a GPS built in, so at least for the foreseeable future, you’re going to want to use the defaultvalue for the &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/windows.devices.geolocation.geolocator.desiredaccuracy.aspx"&gt;DesiredAccuracy&lt;/a&gt; property of the Geolocator, which is “low”.&lt;/p&gt;

&lt;p&gt;In addition to the &lt;em&gt;positionchanged&lt;/em&gt; event, there’s a &lt;em&gt;statuschanged&lt;/em&gt; event that tells you about the sensors, as well as whether the application is permitted to access location data. Some sample code that might be used in a statuschanged event handler is below. Note the case when the status is Disabled.&lt;/p&gt;

&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &amp;#39;Courier New&amp;#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;&lt;span style="color: #0000ff"&gt;switch&lt;/span&gt; (newStatus)&lt;br /&gt;{&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;case&lt;/span&gt; PositionStatus.Ready: &lt;br /&gt;        strStatus = &lt;span style="color: #006080"&gt;&amp;quot;Location is available.&amp;quot;&lt;/span&gt;;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;break&lt;/span&gt;;&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;case&lt;/span&gt; PositionStatus.Initializing:&lt;br /&gt;        strStatus = &lt;span style="color: #006080"&gt;&amp;quot;Geolocation service is initializing.&amp;quot;&lt;/span&gt;;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;break&lt;/span&gt;;&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;case&lt;/span&gt; PositionStatus.NoData:&lt;br /&gt;        strStatus = &lt;span style="color: #006080"&gt;&amp;quot;Location service data is not available.&amp;quot;&lt;/span&gt;;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;break&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;case&lt;/span&gt; PositionStatus.Disabled:&lt;br /&gt;        strStatus = &lt;span style="color: #006080"&gt;&amp;quot;Location services are disabled. Use the &amp;quot;&lt;/span&gt; +&lt;br /&gt;                    &lt;span style="color: #006080"&gt;&amp;quot;Settings charm to enable them.&amp;quot;&lt;/span&gt;;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;break&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;case&lt;/span&gt; PositionStatus.NotInitialized:&lt;br /&gt;        strStatus = &lt;span style="color: #006080"&gt;&amp;quot;Location status is not initialized because &amp;quot;&lt;/span&gt; +&lt;br /&gt;                    &lt;span style="color: #006080"&gt;&amp;quot;the app has not yet requested location data.&amp;quot;&lt;/span&gt;;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;break&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;case&lt;/span&gt; PositionStatus.NotAvailable:&lt;br /&gt;        strStatus = &lt;span style="color: #006080"&gt;&amp;quot;Location services are not supported on your system.&amp;quot;&lt;/span&gt;;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;break&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #0000ff"&gt;default&lt;/span&gt;:&lt;br /&gt;        strStatus = &lt;span style="color: #006080"&gt;&amp;quot;Unknown PositionStatus value (&amp;quot;&lt;/span&gt; + &lt;br /&gt;                    newStatus.ToString() + &lt;span style="color: #006080"&gt;&amp;quot;).&amp;quot;&lt;/span&gt;;&lt;br /&gt;        &lt;span style="color: #0000ff"&gt;break&lt;/span&gt;;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;

  &lt;br /&gt;&lt;/div&gt;

&lt;p&gt;Speaking of permission to access location data, like many other phone platforms that PhoneGap supports, Windows 8 requires the developer to declare that they want to use the location capabilities of the device.&amp;#160; This in turn notifies the user when they install and/or run the app that it’s going to want to access their location.That’s easily specified in the application’s manifest file. Just open the file &lt;em&gt;package.appxmanifest &lt;/em&gt;in solution explorer and check the Location box.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-31-52-metablogapi/0842.4.capabilities.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="4.capabilities" border="0" alt="4.capabilities" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-31-52-metablogapi/8358.4.capabilities_5F00_thumb.png" width="644" height="356" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The first time the user runs your app and it tries to access her location, she’ll actually get a prompt as to whether they want to allow that. The prompt interrupts the app so she can’t miss it. &lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-31-52-metablogapi/7875.locationprompt.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="locationprompt" border="0" alt="locationprompt" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-31-52-metablogapi/6708.locationprompt_5F00_thumb.png" width="660" height="363" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once the user decides to allow the app to access his or her location,, the permission stays that way until the user revokes it in the settings section of your app. You might be thinking to yourself “What settings section? I didn’t create a settings section!” Well one of the things that Windows 8 apps have in common is the Settings section accessible from the setting charm. That’s the panel users can bring up in Windows 8 on the right side of the screen. Just swipe in from the right side or press the Windows key and the C key at the same time. Because your app specified the Location capabilities, your app will automatically get as settings section for Permissions. You can also add your own sections and content to the settings panel, which makes it really flexible!&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-31-52-metablogapi/6283.LocationSettings_5F00_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="LocationSettings" border="0" alt="LocationSettings" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-31-52-metablogapi/3162.LocationSettings_5F00_thumb.png" width="660" height="380" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Another way you can reset the permissions is to uninstall the app and reinstall it. In general this is great for development, because every time you uninstall and reinstall, you’re getting fresh settings and fresh saved data.&lt;/p&gt;

&lt;p&gt;The last tip I’ll leave you with is this. When you are developing your app and running it on your local Windows 8 machine, it will use your machine’s location, typically triangulated from WiFi. But if you want to test your app as if you are in another location, you can do that by running it in the Windows 8 Simulator. Just chose Simulator at the top of the Visual Studio window. This actually brings up a remote desktop connection to the local machine. On the side of the simulator window there’s a globe icon, and if you click it, you can input coordinates, altitude and accuracy directly.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-31-52-metablogapi/3666.locationinsimulator_5F00_1.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="locationinsimulator" border="0" alt="locationinsimulator" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-31-52-metablogapi/0116.locationinsimulator_5F00_thumb_5F00_1.png" width="660" height="418" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So, as you can say, it’s pretty straightforward to start using location services in Windows 8 JavaScript apps if you’ve done it before in PhoneGap.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10339594" width="1" height="1"&gt;</content><author><name>GlenGordon</name><uri>http://blogs.msdn.com/glengordon/ProfileUrlRedirect.ashx</uri></author><category term="PhoneGap" scheme="http://blogs.msdn.com/b/glengordon/archive/tags/PhoneGap/" /><category term="Windows 8" scheme="http://blogs.msdn.com/b/glengordon/archive/tags/Windows+8/" /></entry><entry><title>Downloads for Windows 8 Devcamps</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/glengordon/archive/2012/08/09/downloads-for-windows-8-devcamps.aspx" /><id>http://blogs.msdn.com/b/glengordon/archive/2012/08/09/downloads-for-windows-8-devcamps.aspx</id><published>2012-08-09T15:02:25Z</published><updated>2012-08-09T15:02:25Z</updated><content type="html">&lt;p&gt;This month I’m presenting Windows 8 camps in Atlanta and Raleigh. For those of you who would like the labs, presentations and samples, they are available here in both C# and JavaScript versions.&lt;/p&gt;  &lt;p&gt;&lt;a title="http://www.microsoft.com/en-us/download/details.aspx?id=29854" href="http://www.microsoft.com/en-us/download/details.aspx?id=29854"&gt;http://www.microsoft.com/en-us/download/details.aspx?id=29854&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Don’t forget to sign up for our Generation App promotion so you can &lt;a title="Launch your Windows 8 app in 30 days" href="http://www.microsoft.com/click/services/Redirect2.ashx?CR_CC=200115765"&gt;launch your Windows 8 app in 30 days&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10338241" width="1" height="1"&gt;</content><author><name>GlenGordon</name><uri>http://blogs.msdn.com/glengordon/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>Windows 8 apps for the PhoneGap developer</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/glengordon/archive/2012/08/06/windows-8-apps-for-the-phonegap-developer.aspx" /><id>http://blogs.msdn.com/b/glengordon/archive/2012/08/06/windows-8-apps-for-the-phonegap-developer.aspx</id><published>2012-08-06T19:22:00Z</published><updated>2012-08-06T19:22:00Z</updated><content type="html">&lt;p&gt;Abstract: Windows 8 apps can be designed and coded using HTML/CSS/JS just like PhoneGap apps can. And with very little effort you can use your skill and existing resources to crank out a sleek, modern looking Windows 8 style app in no time.&lt;/p&gt;
&lt;h1&gt;PhoneGap and Windows 8 development &amp;ndash; more similar than you realize&lt;/h1&gt;
&lt;p&gt;PhoneGap is an interesting animal. While it&amp;rsquo;s most salient aspect is the cross platform nature of the applications you can build with it, it&amp;rsquo;s also interesting in that you use HTML and JavaScript to create the apps. Since this relies on the underlying mobile browser technology on each platform, there are (from time to time) a few little quirks. But overall, it really does provide a nice layer of abstraction. You can bring your web skills into play, and all you have to do is learn a few specifics of creating and publishing an app on a particular platform, design the UI with HTML and CSS, code it up with standard JavaScript, learn a few new APIs that PhoneGap offers, and you&amp;rsquo;re all set. In fact, to some teams, the cross platform nature is secondary. They embarked on PhoneGap development because it allowed their teams to reuse their web development skills, their favorite libraries, design tools, and more.&lt;/p&gt;
&lt;p&gt;What does this mean in the context of Windows 8 development? Well, one of the approaches for building the new Windows 8 applications is actually to use HTML/CSS/CS. If you haven&amp;rsquo;t yet, I suggest you read about &lt;a title="http://msdn.microsoft.com/en-us/library/windows/apps/br211385.aspx" href="http://msdn.microsoft.com/en-us/library/windows/apps/br211385.aspx"&gt;creating a Windows 8 Metro style apps with JavaScript&lt;/a&gt;. Here&amp;rsquo;s the upshot for PhoneGap developers:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Your skills, assets, and probably a lot of your existing pure HTML/CSS and JavaScript code will &lt;em&gt;just work&lt;/em&gt; in a Windows 8 application.&lt;/li&gt;
&lt;li&gt;You can update the look of your applications with very little effort by using the intrinsic styles for the basic HTML elements like &amp;lt;h1&amp;gt; and &amp;lt;button&amp;gt;, as well as the advanced Windows 8 controls like the &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/hh465309.aspx"&gt;app bar&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/hh465480.aspx"&gt;date picker&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/hh465425.aspx"&gt;flip view&lt;/a&gt;, and more.&lt;/li&gt;
&lt;li&gt;Your code that interacts with the PhoneGap API (to handle things like file access, sensors and application lifecycle events) can be updated to use the &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/hh967792.aspx"&gt;WinJS library&lt;/a&gt; to accomplish the same things you were doing in PhoneGap.&lt;/li&gt;
&lt;li&gt;Scenarios where you had to write PhoneGap plugins can be addressed by either finding the functionality in the expansive WinJS library, or by incorporating native code in a Windows 8 JavaScript app.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This blog post series is going to address the third bullet above &amp;ndash; figuring out how to do things in Windows 8 app development that you know how to do in PhoneGap. We&amp;rsquo;ll start with a simple example and then dive in deeper over subsequent weeks.&lt;/p&gt;
&lt;h1&gt;A simple PhoneGap example&lt;/h1&gt;
&lt;p&gt;Here is a very simple PhoneGap application that uses the PhoneGap geolocation API to get information on the device&amp;rsquo;s position. No matter what platform this PhoneGap code is executed on, this will work. That&amp;rsquo;s because the call to getCurrentPosition in line 28 calls into the underlying platform&amp;rsquo;s API. But to your code, It&amp;rsquo;s exposed as a JavaScript function.&lt;/p&gt;
&lt;div style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; width: 97.5%; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; cursor: text; border: silver 1px solid; padding: 4px;" id="codeSnippetWrapper"&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #0000ff;"&gt;&amp;lt;!&lt;/span&gt;&lt;span style="color: #800000;"&gt;DOCTYPE&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;html&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;html&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;head&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;meta&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;name&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="viewport"&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;content&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0, user-scalable=no;"&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;meta&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;http-equiv&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="Content-type"&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;content&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="text/html; charset=utf-8"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;title&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;Cordova WP7&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;title&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;      &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;link&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;rel&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="stylesheet"&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;href&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="master.css"&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;type&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="text/css"&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;media&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="screen"&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;title&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="no title"&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;charset&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="utf-8"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;      &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;script&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;type&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="text/javascript"&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;charset&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="utf-8"&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;src&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="cordova-1.9.0.js"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;script&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum1"&gt; 1:&lt;/span&gt;  &lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum2"&gt; 2:&lt;/span&gt;  &lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum3"&gt; 3:&lt;/span&gt;       &amp;lt;script type=&lt;span style="color: #006080;"&gt;"text/javascript"&lt;/span&gt;&amp;gt;&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum4"&gt; 4:&lt;/span&gt;  &lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum5"&gt; 5:&lt;/span&gt;         &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; getLocation = &lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; () {&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum6"&gt; 6:&lt;/span&gt;  &lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum7"&gt; 7:&lt;/span&gt;             &lt;span style="color: #008000;"&gt;// Success callback&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum8"&gt; 8:&lt;/span&gt;             &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; success = &lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; (p) {&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum9"&gt; 9:&lt;/span&gt;                 document.getElementById(&lt;span style="color: #006080;"&gt;'latitude'&lt;/span&gt;).innerHTML = p.coords.latitude;&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum10"&gt; 10:&lt;/span&gt;                 document.getElementById(&lt;span style="color: #006080;"&gt;'longitude'&lt;/span&gt;).innerHTML = p.coords.longitude;&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum11"&gt; 11:&lt;/span&gt;  &lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum12"&gt; 12:&lt;/span&gt;                 document.getElementById(&lt;span style="color: #006080;"&gt;'tdAlt'&lt;/span&gt;).innerHTML = p.coords.altitude;&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum13"&gt; 13:&lt;/span&gt;                 document.getElementById(&lt;span style="color: #006080;"&gt;'tdAcc'&lt;/span&gt;).innerHTML = p.coords.accuracy;&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum14"&gt; 14:&lt;/span&gt;                 document.getElementById(&lt;span style="color: #006080;"&gt;'tdAltAcc'&lt;/span&gt;).innerHTML = p.coords.altitudeAccuracy;&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum15"&gt; 15:&lt;/span&gt;                 document.getElementById(&lt;span style="color: #006080;"&gt;'tdHeading'&lt;/span&gt;).innerHTML = p.coords.heading;&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum16"&gt; 16:&lt;/span&gt;                 document.getElementById(&lt;span style="color: #006080;"&gt;'tdSpeed'&lt;/span&gt;).innerHTML = p.coords.speed;&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum17"&gt; 17:&lt;/span&gt;  &lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum18"&gt; 18:&lt;/span&gt;                 setLocationStatus(&lt;span style="color: #006080;"&gt;"Done"&lt;/span&gt;);&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum19"&gt; 19:&lt;/span&gt;             };&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum20"&gt; 20:&lt;/span&gt;  &lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum21"&gt; 21:&lt;/span&gt;             &lt;span style="color: #008000;"&gt;// Fail callback&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum22"&gt; 22:&lt;/span&gt;             &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; fail = &lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; (e) {&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum23"&gt; 23:&lt;/span&gt;                 console.log(&lt;span style="color: #006080;"&gt;"getLocation fail callback with error code "&lt;/span&gt; + e.code);&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum24"&gt; 24:&lt;/span&gt;                 setLocationStatus(&lt;span style="color: #006080;"&gt;"Error: "&lt;/span&gt; + e.code);&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum25"&gt; 25:&lt;/span&gt;             };&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum26"&gt; 26:&lt;/span&gt;  &lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum27"&gt; 27:&lt;/span&gt;             &lt;span style="color: #008000;"&gt;// Get location&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum28"&gt; 28:&lt;/span&gt;             navigator.geolocation.getCurrentPosition(success, fail, { enableHighAccuracy: &lt;span style="color: #0000ff;"&gt;true&lt;/span&gt; }); &lt;span style="color: #008000;"&gt;//, {timeout: 10000});&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum29"&gt; 29:&lt;/span&gt;             setLocationStatus(&lt;span style="color: #006080;"&gt;"Retrieving location..."&lt;/span&gt;);&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum30"&gt; 30:&lt;/span&gt;  &lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum31"&gt; 31:&lt;/span&gt;         };&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum32"&gt; 32:&lt;/span&gt;         &lt;span style="color: #008000;"&gt;/**&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum33"&gt; 33:&lt;/span&gt; &lt;span style="color: #008000;"&gt; * Set location status&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum34"&gt; 34:&lt;/span&gt; &lt;span style="color: #008000;"&gt; */&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum35"&gt; 35:&lt;/span&gt;         &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; setLocationStatus = &lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; (status) {&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum36"&gt; 36:&lt;/span&gt;             document.getElementById(&lt;span style="color: #006080;"&gt;'location_status'&lt;/span&gt;).innerHTML = status;&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum37"&gt; 37:&lt;/span&gt;         };&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum38"&gt; 38:&lt;/span&gt;       &lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;" id="codeSnippet"&gt;&lt;!--CRLF--&gt;&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;script&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;head&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;body&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;h1&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;Location&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;h1&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;id&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="info"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;b&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;Status:&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;b&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;span&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;id&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="location_status"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;Stopped&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;span&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;table&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;width&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="100%"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;tr&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;b&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;Latitude:&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;b&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;id&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="latitude"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;tr&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;tr&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;b&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;Longitude:&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;b&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;id&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="longitude"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;tr&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;tr&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;b&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;Altitude:&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;b&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;id&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="tdAlt"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;tr&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;tr&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;b&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;Accuracy:&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;b&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;id&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="tdAcc"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;tr&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;tr&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;b&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;Altitude Accuracy:&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;b&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;id&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="tdAltAcc"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;tr&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;tr&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;b&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;Heading:&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;b&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;id&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="tdHeading"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;tr&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;tr&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;b&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;Speed:&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;b&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;id&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="tdSpeed"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;tr&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;table&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;h2&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;Action&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;h2&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;button&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;onclick&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="getLocation();"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;Get Location&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;button&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;  &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;body&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;html&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;The HTML of a PhoneGap application is a little different from the HTML you&amp;rsquo;d write for a browser application. Let&amp;rsquo;s take a look at the differences and their equivalents in Windows 8 JavaScript apps.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The DOCTYPE element&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Since we&amp;rsquo;re not running in a browser of the user&amp;rsquo;s choice, but instead in a specific execution environment, we can use the standard HTML5 doctype which is simply &amp;ldquo;HTML&amp;rdquo;. This is identical in Windows 8.&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight: bold;"&gt;The meta tag controlling the &amp;ldquo;viewport&amp;rdquo;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Because in PhoneGap, the hosting container is essentially a web browser, this tag tells it behave &lt;em&gt;less&lt;/em&gt; like a web browser. That is, don&amp;rsquo;t allow the user to pan and pinch to zoom as if it were a web &lt;em&gt;page&lt;/em&gt;. We don&amp;rsquo;t need this for Windows 8 apps because there is no scrolling, panning or zooming like in a web &lt;em&gt;page&lt;/em&gt; since it&amp;rsquo;s an &lt;em&gt;app&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The stylesheet reference&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;One of the great aspects of designing a web page is the flexibility and power of CSS. Since an app has a design as well, CSS can be used to design the app&amp;rsquo;s interface in the same way. The &amp;ldquo;master.css&amp;rdquo; here is from the template for building Windows Phone apps with PhoneGap. When you design a PhoneGap application, you&amp;rsquo;re going to want to give it a different look and feel on each platform. And swapping out CSS files when you&amp;rsquo;re building the final app for each platform is one way to do that. The CSS and overall design you use should be tailored to the platform.&lt;/p&gt;
&lt;p&gt;Windows 8 JavaScript apps use CSS to design the UI just like a browser or PhoneGap app. In moving this code to Windows 8, we won&amp;rsquo;t need this line as there&amp;rsquo;s a default Windows 8 style for every control. You&amp;rsquo;d only need to specify styles if you want to customize the look. Later in this article I&amp;rsquo;ll show that in action.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The script reference to &amp;ldquo;cordova&amp;rdquo;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;When your code is running in PhoneGap, all the standard JavaScript APIs are available to use. By bringing in this script file, you can then use the PhoneGap APIs to do more &amp;ldquo;appy&amp;rdquo; stuff like working with the file system, responding to application lifecycle events, and more.&lt;/p&gt;
&lt;p&gt;In Windows 8 we have something similar in the form of WinJS. So it&amp;rsquo;s just a matter of learning what&amp;rsquo;s in the WinJS API like you did when you first learned PhoneGap.&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight: bold;"&gt;The app code&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The rest of the source is the code and markup for your app. There is a table in which to display the location information once we retrieve it, and an asynchronous call into the PhoneGap&amp;rsquo;s geolocation API to get the result.&lt;/p&gt;
&lt;h1&gt;The Windows 8 equivalent&lt;/h1&gt;
&lt;p&gt;Now that we have reviewed the anatomy of a basic PhoneGap application page, let&amp;rsquo;s look at the equivalent in Windows 8. When you set up a machine (physical or virtual) with the Windows 8 Release Preview and Visual Studio 2012 Release Candidate, you&amp;rsquo;ll be able to create Windows 8 apps with JavaScript and HTML. For an overview on how that works, check out this &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/br211385.aspx"&gt;this introduction&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;When you create a new Windows 8 JavaScript project, you&amp;rsquo;ll get the following basic HTML:&lt;/p&gt;
&lt;div style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; width: 97.5%; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; cursor: text; border: silver 1px solid; padding: 4px;" id="codeSnippetWrapper"&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #0000ff;"&gt;&amp;lt;!&lt;/span&gt;&lt;span style="color: #800000;"&gt;DOCTYPE&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;html&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;html&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;head&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;meta&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;charset&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="utf-8"&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;title&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;SimpleLocation&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;title&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #008000;"&gt;&amp;lt;!-- WinJS references --&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;link&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;href&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="//Microsoft.WinJS.1.0.RC/css/ui-dark.css"&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;rel&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="stylesheet"&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;script&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;src&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="//Microsoft.WinJS.1.0.RC/js/base.js"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;script&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum1"&gt; 1:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum2"&gt; 2:&lt;/span&gt;     &amp;lt;script src=&lt;span style="color: #006080;"&gt;"//Microsoft.WinJS.1.0.RC/js/ui.js"&lt;/span&gt;&amp;gt;&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum1"&gt; 1:&lt;/span&gt; &amp;lt;/script&amp;gt;&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum2"&gt; 2:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum3"&gt; 3:&lt;/span&gt;     &amp;lt;!-- SimpleLocation references --&amp;gt;&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum4"&gt; 4:&lt;/span&gt;     &amp;lt;link href=&lt;span style="color: #006080;"&gt;"/css/default.css"&lt;/span&gt; rel=&lt;span style="color: #006080;"&gt;"stylesheet"&lt;/span&gt; /&amp;gt;&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum5"&gt; 5:&lt;/span&gt;     &amp;lt;script src=&lt;span style="color: #006080;"&gt;"/js/default.js"&lt;/span&gt;&amp;gt;&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;" id="codeSnippet"&gt;&lt;!--CRLF--&gt;&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;script&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;head&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;body&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;p&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;Content goes here&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;p&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;body&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;html&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;Looks a lot like PhoneGap, huh? There&amp;rsquo;s the same DOCTYPE, some CSS and JS references to intrinsic resources and some to project-specific styles and code. So let&amp;rsquo;s bring in pieces from the PhoneGap sample above and make the necessary changes to get it running on Windows 8!&lt;/p&gt;
&lt;div style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; width: 97.5%; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; cursor: text; border: silver 1px solid; padding: 4px;" id="codeSnippetWrapper"&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #0000ff;"&gt;&amp;lt;!&lt;/span&gt;&lt;span style="color: #800000;"&gt;DOCTYPE&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;html&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;html&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;head&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;meta&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;charset&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="utf-8"&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;title&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;SimpleLocation&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;title&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #008000;"&gt;&amp;lt;!-- WinJS references --&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;link&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;href&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="//Microsoft.WinJS.1.0.RC/css/ui-dark.css"&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;rel&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="stylesheet"&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;/&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;script&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;src&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="//Microsoft.WinJS.1.0.RC/js/base.js"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;script&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum1"&gt; 1:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum2"&gt; 2:&lt;/span&gt;     &amp;lt;script src=&lt;span style="color: #006080;"&gt;"//Microsoft.WinJS.1.0.RC/js/ui.js"&lt;/span&gt;&amp;gt;&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum1"&gt; 1:&lt;/span&gt; &amp;lt;/script&amp;gt;&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum2"&gt; 2:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum3"&gt; 3:&lt;/span&gt;     &amp;lt;!-- SimpleLocation references --&amp;gt;&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum4"&gt; 4:&lt;/span&gt;     &amp;lt;link href=&lt;span style="color: #006080;"&gt;"/css/default.css"&lt;/span&gt; rel=&lt;span style="color: #006080;"&gt;"stylesheet"&lt;/span&gt; /&amp;gt;&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum5"&gt; 5:&lt;/span&gt;     &amp;lt;script src=&lt;span style="color: #006080;"&gt;"/js/default.js"&lt;/span&gt;&amp;gt;&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum1"&gt; 1:&lt;/span&gt; &amp;lt;/script&amp;gt;&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum2"&gt; 2:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum3"&gt; 3:&lt;/span&gt;         &amp;lt;script type=&lt;span style="color: #006080;"&gt;"text/javascript"&lt;/span&gt;&amp;gt;&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum4"&gt; 4:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum5"&gt; 5:&lt;/span&gt;             &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; getLocation = &lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; () {&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum6"&gt; 6:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum7"&gt; 7:&lt;/span&gt;                 &lt;span style="color: #008000;"&gt;// Success callback&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum8"&gt; 8:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum9"&gt; 9:&lt;/span&gt;                 &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; success = &lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; (p) {&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum10"&gt; 10:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum11"&gt; 11:&lt;/span&gt;                     document.getElementById(&lt;span style="color: #006080;"&gt;'latitude'&lt;/span&gt;).innerHTML = p.coordinate.latitude;&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum12"&gt; 12:&lt;/span&gt;                     document.getElementById(&lt;span style="color: #006080;"&gt;'longitude'&lt;/span&gt;).innerHTML = p.coordinate.longitude;&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum13"&gt; 13:&lt;/span&gt;                     document.getElementById(&lt;span style="color: #006080;"&gt;'tdAlt'&lt;/span&gt;).innerHTML = p.coordinate.altitude;&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum14"&gt; 14:&lt;/span&gt;                     document.getElementById(&lt;span style="color: #006080;"&gt;'tdAcc'&lt;/span&gt;).innerHTML = p.coordinate.accuracy;&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum15"&gt; 15:&lt;/span&gt;                     document.getElementById(&lt;span style="color: #006080;"&gt;'tdAltAcc'&lt;/span&gt;).innerHTML = p.coordinate.altitudeAccuracy;&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum16"&gt; 16:&lt;/span&gt;                     document.getElementById(&lt;span style="color: #006080;"&gt;'tdHeading'&lt;/span&gt;).innerHTML = p.coordinate.heading;&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum17"&gt; 17:&lt;/span&gt;                     document.getElementById(&lt;span style="color: #006080;"&gt;'tdSpeed'&lt;/span&gt;).innerHTML = p.coordinate.speed;&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum18"&gt; 18:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum19"&gt; 19:&lt;/span&gt;                     setLocationStatus(&lt;span style="color: #006080;"&gt;"Done"&lt;/span&gt;);&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum20"&gt; 20:&lt;/span&gt;                 };&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum21"&gt; 21:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum22"&gt; 22:&lt;/span&gt;                 &lt;span style="color: #008000;"&gt;// Fail callback&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum23"&gt; 23:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum24"&gt; 24:&lt;/span&gt;                 &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; fail = &lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; (e) {&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum25"&gt; 25:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum26"&gt; 26:&lt;/span&gt;                     &lt;span style="color: #008000;"&gt;//setLocationStatus("Error: " + e.code);&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum27"&gt; 27:&lt;/span&gt;                     setLocationStatus(&lt;span style="color: #006080;"&gt;"Error: "&lt;/span&gt; + e.message);&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum28"&gt; 28:&lt;/span&gt;                 };&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum29"&gt; 29:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum30"&gt; 30:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum31"&gt; 31:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum32"&gt; 32:&lt;/span&gt;                 &lt;span style="color: #008000;"&gt;// Get location&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum33"&gt; 33:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum34"&gt; 34:&lt;/span&gt;                 &lt;span style="color: #008000;"&gt;//navigator.geolocation.getCurrentPosition(success, fail, { enableHighAccuracy: true }); //, {timeout: 10000});&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum35"&gt; 35:&lt;/span&gt;            &lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum36"&gt; 36:&lt;/span&gt;                 &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; geolocator = Windows.Devices.Geolocation.Geolocator();&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum37"&gt; 37:&lt;/span&gt;                 geolocator.desiredAccuracy = Windows.Devices.Geolocation.PositionAccuracy.high; &lt;span style="color: #008000;"&gt;//or default&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum38"&gt; 38:&lt;/span&gt;                 geolocator.getGeopositionAsync().then(success, fail);&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum39"&gt; 39:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum40"&gt; 40:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum41"&gt; 41:&lt;/span&gt;                 setLocationStatus(&lt;span style="color: #006080;"&gt;"Retrieving location..."&lt;/span&gt;);&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum42"&gt; 42:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum43"&gt; 43:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum44"&gt; 44:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum45"&gt; 45:&lt;/span&gt;             };&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum46"&gt; 46:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum47"&gt; 47:&lt;/span&gt;             &lt;span style="color: #008000;"&gt;/**&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum48"&gt; 48:&lt;/span&gt; &lt;span style="color: #008000;"&gt; &lt;/span&gt;&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum49"&gt; 49:&lt;/span&gt; &lt;span style="color: #008000;"&gt; * Set location status&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum50"&gt; 50:&lt;/span&gt; &lt;span style="color: #008000;"&gt; &lt;/span&gt;&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum51"&gt; 51:&lt;/span&gt; &lt;span style="color: #008000;"&gt; */&lt;/span&gt;&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum52"&gt; 52:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum53"&gt; 53:&lt;/span&gt;             &lt;span style="color: #0000ff;"&gt;var&lt;/span&gt; setLocationStatus = &lt;span style="color: #0000ff;"&gt;function&lt;/span&gt; (status) {&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum54"&gt; 54:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum55"&gt; 55:&lt;/span&gt;                 document.getElementById(&lt;span style="color: #006080;"&gt;'location_status'&lt;/span&gt;).innerHTML = status;&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum56"&gt; 56:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum57"&gt; 57:&lt;/span&gt;             };&lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum58"&gt; 58:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: white; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;"&gt;&lt;span style="color: #606060;" id="lnum59"&gt; 59:&lt;/span&gt;       &lt;/pre&gt;
&lt;pre style="text-align: left; line-height: 12pt; background-color: #f4f4f4; margin: 0em; width: 100%; font-family: 'Courier New', courier, monospace; direction: ltr; color: black; font-size: 8pt; overflow: visible; border-style: none; padding: 0px;" id="codeSnippet"&gt;&lt;!--CRLF--&gt;&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;script&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;head&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;body&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;       &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;h1&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;Location&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;h1&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;id&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="info"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;b&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;Status:&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;b&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;span&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;id&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="location_status"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;Stopped&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;span&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;table&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;tr&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;b&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;Latitude:&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;b&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;id&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="latitude"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;tr&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;tr&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;b&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;Longitude:&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;b&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;id&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="longitude"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;tr&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;tr&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;b&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;Altitude:&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;b&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;id&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="tdAlt"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;tr&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;tr&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;b&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;Accuracy:&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;b&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;id&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="tdAcc"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;tr&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;tr&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;b&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;Altitude Accuracy:&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;b&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;id&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="tdAltAcc"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;tr&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;tr&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;b&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;Heading:&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;b&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;id&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="tdHeading"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;tr&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;            &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;tr&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;b&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;Speed:&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;b&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;id&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="tdSpeed"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;td&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;tr&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;        &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;table&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;div&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;h2&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;Action&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;h2&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: #0000ff;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000;"&gt;button&lt;/span&gt; &lt;span style="color: #ff0000;"&gt;onclick&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;="getLocation();"&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;Get Location&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;button&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;body&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #0000ff;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000;"&gt;html&lt;/span&gt;&lt;span style="color: #0000ff;"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;The HTML is virtually unchanged, other than swapping the PhoneGap app-specific &amp;ldquo;master.css&amp;rdquo; for the built in Windows 8 one called &amp;ldquo;ui-dark&amp;rdquo;. And yes, there is a &amp;ldquo;ui-light&amp;rdquo; if you want your app to have a light colored background. The code is only a little different because we&amp;rsquo;re using the .then syntax from the &lt;a href="http://msdn.microsoft.com/en-us/library/windows/apps/br211867.aspx"&gt;WinJS Promise object&lt;/a&gt; to accomplish things asynchronously. The success parameter became &lt;em&gt;coordinate&lt;/em&gt; instead of &lt;em&gt;coords&lt;/em&gt; (but note the properties are the same name!).&lt;/p&gt;
&lt;p&gt;Below, I have some screen shots of the PhoneGap app running in the Windows Phone emulator, and the Windows 8 JavaScript app.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-31-52-metablogapi/4670.SimpleLocationStopped_5F00_2.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="SimpleLocationStopped" border="0" alt="SimpleLocationStopped" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-31-52-metablogapi/7875.SimpleLocationStopped_5F00_thumb.png" width="164" height="260" /&gt;&lt;/a&gt;&amp;nbsp; &lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-31-52-metablogapi/1031.screenshot_5F00_07062012_5F00_151729_5F00_2.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="screenshot_07062012_151729" border="0" alt="screenshot_07062012_151729" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-31-52-metablogapi/8054.screenshot_5F00_07062012_5F00_151729_5F00_thumb.png" width="442" height="257" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-31-52-metablogapi/5756.SimpleLocationDone_5F00_2.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="SimpleLocationDone" border="0" alt="SimpleLocationDone" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-31-52-metablogapi/0447.SimpleLocationDone_5F00_thumb.png" width="164" height="260" /&gt;&lt;/a&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-31-52-metablogapi/8054.screenshot_5F00_07062012_5F00_151858_5F00_2.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="screenshot_07062012_151858" border="0" alt="screenshot_07062012_151858" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-31-52-metablogapi/7317.screenshot_5F00_07062012_5F00_151858_5F00_thumb.png" width="447" height="260" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;Conclusion&lt;/h1&gt;
&lt;p&gt;When you started using PhoneGap you had to design for a different rendering environment (an app) instead of a browser. And you had to learn a new set of APIs. But you still used your HTML/CSS/JS skills from creating browser applications. And so it is with Windows 8 HTML/JS development. In future articles I&amp;rsquo;ll cover a lot more aspects of Windows 8 JavaScript apps from a PhoneGap developers perspective.&lt;/p&gt;
&lt;p&gt;A Windows 8 developer has good reason to be excited. With over 650 million licenses of Windows 7 out there, exciting new hardware coming from manufacturers, a developer friendly store with a great revenue sharing approach, and tons of resources (online and local), frankly, PhoneGap developers who aren&amp;rsquo;t targeting Windows 8 are just missing the boat.&lt;/p&gt;
&lt;p&gt;Don't forget that we have a great program to get you from idea to Windows 8 app with our &lt;a href="http://www.microsoft.com/click/services/Redirect2.ashx?CR_CC=200115765"&gt;30 to Launch program as part of Generation App&lt;/a&gt;. Sign up today!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10337263" width="1" height="1"&gt;</content><author><name>GlenGordon</name><uri>http://blogs.msdn.com/glengordon/ProfileUrlRedirect.ashx</uri></author><category term="PhoneGap" scheme="http://blogs.msdn.com/b/glengordon/archive/tags/PhoneGap/" /><category term="Windows 8" scheme="http://blogs.msdn.com/b/glengordon/archive/tags/Windows+8/" /></entry><entry><title>Windows 8 and Visual Studio 2012 are on the way–released to manufacturing today!</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/glengordon/archive/2012/08/01/windows-8-is-on-the-way-released-to-manufacturing-today.aspx" /><id>http://blogs.msdn.com/b/glengordon/archive/2012/08/01/windows-8-is-on-the-way-released-to-manufacturing-today.aspx</id><published>2012-08-01T16:39:00Z</published><updated>2012-08-01T16:39:00Z</updated><content type="html">&lt;p&gt;Today, various Microsoft team blogs joined together in announcing some huge news to the tech industry. &lt;a href="http://windowsteamblog.com/windows/b/bloggingwindows/archive/2012/08/01/windows-8-has-reached-the-rtm-milestone.aspx"&gt;Windows 8 has been released to manufacturing&lt;/a&gt; and will soon be available to download &amp;ndash; first for MSDN and TechNet subscribers, then via other channels.&lt;/p&gt;
&lt;p&gt;This means the Windows Store is now open, according to this single statement from the &lt;a href="http://blogs.msdn.com/b/windowsstore/archive/2012/08/01/rtm-windows-store-is-now-open-for-paid-apps-company-accounts.aspx"&gt;Windows Store blog&amp;rsquo;s post&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Starting today, any qualifying business in a supported market can now submit a Metro style app for Windows 8!&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/b/jasonz/archive/2012/08/01/final-build-for-vs-2012-availability-and-launch-dates-ahead.aspx" target="_blank"&gt;Visual Studio 2012 has hit RTM&lt;/a&gt; as well, so all the tools you need to build and submit apps will be available soon as well.&lt;/p&gt;
&lt;p&gt;If you've been on the fence about getting started with Windows 8 development, here are some things to help you get off that fence - on the right side!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Devcamps and Hackathons&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Come out to one of our imminent &lt;a href="http://blogs.msdn.com/b/glengordon/archive/2012/06/25/windows-8-devcamps-and-hackathons-coming-in-august.aspx"&gt;Windows 8 devcamps and hackathons&lt;/a&gt; and spend a day learning about Windows 8 development, and a day &lt;em&gt;doing&lt;/em&gt; where you build an app, get some help, and win prizes! In the southeast, we'll be in Atlanta on August 3-4 and Raleigh on August 17-18.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Generation App&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Begin your 30-day journey to create a great Windows 8 app. Get started at &lt;a href="http://www.microsoft.com/click/services/Redirect2.ashx?CR_CC=200115765"&gt;www.generationapp.com&lt;/a&gt; and receive:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Insider tips and tricks on Windows 8 application development.&lt;/li&gt;
&lt;li&gt;Personal on-the-phone access to a Windows 8 architect.&lt;/li&gt;
&lt;li&gt;An exclusive one-on-one Windows 8 style design consultation.&lt;/li&gt;
&lt;li&gt;An opportunity to get expert help from a Microsoft Services Engineer at an App Excellence Lab.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Your new Windows 8 app could be mere days away.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Learn how to make your app succesful&lt;/strong&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;My colleague Chris Bowen has just published a really useful post on &lt;a href="http://blogs.msdn.com/b/cbowen/archive/2012/08/01/the-top-10-windows-8-secrets-of-app-success.aspx" target="_blank"&gt;The Top 10 Windows 8 Secrets of App Success&lt;/a&gt;. Some great tips in there on dealing with screen sizes, managing online/offline scenarios, and more. Following those tips will really help differentiate your app from the competition!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10335679" width="1" height="1"&gt;</content><author><name>GlenGordon</name><uri>http://blogs.msdn.com/glengordon/ProfileUrlRedirect.ashx</uri></author><category term="Windows 8" scheme="http://blogs.msdn.com/b/glengordon/archive/tags/Windows+8/" /></entry></feed>