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“