Array

Vibration Alerts and Web Browser

Must Read

Admin
Admin
Just post!

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:

  • Add a reference to the namespace Microsoft.Devices to your class.
  • Call the static methods of the default VibrateController class to start and stop vibration.

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

Previous articleTouch and Gestures
Next articleWindows Marketplace
- Advertisement -

Latest News

Unpacking Fixed Rate HELOCs: The Good, the Bad, and Everything In Between

Today, we're diving deep into the world of Fixed Rate Home Equity Lines of Credit (HELOCs). If you're a...
- Advertisement -

More Articles Like This

- Advertisement -