Universal App Tutorials Part 17 : Background Tasks

UWP apps, like the Windows Phone 7 and 8 platforms before them can have Background Tasks, while a background task for the Morse Coder app might not be enormously useful at this stage, let’s take a look at how to create one.  In a further post we will look at updating the Live Tile from our Background Task.

Outcome

By the end of this post we’ll have a Background Task running on a schedule.  It won’t do anything, but we will have set up the permission in the manifest, created the project, and our task class and registered it with the application.  We will then be ready to implement the task.

Continue reading “Universal App Tutorials Part 17 : Background Tasks”

Universal App Tutorials Part 16 : Styles

Using Styles to create a consistent User Interface is generally considered to be a best practice.  In much the same way as CSS is used on the Web, Styles in XAML provide a similar development experience.

Outcome

By the end of this post we will have implemented a Style to target our About and Settings Buttons on the Home Page. removing some of the duplication in the XAML definitions.

Continue reading “Universal App Tutorials Part 16 : Styles”

Universal App Tutorials Part 15 : MVVM Light Messaging

It’s often necessary to “inform” other areas of an application of changes that have occurred.  This can be achieved through Messaging.  In the previous tutorial we created a Settings page and made the TranslationDirection Configurable.  It would be nice if the Main View Model knew about our new Translation Direction setting, let’s look at how we can achieve this.

Outcome

By the end of this tutorial we should have implemented a SettingsChangedMessage, subscribed to it from our MainViewModel and Published it from our SettingsViewModel. Continue reading “Universal App Tutorials Part 15 : MVVM Light Messaging”

Universal App Tutorials Part 12 : Universal App Reviews

One of the most compelling reasons to download an app is the number of Universal App Reviews in the store.  This tutorial will look at adding a Review App Button to our completely empty About Page.  There are various places you can surface the Review App Function, commonly it’ll be available on an About or Info page, or you may choose to have a Review Reminder.  As with a number of things with UWP apps, the Universal App Review Method changed slightly from Windows Phone 8’s MarketPlaceTask, let’s take a look…

Continue reading “Universal App Tutorials Part 12 : Universal App Reviews”

Universal App Tutorials Part 11 : Value Converters

One of the rules of using MVVM is that your model shouldn’t need to know anything about the UI Layer, and your View should be decoupled from the Model via the ViewModel.  It can often be necessary to have some form of conversion between what our Model understands and what the View would understand.  A common example would be converting a boolean flag to a Visibility State, this is where Value Converters come in.

Outcome

We’ll follow a slightly more domain specific example in this case, converting the TranslationDirection Enumeration Property to a Visibility State for our Morse Input User Control.

Continue reading “Universal App Tutorials Part 11 : Value Converters”

Universal App Tutorials Part 10 : MVVM Light NavigationService

Despite the rise in popularity of Single Page Applications (SPAs) and supporting frameworks like Angular in the Web Development world, it might be nice if we had more than one page in our app, or at least had the option to.  Our app so far is contained within a single page, MainPage.xaml.  A common pattern is to have different pages for Settings or Publisher contact information.  Navigation has moved on since Windows Phone 7.5 when it was URI based, we will look at how it now works with Universal Apps with typing and the MVVM Light implementation of INavigationService. Continue reading “Universal App Tutorials Part 10 : MVVM Light NavigationService”

Universal App Gotchas : Namespaces must exist in all Platform Projects

In certain circumstances Visual Studio will quite happily suggest to add namespaces into Shared Projects that will then fail to compile.  It’s an obvious issue to resolve, with the bottom line being that the Namespaces must exist in all Platform Projects in order for it to be referenced by the Shared Project.
Continue reading “Universal App Gotchas : Namespaces must exist in all Platform Projects”