UniversalRateReminder, a rate pop up for Windows/Windows Phone Universal XAML apps

While slowly moving from making Windows Phone Silverlight apps to Universal XAML ones, I found that the availability of some basic libraries and controls is very fragmented. There are lots of resources for enhancing your Windows Phone Silverlight app, while Windows 8 XAML feels a little neglected. And on top of it, a good amount of Windows libraries/controls don’t work out of the box when targeting 8.1 projects or just plain crash.

One of these features that is very helpful is a pop up reminder for rating the app. While there are lots of implementations for Silverlight (Telerik has one in its controls suite, and even Nokia released a free one), in XAML it’s more difficult to find a library that performs this, to the point that searching Google for “windows 8 xaml rate reminder” only produces one significant result. And don’t forget that almost all implementations rely on XAML controls, which can introduce additional complexity if you want to show the reminder programmatically.

To try and fix some of these shortcomings, a new library is available for Universal XAML apps. It allows you to show a rate reminder pop up for both the Windows and Windows Phone versions of the app with only one line of code:

  1. RatePopup.CheckRateReminder();

Just call it at the end of the OnLaunched function of your App class and it will automatically check the number of times the app has been run, and if it exceeds the threshold (by default five times), the pop up will be shown. Dismissing it by tapping either one of the buttons will make it never show again.

Sample app showing UniversalRateReminder pop up

Of course, everything is customizable, from the text shown inside the pop up to the number of times the application must be launched before showing it. Just be sure to modify the static properties before calling CheckRateReminder:

  1. RatePopup.LaunchLimit = 1;
  2. RatePopup.RateButtonText = “rate”;
  3. RatePopup.CancelButtonText = “cancel”;
  4. RatePopup.Title = “Rate app”;
  5. RatePopup.Content = “Would you like to rate this app?”;
  6. RatePopup.CheckRateReminder();

And if for whatever reason you want to reset the launch count or want to show the reminder more than once, you can call ResetLaunchCount to reinitialize all internal counters.

You can get the source code, including a small sample app showing how to use the library, from its GitHub page; or you can search for UniversalRateReminder on NuGet or view its project page.