Export (0) Print
Expand All
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

How to use the share link task for Windows Phone 8

Applies to: Windows Phone 8 and Windows Phone Silverlight 8.1 | Windows Phone OS 7.1

Use the share link task to enable the user to share a link on the social network of their choice.

By using Launchers, you help provide a consistent user experience throughout the Windows Phone platform. For more information, see Launchers and Choosers for Windows Phone 8.

To use the share link task

  1. Add the following statements to your code.

    using System;
    using Microsoft.Phone.Tasks;
    
  2. Add the following code to your application wherever you need it, such as in a button click event. To test this procedure, you can put the code in the page constructor. This is the code to launch the task.

    ShareLinkTask shareLinkTask = new ShareLinkTask();
    
    shareLinkTask.Title = "Code Samples";
    shareLinkTask.LinkUri = new Uri("http://code.msdn.com/wpapps", UriKind.Absolute);
    shareLinkTask.Message = "Here are some great code samples for Windows Phone.";
    
    shareLinkTask.Show();
    

Show:
© 2015 Microsoft