Possible Duplicate:
How can I turn on/off WiFi programatically on WP7
How can I enable WiFi programmatically on Windows Phone 8? So far I have only found status info on network, but no actual way to set the WiFi enabled/disabled. Do I really have to go through the WiFi Settings page to set the state?
There is no way to modify system settings like WiFi, Bluetooth or others by code. The only thing you can do is to get the user to the WiFi system screen using the ConnectionSettingsTask launcher, establishing the ConnectionSettingsType to WiFi.