<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Blankenblog</title>
	
	<link>http://www.jeffblankenburg.com</link>
	<description>windows development and other geekery</description>
	<lastBuildDate>Mon, 01 Apr 2013 12:24:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Blankenthoughts" /><feedburner:info uri="blankenthoughts" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><geo:lat>40.14852</geo:lat><geo:long>-82.912785</geo:long><feedburner:emailServiceId>Blankenthoughts</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2FBlankenthoughts" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2FBlankenthoughts" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Ffeeds.feedburner.com%2FBlankenthoughts" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://feeds.feedburner.com/Blankenthoughts" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2FBlankenthoughts" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2FBlankenthoughts" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2FBlankenthoughts" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><feedburner:feedFlare href="http://www.plusmo.com/add?url=http%3A%2F%2Ffeeds.feedburner.com%2FBlankenthoughts" src="http://plusmo.com/res/graphics/fbplusmo.gif">Subscribe with Plusmo</feedburner:feedFlare><feedburner:feedFlare href="http://www.addtoany.com/?linkname=Blankenblog&amp;linkurl=http%3A%2F%2Ffeeds.feedburner.com%2FBlankenthoughts&amp;type=feed" src="http://www.addtoany.com/addfr-b.gif">Add to Any Feed Reader</feedburner:feedFlare><item>
		<title>Lessons Learned In Using Microsoft Ads</title>
		<link>http://feedproxy.google.com/~r/Blankenthoughts/~3/6rPa5aqXHro/</link>
		<comments>http://www.jeffblankenburg.com/2013/04/01/lessons-learned-in-using-microsoft-ads/#comments</comments>
		<pubDate>Mon, 01 Apr 2013 12:24:57 +0000</pubDate>
		<dc:creator>jeffblankenburg</dc:creator>
				<category><![CDATA[What I Learned]]></category>

		<guid isPermaLink="false">http://www.jeffblankenburg.com/?p=3229</guid>
		<description>Yesterday ended my first month of being an active Windows 8 app publisher.&amp;#160; The way I define “active” is that I have been consistently working to improve it since its launch.&amp;#160; There are many apps that are thrown into any marketplace, never to see an update of any kind.&amp;#160; In the first month, I shipped [...]</description>
			<content:encoded><![CDATA[<p>Yesterday ended my first month of being an active Windows 8 app publisher.&#160; The way I define “active” is that I have been consistently working to improve it since its launch.&#160; There are many apps that are thrown into any marketplace, never to see an update of any kind.&#160; In the first month, I shipped EIGHT updates.</p>
<p>Mind you, the first couple of updates were meant to solve two specific problems:</p>
<p>1)&#160; Address a couple of small bugs I had identified.</p>
<p>2)&#160; Get the Microsoft Advertising Control to actually work in my app.</p>
<p>Every app is going to have a bug or two, and there’s nothing terribly interesting about those, but the ads WERE tricky.&#160; I created my ad units at <a href="http://pubcenter.microsoft.com" target="_blank">PubCenter</a> (which as it turns out, is not a place to find a frosty pint.)&#160; I added an AdControl to the pages of my app using the identifiers from my ad units.&#160; But they didn’t show up in my app when I published it.&#160; In fact, after I published the first time, they didn’t show up in my development environment anymore either.</p>
<h2>Being Lazy Was a Problem</h2>
<p>One of the consistent pieces of feedback I had given developers was to uncheck the “Internet” option in the app capabilities if you weren’t using it.&#160; Having that box checked also requires you to publish and include a privacy policy, and being lazy and averse to legalese, I decided my poker app, which didn’t have any need to connect to the internet, would not get this box checked.&#160; (Of course, you do this right before you publish, not realizing you’re breaking everything.)</p>
<p>I opened a support ticket with PubCenter, and after a couple of days of trading emails and eliminating the obvious problems, they simply asked to see my code, if possible.&#160; I pointed them to my github repository, where they identified that I had turned off “Internet” capabilities, and the AdControl needs this to serve ads.</p>
<p><strong>Looking back, this is one of the most obvious statements I have ever written.</strong></p>
<p>At the time, however, I seemed to me that the AdControl would probably have its own mechanisms for serving ads, and that they weren’t dependent on my app’s settings.&#160; WRONG.</p>
<p>Anyways, once I flipped that switch on March 8th, the ads started showing up, and much to my surprise, I started making a little money.</p>
<h2>Let’s Define “Making Money”</h2>
<p>In the first few days after the ads started working, I averaged about $1.30 a day.&#160; Not retirement money by any means, but my expectations were in the pennies a day range.&#160; A dollar or more seemed HUGE.&#160; Here’s a chart of my first month:</p>
<p><img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="image" src="http://www.jeffblankenburg.com/wp-content/uploads/2013/04/image.png" width="413" height="228" /> </p>
<p>As you can see, March 18th was a huge day, grabbing me $4.55 that day.&#160; I thought this thing was just going to take off.&#160; As it turns out, that was my first day in the “New &amp; Rising” category, and the shine slowly faded on that $4+ day.&#160; Regardless, I’ve been consistently averaging more than $2 a day, which would be over $700 annually.&#160; Not a fortune, but now I’ve got a baseline to start from, and I’ve got big plans to elevate that number over time.</p>
<h2>What About eCPM?</h2>
<p>The important number in the mobile app game is something called eCPM.&#160; If you haven’t seen this term before, everyone uses is, but nobody really seems to define it.&#160; eCPM means “effective cost per thousand impressions.”&#160; </p>
<p>In simpler terms, this breaks down to the amount of money you made for every 1,000 times an ad was shown.&#160; For the month of March 2013, my eCPM fluctuated as I was adding users, and ended up at an average of $0.73.&#160; This number seemed a little low, until I looked at where I’m hovering each day lately:</p>
<p><img title="image" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="image" src="http://www.jeffblankenburg.com/wp-content/uploads/2013/04/image1.png" width="550" height="205" /> </p>
<p>Day to day, I’m averaging about $2.30 for my eCPM.&#160; Since I’m averaging around 1,000 impressions per day, it makes sense that I’d be making about $2.00 a day.&#160; (I’ve had peaks of 5,000+ impressions in a day, but lately it’s been more in-line with 1,000 per day.</p>
<h2>So What’s Next?</h2>
<p>My plans for the future are pretty simple: drive more impressions per day.&#160; One idea I have for this is to offer a prize to users who hit a royal flush in the game.&#160; This should incentivize people to play more, in the hopes they’ll win the prize.&#160; I need to determine whether or not this is really legal, as well as whether or not it’s permitted in the Windows Store.</p>
<p>Another one is to make it more simple, and just reward those players that play more than a specific number of video poker hands each month.&#160; Something like 10,000 hands.</p>
<p>In either case, I’m looking for ways to get more players to play more often, to drive up the number of impressions I’m getting each day, which should also drive up the amount of money I’m making each day.</p>
<p>I’ll keep you posted on how this all works out.</p>
<div class="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://www.jeffblankenburg.com/2013/03/26/poll-is-it-gambling/" rel="bookmark" class="crp_title">POLL: Is It Gambling?</a></li><li><a href="http://www.jeffblankenburg.com/2013/03/25/lessons-learned-from-rushing-to-market/" rel="bookmark" class="crp_title">Lessons Learned From Rushing To Market</a></li><li><a href="http://www.jeffblankenburg.com/2010/12/17/what-i-learned-in-wp7-%e2%80%93-issue-6/" rel="bookmark" class="crp_title">What I Learned In WP7 – Issue 6</a></li><li><a href="http://www.jeffblankenburg.com/2011/12/17/want-to-change-your-windows-phone-emulator/" rel="bookmark" class="crp_title">Want to change your Windows Phone emulator?</a></li><li><a href="http://www.jeffblankenburg.com/2012/05/11/the-one-where-you-can-get-rich-famous/" rel="bookmark" class="crp_title">The One Where You Can Get Rich &amp; Famous</a></li></ul></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=6rPa5aqXHro:lvOZrBm-kpY:G79ilh31hkQ"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?d=G79ilh31hkQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=6rPa5aqXHro:lvOZrBm-kpY:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?i=6rPa5aqXHro:lvOZrBm-kpY:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=6rPa5aqXHro:lvOZrBm-kpY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=6rPa5aqXHro:lvOZrBm-kpY:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?i=6rPa5aqXHro:lvOZrBm-kpY:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=6rPa5aqXHro:lvOZrBm-kpY:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=6rPa5aqXHro:lvOZrBm-kpY:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?i=6rPa5aqXHro:lvOZrBm-kpY:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=6rPa5aqXHro:lvOZrBm-kpY:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Blankenthoughts/~4/6rPa5aqXHro" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.jeffblankenburg.com/2013/04/01/lessons-learned-in-using-microsoft-ads/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://www.jeffblankenburg.com/2013/04/01/lessons-learned-in-using-microsoft-ads/</feedburner:origLink></item>
		<item>
		<title>POLL: Is It Gambling?</title>
		<link>http://feedproxy.google.com/~r/Blankenthoughts/~3/flFOy6UuLWs/</link>
		<comments>http://www.jeffblankenburg.com/2013/03/26/poll-is-it-gambling/#comments</comments>
		<pubDate>Wed, 27 Mar 2013 02:49:32 +0000</pubDate>
		<dc:creator>jeffblankenburg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.jeffblankenburg.com/?p=3225</guid>
		<description>Let’s say, hypothetically, that you had created a game that simulated video poker.&amp;#160; Users can download the app for free, and they play with free credits that can’t be purchased in any way, nor can they be cashed in for anything at all. Is that gambling? Let’s now say, hypothetically, that in this video poker [...]</description>
			<content:encoded><![CDATA[<p>Let’s say, hypothetically, that you had created a game that simulated video poker.&#160; Users can download the app for free, and they play with free credits that can’t be purchased in any way, nor can they be cashed in for anything at all.</p>
<p><strong>Is that gambling?</strong></p>
<p>Let’s now say, hypothetically, that in this video poker app, you created an offer to all of your users to award the first person each month that achieves a ROYAL FLUSH a prize of a giant, stuffed teddy bear.&#160; The users still risk none of their own money, but playing the game “might” win them the prize.</p>
<p><strong>Is that gambling?</strong></p>
<p>Now let’s swap out that teddy bear for a $100 gift card.&#160; Does that change anything?</p>
<p><strong>Now is it gambling?</strong></p>
<p>I’m considering this approach with my app, to encourage more people to play more often, but I also am jail-averse.&#160; I’m also massive-fine-averse.&#160; But to me, this seems about as cut and dried as it can get.&#160; How could it possibly be gambling if the player never risks anything?</p>
<p><strong>Please leave your thoughts in the comments.</strong>&#160; I am sincerely interested in your opinions, and if you know a lawyer that has any insight into this, I’d love a chance to chat with them.</p>
<p>Thanks!</p>
<div class="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://www.jeffblankenburg.com/2012/06/25/the-social-contract-of-an-invitation/" rel="bookmark" class="crp_title">The Social Contract of an Invitation</a></li><li><a href="http://www.jeffblankenburg.com/2013/04/01/lessons-learned-in-using-microsoft-ads/" rel="bookmark" class="crp_title">Lessons Learned In Using Microsoft Ads</a></li><li><a href="http://www.jeffblankenburg.com/2013/03/25/lessons-learned-from-rushing-to-market/" rel="bookmark" class="crp_title">Lessons Learned From Rushing To Market</a></li><li><a href="http://www.jeffblankenburg.com/2011/07/12/why-cant-software-development-be-more-like-sports/" rel="bookmark" class="crp_title">Why Can&rsquo;t Software Development Be More Like Sports?</a></li><li><a href="http://www.jeffblankenburg.com/2012/07/18/asynchronous-javascript-advice/" rel="bookmark" class="crp_title">Asynchronous Javascript Advice</a></li></ul></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=flFOy6UuLWs:N0wo8M8CXvk:G79ilh31hkQ"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?d=G79ilh31hkQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=flFOy6UuLWs:N0wo8M8CXvk:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?i=flFOy6UuLWs:N0wo8M8CXvk:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=flFOy6UuLWs:N0wo8M8CXvk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=flFOy6UuLWs:N0wo8M8CXvk:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?i=flFOy6UuLWs:N0wo8M8CXvk:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=flFOy6UuLWs:N0wo8M8CXvk:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=flFOy6UuLWs:N0wo8M8CXvk:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?i=flFOy6UuLWs:N0wo8M8CXvk:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=flFOy6UuLWs:N0wo8M8CXvk:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Blankenthoughts/~4/flFOy6UuLWs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.jeffblankenburg.com/2013/03/26/poll-is-it-gambling/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.jeffblankenburg.com/2013/03/26/poll-is-it-gambling/</feedburner:origLink></item>
		<item>
		<title>Lessons Learned From Rushing To Market</title>
		<link>http://feedproxy.google.com/~r/Blankenthoughts/~3/J9_46ULLOMQ/</link>
		<comments>http://www.jeffblankenburg.com/2013/03/25/lessons-learned-from-rushing-to-market/#comments</comments>
		<pubDate>Mon, 25 Mar 2013 23:18:03 +0000</pubDate>
		<dc:creator>jeffblankenburg</dc:creator>
				<category><![CDATA[What I Learned]]></category>

		<guid isPermaLink="false">http://www.jeffblankenburg.com/?p=3222</guid>
		<description>I’m still working on my Windows 8 application, King Poker, and have I learned some things this week.&amp;#160; (It’s also available for Windows Phone, btw.) In general, my app is pretty straightforward.&amp;#160; It’s a video poker application designed to look as similar to the real video poker machines in casinos as it can.&amp;#160; Last week, [...]</description>
			<content:encoded><![CDATA[<p><a href="http://apps.microsoft.com/windows/app/king-poker/bc8d046c-e35d-49fa-824e-eccf675c7a12" target="_blank"><img title="SplashScreen" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="SplashScreen" src="http://www.jeffblankenburg.com/wp-content/uploads/2013/03/SplashScreen.png" width="206" height="100" /></a> </p>
<p>I’m still working on my Windows 8 application, <a href="http://apps.microsoft.com/windows/app/king-poker/bc8d046c-e35d-49fa-824e-eccf675c7a12" target="_blank">King Poker</a>, and have I learned some things this week.&#160; (It’s also available for <a href="http://www.windowsphone.com/en-us/store/app/king-poker/0eccfa62-3566-420f-9955-d4e108ba247a" target="_blank">Windows Phone</a>, btw.)</p>
<p>In general, my app is pretty straightforward.&#160; It’s a video poker application designed to look as similar to the real video poker machines in casinos as it can.&#160; Last week, I got ambitious, and decided to add some functionality that goes above and beyond the core functionality you’d expect.</p>
<p>I added <a href="http://www.windowsazure.com/en-us/develop/mobile/" target="_blank">Azure Mobile Services</a>, and if the user was online, every single hand was recorded to my cloud storage database.&#160; In the 10 days it’s been live, I’ve recorded over 45,000 random hands of video poker to my database.</p>
<p>In addition, I added Microsoft Account authentication, which means that if you log in with your Microsoft credentials, I could persist your credit count and hand history across all of your devices.&#160; This is where the story gets ugly.</p>
<p>I spent HOURS writing and testing this functionality.&#160; Log in on my Surface RT.&#160; Play some hands of Deuces Wild.&#160; Log out.&#160; Keep playing.&#160; Log in.&#160; Play some more.&#160; Cut the wi-fi connection.&#160; Play some more.&#160; Reconnect.&#160; Sync the hands that were played when disconnected.&#160; Log in to the Windows Phone 8 version.&#160; See the identical credit count.&#160; If you were logged in to these apps, everything worked marvelously.</p>
<p>When you weren’t logged in, it still worked marvelously.&#160; It still logged your hands in my cloud database.&#160; <strong>My mistake was that I didn’t notice that even when you were logged out, it was trying to sync your credits.&#160; Anonymously.</strong></p>
<p>So I pushed this new update chock full of new features to the store.&#160; <em>And it passed.</em>&#160; I was so excited!&#160; And then the negative reviews started flowing in.&#160; </p>
<p>“Used to work well on RT. Last update broke it. Lost all my money, well pretend money anyway. Please fix it”</p>
<p>“This is a great poker game. Play it all the time. However installed update yesterday and now it crashes all the time.”</p>
<p>“Credit counter still going crazy...Change the word HELD...back to HOLD, like in Vegas and Atlantic city...”</p>
<p><strong>As it turns out, everyone that wasn’t logged in was synching their credits with everyone else that wasn’t logged in.&#160; Ouch.</strong></p>
<p>I’ve been really careful about thorough manual testing, as well as running a full suite of unit tests, but this one got by me.&#160; I was so focused on what the experience was like for authenticated users, I didn’t give enough to time to think through all of the scenarios for those people that chose not to authenticate.&#160; </p>
<p>I fixed it immediately, but it was Friday night, and the Windows Store team doesn’t approve apps on the weekends.&#160; It wasn’t until Monday afternoon that my new patch was finally released, and almost immediately, I found yet another issue.&#160; (It’s funny how much more obvious bugs are when they’re in production vs. development.)&#160; I now have to wait at least another day before this issue will finally be solved.</p>
<h2>Take Your Time</h2>
<p>My point in all of this is to take your time.&#160; I was so anxious to get my new set of features into the hands of my users, I completely neglected to remember that apps that have to go through stores are SIGNIFICANTLY harder to fix than a simple website.&#160; If I find an issue on my website, I can fix it instantly.&#160; In your app, your users may have to suffer through days or bugs before you’re able to fix an issue.&#160; Take your time, get it right, and give your users the experience they deserve.&#160; It’s the only way you’re going to get MORE users.</p>
<p>In short, no matter how great your set of features is, a little extra diligence to think through ALL of the user scenarios will benefit everyone in the long run.&#160; That’s how you build a great app.&#160; Keep your users’ confidence high, and give them a reason to tell their friends about it.</p>
<p>If you’d like to </p>
<div class="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://www.jeffblankenburg.com/2010/12/17/what-i-learned-in-wp7-%e2%80%93-issue-6/" rel="bookmark" class="crp_title">What I Learned In WP7 – Issue 6</a></li><li><a href="http://www.jeffblankenburg.com/2013/03/26/poll-is-it-gambling/" rel="bookmark" class="crp_title">POLL: Is It Gambling?</a></li><li><a href="http://www.jeffblankenburg.com/2010/12/20/what-i-learned-in-wp7-%e2%80%93-issue-7/" rel="bookmark" class="crp_title">What I Learned In WP7 – Issue 7</a></li><li><a href="http://www.jeffblankenburg.com/2013/04/01/lessons-learned-in-using-microsoft-ads/" rel="bookmark" class="crp_title">Lessons Learned In Using Microsoft Ads</a></li><li><a href="http://www.jeffblankenburg.com/2012/08/24/getting-started-with-windows-8-development/" rel="bookmark" class="crp_title">Getting Started With Windows 8 Development?</a></li></ul></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=J9_46ULLOMQ:VL5EQrm5PN8:G79ilh31hkQ"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?d=G79ilh31hkQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=J9_46ULLOMQ:VL5EQrm5PN8:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?i=J9_46ULLOMQ:VL5EQrm5PN8:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=J9_46ULLOMQ:VL5EQrm5PN8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=J9_46ULLOMQ:VL5EQrm5PN8:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?i=J9_46ULLOMQ:VL5EQrm5PN8:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=J9_46ULLOMQ:VL5EQrm5PN8:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=J9_46ULLOMQ:VL5EQrm5PN8:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?i=J9_46ULLOMQ:VL5EQrm5PN8:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=J9_46ULLOMQ:VL5EQrm5PN8:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Blankenthoughts/~4/J9_46ULLOMQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.jeffblankenburg.com/2013/03/25/lessons-learned-from-rushing-to-market/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://www.jeffblankenburg.com/2013/03/25/lessons-learned-from-rushing-to-market/</feedburner:origLink></item>
		<item>
		<title>Lessons Learned About Capturing Keystrokes in Windows 8</title>
		<link>http://feedproxy.google.com/~r/Blankenthoughts/~3/ypW4wJ6NrpQ/</link>
		<comments>http://www.jeffblankenburg.com/2013/03/16/lessons-learned-about-capturing-keystrokes-in-windows-8/#comments</comments>
		<pubDate>Sat, 16 Mar 2013 23:05:35 +0000</pubDate>
		<dc:creator>jeffblankenburg</dc:creator>
				<category><![CDATA[What I Learned]]></category>

		<guid isPermaLink="false">http://www.jeffblankenburg.com/?p=3216</guid>
		<description>It would appear I’m going to start pumping out little “lessons learned” articles over the next few weeks, as I’ve learned an absolute TON from building my King Poker app.  Today’s lesson is about capturing keystrokes. Many of you have probably done this before: you want to recognize a specific key that has been pressed [...]</description>
			<content:encoded><![CDATA[<p>It would appear I’m going to start pumping out little “lessons learned” articles over the next few weeks, as I’ve learned an absolute TON from building my <a href="http://apps.microsoft.com/windows/app/king-poker/bc8d046c-e35d-49fa-824e-eccf675c7a12" target="_blank">King Poker</a> app.  Today’s lesson is about capturing keystrokes.</p>
<p>Many of you have probably done this before: you want to recognize a specific key that has been pressed when a user is entering something into a TextBox.  Maybe you want to take action when they press the Enter key, for example.  This is generally simple enough, you just set up a KeyDown (or KeyUp, depending on your needs) event on the TextBox in question, and then just check every time the event fires until you find the key you’re looking for.</p>
<p><strong>That’s not what I wanted to do.</strong></p>
<p>To give you some context, here’s a screenshot of my app:</p>
<p><a href="http://www.jeffblankenburg.com/wp-content/uploads/2013/03/screenshot_03162013_184638.png"><img style="display: inline; border: 0px;" title="screenshot_03162013_184638" src="http://www.jeffblankenburg.com/wp-content/uploads/2013/03/screenshot_03162013_184638_thumb.png" alt="screenshot_03162013_184638" width="500" height="281" border="0" /></a></p>
<p>For the cards in question, I want to hold the three Queens, and then re-deal, hoping to get the 4th Queen, or maybe one of the Wild Deuces.  (If I’m very lucky, BOTH!)</p>
<p>As the game currently stands, it is designed for use on a touch screen or with a mouse.  Clicking/tapping on a card will mark it as “HELD,” and won’t replace it when you click the “DEAL” button.  But you have to actually move your fingers or mouse to each card to mark them.  For speed players, they’d prefer physical buttons that can be pressed over having to touch a screen.</p>
<p><strong>This is where my key capture needs come in.</strong></p>
<p>I don’t have a control that I can just drop a KeyDown event on.  I want to be able to monitor keystrokes at all times.  For this, we can simply wire up an event in the code-behind file, and capture it there.  Here’s what it looks like:</p>
<div class="csharpcode">
<pre class="alt"><span class="kwrd">protected</span> <span class="kwrd">override</span> <span class="kwrd">void</span> OnNavigatedTo(NavigationEventArgs e)</pre>
<pre>{</pre>
<pre class="alt">    Window.Current.CoreWindow.KeyDown += CoreWindow_KeyDown;</pre>
<pre>}</pre>
<pre class="alt"></pre>
<pre><span class="kwrd">void</span> CoreWindow_KeyDown(Windows.UI.Core.CoreWindow sender, Windows.UI.Core.KeyEventArgs args)</pre>
<pre class="alt">{</pre>
<pre class="alt">    <span class="kwrd">switch</span> (args.VirtualKey)</pre>
<pre>    {</pre>
<pre class="alt">        <span class="kwrd">case</span> <span class="str">Windows.System.VirtualKey.Number1</span>:</pre>
<pre>            <span class="kwrd">if</span> (HoldRound) HoldCard(Card0);</pre>
<pre class="alt">            <span class="kwrd">else</span> SetBet(1);</pre>
<pre>            <span class="kwrd">break</span>;</pre>
<pre class="alt">        <span class="kwrd">case</span> Windows.System.VirtualKey.Number2:</pre>
<pre>            HoldCard(Card1);</pre>
<pre class="alt">            <span class="kwrd">break</span>;</pre>
<pre>        <span class="kwrd">case</span> Windows.System.VirtualKey.Number3:</pre>
<pre class="alt">            HoldCard(Card2);</pre>
<pre>            <span class="kwrd">break</span>;</pre>
<pre class="alt">        <span class="kwrd">case</span> Windows.System.VirtualKey.Number4:</pre>
<pre>            HoldCard(Card3);</pre>
<pre class="alt">            <span class="kwrd">break</span>;</pre>
<pre>        <span class="kwrd">case</span> Windows.System.VirtualKey.Number5:</pre>
<pre class="alt">            <span class="kwrd">if</span> (HoldRound) HoldCard(Card4);</pre>
<pre>            <span class="kwrd">else</span> SetBet(5);</pre>
<pre class="alt">            <span class="kwrd">break</span>;</pre>
<pre>        <span class="kwrd">case</span> Windows.System.VirtualKey.Space:</pre>
<pre class="alt">            Deal();</pre>
<pre>            <span class="kwrd">break</span>;</pre>
<pre class="alt">    }</pre>
<pre>}</pre>
<pre class="alt"></pre>
<pre><span class="kwrd">protected</span> <span class="kwrd">override</span> <span class="kwrd">void</span> OnNavigatingFrom(NavigatingCancelEventArgs e)</pre>
<pre class="alt">{</pre>
<pre>    Window.Current.CoreWindow.KeyDown -= CoreWindow_KeyDown;</pre>
<pre class="alt">}</pre>
</div>
<p>&nbsp;</p>
<p>As you can see above, I subscribe to the Window.Current.CoreWindow.KeyDown event, which fires before anything else gets access to the key event.  This is also a great way to capture keystrokes before they get to your TextBox controls, etc.</p>
<p>Once I’ve got this event rigged up (and un-rigged it with my OnNavigatingFrom event), I can now easily provide physical keys for my power users by enabling the #1 - #5 keys to hold the cards rather than having to move their mouse all over the screen.  In addition, I’ve also set the Spacebar up to provide “Deal” functionality, which means they never need the mouse once they start playing the game.  Here’s a look at the cards held:</p>
<p><img style="display: inline; border: 0px;" title="screenshot_03162013_190355" src="http://www.jeffblankenburg.com/wp-content/uploads/2013/03/screenshot_03162013_190355.png" alt="screenshot_03162013_190355" width="500" height="281" border="0" /></p>
<p>And finally, in case you were wondering, here’s what I drew (I got that wild 2) to get my four of a kind!</p>
<p><img style="display: inline; border: 0px;" title="screenshot_03162013_190451" src="http://www.jeffblankenburg.com/wp-content/uploads/2013/03/screenshot_03162013_190451.png" alt="screenshot_03162013_190451" width="500" height="281" border="0" /></p>
<h2>Summary</h2>
<p>So there you have it.  A simple way to capture keystrokes in C# and XAML applications for Windows 8/Windows RT applications.  Many apps have a need for this in some way (even if it’s to provide a shortcut or even an Easter Egg), so consider this in your applications as well.</p>
<p><a href="http://bit.ly/w8keepthecash" target="_blank"><img title="clip_image002" src="http://www.jeffblankenburg.com/wp-content/uploads/2013/03/clip_image002.jpg" alt="clip_image002" width="435" height="102" border="0" hspace="12" /></a></p>
<div class="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://www.jeffblankenburg.com/2012/11/23/31-days-of-windows-8-day-23-the-compass/" rel="bookmark" class="crp_title">31 Days of Windows 8 | Day #23: The Compass</a></li><li><a href="http://www.jeffblankenburg.com/2012/11/24/31-days-of-windows-8-day-24-light-sensor/" rel="bookmark" class="crp_title">31 Days of Windows 8 | Day #24: Light Sensor</a></li><li><a href="http://www.jeffblankenburg.com/2012/11/25/31-days-of-windows-8-day-25-accelerometer/" rel="bookmark" class="crp_title">31 Days of Windows 8 | Day #25: Accelerometer</a></li><li><a href="http://www.jeffblankenburg.com/2012/11/27/31-days-of-windows-8-day-27-inclinometer/" rel="bookmark" class="crp_title">31 Days of Windows 8 | Day #27: Inclinometer</a></li><li><a href="http://www.jeffblankenburg.com/2012/11/26/31-days-of-windows-8-day-26-gyrometer/" rel="bookmark" class="crp_title">31 Days of Windows 8 | Day #26: Gyrometer</a></li></ul></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=ypW4wJ6NrpQ:m6cM78Ab-S0:G79ilh31hkQ"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?d=G79ilh31hkQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=ypW4wJ6NrpQ:m6cM78Ab-S0:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?i=ypW4wJ6NrpQ:m6cM78Ab-S0:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=ypW4wJ6NrpQ:m6cM78Ab-S0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=ypW4wJ6NrpQ:m6cM78Ab-S0:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?i=ypW4wJ6NrpQ:m6cM78Ab-S0:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=ypW4wJ6NrpQ:m6cM78Ab-S0:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=ypW4wJ6NrpQ:m6cM78Ab-S0:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?i=ypW4wJ6NrpQ:m6cM78Ab-S0:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=ypW4wJ6NrpQ:m6cM78Ab-S0:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Blankenthoughts/~4/ypW4wJ6NrpQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.jeffblankenburg.com/2013/03/16/lessons-learned-about-capturing-keystrokes-in-windows-8/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		<feedburner:origLink>http://www.jeffblankenburg.com/2013/03/16/lessons-learned-about-capturing-keystrokes-in-windows-8/</feedburner:origLink></item>
		<item>
		<title>Lessons Learned in Windows 8 Scaling</title>
		<link>http://feedproxy.google.com/~r/Blankenthoughts/~3/jFdx1IFjSYc/</link>
		<comments>http://www.jeffblankenburg.com/2013/03/16/lessons-learned-in-windows-8-scaling/#comments</comments>
		<pubDate>Sat, 16 Mar 2013 12:38:36 +0000</pubDate>
		<dc:creator>jeffblankenburg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.jeffblankenburg.com/?p=3210</guid>
		<description>As I mentioned in my last article, I recently published a new Windows 8 application called King Poker.&amp;#160; One of the major challenges I had was around handling the giant variety of screen sizes that are possible with Windows 8. In my numerous years of XAML and C# development,&amp;#160; I’ve almost always had the good [...]</description>
			<content:encoded><![CDATA[<p>As I mentioned in my last article, I recently published a new Windows 8 application called <a href="http://apps.microsoft.com/windows/app/king-poker/bc8d046c-e35d-49fa-824e-eccf675c7a12" target="_blank">King Poker</a>.&#160; One of the major challenges I had was around handling the giant variety of screen sizes that are possible with Windows 8.</p>
<p><a href="http://apps.microsoft.com/windows/app/king-poker/bc8d046c-e35d-49fa-824e-eccf675c7a12" target="_blank"><img title="414x180Promotional" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="414x180Promotional" src="http://www.jeffblankenburg.com/wp-content/uploads/2013/03/414x180Promotional.png" width="181" height="79" /></a></p>
<p><a href="http://www.windowsphone.com/s?appid=0eccfa62-3566-420f-9955-d4e108ba247a" target="_blank"><img title="WindowsPhoneStoreIcon" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="WindowsPhoneStoreIcon" src="http://www.jeffblankenburg.com/wp-content/uploads/2013/03/WindowsPhoneStoreIcon.png" width="91" height="29" /></a><a href="http://apps.microsoft.com/windows/app/king-poker/bc8d046c-e35d-49fa-824e-eccf675c7a12" target="_blank"><img title="WindowsStoreIcon" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="WindowsStoreIcon" src="http://www.jeffblankenburg.com/wp-content/uploads/2013/03/WindowsStoreIcon.png" width="92" height="29" /></a> </p>
<p>In my numerous years of XAML and C# development,&#160; I’ve almost always had the good fortune to be working in a constrained box.&#160; In Silverlight, I knew exactly what size the control was going to be when it was embedded on a web page.&#160; In Windows Phone 7, there was only one resolution: 480 x 800.&#160; It allowed me to get lazy.</p>
<p>With Windows 8, laziness is no longer possible.&#160; You’re required to support 3 distinct resolutions out of the gate:</p>
<ul>
<li>1024x768 (filled view)</li>
<li>1366x768 (minimum full screen resolution)</li>
<li>320x768 (snapped view)</li>
</ul>
<h2>Using Grids</h2>
<p>I knew going into this project that I was going to be making extensive use of the Grid control.&#160; By setting the widths to “*”, I could have my content automatically scale to the size of the container, effectively scaling everything up to the appropriate sizes.&#160; I had another problem though: <strong>the amount of content I was presenting varied also</strong>.</p>
<p><em>ProTip: When layout a dynamic grid system, figure out what you want your layout to look like in fixed values on a 1366x768 screen.&#160; Set every ColumnDefinition and RowDefinition explicitly, so that it is EXACTLY the way you want it to look.&#160; Once you know those values, figure out what percentage of the width or height of the screen that takes up.&#160; Use these percentages as the dynamic values in your Column and RowDefinitions.&#160; Like this:</em></p>
<div class="csharpcode">
<pre class="alt"><span class="kwrd">&lt;</span><span class="html">Grid.RowDefinitions</span><span class="kwrd">&gt;</span></pre>
<pre>   <span class="kwrd">&lt;</span><span class="html">RowDefinition</span> <span class="attr">Height</span><span class="kwrd">=&quot;38*&quot;</span> <span class="kwrd">/&gt;</span></pre>
<pre class="alt">   <span class="kwrd">&lt;</span><span class="html">RowDefinition</span> <span class="attr">Height</span><span class="kwrd">=&quot;36*&quot;</span> <span class="kwrd">/&gt;</span></pre>
<pre>   <span class="kwrd">&lt;</span><span class="html">RowDefinition</span> <span class="attr">Height</span><span class="kwrd">=&quot;7*&quot;</span> <span class="kwrd">/&gt;</span></pre>
<pre class="alt">   <span class="kwrd">&lt;</span><span class="html">RowDefinition</span> <span class="attr">Height</span><span class="kwrd">=&quot;5*&quot;</span> <span class="kwrd">/&gt;</span></pre>
<pre>   <span class="kwrd">&lt;</span><span class="html">RowDefinition</span> <span class="attr">Height</span><span class="kwrd">=&quot;12*&quot;</span> <span class="kwrd">/&gt;</span></pre>
<pre class="alt"><span class="kwrd">&lt;/</span><span class="html">Grid.RowDefinitions</span><span class="kwrd">&gt;</span></pre>
</div>
<p>
<style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
</p>
<p>At the top of each game, there is a “paytable” that indicates how many credits you will win for certain types of poker hands.&#160; Some games, like Jacks or Better, have only 9 different hands that pay out.&#160; Other games, especially those that include wild cards, can have as many as 15!&#160; Here’s two screenshots of my app (before I solved all of my scaling issues.)</p>
<table cellspacing="0" cellpadding="2" width="500" border="0">
<tbody>
<tr>
<td valign="top" width="250"><a href="http://www.jeffblankenburg.com/wp-content/uploads/2013/03/Screenshot4.png"><img title="Screenshot4" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="Screenshot4" src="http://www.jeffblankenburg.com/wp-content/uploads/2013/03/Screenshot4_thumb.png" width="240" height="135" /></a> </td>
<td valign="top" width="250"><a href="http://www.jeffblankenburg.com/wp-content/uploads/2013/03/Screenshot5.png"><img title="Screenshot5" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="Screenshot5" src="http://www.jeffblankenburg.com/wp-content/uploads/2013/03/Screenshot5_thumb.png" width="240" height="135" /></a> </td>
</tr>
<tr>
<td valign="top" width="250"><strong>Jacks or Better (9 rows)</strong></td>
<td valign="top" width="250"><strong>White Hot Aces (11 rows)</strong></td>
</tr>
</tbody>
</table>
<p>As you can see, the paytables are different heights, and there’s a variable amount of space between the cards and the content below them.&#160; This was unacceptable, but I couldn’t figure out how to keep my paytable box a consistent height while having the content inside of it scale to fill it appropriately.</p>
<h2>Discovering the Viewbox Control</h2>
<p>Last night, after fighting with this issue for a couple of weeks, I discovered the <a href="http://msdn.microsoft.com/en-us/library/system.windows.controls.viewbox.aspx" target="_blank">Viewbox</a> control.&#160; Not sure how this has eluded me for so long, but that time has passed, and I am a HUGE fan.&#160; Its simplicity is its genius.&#160; Wrap any content inside a Viewbox control, and it will automatically scale it to fill its container.&#160; What this meant for me was that I could set my paytable box to be a fixed percentage of the screen, and the text inside that box would simply scale to fill the box.&#160; This means that 9 rows can fit in the same box as 15 rows, because it will just make the font size smaller for me automatically.</p>
<p><em>Sidenote: I had already started writing an elaborate “Page_SizeChanged” method that was going to manually set all of the font sizes, image sizes, etc. based on the resolution of the user’s machine. I am so glad I don’t have to do that.</em></p>
<p>You don’t need to do this with everything.&#160; For example, I’m only using it for my paytable grid and the advertisement.&#160; Everything else is able to scale on its own by the default behavior of a Grid.&#160; Here’s some screenshots of the new interface, with many more rows, yet more available vertical space:</p>
<table cellspacing="0" cellpadding="2" width="500" border="0">
<tbody>
<tr>
<td valign="top" width="250"><a href="http://www.jeffblankenburg.com/wp-content/uploads/2013/03/screenshot_03162013_080544.png"><img title="screenshot_03162013_080544" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="screenshot_03162013_080544" src="http://www.jeffblankenburg.com/wp-content/uploads/2013/03/screenshot_03162013_080544_thumb.png" width="240" height="135" /></a> </td>
<td valign="top" width="250"><img title="screenshot_03162013_080634" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="screenshot_03162013_080634" src="http://www.jeffblankenburg.com/wp-content/uploads/2013/03/screenshot_03162013_080634.png" width="240" height="135" /> </td>
</tr>
<tr>
<td valign="top" width="250"><strong>Black Jack Bonus Poker (14 rows)</strong></td>
<td valign="top" width="250"><strong>Deuces Wild (10 rows)</strong></td>
</tr>
</tbody>
</table>
<p>You can see that now, my interface looks identical, regardless of how many rows I add to that paytable box.&#160; What’s also cool is that the second image, the Deuces Wild one, is actually at a significantly higher resolution than the Black Jack Bonus Poker one.&#160; Yet they look identical.&#160; THIS is exactly what I was going for.</p>
<h2>Struggling with Dynamic Layout</h2>
<p>So it may seem, at this point, that my problem is solved, and we’re done talking about scaling.&#160; Wrong.&#160; See those 5 card images?&#160; Their size is dynamically determined by the size of the grid cells they reside in.&#160; This works perfectly fine until I want to swap them out for other graphics (like when a user deals new cards, for example.)&#160; When I change their source, for a brief moment, they don’t have a width or height.&#160; More specifically, their width and height are zero.&#160; My intial solution (so far) to this problem is to determine what size the images are when they are loaded, and then set their MinHeight, MinWidth, MaxHeight, and MaxWidth equal to their “loaded” size, so that even when I swap out their source, they’ll remain the same size.&#160; I tried many different events until <a href="http://timheuer.com/blog/" target="_blank">Tim Heuer</a> suggested I try the ImageOpened event on each image.&#160; This is where I landed:</p>
<div class="csharpcode">
<pre class="alt"><span class="kwrd">private</span> <span class="kwrd">void</span> Card_ImageOpened(<span class="kwrd">object</span> sender, RoutedEventArgs e)</pre>
<pre>{</pre>
<pre class="alt">   ResizeSingleCard(sender <span class="kwrd">as</span> Image);</pre>
<pre> }</pre>
<pre class="alt">&#160;</pre>
<pre><span class="kwrd">private</span> <span class="kwrd">void</span> ResizeSingleCard(Image i)</pre>
<pre class="alt">{</pre>
<pre>   i.MinWidth = i.ActualWidth;</pre>
<pre class="alt">   i.MaxWidth = i.ActualWidth;</pre>
<pre>   i.MinHeight = i.ActualHeight;</pre>
<pre class="alt">   i.MaxHeight = i.ActualHeight;</pre>
<pre>}</pre>
</div>
<style type="text/css">
.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
</p>
<p>By doing this, each of our images are “locked” to their size for the duration of the user’s game session.&#160; I am also handling some weird stuff for the very unlikely situation that a user changes their resolution <em>during</em> a game session, but that’s not something most of us need to worry about.</p>
<h2>Summary</h2>
<p>In short, getting your app to scale to multiple resolutions is hard, but it’s much easier than I was making it thanks to the Viewbox control.&#160; Now to find a way to get this control into my Windows Phone version, and I’ll be set.</p>
<p>A special shout-out needs to go to <a href="http://ryanlowdermilk.com/" target="_blank">Ryan Lowdermilk</a>, because without his constant beta-testing and encouragement to clean up my scaling issues, I probably never would have fought through it to get where I am today.&#160; (Also, check out his great podcast, <a href="http://windowsdevelopershow.com/" target="_blank">The Windows Developer Show</a>.&#160; I’m hooked on this weekly broadcast of the latest news for Windows 8 &amp; Windows Phone Developers.)</p>
<p><a href="http://bit.ly/w8keepthecash" target="_blank"><img title="clip_image002" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" hspace="12" alt="clip_image002" src="http://www.jeffblankenburg.com/wp-content/uploads/2013/03/clip_image002.jpg" width="435" height="102" /></a></p>
<div class="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://www.jeffblankenburg.com/2012/11/27/31-days-of-windows-8-day-27-inclinometer/" rel="bookmark" class="crp_title">31 Days of Windows 8 | Day #27: Inclinometer</a></li><li><a href="http://www.jeffblankenburg.com/2012/11/24/31-days-of-windows-8-day-24-light-sensor/" rel="bookmark" class="crp_title">31 Days of Windows 8 | Day #24: Light Sensor</a></li><li><a href="http://www.jeffblankenburg.com/2012/11/25/31-days-of-windows-8-day-25-accelerometer/" rel="bookmark" class="crp_title">31 Days of Windows 8 | Day #25: Accelerometer</a></li><li><a href="http://www.jeffblankenburg.com/2013/03/16/lessons-learned-about-capturing-keystrokes-in-windows-8/" rel="bookmark" class="crp_title">Lessons Learned About Capturing Keystrokes in Windows 8</a></li><li><a href="http://www.jeffblankenburg.com/2012/11/26/31-days-of-windows-8-day-26-gyrometer/" rel="bookmark" class="crp_title">31 Days of Windows 8 | Day #26: Gyrometer</a></li></ul></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=jFdx1IFjSYc:4rTojmFyTes:G79ilh31hkQ"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?d=G79ilh31hkQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=jFdx1IFjSYc:4rTojmFyTes:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?i=jFdx1IFjSYc:4rTojmFyTes:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=jFdx1IFjSYc:4rTojmFyTes:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=jFdx1IFjSYc:4rTojmFyTes:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?i=jFdx1IFjSYc:4rTojmFyTes:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=jFdx1IFjSYc:4rTojmFyTes:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=jFdx1IFjSYc:4rTojmFyTes:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?i=jFdx1IFjSYc:4rTojmFyTes:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=jFdx1IFjSYc:4rTojmFyTes:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Blankenthoughts/~4/jFdx1IFjSYc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.jeffblankenburg.com/2013/03/16/lessons-learned-in-windows-8-scaling/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://www.jeffblankenburg.com/2013/03/16/lessons-learned-in-windows-8-scaling/</feedburner:origLink></item>
		<item>
		<title>Lessons Learned in Windows 8 App Certification</title>
		<link>http://feedproxy.google.com/~r/Blankenthoughts/~3/ilPJ2md5YYg/</link>
		<comments>http://www.jeffblankenburg.com/2013/02/26/lessons-learned-in-windows-8-app-certification/#comments</comments>
		<pubDate>Tue, 26 Feb 2013 14:10:47 +0000</pubDate>
		<dc:creator>jeffblankenburg</dc:creator>
				<category><![CDATA[Windows 8]]></category>

		<guid isPermaLink="false">http://www.jeffblankenburg.com/?p=3192</guid>
		<description>Today, I finally got my first Windows 8 app into the marketplace.  It was certainly not for a lack of trying, however.  I actually failed my first FIVE attempts, but I chalk most of that up to inexperience more than anything else.  This post is meant to shed some light on the issues I faced, [...]</description>
			<content:encoded><![CDATA[<p>Today, I finally got my first Windows 8 app into the marketplace.  It was certainly not for a lack of trying, however.  I actually failed my first FIVE attempts, but I chalk most of that up to inexperience more than anything else.  This post is meant to shed some light on the issues I faced, so that you might be lucky enough to avoid them.</p>
<h2>1. Use the WACK (Windows App Certification Kit)</h2>
<p>The first time I was denied, most of it was completely avoidable.  There is an amazing tool called the WACK (Windows App Certification Kit) baked in to Visual Studio 2012 that will analyze your app package for all of the computer-verifiable issues your app may have.  This includes things like:</p>
<ul>
<li>Forgetting to provide all of the appropriate icons.</li>
<li>Accurately checking your capabilities vs. functionality.</li>
<li>Performance metrics.</li>
<li>Many more (<a href="http://msdn.microsoft.com/en-us/library/windows/apps/hh694081.aspx" target="_blank">the entire list can be found here</a>.)</li>
</ul>
<h2>2. Don’t advertise outside of your app.</h2>
<p>In my Settings charm menu, I included an About page.  On this about page, I included a way to get a hold of me if you have comments, suggestions, requests, or discover a bug.  I also included a mention that this same app exists in the Windows Phone marketplace, if you’re interested in that.</p>
<p>THIS IS APPARENTLY A BIG NO-NO.</p>
<blockquote>
<h6>2.3 Your app must not use its description, tiles, notifications, app bar, or the swipe-from-edge interactions to display ads</h6>
<p>The elements of your app's description, such as screenshots, text, and promotional images must describe your app and not contain additional advertising.</p></blockquote>
<p>This means that you cannot provide links to your other apps, because this is considered “advertising,” which I guess in its truest definition is accurate.</p>
<h2>3. Be prepared for the challenge that Taiwan, South Africa, Korea, and Brazil will present.</h2>
<p>More accurately, those four countries <strong>require</strong> a game to have an age rating verification, and the Windows Store doesn’t do a great job of warning you about this before you submit your app.  (They also don't offer any guidance on how to accomplish it.)  On one screen, you have the ability to choose from well over 80 countries.</p>
<p><img style="display: inline; border: 0px;" title="image" src="http://www.jeffblankenburg.com/wp-content/uploads/2013/02/image.png" alt="image" width="481" height="819" border="0" /></p>
<p>On a completely separate screen related to game ratings, they subtly mention that there are four countries that require a game rating:</p>
<p><img style="display: inline; border: 0px;" title="image" src="http://www.jeffblankenburg.com/wp-content/uploads/2013/02/image1.png" alt="image" width="500" height="196" border="0" /></p>
<p>If you don’t put two and two together to make four, you’ll likely get denied for this, so take one of two approaches here:</p>
<p>1)  Take the time to wait for the official ratings boards to get you a certificate that verifies your rating.</p>
<p>2) Submit your app without these four countries initially, and then update the app to support them once you receive your ratings.</p>
<p>Here's where you can submit an application for each country:</p>
<p>Brazil - <a title="DJCTQ" href="http://portal.mj.gov.br/classificacao/main.asp?Team=%7B49798573-B4FD-44A7-B6FB-81E0B8B69A19%7D" target="_blank">DJCTQ</a></p>
<p>Korea - <a title="GRB" href="http://grb.or.kr/" target="_blank">GRB</a></p>
<p>South Africa - <a title="FPB" href="http://fpb.org.za/" target="_blank">FPB</a></p>
<p>Taiwan - <a title="CSRR" href="http://www.csrtaiwan.org/index.php?option=com_weblinks&amp;catid=29&amp;Itemid=23" target="_blank">CSRR</a></p>
<h2>Summary</h2>
<p>So, those are my simple lessons learned from my first Windows 8 app submission.  I hope to have many more in the near future, and I’ll be sure to announce them here when it happens.  If you would like to check out this app I’ve made, you can check it out here:</p>
<p><a href="http://apps.microsoft.com/windows/app/king-poker/bc8d046c-e35d-49fa-824e-eccf675c7a12" target="_blank"><img style="display: inline; border: 0px;" title="414x180Promotional" src="http://www.jeffblankenburg.com/wp-content/uploads/2013/02/414x180Promotional.png" alt="414x180Promotional" width="414" height="180" border="0" /></a></p>
<p>It’s an authentic re-creation of the video poker machines you find in every casino.  I’d love your feedback, your requests for more features, and especially your positive reviews.</p>
<p>Let me know what you think!</p>
<div class="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://www.jeffblankenburg.com/2012/05/11/the-one-where-you-can-get-rich-famous/" rel="bookmark" class="crp_title">The One Where You Can Get Rich &amp; Famous</a></li><li><a href="http://www.jeffblankenburg.com/2012/08/24/getting-started-with-windows-8-development/" rel="bookmark" class="crp_title">Getting Started With Windows 8 Development?</a></li><li><a href="http://www.jeffblankenburg.com/2011/11/13/the-marketplace-test-kit/" rel="bookmark" class="crp_title">31 Days of Mango | Day #13: Marketplace Test Kit</a></li><li><a href="http://www.jeffblankenburg.com/2013/03/25/lessons-learned-from-rushing-to-market/" rel="bookmark" class="crp_title">Lessons Learned From Rushing To Market</a></li><li><a href="http://www.jeffblankenburg.com/2013/03/16/lessons-learned-about-capturing-keystrokes-in-windows-8/" rel="bookmark" class="crp_title">Lessons Learned About Capturing Keystrokes in Windows 8</a></li></ul></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=ilPJ2md5YYg:w3Pk8ijfrj0:G79ilh31hkQ"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?d=G79ilh31hkQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=ilPJ2md5YYg:w3Pk8ijfrj0:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?i=ilPJ2md5YYg:w3Pk8ijfrj0:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=ilPJ2md5YYg:w3Pk8ijfrj0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=ilPJ2md5YYg:w3Pk8ijfrj0:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?i=ilPJ2md5YYg:w3Pk8ijfrj0:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=ilPJ2md5YYg:w3Pk8ijfrj0:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=ilPJ2md5YYg:w3Pk8ijfrj0:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?i=ilPJ2md5YYg:w3Pk8ijfrj0:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=ilPJ2md5YYg:w3Pk8ijfrj0:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Blankenthoughts/~4/ilPJ2md5YYg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.jeffblankenburg.com/2013/02/26/lessons-learned-in-windows-8-app-certification/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		<feedburner:origLink>http://www.jeffblankenburg.com/2013/02/26/lessons-learned-in-windows-8-app-certification/</feedburner:origLink></item>
		<item>
		<title>Windows 8 Office Hours, Design Help, and Funding</title>
		<link>http://feedproxy.google.com/~r/Blankenthoughts/~3/uUCpe-HJp3Q/</link>
		<comments>http://www.jeffblankenburg.com/2013/02/05/windows-8-office-hours-design-help-and-funding/#comments</comments>
		<pubDate>Tue, 05 Feb 2013 19:54:32 +0000</pubDate>
		<dc:creator>jeffblankenburg</dc:creator>
				<category><![CDATA[Windows 8]]></category>

		<guid isPermaLink="false">http://www.jeffblankenburg.com/?p=3187</guid>
		<description>In my time working with software developers on their apps, I’ve found three things to generally be true: Their app is making great progress, but they’ve hit a technical hurdle that they can’t solve. Their app is nearly done, but it really needs some UX help and some design sense. In order to accomplish the [...]</description>
			<content:encoded><![CDATA[<p>In my time working with software developers on their apps, I’ve found three things to generally be true:</p>
<ol>
<li>Their app is making great progress, but they’ve hit a technical hurdle that they can’t solve.     </p>
</li>
<li>Their app is nearly done, but it really needs some UX help and some design sense.
</li>
<li>In order to accomplish the goals of the app, they need some funding to buy data, developers, time, resources, etc.</li>
</ol>
<p>To that end, I’ve constructed a way to try and help you in each of these regards.</p>
<p><strong>Technical Office Hours</strong> – I am dedicating every Thursday to helping you with your apps.&#160; Have technical questions?&#160; Bring them (and your code), and we’ll work our way through it.&#160; To sign up for a slot, I’ve started using OHours at <a href="http://bit.ly/blankenhours">http://bit.ly/blankenhours</a>.&#160; You can attend in-person at <a href="http://techcolumbus.org" target="_blank">TechColumbus</a>, or join me via Skype, Lync, or Google Hangout.</p>
<p><strong>Design &amp; UX</strong> – I will help guide your app design to the best of my ability, but I’m also partnering with some of the top designers in Columbus to help you take a good app to great.</p>
<p><strong>Funding</strong> – I am working directly with <a href="http://techcolumbus.org" target="_blank">TechColumbus</a>, and if you have an idea that interests them (and you’re based in Columbus), they might just be interested in investing in you.&#160; Come talk to me.&#160; I think you’ll be surprised what you can do.</p>
<p>Finally, if you haven’t found it already, check out <a href="http://www.microsoft.com/click/services/Redirect2.ashx?CR_CC=200114924" target="_blank">Generation App</a>.&#160; You’ll find free technical and design support via phone, as well as contests and giveaways just for building apps.</p>
<div class="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://www.jeffblankenburg.com/2012/08/24/getting-started-with-windows-8-development/" rel="bookmark" class="crp_title">Getting Started With Windows 8 Development?</a></li><li><a href="http://www.jeffblankenburg.com/2012/05/11/the-one-where-you-can-get-rich-famous/" rel="bookmark" class="crp_title">The One Where You Can Get Rich &amp; Famous</a></li><li><a href="http://www.jeffblankenburg.com/2011/10/14/m3and-why-its-called-m-cubed/" rel="bookmark" class="crp_title">M3&hellip;and why it&rsquo;s called &ldquo;M Cubed&rdquo;</a></li><li><a href="http://www.jeffblankenburg.com/2012/06/21/any-developers-looking-for-a-free-phone-i-got-em/" rel="bookmark" class="crp_title">Any developers looking for a free phone? I got &lsquo;em.</a></li><li><a href="http://www.jeffblankenburg.com/2012/09/18/windows-8-devdays-hackathons/" rel="bookmark" class="crp_title">Windows 8 DevDays &amp; Hackathons</a></li></ul></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=uUCpe-HJp3Q:96mVftXilnw:G79ilh31hkQ"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?d=G79ilh31hkQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=uUCpe-HJp3Q:96mVftXilnw:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?i=uUCpe-HJp3Q:96mVftXilnw:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=uUCpe-HJp3Q:96mVftXilnw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=uUCpe-HJp3Q:96mVftXilnw:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?i=uUCpe-HJp3Q:96mVftXilnw:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=uUCpe-HJp3Q:96mVftXilnw:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=uUCpe-HJp3Q:96mVftXilnw:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?i=uUCpe-HJp3Q:96mVftXilnw:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=uUCpe-HJp3Q:96mVftXilnw:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Blankenthoughts/~4/uUCpe-HJp3Q" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.jeffblankenburg.com/2013/02/05/windows-8-office-hours-design-help-and-funding/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://www.jeffblankenburg.com/2013/02/05/windows-8-office-hours-design-help-and-funding/</feedburner:origLink></item>
		<item>
		<title>31 Days of Windows 8 | Day #31: Design</title>
		<link>http://feedproxy.google.com/~r/Blankenthoughts/~3/g0tAkXEepe4/</link>
		<comments>http://www.jeffblankenburg.com/2012/12/01/31-days-of-windows-8-day-31-design/#comments</comments>
		<pubDate>Sat, 01 Dec 2012 07:08:00 +0000</pubDate>
		<dc:creator>jeffblankenburg</dc:creator>
				<category><![CDATA[31 Days of Windows 8]]></category>
		<category><![CDATA[Windows 8]]></category>

		<guid isPermaLink="false">http://www.jeffblankenburg.com/?p=3184</guid>
		<description>This article is Day #29 in a series called 31 Days of Windows 8.&amp;#160; Each of the articles in this series will be published for both HTML5/JS and XAML/C#. You can find additional resources, downloads, and source code on our website. Today is the last day of this series, and we’re going to focus on [...]</description>
			<content:encoded><![CDATA[<p>This article is Day #29 in a series called <a href="http://31daysofwindows8.com/">31 Days of Windows 8</a>.&#160; Each of the articles in this series will be published for both <a href="http://csell.net/category/windows-8/31-days/">HTML5/JS</a> and <a href="http://www.jeffblankenburg.com/category/31-days-of-windows-8/">XAML/C#</a>. You can find additional resources, downloads, and source code on our <a href="http://www.31daysofwindows8.com/" target="_blank">website</a>.</p>
<p><a href="http://31daysofwindows8.com/?day=31" target="_blank"><img title="advertisementsample" style="border-left-width: 0px; border-right-width: 0px; border-bottom-width: 0px; display: inline; border-top-width: 0px" border="0" alt="advertisementsample" src="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/advertisementsample31.png" width="500" height="81" /></a> </p>
<p>Today is the last day of this series, and we’re going to focus on designing Windows 8 applications today.&#160; You might be asking yourself:</p>
<p><em>I’m a developer…why would I want to read an article about design?</em></p>
<p>I’ll tell you why.&#160; Because we developers have been making user interfaces that look like this for decades:</p>
<p>&#160;<img alt="" src="http://www.bulkrenameutility.co.uk/Shots/BRU_Main_Screen.gif" width="500" height="332" /></p>
<p>The point of this article is to get you to think differently about you user interface, not just the colors and shapes that are user, but the ENTIRE EXPERIENCE.&#160; The way pages show content.&#160; The navigation experience.&#160; Even page transitions.&#160; It all matters now. Here’s more proof, if you need it.&#160; Think, for a moment, about what an app running in Windows 7 looks like.&#160; Any app.&#160; Picture it in your mind.&#160; It probably looks like this:</p>
<p><img title="31-XAML-Win7" style="border-left-width: 0px; border-right-width: 0px; border-bottom-width: 0px; display: inline; border-top-width: 0px" border="0" alt="31-XAML-Win7" src="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/31XAMLWin7.png" width="500" height="316" /> </p>
<p>If you take a closer look at this diagram, there’s no indication whatsoever about what this app does.&#160; We’ve tended to focus on how we use the app, not what the content is.&#160; Windows 8 fundamentally shifts that idea.&#160; Now think about a Windows 8 application in your mind.&#160; It probably looks more like this:</p>
<p><img title="31-XAML-Win8" style="border-left-width: 0px; border-right-width: 0px; border-bottom-width: 0px; display: inline; border-top-width: 0px" border="0" alt="31-XAML-Win8" src="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/31XAMLWin8.png" width="500" height="315" /> </p>
<p>In this illustration, the ENTIRE image shows content.&#160; This means that instead of remembering how to use your app, users are far more focused on the content of your app.&#160; This is part of the conversation we’re going to have today.&#160; This article will be divided into several sections, and each section talks about a different part of user interface creation.&#160; Here’s the topics we’ll cover:</p>
<ul>
<li>Content Before Chrome </li>
<li>Using The Windows 8 Silhouette </li>
<li>Navigation Patterns </li>
<li>Fluid Motion</li>
<li>Make Touch a Priority</li>
</ul>
<p>That’s a ton of topics, so let’s get right to it.</p>
<h2>Content Before Chrome</h2>
<p>In this section, I want to focus on one of the most important lessons in this entire article:</p>
<p>STOP MAKING BUTTONS.</p>
<p>The focus of every screen of your application should be about the content.&#160; If you’re adding buttons, you’re likely doing it wrong.&#160; Here’s a very common scenario:</p>
<p><img title="31-XAML-WithButtons" style="border-left-width: 0px; border-right-width: 0px; border-bottom-width: 0px; display: inline; border-top-width: 0px" border="0" alt="31-XAML-WithButtons" src="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/31XAMLWithButtons.png" width="502" height="283" /> </p>
<p>We have several sections to our application, and we want to provide an interface for our users to get to each section.&#160; In general, most people would say that there’s absolutely nothing wrong with this interface (except that maybe those giant gray boxes should have photos in them.)&#160; The key lesson to remember is that the entire colored block IS the button.&#160; There’s no reason to add the circled arrow icons.&#160; Instead, consider this:</p>
<p><img title="31-XAML-WithoutButtons" style="border-left-width: 0px; border-right-width: 0px; border-bottom-width: 0px; display: inline; border-top-width: 0px" border="0" alt="31-XAML-WithoutButtons" src="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/31XAMLWithoutButtons.png" width="502" height="283" /> </p>
<p>By removing the circled arrows, we’ve made the interface cleaner by removing the clutter, we’ve provided the user with a larger touch target for their fingers on touch devices, and given ourselves less to worry about on the page.&#160; “One button to rule them all&quot;,” if you will.</p>
<p>When you desperately feel the need to add a button to the screen, ask yourself:</p>
<p><em>Could this live in an application bar?</em></p>
<p>If it can, do it.&#160; <a href="http://www.jeffblankenburg.com/2012/11/04/31-days-of-windows-8-day-4-new-controls" target="_blank">For more on the application bar, check out Day #4</a>.&#160; In short, let the user tap the content instead of creating another button for them to click.&#160; If an action can be taken on more than one item at a time, use the App Bar to provide contextual actions when multiple items are selected.</p>
<h2>Using the Windows 8 Silhouette</h2>
<p>It would be a dreary, boring world if every app looked exactly the same.&#160; That considered, it is also difficult for users to learn a new interface with every application that they use.&#160; This is where the idea of a silhouette comes into play.&#160; Take a look at the four different application examples below.&#160; They all present very different content in very different ways, but there’s a uniform experience about them that makes it very obvious to the user where the important content lives.</p>
<p><a href="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/31XAMLSilhouette.png" target="_blank"><img title="31-XAML-Silhouette" style="border-left-width: 0px; border-right-width: 0px; border-bottom-width: 0px; display: inline; border-top-width: 0px" border="0" alt="31-XAML-Silhouette" src="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/31XAMLSilhouette_thumb.png" width="500" height="281" /></a> </p>
<p>There are many ways to utilize this familiar silhouette, here are just a few examples:</p>
<p><img title="31-XAML-Silhouette1" style="border-left-width: 0px; border-right-width: 0px; border-bottom-width: 0px; display: inline; border-top-width: 0px" border="0" alt="31-XAML-Silhouette1" src="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/31XAMLSilhouette1.png" width="500" height="281" /> </p>
<p><img title="31-XAML-Silhouette2" style="border-left-width: 0px; border-right-width: 0px; border-bottom-width: 0px; display: inline; border-top-width: 0px" border="0" alt="31-XAML-Silhouette2" src="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/31XAMLSilhouette2.png" width="502" height="283" /> </p>
<p><img title="31-XAML-Silhouette3" style="border-left-width: 0px; border-right-width: 0px; border-bottom-width: 0px; display: inline; border-top-width: 0px" border="0" alt="31-XAML-Silhouette3" src="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/31XAMLSilhouette3.png" width="502" height="283" /> </p>
<p><img title="31-XAML-Silhouette4" style="border-left-width: 0px; border-right-width: 0px; border-bottom-width: 0px; display: inline; border-top-width: 0px" border="0" alt="31-XAML-Silhouette4" src="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/31XAMLSilhouette4.png" width="502" height="282" /> </p>
<p>All of the previous images follow a familiar format, which makes it easy for the user to figure out how to use your application, while still looking diverse enough to make your app visually unique.&#160; The reason for all of this is because there will be learned behaviors your users will acquire simply from using Windows 8.&#160; They’ll start to rely on the Charms bar.&#160; They’ll start to expect that right-clicking brings up an AppBar with more options.&#160; They’ll try pinching the screen to zoom.&#160; Taking advantage of these silhouettes is another example of the expectations users will have about your application.</p>
<h2>Navigation Patterns</h2>
<p>As developers, we have a tendency to try to accommodate our users’ needs, almost to a fault.&#160; One example of this that is rampant in both desktop applications as well as the web is this idea:</p>
<p><em>We need to allow the user to get TO any page, FROM any page.</em></p>
<p>You do <strong>NOT</strong> need to do this.&#160; When we provide this type of functionality, we limit the amount of space that can actually be used for the purpose of the app.&#160; Here’s an example of an RSS reader app that practices the “everywhere navigation” pattern (click to enlarge).</p>
<p><a href="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/31XAMLRSS.png" target="_blank"><img title="31-XAML-RSS" style="border-left-width: 0px; border-right-width: 0px; border-bottom-width: 0px; display: inline; border-top-width: 0px" border="0" alt="31-XAML-RSS" src="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/31XAMLRSS_thumb.png" width="500" height="331" /></a> </p>
<p>As you can see, an app that is dedicated to reading only uses about 30% of the screen for <em>actual content.</em>&#160; We need to think about our application in a navigational scheme that makes sense for our content, which will almost always be hierarchical or flat.</p>
<h4>Hierarchical Navigation</h4>
<p>In this style of navigation, we work in a hub-and-spokes model, where the users’ choices move them further and futher from the home page, and using the back button allows them to return backwards through their path before choosing another branch of the tree to travel down.&#160; Like this: <img title="31-XAML-Hierarchical" style="border-left-width: 0px; border-right-width: 0px; border-bottom-width: 0px; display: inline; border-top-width: 0px" border="0" alt="31-XAML-Hierarchical" src="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/31XAMLHierarchical.png" width="500" height="279" /> </p>
<p>We build pages with a master/detail structure so that navigation is intuitive and simple to use.&#160; The user should always know where they are in the app, without having to lay an elaborate trail of breadcrumbs for them.&#160; They should be diving into deeper and deeper detail about the original choice they made.&#160; The default News application in Windows 8 is a great example of this hierarchy.</p>
<p>On the home page of the app, I can scroll to the right to see a few articles from each section (Entertainment and Sports are currently shown):</p>
<p><a href="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/31XAMLNews1.png" target="_blank"><img title="31-XAML-News1" style="border-left-width: 0px; border-right-width: 0px; border-bottom-width: 0px; display: inline; border-top-width: 0px" border="0" alt="31-XAML-News1" src="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/31XAMLNews1_thumb.png" width="500" height="312" /></a> </p>
<p>Using Semantic Zoom, the user can easily see all of the categories, and jump to the one they want to read more about.</p>
<p><a href="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/31XAMLNews2.png" target="_blank"><img title="31-XAML-News2" style="border-left-width: 0px; border-right-width: 0px; border-bottom-width: 0px; display: inline; border-top-width: 0px" border="0" alt="31-XAML-News2" src="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/31XAMLNews2_thumb.png" width="500" height="312" /></a> </p>
<p>If I tap on one of the section headers on the main page (like the word Entertainment above the large photo of the woman, Lynn Shelton), I am taken to a new page that contains only Entertainment news.</p>
<p><a href="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/31XAMLNews3.png" target="_blank"><img title="31-XAML-News3" style="border-left-width: 0px; border-right-width: 0px; border-bottom-width: 0px; display: inline; border-top-width: 0px" border="0" alt="31-XAML-News3" src="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/31XAMLNews3_thumb.png" width="500" height="312" /></a> </p>
<p>Finally, and this can be done from anywhere in the app that I see an article, when I tap on a specific article, I am taken to a detail page for that item.</p>
<p><a href="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/31XAMLNews4.png" target="_blank"><img title="31-XAML-News4" style="border-left-width: 0px; border-right-width: 0px; border-bottom-width: 0px; display: inline; border-top-width: 0px" border="0" alt="31-XAML-News4" src="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/31XAMLNews4_thumb.png" width="500" height="312" /></a> </p>
<p>In each instance, there is the presence of a back button which will take me back through my previous choices.&#160; What you don’t see, however, is the ability to jump from an Entertainment news article over to a Sports article.&#160; In fact, there’s not even a way to get to the Sports category without using the back button.&#160; That is, until you take a look at the AppBar for this app.</p>
<p><img title="31-XAML-News5" style="border-left-width: 0px; border-right-width: 0px; border-bottom-width: 0px; display: inline; border-top-width: 0px" border="0" alt="31-XAML-News5" src="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/31XAMLNews5.png" width="500" height="109" /> </p>
<p>There, you’ll see that they succumbed to the need to let the user navigate quickly between sections without cluttering up the screen with all of this navigation.&#160; The AppBar is a great way to provide some of these navigation mechanisms without taking away from the visual appearance of your application.</p>
<p>This is a hierarchical navigation pattern.&#160; Learn to use it.&#160; It will be your friend, and clear your screen of all of the navigation elements you would need otherwise.</p>
<h4>Flat Navigation</h4>
<p>Flat navigation is something that you see every day in your web browser.&#160; You also see it in instant messaging apps, and other places that have similarly formatted, but somewhat unrelated content.&#160; A picture would look like this:</p>
<p><img title="31-XAML-Flat" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="31-XAML-Flat" src="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/31XAMLFlat.png" width="500" height="73" /> </p>
<p>When we navigate a website, we’re using this flat navigation style.&#160; We can move forwards and backwards, but there is really no concept of branches in this format.&#160; Since you’re likely using a web browser to view this article, I’m going to assume you know what I’m talking about.</p>
<h2>Fluid Motion</h2>
<p>Motion is one of those things that we never think about as developers.&#160; We tend to focus on the important topics, like data, and never really consider how much nicer our app would look if it incorporated a little animation.</p>
<p>When I talk about animation, however, I’m not talking about it for visual adornment.&#160; It’s not a decoration that you slap on your page.&#160; Animation should be purposeful.&#160; If you can use animation to transition between screens of your app, your user will perceive load times to be shorter, and feel that your app is faster and more responsive than it actually is.</p>
<p>In addition, there are a bunch of animations available to you with minimal effort.&#160; <a href="http://msdn.microsoft.com/en-us/library/windows/apps/xaml/Hh452701(v=win.10).aspx" target="_blank">Check out this article on Animating Your UI from MSDN</a>.</p>
<h2>Make Touch A Priority</h2>
<p>A “tap” and a “click” in Windows 8 are the same thing.&#160; It requires no effort on your part to make touch happen.&#160; Making your click targets big enough for a finger, however, does.&#160; Always, always, always make anything on your page that is clickable larger than 48 x 48 pixels.</p>
<p>Incorporate gestures where possible.&#160; Your users will expect them.&#160; It requires minimal extra effort, and it lets your users interact with your app the way they expect to:</p>
<p><img title="31-XAML-Touch" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="31-XAML-Touch" src="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/31XAMLTouch.png" width="500" height="249" /> </p>
<p>In addition, it’s important to remember that <em>because</em> your users will be touching the screen, this also means that there are optimal places to put your buttons and content.&#160; Generally, a user will hold a tablet horizontally, with their thumbs hovering over the two sides of the tablet.&#160; This means your primary buttons should probably live in these regions as well.&#160; What shouldn’t live there is your content.&#160; If the user’s thumbs are hovering over this region of the screen, this also means they can’t see what is happening on that region of the screen.&#160; Here’s a good rule of thumb:</p>
<p>&#160;<img title="31-XAML-Occlusion" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="31-XAML-Occlusion" src="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/31XAMLOcclusion.png" width="500" height="193" /> </p>
<h2>Summary</h2>
<p>In this article, we covered some of the important things you should be thinking about when you start building, and more specifically designing, your Windows 8 applications.&#160; There are tons of additional resources at </p>
<p><a href="http://design.windows.com">http://design.windows.com</a></p>
<p>and you should definitely make a trip over to the site to check them out.&#160; There are additional design patterns, UX guidelines, Adobe Photoshop templates and much more.</p>
<p>This article also puts the finishing touches on this lengthy series, and we want to sincerely thank each of you that have taken the time to read our words.&#160; There are many reasons to write an article series like this, but our primary reason is that it’s an amazing excuse to dive deep into a technology stack and really understand it.&#160; My second reason, however, is you, the reader.&#160; <a href="http://csell.net" target="_blank">Clark</a> and I have made our best effort to understand each of these topics thoroughly, and explain them in a “no assumptions, start from the beginning” manner.&#160; You, our readers, bring us comments and questions that we hadn’t anticipated, and for that, we truly are thankful.</p>
<p>Please leave comments and questions on our articles.&#160; These will continue to live on as excellent learning resources for developers looking to build Windows 8 apps, and your contributions only make them that much better.</p>
<p>Thanks.</p>
<div class="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://www.jeffblankenburg.com/2012/02/08/the-curious-today-button/" rel="bookmark" class="crp_title">The Curious &ldquo;Today&rdquo; Button</a></li><li><a href="http://www.jeffblankenburg.com/2011/12/17/want-to-change-your-windows-phone-emulator/" rel="bookmark" class="crp_title">Want to change your Windows Phone emulator?</a></li><li><a href="http://www.jeffblankenburg.com/2012/05/11/the-one-where-you-can-get-rich-famous/" rel="bookmark" class="crp_title">The One Where You Can Get Rich &amp; Famous</a></li><li><a href="http://www.jeffblankenburg.com/2010/11/08/windows-phone-launches-today-in-the-us/" rel="bookmark" class="crp_title">Windows Phone Launches Today in the US</a></li><li><a href="http://www.jeffblankenburg.com/2012/10/31/31-days-of-windows-8/" rel="bookmark" class="crp_title">31 Days of Windows 8</a></li></ul></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=g0tAkXEepe4:lkiljVPWEJg:G79ilh31hkQ"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?d=G79ilh31hkQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=g0tAkXEepe4:lkiljVPWEJg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?i=g0tAkXEepe4:lkiljVPWEJg:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=g0tAkXEepe4:lkiljVPWEJg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=g0tAkXEepe4:lkiljVPWEJg:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?i=g0tAkXEepe4:lkiljVPWEJg:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=g0tAkXEepe4:lkiljVPWEJg:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=g0tAkXEepe4:lkiljVPWEJg:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?i=g0tAkXEepe4:lkiljVPWEJg:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=g0tAkXEepe4:lkiljVPWEJg:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Blankenthoughts/~4/g0tAkXEepe4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.jeffblankenburg.com/2012/12/01/31-days-of-windows-8-day-31-design/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://www.jeffblankenburg.com/2012/12/01/31-days-of-windows-8-day-31-design/</feedburner:origLink></item>
		<item>
		<title>31 Days of Windows 8 | Day #30: Store</title>
		<link>http://feedproxy.google.com/~r/Blankenthoughts/~3/O2jJ_eC_ymU/</link>
		<comments>http://www.jeffblankenburg.com/2012/11/30/31-days-of-windows-8-day-30-store/#comments</comments>
		<pubDate>Fri, 30 Nov 2012 07:08:00 +0000</pubDate>
		<dc:creator>jeffblankenburg</dc:creator>
				<category><![CDATA[31 Days of Windows 8]]></category>
		<category><![CDATA[Windows 8]]></category>
		<category><![CDATA[Store]]></category>

		<guid isPermaLink="false">http://www.jeffblankenburg.com/?p=3156</guid>
		<description>This article is Day #30 in a series called 31 Days of Windows 8.&amp;#160; Each of the articles in this series will be published for both HTML5/JS and XAML/C#. You can find additional resources, downloads, and source code on our website. Wow, here we are finally talking about the Store. This is really our last [...]</description>
			<content:encoded><![CDATA[<p>This article is Day #30 in a series called <a href="http://31daysofwindows8.com/">31 Days of Windows 8</a>.&#160; Each of the articles in this series will be published for both <a href="http://csell.net/category/windows-8/31-days/">HTML5/JS</a> and <a href="http://www.jeffblankenburg.com/category/31-days-of-windows-8/">XAML/C#</a>. You can find additional resources, downloads, and source code on our <a href="http://www.31daysofwindows8.com/" target="_blank">website</a>.<a href="http://31daysofwindows8.com/?day=30"><img title="WindowsStore" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: right; padding-top: 0px; padding-left: 0px; margin: 25px 0px 25px 25px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="WindowsStore" align="right" src="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/WindowsStore.png" width="188" height="188" /></a></p>
<p>Wow, here we are finally talking about the Store. This is really our last step ( and a very exciting one no less ) in your development process. Today we’re going to share with you some of our steps and experience in not only helping others get their apps into the store, but also submitting our own.</p>
<p>If you’ve gotten to this point, then no doubt, these are exciting times. Whether you’re a few code slingers at Rovio making Angry Birds or someone like me who was building an app on the nights and weekends, it’s exciting. If you’ve have an app in the Store, I would also invite you to share in the comments the things that have worked well for you, and not so well.</p>
<p>Microsoft announced just a few short days ago, that they’ve sold 40 million licenses of Windows 8 in it’s first month of life. I don’t know about you, but that’s a pretty big audience for some indie developer like me. The Store is our new platform for us to ship our software to.</p>
<p>For purposes of today, we are only going to talk about the public facing Microsoft Store. If you feel you fall outside of that scenario, say you’re an enterprise developer and might like to deploy through group policy, I would suggest start by reading the <a href="http://msdn.microsoft.com/en-US/library/windows/apps/hh832040">Managing Client Access to the Windows Store</a>.</p>
<h2>To the Store</h2>
<p>Now to get in the store, you have to have to first be <a href="http://www.windowsstore.com/">signed up</a> as a individual developer ($49 USD) or a company ($99 USD). Once signed up, you can then <a href="http://msdn.microsoft.com/en-us/library/windows/apps/hh694077.aspx">start reserving app names</a>. Now I know this might sound a bit like duh, of course, but maybe you already have an idea but just haven’t started it. Nothing is stopping you from creating your account and reserving those application names now. Now unlike all of those domain names you’ve been buying over the years and just parking until you get time, you have 1 year from the time of reservation to shipping. If you don’t release anything, then that reserved name goes back into the pool. As someone who has a few apps reserved, it’s a pretty good incentive program for me.</p>
<h2>Pre-Certification</h2>
<p>If for some reason you’re new to this notion of a “store” or “marketplace” concept, as developers once we finish our app we have to go through a certification process before our application will be officially published. While this may seem somewhat cumbersome, this certification process is really there for everyone's benefit. Having been through it, the first time you submit your app the minutes can feel like hours but in the end it’s the right thing.</p>
<p>Of course the certification process is both automated and manual. For the Microsoft Store you as the developer have access to the same automated tools (<a href="http://msdn.microsoft.com/en-US/windows/apps/jj572486">WACK</a>) which are used once you’ve submitted to the store. This allows you to go through the process before you’ve ever submitted addressing any potential issues.</p>
<p>The <a href="http://msdn.microsoft.com/en-US/windows/apps/jj572486">Windows App Certification Kit</a> or WACK is really two different kits; one kit for Intel based processors and another one for ARM based processors. These kits are tools that you would of course install on a test system which will run through the same automated process that the Microsoft Store would do from it’s servers. The beauty about these kits you can run them on yourself before you ever submit your application to the marketplace. As I said this really helps to ensure you’ve cut down any issues long before submitting to the store, ultimately cutting down your certification time if you we’re to have any issues. </p>
<p>After starting the Windows App Certification Kit you have 3 different categories of apps that you can select. For our apps we would select the validate Windows Store App option. Once selected, you’ll be asked as to what application you want to validate.</p>
<p><a href="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/SNAGHTML2a9a1b2d.png"><img title="SNAGHTML2a9a1b2d" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 25px 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="SNAGHTML2a9a1b2d" src="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/SNAGHTML2a9a1b2d_thumb.png" width="500" height="352" /></a></p>
<p>Once you pick out your application, the WACK tool will start running. It will start to run a variety of tests against your application and even do things like open it, to see how long wait times are. After it’s completed, you will get a detailed report as to what was validated. Of course just like in TDD, green is good and red is bad. Below is just a snip from a failed event report. </p>
<p><a href="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/image4.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 25px 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/image_thumb2.png" width="502" height="150" /></a></p>
<p>The WACK tool provides a very detailed report as to its findings. Having said you should run it across all of the platforms you expect to run on, as your load times on a low power ARM device might be a lot longer than that of a multicore Intel machine. It’s also <strong>not a replacement </strong>for hard core testing, both manual and automated. Just saying…</p>
<p>It’s also true, when you submit there is still a potential for failing the certification. Now Microsoft has released a pretty good document which details a number of the <a href="http://msdn.microsoft.com/en-us/library/windows/apps/jj657968.aspx">most common certification failures</a> but make sure you have read through the <a href="http://msdn.microsoft.com/en-us/library/windows/apps/hh694083.aspx">certification requirements</a> such that you’re not surprised.</p>
<p>One of the biggest reason apps fail is <a href="http://msdn.microsoft.com/en-us/library/windows/apps/hh694083.aspx#acr_4_1">certification requirement 4.1</a>. 4.1 states that an app with the Internet Access capability checked must provide a policy policy to the Store. Of course this means you might have to setup a simple website just to contain the privacy policy required. If you’re not using the internet, just uncheck it.</p>
<h2>TIP</h2>
<p>All of the Visual Studio templates for the Windows Store create the shell of an app but with the internet capability.enabled. If you’re *not* using the internet – uncheck it and save yourself the hassle. </p>
<h2>App Images</h2>
<p>Like it or not, the first thing your potential customer will see is an image of your application&#160; in the store. In fact, there are a number of different images your user might see depending on where the store app has placed your application.<a href="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/image5.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; float: right; padding-top: 0px; padding-left: 0px; margin: 25px 0px 25px 25px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" align="right" src="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/image_thumb3.png" width="268" height="86" /></a> Now mind you, this is all before your potential customer has even installed it, so make sure you have some great store appeal is a good thing. </p>
<p>During <a href="http://csell.net/2012/11/01/31-days-of-windows-8-day-1-the-blank-app">day 1</a> when we talked about the blank application, we discussed a number of different images you needed to include in your application. These were things like the store logo, small tile, wide tile and so on. </p>
<p>As it turns out, when you try and submit your application, you’re not done with the image creation process. At the time of submission you will be asked for a number of <em>new</em> logos that will be used by the store specifically. They are not part of your app’s package, they are images uploaded directly to the store. Specifically these images are your billboard images as well as screenshots of your application.</p>
<p>Making logos is clearly an art form. To help make things a bit easier, a friend of mine build a number of <a href="http://pressffive.com/blog/article/17">Photoshop templates around these Store submission graphics</a>. I would encourage you to check them out as they could save you a number of hours.</p>
<p>Whatever you do, please, please, PLEASE replace all of the default images. Now I do not know who wrote Backgammon Gold nor am I not trying to place a dig on all the hard work they’ve done. But, I would never spend $4.99 on something where someone hasn’t even taken the time to replace the default Visual Studio images. I’m not saying, but I’m saying. Clearly their rating proves my point.</p>
<p><a href="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/image6.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 25px 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/image_thumb5.png" width="240" height="57" /></a></p>
<h2>Making Money</h2>
<p>Your monetization model is clearly something that only you can determine. While charging outright for the application is one way, there are many creative ways as well. The minimum price someone can <a href="http://msdn.microsoft.com/en-us/library/windows/apps/jj193599.aspx#pricetiers">charge for an application is $1.49 USD with increments starting at .50 USD</a>.</p>
<p>While charging upfront is a clearly an easy way to make some coin, it’s not the only and it might not be the best depending on your scenario. What about offering the user a <a href="http://msdn.microsoft.com/en-us/library/windows/apps/hh694065.aspx">time-limited trial</a>, or a <a href="http://msdn.microsoft.com/en-us/library/windows/apps/hh694065.aspx">feature-limited trial</a>? Remember the goal is to make money and getting user to test drive your app isn’t a bad thing. There are a number of studies written about how trials have a much higher conversion rate that ones without trials. You don’t buy a car without driving it first, why not test drive an app?</p>
<p>Another very popular mechanism for making money is an ad supported model. This is nothing more than putting some ad container in your applications such that you’re displaying ads to your customers. While you can use any ad platform you wish (assuming they adhere to Microsoft’s certification requirements ) <a href="http://advertising.microsoft.com/ads-in-apps">Microsoft offers an ad sdk from Microsoft Advertising</a> which will get you easily up and running on Microsoft’s platform.</p>
<p>Lastly offering the ability for an <a href="http://msdn.microsoft.com/en-us/library/windows/apps/hh694067.aspx">in app purchase</a> shouldn’t be out of your reach either. Using a game app example, one could offer more levels once the user got to a particular point in their journey just for a bit more money. I personally think this is a pretty interesting scenario as it gives you the ability to get people using your app, but offers them the ability to purchase something more full featured.</p>
<p>Now when you’re making most of the money, the Microsoft Store is doing all of this legwork for you, hosting the bits, transitions, currency conversions etc.&#160; As you might expect there is a cut that Microsoft needs to take just to offer such support. For your first $25k Microsoft will charge you a 30% fee, but after your app makes $25k, that fee will drop to 20%. These are just a few of the items you will find in the <a href="http://msdn.microsoft.com/en-us/library/windows/apps/hh694058.aspx">app developer agreement</a>.</p>
<h2>Creating the package(s)</h2>
<p>Creating the packages for the store is a painless process. There is basically two reasons to create a package, sideloading or WACK testing OR to upload to the store. The difference between the two different packages is really one is signed with your developer account whereas the other isn’t.</p>
<p>To get started, <em>Project –&gt; Store –&gt; Create App Packages… </em>As you can see, the first dialog box you’re presented with is in fact the two different options we just mentioned.</p>
<p><a href="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/SNAGHTML1006b5c3.png"><img title="SNAGHTML1006b5c3" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 25px 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="SNAGHTML1006b5c3" src="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/SNAGHTML1006b5c3_thumb.png" width="500" height="408" /></a></p>
<p>If we’re building a package for the Store. Then our next step is to select what our app name was in the store such that we can associate things correctly.</p>
<p><a href="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/image7.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 25px 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/image_thumb6.png" width="500" height="405" /></a></p>
<p>Regardless of what direction we choose first the next step in the process is picking what platform we want to build for. These will be the packages we will later either sideload or upload to the store.</p>
<p><a href="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/SNAGHTML100afd09.png"><img title="SNAGHTML100afd09" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 25px 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="SNAGHTML100afd09" src="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/SNAGHTML100afd09_thumb.png" width="500" height="408" /></a></p>
<p>And once created all of your glory should look something like:</p>
<p><a href="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/image8.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 25px 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/image_thumb7.png" width="300" height="171" /></a></p>
<p>For more information about sideloading please see this article: <a title="http://technet.microsoft.com/en-us/library/hh852635.aspx" href="http://technet.microsoft.com/en-us/library/hh852635.aspx">http://technet.microsoft.com/en-us/library/hh852635.aspx</a></p>
<h2>Ready to submit</h2>
<p>Submitting your application is mostly just a one page web form you’re required to fill out. These are things like, description, search keywords, release date and so on. The Windows Store team has done an excellent job of documenting everything, so I won’t rehash that here but rather ask you to please <a href="http://msdn.microsoft.com/en-us/library/windows/apps/br230835.aspx">read their article</a>.</p>
<h2>App Update(s)</h2>
<p>You’ve pushed and now you need to fix up a bug. Well, thankfully you’ve already been through the entire process already. Now it’s just a matter of creating a new release and changing anything that might be now applicable. Oh yea, of course you would need to update the new package too.</p>
<h2>Summary</h2>
<p>Honestly submitting your app into the store is the easy part. All of the planning and development that’s been done to this point has really been the hard part. While you have a plan in mind about how you may make money, don’t be afraid to think outside of the box and try a few different things. You never know what will net you the best results. </p>
<p>Tomorrow, we’re going to talk about our last day in this series which is focused on design.</p>
<p><a href="bit.ly/win8devgear" target="_blank"><img title="downloadTheTools" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 25px 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="downloadTheTools" src="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/downloadTheTools32.png" width="500" height="61" /></a></p>
<div class="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://www.jeffblankenburg.com/2012/02/08/the-curious-today-button/" rel="bookmark" class="crp_title">The Curious &ldquo;Today&rdquo; Button</a></li><li><a href="http://www.jeffblankenburg.com/2012/05/11/the-one-where-you-can-get-rich-famous/" rel="bookmark" class="crp_title">The One Where You Can Get Rich &amp; Famous</a></li><li><a href="http://www.jeffblankenburg.com/2011/12/17/want-to-change-your-windows-phone-emulator/" rel="bookmark" class="crp_title">Want to change your Windows Phone emulator?</a></li><li><a href="http://www.jeffblankenburg.com/2011/11/13/the-marketplace-test-kit/" rel="bookmark" class="crp_title">31 Days of Mango | Day #13: Marketplace Test Kit</a></li><li><a href="http://www.jeffblankenburg.com/2010/11/08/windows-phone-launches-today-in-the-us/" rel="bookmark" class="crp_title">Windows Phone Launches Today in the US</a></li></ul></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=O2jJ_eC_ymU:XSoi6mZ3QS4:G79ilh31hkQ"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?d=G79ilh31hkQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=O2jJ_eC_ymU:XSoi6mZ3QS4:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?i=O2jJ_eC_ymU:XSoi6mZ3QS4:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=O2jJ_eC_ymU:XSoi6mZ3QS4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=O2jJ_eC_ymU:XSoi6mZ3QS4:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?i=O2jJ_eC_ymU:XSoi6mZ3QS4:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=O2jJ_eC_ymU:XSoi6mZ3QS4:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=O2jJ_eC_ymU:XSoi6mZ3QS4:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?i=O2jJ_eC_ymU:XSoi6mZ3QS4:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=O2jJ_eC_ymU:XSoi6mZ3QS4:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Blankenthoughts/~4/O2jJ_eC_ymU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.jeffblankenburg.com/2012/11/30/31-days-of-windows-8-day-30-store/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://www.jeffblankenburg.com/2012/11/30/31-days-of-windows-8-day-30-store/</feedburner:origLink></item>
		<item>
		<title>31 Days of Windows 8 | Day #29: Application Lifecycle</title>
		<link>http://feedproxy.google.com/~r/Blankenthoughts/~3/LUwy_Z-6bpQ/</link>
		<comments>http://www.jeffblankenburg.com/2012/11/29/31-days-of-windows-8-day-29-application-lifecycle/#comments</comments>
		<pubDate>Thu, 29 Nov 2012 07:08:00 +0000</pubDate>
		<dc:creator>jeffblankenburg</dc:creator>
				<category><![CDATA[31 Days of Windows 8]]></category>
		<category><![CDATA[Windows 8]]></category>

		<guid isPermaLink="false">http://www.jeffblankenburg.com/?p=3136</guid>
		<description>This article is Day #29 in a series called 31 Days of Windows 8.&amp;#160; Each of the articles in this series will be published for both HTML5/JS and XAML/C#. You can find additional resources, downloads, and source code on our website. Today, we’re going to talk about Application Lifecycle.&amp;#160; I wish there were a cooler [...]</description>
			<content:encoded><![CDATA[<p>This article is Day #29 in a series called <a href="http://31daysofwindows8.com/">31 Days of Windows 8</a>.&#160; Each of the articles in this series will be published for both <a href="http://csell.net/category/windows-8/31-days/">HTML5/JS</a> and <a href="http://www.jeffblankenburg.com/category/31-days-of-windows-8/">XAML/C#</a>. You can find additional resources, downloads, and source code on our <a href="http://www.31daysofwindows8.com/" target="_blank">website</a>.</p>
<p><a href="http://31daysofwindows8.com/?day=29" target="_blank"><img title="advertisementsample" style="border-left-width: 0px; border-right-width: 0px; border-bottom-width: 0px; display: inline; border-top-width: 0px" border="0" alt="advertisementsample" src="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/advertisementsample30.png" width="500" height="81" /></a> </p>
<p>Today, we’re going to talk about Application Lifecycle.&#160; I wish there were a cooler word for this topic, but ultimately we’re looking at the management of the different states our application can be in on a user’s device.&#160; Here’s an illustration (image from <a href="http://msdn.microsoft.com/en-US/library/windows/apps/hh464925" target="_blank">MSDN</a>):</p>
<p><a href="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/29XAMLLifecycleDiagram.png" target="_blank"><img title="29-XAML-LifecycleDiagram" style="border-left-width: 0px; border-right-width: 0px; border-bottom-width: 0px; display: inline; border-top-width: 0px" border="0" alt="29-XAML-LifecycleDiagram" src="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/29XAMLLifecycleDiagram_thumb.png" width="500" height="238" /></a> </p>
<p>The reason that this is important to us as developers of Windows 8 applications is because we want to provide a seamless user experience in our apps.&#160; When a user presses the Windows key on their machine, and leaves your app, you want to make sure you save or preserve their data in some way, so that when they come back, it’s all still there.</p>
<h2>I Thought Windows Handled This Automatically??</h2>
<p>Yes and no.&#160; By default, if you run a Windows 8 application, leave it, and come back, it will automatically be exactly where you left it.&#160; However, if you leave it, and then open 6 or 7 more applications, it’s likely that the operating system is going to suspend your application, or even terminate it.&#160; Thankfully, there’s a couple of great mechanisms we can use to manage this.</p>
<h2>Recognizing Your App Has Been Suspended</h2>
<p>According to Microsoft, “an app can be suspended when the user switches away from it, or when Windows enters a low power state.&#160; Most app stop running when the user switches away from them.”&#160; There’s a few things you need to know about how your app will end up in a suspended state:</p>
<ul>
<li>Your app “might” be suspended.&#160; For the simple app I’ve built for this article, I’ve never seen it enter a suspended state on its own. </li>
<li>Generally, when the system runs out of resources, this is the time your app will enter a suspended state. </li>
<li>When you leave an app to use another, Windows will wait a few seconds before suspending it, just in case you were planning to return to it quickly.</li>
<li>If you need to execute any code before your application is suspended (we’ll talk about how next), you get a total of 5 seconds before your app is assumed to be unresponsive and terminated instead.&#160; Keep this in mind…web service calls are probably not the thing to do.</li>
</ul>
<p>So, if you’re anything like me, you’re probably wondering how we are going to write and test some code that only occurs when Windows feels like making it happen. Thankfully, there’s some tools for that.</p>
<p>First, let’s write some code.&#160; On each page that a user might provide some input (whatever type of data), we can add an event handler that gets called when our app is suspended.&#160; In the code below, I have created this event handler, and saved two values to local storage when it is called.</p>
<div class="code">
<div class="csharpcode">
<pre class="alt"><span class="kwrd">using</span> System;</pre>
<pre><span class="kwrd">using</span> Windows.Storage;</pre>
<pre class="alt"><span class="kwrd">using</span> Windows.UI.Xaml;</pre>
<pre><span class="kwrd">using</span> Windows.UI.Xaml.Controls;</pre>
<pre class="alt"><span class="kwrd">using</span> Windows.UI.Xaml.Navigation;</pre>
<pre>&#160;</pre>
<pre class="alt"><span class="kwrd">namespace</span> Day29_ApplicationLifecycle</pre>
<pre>{</pre>
<pre class="alt">    <span class="kwrd">public</span> <span class="kwrd">sealed</span> <span class="kwrd">partial</span> <span class="kwrd">class</span> MainPage : Page</pre>
<pre>    {</pre>
<pre class="alt">        <span class="kwrd">public</span> MainPage()</pre>
<pre>        {</pre>
<pre class="alt">            <span class="kwrd">this</span>.InitializeComponent();</pre>
<pre>        }</pre>
<pre class="alt">&#160;</pre>
<pre>        ApplicationDataContainer settings;</pre>
<pre class="alt">&#160;</pre>
<pre>        <span class="kwrd">protected</span> <span class="kwrd">override</span> <span class="kwrd">void</span> OnNavigatedTo(NavigationEventArgs e)</pre>
<pre class="alt">        {</pre>
<pre>            Application.Current.Suspending += Current_Suspending;</pre>
<pre class="alt">            settings = ApplicationData.Current.LocalSettings;</pre>
<pre>        }</pre>
<pre class="alt">&#160;</pre>
<pre>        <span class="kwrd">void</span> Current_Suspending(<span class="kwrd">object</span> sender, Windows.ApplicationModel.SuspendingEventArgs e)</pre>
<pre class="alt">        {</pre>
<pre>            settings.Values[<span class="str">&quot;suspendedDateTime&quot;</span>] = DateTime.Now.ToString();</pre>
<pre class="alt">            settings.Values[<span class="str">&quot;customTextValue&quot;</span>] = CustomText.Text;</pre>
<pre>        }</pre>
<pre class="alt">&#160;</pre>
<pre>        <span class="kwrd">protected</span> <span class="kwrd">override</span> <span class="kwrd">void</span> OnNavigatingFrom(NavigatingCancelEventArgs e)</pre>
<pre class="alt">        {</pre>
<pre>            Application.Current.Suspending += Current_Suspending;</pre>
<pre class="alt">        }</pre>
<pre>    }</pre>
<pre class="alt">}</pre>
</p></div>
</div>
<style type="text/css">
<p>.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<p>&#160;</p>
<p>You’ll notice, that like with all event handlers we create, I also remove it when the OnNavigatingFrom event is called.&#160; <a href="http://www.jeffblankenburg.com/2012/11/08/31-days-of-windows-8-day-8-local-and-roaming-data" target="_blank">We covered saving data on Day #8</a>, so I won’t spend any time explaining that, other than to say that we are saving the time our app was suspended, as well as any text that was currently entered into a TextBox that I have on my MainPage.xaml page.&#160; In order to verify this information has been saved, let’s add the Resuming event next.</p>
<h2>Recognizing That Your App Is Resuming</h2>
<p>In this case, we’re going to add a Resuming event, just like we did with the Suspending one.&#160; When the method is called, I’m going to write the date and TextBox content back to the screen, so that the user can continue working on their data.</p>
<div class="code">
<div class="csharpcode">
<pre class="alt"><span class="kwrd">using</span> System;</pre>
<pre><span class="kwrd">using</span> System.Collections.Generic;</pre>
<pre class="alt"><span class="kwrd">using</span> System.IO;</pre>
<pre><span class="kwrd">using</span> System.Linq;</pre>
<pre class="alt"><span class="kwrd">using</span> Windows.Foundation;</pre>
<pre><span class="kwrd">using</span> Windows.Foundation.Collections;</pre>
<pre class="alt"><span class="kwrd">using</span> Windows.Storage;</pre>
<pre><span class="kwrd">using</span> Windows.UI.Xaml;</pre>
<pre class="alt"><span class="kwrd">using</span> Windows.UI.Xaml.Controls;</pre>
<pre><span class="kwrd">using</span> Windows.UI.Xaml.Controls.Primitives;</pre>
<pre class="alt"><span class="kwrd">using</span> Windows.UI.Xaml.Data;</pre>
<pre><span class="kwrd">using</span> Windows.UI.Xaml.Input;</pre>
<pre class="alt"><span class="kwrd">using</span> Windows.UI.Xaml.Media;</pre>
<pre><span class="kwrd">using</span> Windows.UI.Xaml.Navigation;</pre>
<pre class="alt">&#160;</pre>
<pre><span class="kwrd">namespace</span> Day29_ApplicationLifecycle</pre>
<pre class="alt">{</pre>
<pre>    <span class="kwrd">public</span> <span class="kwrd">sealed</span> <span class="kwrd">partial</span> <span class="kwrd">class</span> MainPage : Page</pre>
<pre class="alt">    {</pre>
<pre>        <span class="kwrd">public</span> MainPage()</pre>
<pre class="alt">        {</pre>
<pre>            <span class="kwrd">this</span>.InitializeComponent();</pre>
<pre class="alt">        }</pre>
<pre>&#160;</pre>
<pre class="alt">        ApplicationDataContainer settings;</pre>
<pre>&#160;</pre>
<pre class="alt">        <span class="kwrd">protected</span> <span class="kwrd">override</span> <span class="kwrd">void</span> OnNavigatedTo(NavigationEventArgs e)</pre>
<pre>        {</pre>
<pre class="alt">            Application.Current.Suspending += Current_Suspending;</pre>
<pre>            Application.Current.Resuming += Current_Resuming;</pre>
<pre class="alt">            settings = ApplicationData.Current.LocalSettings;</pre>
<pre>        }</pre>
<pre class="alt">&#160;</pre>
<pre>        <span class="kwrd">void</span> Current_Suspending(<span class="kwrd">object</span> sender, Windows.ApplicationModel.SuspendingEventArgs e)</pre>
<pre class="alt">        {</pre>
<pre>            settings.Values[<span class="str">&quot;suspendedDateTime&quot;</span>] = DateTime.Now.ToString();</pre>
<pre class="alt">            settings.Values[<span class="str">&quot;customTextValue&quot;</span>] = CustomText.Text;</pre>
<pre>        }</pre>
<pre class="alt">&#160;</pre>
<pre>        <span class="kwrd">void</span> Current_Resuming(<span class="kwrd">object</span> sender, <span class="kwrd">object</span> e)</pre>
<pre class="alt">        {</pre>
<pre>            Message.Text = <span class="str">&quot;Resumed.  Was suspended at\n\n&quot;</span> + settings.Values[<span class="str">&quot;suspendedDateTime&quot;</span>];</pre>
<pre class="alt">            CustomText.Text = settings.Values[<span class="str">&quot;customTextValue&quot;</span>].ToString();</pre>
<pre>        }</pre>
<pre class="alt">&#160;</pre>
<pre>        <span class="kwrd">protected</span> <span class="kwrd">override</span> <span class="kwrd">void</span> OnNavigatingFrom(NavigatingCancelEventArgs e)</pre>
<pre class="alt">        {</pre>
<pre>            Application.Current.Resuming -= Current_Resuming;</pre>
<pre class="alt">            Application.Current.Suspending += Current_Suspending;</pre>
<pre>        }</pre>
<pre class="alt">&#160;</pre>
<pre>    }</pre>
<pre class="alt">}</pre>
</p></div>
</div>
<style type="text/css">
<p>.csharpcode, .csharpcode pre
{
	font-size: small;
	color: black;
	font-family: consolas, "Courier New", courier, monospace;
	background-color: #ffffff;
	/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
	background-color: #f4f4f4;
	width: 100%;
	margin: 0em;
}
.csharpcode .lnum { color: #606060; }</style>
<p>&#160;</p>
<h2>How In The World Do I Test This Scenario?</h2>
<p>Because this is a tough scenario to make happen automatically, there are tools inside Visual Studio that allow us to simulate these states in our application.&#160; First, make sure that you’ve opened the <strong>Debug Location</strong> toolbar in Visual Studio.</p>
<p><a href="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/29XAMLDebugLocation.png" target="_blank"><img title="29-XAML-DebugLocation" style="border-left-width: 0px; border-right-width: 0px; border-bottom-width: 0px; display: inline; border-top-width: 0px" border="0" alt="29-XAML-DebugLocation" src="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/29XAMLDebugLocation_thumb.png" width="500" height="724" /></a> </p>
<p>Once you’ve added that toolbar, it’s as simple as choosing one of these three options:</p>
<p><img title="29-XAML-Suspend" style="border-left-width: 0px; border-right-width: 0px; border-bottom-width: 0px; display: inline; border-top-width: 0px" border="0" alt="29-XAML-Suspend" src="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/29XAMLSuspend.png" width="224" height="96" /> </p>
<ul>
<li><strong>Suspend</strong> will immediately put your application in a suspended state.&#160; This will also fire your suspended event handler before it stops running. </li>
<li><strong>Resume</strong> will obviously resume your app from a suspended state.&#160; If your app is not suspended, nothing will happen. </li>
<li><strong>Suspend and shutdown</strong> will simulate what happens when Windows terminates your application.&#160; The suspended state will happen first, followed by a complete shutdown of your app. </li>
</ul>
<p>If we use these buttons on the application we’ve created in this article, you’ll get an experience similar to the one in this short video:</p>
<p><iframe height="375" src="http://www.youtube.com/embed/6GVl0vg1PUU" frameborder="0" width="500" allowfullscreen="allowfullscreen"></iframe></p>
<p>&#160;</p>
<p>In short, this is how we manage data on a page-by-page basis.&#160; If you’re looking to do things at the overarching application level, you can take a look at your App.xaml.cs file.</p>
<h2>Using App.xaml.cs to Manage the Lifecycle</h2>
<p>There are already two methods sitting in your App.xaml.cs file, and you’ve already used them in previous days of this series.</p>
<ul>
<li><strong>OnLaunched</strong> is called when your application is launched normally.&#160; This will not be called when your application is resumed, as the user will be taken directly to the page they were on previously.</li>
<li><strong>OnSuspending</strong> is called AFTER your page event is called, but is also called when the application is suspended by Windows 8.&#160; Saving any of your application-level data should be done here.</li>
</ul>
<p>These methods provide you a little more power on a global level, but you’re still going to need to rely on your page level events for most of the state preservation you’re going to attempt.</p>
<h2>Summary</h2>
<p>In short, we want to provide a seamless experience for our users, so keep the lessons in this article in mind.&#160; Don’t overdo it, though.&#160; Saving unsaved data for a user is a convenience, so unless you think it will be important, don’t exhaust yourself trying to anticipate everything the user might need.</p>
<p>In games, if the user leaves, and they have to replay a level, so be it.&#160; You don’t have to remember that they were jumping over that block to make it a great experience.&#160; Remember which level they were on is probably enough.</p>
<p>If you would like to download the sample app that uses the code from this article, click the icon below:</p>
<p><a href="https://github.com/csell5/31DaysOfWindows8/tree/master/source/XAML/Day29-ApplicationLifecycle" target="_blank"><img title="downloadXAML" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="downloadXAML" src="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/downloadXAML31.png" width="150" height="150" /></a> </p>
<p>&#160;</p>
<p>Tomorrow, we’re going to dive into the Windows Store, and give you all of the information you’re going to need to get your app available for sale.&#160; See you then!</p>
<p><a href="bit.ly/win8devgear" target="_blank"><img title="downloadTheTools" style="border-top: 0px; border-right: 0px; border-bottom: 0px; border-left: 0px; display: inline" border="0" alt="downloadTheTools" src="http://www.jeffblankenburg.com/wp-content/uploads/2012/11/downloadTheTools31.png" width="500" height="61" /></a></p>
<div class="crp_related"><h3>Related Posts:</h3><ul><li><a href="http://www.jeffblankenburg.com/2012/11/24/31-days-of-windows-8-day-24-light-sensor/" rel="bookmark" class="crp_title">31 Days of Windows 8 | Day #24: Light Sensor</a></li><li><a href="http://www.jeffblankenburg.com/2012/11/23/31-days-of-windows-8-day-23-the-compass/" rel="bookmark" class="crp_title">31 Days of Windows 8 | Day #23: The Compass</a></li><li><a href="http://www.jeffblankenburg.com/2012/11/25/31-days-of-windows-8-day-25-accelerometer/" rel="bookmark" class="crp_title">31 Days of Windows 8 | Day #25: Accelerometer</a></li><li><a href="http://www.jeffblankenburg.com/2012/11/27/31-days-of-windows-8-day-27-inclinometer/" rel="bookmark" class="crp_title">31 Days of Windows 8 | Day #27: Inclinometer</a></li><li><a href="http://www.jeffblankenburg.com/2013/03/16/lessons-learned-about-capturing-keystrokes-in-windows-8/" rel="bookmark" class="crp_title">Lessons Learned About Capturing Keystrokes in Windows 8</a></li></ul></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=LUwy_Z-6bpQ:5hTLLsWHDKU:G79ilh31hkQ"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?d=G79ilh31hkQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=LUwy_Z-6bpQ:5hTLLsWHDKU:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?i=LUwy_Z-6bpQ:5hTLLsWHDKU:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=LUwy_Z-6bpQ:5hTLLsWHDKU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=LUwy_Z-6bpQ:5hTLLsWHDKU:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?i=LUwy_Z-6bpQ:5hTLLsWHDKU:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=LUwy_Z-6bpQ:5hTLLsWHDKU:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=LUwy_Z-6bpQ:5hTLLsWHDKU:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?i=LUwy_Z-6bpQ:5hTLLsWHDKU:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Blankenthoughts?a=LUwy_Z-6bpQ:5hTLLsWHDKU:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/Blankenthoughts?d=dnMXMwOfBR0" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/Blankenthoughts/~4/LUwy_Z-6bpQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.jeffblankenburg.com/2012/11/29/31-days-of-windows-8-day-29-application-lifecycle/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://www.jeffblankenburg.com/2012/11/29/31-days-of-windows-8-day-29-application-lifecycle/</feedburner:origLink></item>
	</channel>
</rss>
