Metro Nuggets

Bitesized Windows Phone 7, Windows Phone 8 and Windows 8 tidbits

Introducing: ThemeManagerRt

Windows 8.1 and Windows Phone 8.1 both have this really great theme support that allows you to use ThemeResource as a xaml type, it means if the theme changes, anything using that will change its theme too. It’s actually very cool. What’s not cool though is you can only have two themes (Light/Dark). What if you want other themes? Yes, you can override both of those themes to show your own custom theme, but what if you want a third? A fourth? What then?

Well I’ve created a little helper that helps to alleviate that, and also means that you can swap themes on the fly without having to restart the app. Pretty cool, huh.

Read more of this post

Sharing Links To Pocket (formerly Read It Later)

Pocket is a brilliant service that allows you to essentially bookmark links and (as the old name suggests), read it later. Pocket has no official app on the Windows Phone platform, but there are more apps coming from other sources (including my own Squirrel).

One of the things each of the apps has in common (other than being a Pocket client), is the ability to add links to Pocket from other apps. This is done using a custom URI scheme and works as expected. The only problem is, if you’re writing an app that you’d like to add Pocket support to, what do you do? Do you pledge your allegiance to one app? What if your users are using a different Pocket app? What then?

This was a problem I decided to address whilst writing my own Pocket app.

Read more of this post

Resizing the RadImageButton

Telerik have a great range of controls that allow you to build some really cool looking interfaces for Windows Phone. One of those controls is the RadImageButton, which lets you set an image and it creates an appbar style button for you. However, I wanted the button to be a different size to the default one, how to go about doing that?

Read more of this post

Introducing the RottenTomatoesPortable PCL

Over the weekend I was looking at some Rotten Tomatoes stuff for Media Browser 3, and I noticed they had an API for getting the movie information (including reviews and fresh ratings). It’s been a while since I last did a PCL and to avoid any withdrawal symptoms, I created a new project.

For those that don’t know, Rotten Tomatoes is a review aggregator for movies that gives a “freshness” rating based on the reviews that have been done about a given movie.

Read more of this post

The Mystery of the Disappearing Images in the Emulator

While I was working on In Two (a great game by the way, you should check it out), I was working on one feature that allowed the user to set their profile picture, which involved letting them either choose a photo from one of their many, many albums, or taking a new picture. Most of the development of that game was done using the emulator, which was no problem, I thought, as I knew the emulator came with stock images for you to use. But every time I went to choose an image from my app, all I had was the empty camera roll folder, no stock images.

Read more of this post

ScoreoidPortable Gets Secret Squirrel API Calls

One of the cool things about working on something that in turn works with a new platform is that both parties are looking to help each other out. And such is the case here. After releasing ScoreoidPortable, I was contacted by the creators of Scoreoid thanking me for my library and also giving me access to some new methods that are new and, as yet, undocumented on their wiki. The documentation for them is coming soon, but they were keen for them to be added to ScoreoidPortable.

Read more of this post

Belatedly Introducing LiveSDKHelper

A while back I was working on a project that allowed me to actually look at, and use, the Live SDK in order to access information on SkyDrive. I was surprised to find just how hard it was to use the Live SDK, so as part of building the main project, I also built a little helper for using the Live SDK.

Read more of this post

Introducing the ScoreoidPortable PCL

For a game I’ve been writing the last few weeks, I’ve been using an online scoring system in order to keep a track of people’s best scores whilst playing the game. What I’ve been using is Scoreoid, which is a cross platform scoring platform. It’s actually pretty easy to get yourself set up with Scoreoid, but that’s not the purpose of this post.

Their API is a REST based one and has a pretty expansive list of calls, from player creation, to score creation to leaderboards, etc. Initially, I looked to see whether anyone had already created any kind of helper library for Scoreoid and found Scoreoid for Windows 8 which I had to tweak in order to use it in my Windows Phone game. Unfortunately, the number of methods it had implemented was somewhat limited, I guess Rudy only implemented the ones he needed, so I found I was going to be adding a lot to his existing code base. In the end, I decided I’d write my own version and have the library how I wanted it (naming conventions etc).

So that’s what I did.

Read more of this post

Launching a Context Menu From Code

One of the great things the Windows Phone Toolkit brings developers is the ContextMenu and ContextMenuService that allows developers to offer their users a tap and hold menu, the same kind that appears in the OS itself.

Generally, you would create the context menu in xaml and attach it to an item within your page (or DataTemplate), but what if you want the user to be able to tap a button and have it appear? If you create the ContextMenu as normal in xaml then try and launch it from code, you’ll end up with an exception being through that the Element is already a child of another element. But if you create it in code, then it might not appear where you want it to appear, so what then?

Read more of this post

Tip: Nokia Ad Exchange (NAX) and Annoying Unhandled Exceptions

One of the ways in which developers try to increase their revenue is to include ads within their app and there are a number of different providers, from Google to Microsoft to Nokia. All seem to have one thing in common: Unhandled Exceptions. For some reason, ad controls seem to be some of the biggest culprits for unhandled exceptions in apps, and better still, there’s nothing you can do to actually handle them. Nothing. Not. A. Damn. Thing! So how do you stop your app from sinking without a trace in a barrage of error reports? Nothing elegant, I can tell you that, but it works.

Read more of this post

Follow

Get every new post delivered to your Inbox.