ConnectionSettings Task allows user to set and adjust device network settings. ConnectionSettings task is defined in Microsoft.Phone.Tasks namespace as below,
User can set device network setting to any of the following
If you want to set Network connection setting to WiFi, you can set it as below,
ConnectionSettingsTask connectionSettingsTask = new ConnectionSettingsTask(); connectionSettingsTask.ConnectionSettingsType = ConnectionSettingsType.WiFi; connectionSettingsTask.Show();
If you want to set Network connection setting to Bluetooth, you can set it as below,
ConnectionSettingsTask connectionSettingsTask = new ConnectionSettingsTask(); connectionSettingsTask.ConnectionSettingsType = ConnectionSettingsType.Bluetooth; connectionSettingsTask.Show();
If you want to set Network connection setting to Cellular, you can set it as below,
ConnectionSettingsTask connectionSettingsTask = new ConnectionSettingsTask(); connectionSettingsTask.ConnectionSettingsType = ConnectionSettingsType.Cellular; connectionSettingsTask.Show();
If you want to set Network connection setting to Airplane mode, you can set it as below,
ConnectionSettingsTask connectionSettingsTask = new ConnectionSettingsTask(); connectionSettingsTask.ConnectionSettingsType = ConnectionSettingsType.AirplaneMode; connectionSettingsTask.Show();
In this way you can set the network setting of device using ConnectionSettings task. I hope this post is useful. Thanks for reading
Follow @debug_mode
Leave a Reply