Opening Settings in Windows Phone 8.1 Runtime XAML

I've been frustrated to find that as a result of Microsoft.Phone (and more importantly Microsoft.Phone.Tasks) not being supported in Windows Phone 8.1 XAML launching a specific phone setting from your application has changed. It is however supported in Windows Phone Silverlight 8 and 8.1.

Previously the code for opening a settings page (in this example the Bluetooth Settings Page) would have followed:

ConnectionSettingsTask connectionSettingsTask = new ConnectionSettingsTask();
connectionSettingsTask.ConnectionSettingsType = ConnectionSettingsType.Bluetooth; 

or alternatively:

Windows.System.Launcher.LaunchUriAsync(new Uri("ms-settings-bluetooth"));


The new syntax for opening a settings page (again in this example Bluetooth) in Windows 8.1 Phone XAML is as follows:

Windows.System.Launcher.LaunchUriAsync(new Uri("ms-settings-bluetooth:///"));

*Notice the addition of the :/// (makes all the difference in the world)


Hopefully that saves you some time searching because it took me a while before i found anything remotely useful for Windows Phone 8.1.

Omar Elabd

Omar Elabd

Omar Elabd is a software developer specializing within the .NET Framework. He has experience in developing Web and Desktop based applications using ASP.NET, MVC, WebAPI and WPF.
Omar Elabd