Metro Nuggets

Bitesized tidbits for building Modern (Metro) apps.

How to Display Ads/Review Prompts/Whatever Inline in Lists

A while back, I read a really interesting article on the best way to approach prompting your user to leave a review for your app, it’s a really good read, so I do encourage you to take a moment and give it the once over. The TL;DR version of it, though, is basically: don’t push a prompt up to yours users to leave a review, don’t do anything that shoves this kind of thing in the user’s face, be it ads, reviews or whatever. The suggested solution is to display your review prompts inline with the rest of your display data (this assumes you have that).

So how do we go about doing that on Windows Phone/Windows? Actually, it’s rather simple (sorry Silverlight, this is not for you).

Read more of this post

Creating a Weather App Style Adaptive Tile

In Windows 10, we’ve seen apps that look to have different tile faces and they cycle between those tiles. It’s a really nice effect and can be a very powerful thing for your app to use, it allows you to present more data to the user without having to have your tile all cramped. A good example of this would be a weather app where you might want to allow the user to show the weather for different places. So, how do you go about creating a tile like this?

Read more of this post

Universal Windows Apps, AppBars and Custom Colours

In your Universal app, you may want to have AppBars that have different colours from the default theme colours, which is understandable if you want to add your own branding to it. But when you set the Foreground/Background colours, you may end up with behaviour you weren’t fully expecting.

Read more of this post

Personalisation, Cimbalino and Universal Windows Apps

With Windows 10, two key areas of personalisation for a user are the lock screen and the wallpaper images, and this is both on phone and desktop. And on both you’ve always been able to set the lock screen image (for now we’ll just forget that WPA8.1 apps couldn’t!), but setting the wallpaper was something you couldn’t do in either desktop or phone. Now that’s changing with Windows 10. Whilst the APIs for settings these aren’t the most complicated ones in the world (Wallpaper/Lock screen), no-one would ever say they wouldn’t like things even simpler, right? Also, how about being able to set these things from a viewmodel in a PCL?

Read more of this post

Cimbalino, Debugging, and NotSupportedExceptions

Cimbalino is a great toolkit that supports most of Microsoft’s current platforms (including the new UWP), it has a useful set of services and interfaces that really help make building modern apps on Microsoft platforms a doddle. The way in which it does that is by use of the “bait and switch” approach with its PCL and various platform specific implementations. What this does mean, however, is there may be occasions where a service method may not be supported for a specific platform, at this point, Cimbalino will throw a NotSupportedException. The problem with doing this is you may have your logic in a PCL and using Dependency Injection using Cimbalino’s services; your viewmodels may not need to know, or care, about whether a platform supports a particular call, but having that call may crash your app. So what then?

Read more of this post

My UWP Nuget Package is Missing a File?

When creating a nuget package that’s intended for a UWP, you’d be excused for creating your package in the same way you always have done, you include the new uap10.0 TFM (Target Framework Moniker) and drop your dll file(s) in there. This is 95% of it, but there’s a sneaky extra 5% that you still need to do, otherwise, whilst your package will still be valid, and will still get pulled into a UWP project, that project won’t be able to build.

Read more of this post

Introducing Bex, A PCL Library for the MS Health APIs

Yesterday Microsoft [finally] released the MS Health APIs they’d talked about at this year’s Build conference. These APIs are a way of accessing the data that’s been accrued from your Microsoft Band, so any bike rides, runs, sleep tracking, etc. These APIs are a set of REST endpoints that, once authenticated, you can call to access this data. So, naturally, I’ve decided to make this easier.

Read more of this post

Introducing InteractiveToastExtensions for Universal Windows Apps

One of the new ways users can interact with your app is through notifications. Now, notifications are nothing new, for either Phone or Desktop, however, what’s been added to 10 is new. With Universal Windows Apps, you can now have interactive toast notifications. So what are these? They are like regular toast notifications only they can have elements that the user can interact with, maybe make a selection, or type in a response to something.

There’s an excellent blog post on MSDN that covers all the different types of interactions you can have within your app’s toasts, along with all the xml elements that are required in order to build your toast notification, but that does mean dealing with xml, and who likes that?!

Read more of this post

Adding photos to the Windows 10 Phone Emulators

When you’re writing an app that requires the user to choose a picture, you give them the photo picker, which allows them to choose a photo from their device. Great. But what about you, as the developer? What about when you’re using the emulator? The old Windows Phone 7 emulators came with some built in images that you could pick (we’ve all seen them in the store screenshots, admit it!!), then with the Windows Phone 8 emulators, you had to perform a little dance to get them. But what about the Windows Phone 8.1 and Windows 10 emulators? And wouldn’t it be nice if you could more easily use real word pictures, rather than stock photos?

Read more of this post

Windows Universal Apps, Cimbalino and the App Back Button

One of the things you can add to a Desktop variant of a Universal Windows App is a back button that a developer can add to their app; this back button appears in the top left corner of the app. In order to use the back button, the developer needs to tell it to appear, as well as potentially wire up to the back button’s pressed event, but that’s not the Cimbalino way.

Read more of this post


Get every new post delivered to your Inbox.