Discussion on Windows Phone 7 development on the 31st day -- 7th: Starter

Source: Internet
Author: User
Tags email account

This article is about Windows Phone 7 development on the 31st day"7th day of the series.

Yesterday we discussed in your Windows PhoneProgramHow to Use the toolbar. Today, let's take a look at another core function in the program, starter.

What is a starter?

I found that I often describe the initiator as a "Trigger and forget" mechanism. You can use them to send emails, view maps, take photos, and so on. I will explain each available starter on this platform to you as a developer. At the end of this article, I provide a downloadableCodeExample.

One thing to remember for these starters is that some of them cannot work on the simulator. For example, emailcomposetask assumes that you have created an email account on the device. Because the simulator cannot create an email account, you cannot test it. You can come to my "office hours ". Every Thursday, at Columbus, I tested the program through a real machine from seven o'clock A.M.. If you want to try it, contact me.

When using any one of the starters, make sure that this statement is included at the top of the code file. We need to reference the Microsoft. Phone. Tasks namespace.

Using Microsoft. Phone. tasks;

You can quickly browse these starters and use the following:

    • Emailcomposetask-Allow users to send emails through their email accounts.
    • Marketplacedetailtask-Start Windows Phone marketplace to allow users to view a specific product.
    • Marketplacehubtask-Start Windows Phone marketplace, which allows you to display a certain type of applications by default.
    • Marketplacereviewtask-Take the user to the comment page of the current program in Windows Phone marketplace.
    • Marketplacesearchtask-Start the Windows Phone marketplace search result. The result is from the search item you enter (or the one you set ).
    • Mediaplayerlauncher-Start the built-in media player and play the specified media file.
    • Phonecalltask-Start the phone program and display the phone number and name. The call is only made after the user clicks "call.
    • Searchtask-You can regard this as a way to provide Bing search functions in your program.
    • Smscomposetask-Start the Information Program and display the function of sending information to users. You can specify the message recipient and information content, but only the user can send the message.
    • Webbrowsertask-Open the web browser and jump to the specified URL.

Enable the starter

Each initiator has a series of attributes, but after setting any attributes, you need to use the show () method to display them to users. Therefore, you can call the show () method on the starter.

For example, this is smscomposetask:

Smscomposetask SCT =   New Smscomposetask ();
SCT. =   " 5555555555 " ;
SCT. Body =   " Call me when you have a chance. Let's do lunch today. " ;
SCT. Show ();

I have linked the names of each starter to the corresponding msdnArticle, Where you can see all the attributes. So I am not doing this kind of copy work here.

Tomorrow, we will introduce the selector. It is the starter's brother who allows you to obtain data from users' phone calls (of course, with their permission ). See you tomorrow!

Download Sample Code

This example contains all the starters described above.

Address: http://www.jeffblankenburg.com/post/31-Days-of-Windows-Phone-7c-Day-7-Launchers.aspx

If you like my article, click "recommendation ",Thank you!

 

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.