Navigating to a Connection Setting Page Using the ConnectionSettingsTask

,

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:

Image AirplaneMode

Image Bluetooth

Image Cellular

Image 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.

Image

FIGURE 14.3 Connection settings pages.

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.

Image

FIGURE 14.4 ConnectionSettingsTaskView page.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.224.34.205