you cannot change the settings using the code, but you can direct the user to the settings page using the following navigation instruction.
in this case, it will go to the settings page. from this you can set location settings
Similarly, you can switch to wifi and other settings
var navigate = Windows.System.Launcher.LaunchUriAsync (new Uri ("ms-settings-location:"));
source share