Windows Phone 7-Return key

Source: Internet
Author: User
// The "Return key" can only be used to return to the previous page. Only when the keyboard, context menu, or pop-up window is available, the return operation is to close the keyboard, cancel the context menu, or pop-up window. // If there is a pop-up window on the page, press "Return key" to cancel the pop-up window instead of returning to the previous page. The page class provides the onbackkeyprocess method that can be reloaded for processing this logic: protected override void onbackkeypress (system. componentmodel. canceleventargs e) {If (Popup. isopen) {Popup. isopen = false; E. cancel = true;} base. onbackkeypress (e) ;}// in some cases, you need to remind the user whether to exit the current page (back to the previous page), for example, to remind the user to save the current page. The onbackkeyprocess method can be reloaded as follows: protected override void onbackkeypress (system. componentmodel. canceleventargs e) {If (_ isnewlist) {If (! Popupsavepromotion. isopen) // promotion not opened yet, show it {e. cancel = true; popupsavepromotion. isopen = true;} else if (popupsavepromotion. isopen) // promotion already showed, if back key hit again, then close promotion and allow back key process continue {popupsavepromotion. isopen = false;} base. onbackkeypress (E );}

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.