Template 10 is a set of Visual Studio project templates for Windows 10 XAML / C# apps.
In my previous post I set the app theme to Light and found that the status bar was completely white on Windows 10 Mobile. The status icons were no longer visible.
Before we can make changes to the status bar we first need to add Windows Mobile Extensions for the UWP to our references:
In the Solution Explorer right click on References and then click Add Reference. In the left pane select Universal Windows and then Extensions from the drop down menu. In the right hand pane select Windows Mobile Extensions for the UWP and click OK.
Now we can customize the status bar by adding the highlighted code to App.xaml.cs.
public override async Task OnStartAsync(StartKind startKind, IActivatedEventArgs args)
// TODO: add your long-running task here
//Set StatusBar background and foreground colors
var statusBar = StatusBar.GetForCurrentView();
if (statusBar != null)
statusBar.BackgroundOpacity = 1;
statusBar.BackgroundColor = Colors.Orange;
statusBar.ForegroundColor = Colors.White;
Next just add the required using statements as prompted by Visual Studio.
As you can see I set the background color to orange and the text to white:
View at Medium.com
Template 10 is a set of Visual Studio project templates for Window 10 XAML / C# apps. By default Template 10 uses the Dark theme.
If you need to switch the Light theme you can add the following code to App.xaml in <common:Bootstrapper:
To see this change in your project, save changes and restart Visual Studio.
Template 10 is set of Visual Studio templates for Windows 10 UWP C# and XAML applications. For those who are interested there is a whole course about Template 10 on the Microsoft Virtual Academy site.
Once you have installed Template 10 via NuGet you will find that your project fails to build with the following error:
Error CS0234 The type or namespace name ‘ApplicationInsights’ does not exist in the namespace ‘Microsoft’ (are you missing an assembly reference?)
The solution is to add the following references to ApplicationInsights in project.json dependencies:
You should then be able to build and run your Template 10 project.
The full project.json is as follows: