A damn at han's Windows Phone Book notes (8: Vibration)

Source: Internet
Author: User

Vibration

 
Vibratecontroller. Default. Start (Timespan. Fromseconds (. 5 ));
 
The parameter is the vibration duration, and the maximum value is 5 seconds.Vibratecontroller. Default. Stop (); the user turns off the vibration in the settings of the mobile phone and does not affect the vibration of the app. It only affects SMS calls.
 
 
 
 

LetProgramKeep running when the phone is locked

Two global variables apply to different scenarios:

PhoneapplicationserviceAfter the. Current. applicationidledetectionmode is disabled, the monitor and lock will be turned off during the timeout period, but it will still run, such as GPS mileage applications and music playing.

PhoneapplicationserviceAfter the. Current. useridledetectionmode is disabled, the display and lock will not be turned off upon timeout, such as video applications.

After disable, you cannot enable the program in this run. You can enable the program only after it is restarted.

// Allow the app to run (and vibrate) even when the phone is locked. // once disabled, you cannot re-enable the default behavior!Phoneapplicationservice. Current. applicationidledetectionmode =Idledetectionmode. Disabled;
 
 
 
Batch initialize buttons
// Fill the wrap panel with the 90 buttonsFor(IntI = 0; I <This. Buttons. length; I ++ ){This. Buttons [I] =NewButton{// Each button contains a square, invisile (fill = NULL) When off and accent-colored when onContent =NewRectangle{Margin =NewThickness(0, 7, 0, 5), width = 30, Height = 30 }};This. Buttons [I]. Click + = button_click;This. Wrappanel. Children. Add (This. Buttons [I]);}

 

Linebreak

In XAML, <linebreak/> is used to indicate carriage return, rather than \ r \ n.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.