Thought for the Dazed

I've had to give up that Distance Learning course as I was having trouble seeing the teacher.

Flickr
www.flickr.com
RobMiles' items Go to RobMiles' photostream
Twitter
C# Yellow Book

Search entire site
« Pluggable USB 3 Docking Station | Main | Century 21 Comic Strips »
Thursday
Aug012013

Accessing Windows Phone Settings from code

DSCF3741.jpg

I’ve discovered that one way to make sure that I remember how to do something is to drop it into the blog. That way I can go find it when I forget. This time it is the code that you use to open up the connection settings dialog page in Windows Phone 8.

ConnectionSettingsTask connectionSettingsTask = 
                                  new ConnectionSettingsTask();
connectionSettingsTask.ConnectionSettingsType = 
                                  ConnectionSettingsType.Bluetooth;
connectionSettingsTask.Show();

This will do the business. You need to include the Tasks namespace:

using Microsoft.Phone.Tasks;

There are options that you can use to open up the WiFi, Cellular and Airplane modes.

Whenever I open the Airplane mode I always want the phone to say

“Surely you can’t be serious?”
”I am serious. And don’t call me Shirley”

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.
Author Email (optional):
Author URL (optional):
Post:
 
All HTML will be escaped. Hyperlinks will be created for URLs automatically.