The connection settings task allows you to launch a settings page for a specified set of network connection related settings.
The ConnectionSettingsType
property of the ConnectionSettingsTask
class allows you to display the settings dialog using one of the following four ConnectionSettingsType
values:
AirplaneMode
Bluetooth
Cellular
WiFi
To display the Wi-Fi settings dialog, for example, use the following:
ConnectionSettingsTask task = new ConnectionSettingsTask();
task.ConnectionSettingsType = ConnectionSettingsType.WiFi;
task.Show();
The four built-in settings pages available to the ConnectionSettingsTask
are shown in Figure 14.3.
The sample for the ConnectionSettingsTask
allows you to select one of the ConnectionSettingsType
values from a Windows Phone Toolkit ListPicker
control (see Figure 14.4). Tapping the Settings button in the application bar executes an ICommand
in the viewmodel, which initializes and calls the Show
method of the ConnectionSettingsTask
.
18.224.34.205