Windows Phone: adding a first run tutorial to your app
Posted on 2014-02-05 21:33:00
Tags: windowsphone projects wpdev
In the Austin area? Come to the Austin Code-a-thon and have a chance to win a JBL Wireless Charging Speaker!
My Marriage Map app has gotten some bad reviews complaining about missing features that were actually present in the app. So, I decided to make a quick tutorial that would point out how to use the app the first time the user ran it. I did a quick search for some sample code but couldn't find any, so I rolled my own. (download the latest version of the app to try it out!) It features
None of these were particularly difficult, but adding them all took a bit of work. So I made a sample project with the same system to make it easier to add to your apps.
Some notes on the code:
_firstRunIndex keep track of whether we're showing the tutorial and what step it's on.
UpdateFirstRunCanvas() - this is where you have to add new steps. Don't forget to update
MAX_FIRSTRUNINDEX when you do!
HideWhenDone() method that gets run when the Storyboard is done takes care of making it collapsed.
SetFirstRunActive(). I was hoping that just putting the FirstRunCanvas with a high z-index would make it be on top of everything and intercept their clicks, but for some reason that didn't work.
/MainPage.xaml?RemoveBackAll=1&Tutorial=1, and OnNavigatedTo() in MainPage.xaml starts the tutorial. If you want to start it from the MainPage.xaml code, just do
See all my Windows Phone development posts.
I'm planning on writing more posts about Windows Phone development - what would you like to hear about? Reply here, on twitter at @gregstoll, or by email at firstname.lastname@example.org.
Interested in developing for Windows Phone? I'm the Nokia Developer Ambassador for Austin - drop me a line at email@example.com!
This backup was done by LJBackup.