Blograby

Vibration Alerts and Web Browser

Vibration Alerts

Application code can initiate the vibration capability of the device to alert users of events occurring in the application. To use this feature,
you must do the following:

To initiate vibration for the default duration, call the Start method. To specify the duration, include a TimeSpan that defines the duration of the vibration as the parameter of the Start method. To stop vibration, call the Stop method.

C#
VibrateController.Default.Start(); // Default duration
VibrateController.Default.Start(TimeSpan.FromSeconds(2));
VibrateController.Default.Stop();

Web Browser

You can invoke the Windows Phone 7 web browser in your applications using the WebBrowserTask class. You simply specify the URL
to open, and call the Show method. The following code example shows how to do this.

C#
WebBrowserTask browserTask = new WebBrowserTask();
browserTask.URL = “http://www.microsoft.com/windowsmobile”;
browserTask.Show();

For more information, see “WebBrowserTask Class” on MSDN (http://msdn.microsoft.com/en-us/library/microsoft.phone.tasks.webbrowsertask(VS.92).aspx).

Exit mobile version