How to set Airplane mode in Windows Phone using C# ?

Airplane mode is a feature in Windows Phone that lets the user to easily turn off the cellular , Wi-Fi , Bluetooth etc .

If you want to access turn on / off the Airplane mode from your Windows Phone App , then you can use the Launcher “ConnectionSettingsTask” to achieve it .

How to set Airplane mode in Windows Phone using C# ?

Just set the ConnectionSettingsType of the ConnectionSettingsTask to AirplaneMode and call the show method .

This will launch the AirplaneMode settings form where you can turn on/off the AirplaneMode .

To use the ConnectionSettingsTask Launcher , use the namespace Microsoft.Phone.Tasks;

private void button1_Click(object sender, RoutedEventArgs e)

{

SetAirplaneMode();

}

private void SetAirplaneMode()

{

ConnectionSettingsTask connectionSettingsTask = new ConnectionSettingsTask();

connectionSettingsTask.ConnectionSettingsType = ConnectionSettingsType.AirplaneMode;

connectionSettingsTask.Show();

}

httpv://www.youtube.com/embed/bkrPavrLxQQ

Leave A Reply

Your email address will not be published. Required fields are marked *

You May Also Like

This blog post will guide you through several effective methods to troubleshoot and resolve the issue of Microsoft Edge not...
Windows 11 offers a range of audio enhancements that can enrich your listening experience. These enhancements include features like virtual...
Windows 11 brings a fresh and visually stunning design to your desktop, and one of the standout features is the...