How can I turn on/off WiFi programatically on WP7

后端 未结 2 1934
误落风尘
误落风尘 2021-01-14 01:03

I would like to know if there is any possibility to turn wifi on and off programatically. My idea is to have a background task looking for geocoordinates and toggle the wifi

相关标签:
2条回答
  • 2021-01-14 01:35

    You can show the dialog like this.

    ConnectionSettingsTask connectionSettingsTask = new ConnectionSettingsTask();
    connectionSettingsTask.ConnectionSettingsType = ConnectionSettingsType.WiFi; 
    connectionSettingsTask.Show();
    
    0 讨论(0)
  • 2021-01-14 01:55

    Sorry, you can't programmatically turn on or off the wifi. The best you can do is displaying the WIFI settings page and let the user take care of it.

    0 讨论(0)
提交回复
热议问题