This is a bit of a brain-dump, in no particular order, of things I learned building my first 4 Windows 8 (C# XAML) apps:
- Countdown To
- Big Screen Countdown
- Code Retreat Countdown
Adding Microsoft Ads to your App
- Sign up here: PubCenter
- Create a Windows 8 Ad Unit (note the different ad sizes)
- Install the Advertising SDK
- Add a reference to the ad assembly
- Ads the AdControl to your XAML, set the application ID and Ad Unit Id properties to those specified in you ad unit in PubCenter (for testing ads before publication see this DZone article)
- Ensure your ad unit control has it’s width and height set to that of your ad unit
- Ensure that the app capabilities have Internet enabled (otherwise you wont see any ads show up).
Certification Failure when your App has internet capability
Easy creation of Custom Settings Flyout UI
Install Callisto. It enables you to easily create settings flyouts see tutorial. It also has some other goodies in the toolkit.
Give Blend a Chance
Expression Blend allows you to design your XAML. I’ve heard a lot of developers find it difficult to use, but it really does make life easier. Even though the XAML design surface in Visual Studio 2012 is so much better than previous versions, I still think investing time learning Blend will pay off.
Test on a Touch Screen
If you can, test your app on a touch screen or tablet to ensure you understand any usability differences.
Test at Different Resolutions
The Simulator makes it really easy to test what your app looks like at different resolutions.
Testing on an ARM device
Arm devices can’t run Visual Studio, you can however install the Remote Debugger Tools onto your ARM device, and from Visual Studio choose the Remote Machine option in the Debugger dropdown. If your dev PC and ARM device on on the same subnet, it should show up in Visual Studio, otherwise you may need to use an IP address. Make a mental note of any slower performing parts of your app to see if any performance optimisations are required.
Get Someone Else to Use your App
Watch someone who is new to your app (assume they know Windows 8 though) and observe what they do, and where they seem to pause or get stuck. Doing this revealed a usability problem with Countdown To that I will need to fix in a future release.
Respect the Microsoft Design Language (aka “Metro”)
For your first apps (unless your are an experienced designer, or have one helping you) you should stick to the basic UI. You will probably think it looks boring and be tempted to add some colours and gradients and borders and other awesome stuff: don’t. You can always do a future release add add some design pixie dust. I’m not saying never add colour or designed elements or break some of the design principles, but probably refrain from doing so for your first app.
Debug Your App When It’s Launched from a Secondary Tile
If you have secondary tiles and you want to debug how your app starts up when launched from one: open your app solution in Visual Studio, go to Debug Menu –> Debug Installed App Package and check the “Do not launch, but debug my code when it starts” box. Now go to your start menu and launch your app from a secondary tile, Visual Studio will now start debugging.
Lock Screen Badge PNG
If your app runs on locks screen and has a badge, make sure the badge.png (or whatever filename you choose) has only pure white or transparent pixels, e.g. no antialiasing, otherwise it will fail certification.
Windows App Cert Kit (aka WACK) runs some of the same tests that get run when you submit your app to the Store. It will tell you early of any basic certification failures, rather than waiting to submit your app and wait days to find out there is a problem.
Don’t Use Blank Page Template
In Visual Studio, don’t use the Blank Page template as you will have to do loads of manual work for dealing with snapped, landscape etc. states. Instead use on e of the other templates such as Basic Page: although these templates have a lot in them and can be overwhelming at first, they will save you time in the long run. You also get a (albeit basic) View Model to bind to in your XAML if you wish to use it.
Executing a Background Agent When A User Logs On
If you need a background agent to run when a user logs on, for example to update some tiles, you can register your agent with a system trigger called UserPresent.
new SystemTrigger(SystemTriggerType.UserPresent, false),
Setup Your Tax & Payment Info
Before submitting your first app, ensure your account is fully set up, otherwise when you submit your app it looks like it gets stuck in the “Pre-processing” phase until you do.
The Kitchen Sink Army Knife
Be mindful of trying to put too much in a single app or implement every single feature you can think of for release 1. Instead think of the best, most major features and implement those. If your app is popular then you can spend time and add the kitchen sink later.