Launching the lock Screen Settings App using URI Scheme in Windows Phone 8

Below is a sample code snippet demonstrating on how to launch the lock Screen App via the URI Scheme and LaunchUriAsync method in Windows Phone using C#?

Launching the lock Screen Settings App using URI Scheme in Windows Phone 8

using Microsoft.Phone.Controls;

using System;

using System.Windows;

using System.Windows.Controls;

using Windows.System;

namespace AbundantCodeWP8

{

public partial class MainPage : PhoneApplicationPage

{

public MainPage()

{

InitializeComponent();

}

async private void Button_Click_1(object sender, RoutedEventArgs e)

{

await LaunchLocationSettingsApp();

}

// Function open the lock Settings App using URI Scheme in Windows Phone 8 using C#.

private async System.Threading.Tasks.Task LaunchLocationSettingsApp()

{

await Launcher.LaunchUriAsync(new Uri("ms-settings-lock:"));

}

}

}