Windows Phone 8 uses page-passing objects to implement multi-value transfer between pages

Source: Internet
Author: User

When doing Windows Phone development, will often encounter between page jumps and pass data, if the value is not passed, only two or three, we usually use Navigationservice.navigate ("page name?"). Name= "" &id= "", urikind.relative));

When it comes to passing multiple values, you'll write a lot of & sign connections. It's not nice.

Here I write a better way---pass the object

Ideas

Define a class that contains all the fields you need to pass, and then declare the object of the class in App.xaml.cs, and finally use the object,

Adds a field to this object.

Practice

The first step:

Define a public access class

<span style= "FONT-SIZE:14PX;" >public  class Goodhelper    {public                string goodname        {            get;            Set;        }        public int Goodprice        {            get;            set;        }} </span>

Detailed Description: http://wp.662p.com/thread-8214-1-1.html

Windows Phone 8 uses page-passing objects to implement multi-value transfer between pages

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.