How can I turn on/off WiFi programatically on WP7

后端 未结 2 1936
误落风尘
误落风尘 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();
    

提交回复
热议问题