Learn Windows Phone 7 development (three. Page)

Source: Internet
Author: User
Tags silverlight

WP7 's form has not been in the same place as mobile, it is a web-style window--a page--generated by Silverlight. But it is not exactly the same as Silverlight, Silverlight is generated by frame and page, and WP7 is generated by Phoneapplicationframe and PhoneApplicationPage.

And for WP7, there is the problem of screen turning. For steering, it's very simple, just add one sentence to each page's constructor.

Supportedorientations = supportedpageorientation.portrait | Supportedpageorientation.landscape;

If you want to add some function to the steering, you need to load the event.

This. Orientationchanging + = new eventhandler<orientationchangedeventargs> (orientchanged);

So if you need to change the position of the control on the page while turning, this is also very simple, as long as you set the parameters of the grid can be completed.

There is a return key on the WP7, when pressed this button will fall back to the previous page, if you need to add some action, you need to load the key press event.

Also, when you jump between pages, use this. Navigationservice.navigate (URL, urikind.relative) will create a new page, so if you want to return to the previous page or the next page, be sure to use the rollback key or Goback (), GoForward ( ) function to complete.

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.