In this post I am going to talk about ShareLinkTask and ShareStatusTask that come with the Windows Phone Mango update of the developer tools.
Note: ShareLinkTask and ShareStatusTask do not work on the emulator. So you will need real Mango device connected to Facebook,Windows Live, etc. in order to test them.
ShareLinkTask
Basically ShareLinkTask launches a dialog that enables the user to share a link on the social networks like for example Facebook, Windows Live, etc.
To start using it you will need to include the following namespace:
Namespace: Microsoft.Phone.Tasks
Assembly: Microsoft.Phone (in Microsoft.Phone.dll)
All you need to do in order to this launchers in your application is:
Step1: Create an instance of ShareLinkTask,
Step2: Set desired propertied: Title, LinkUri, Message.
Step3. Call Show():
ShareLinkTask shareLinkTask = new ShareLinkTask();
shareLinkTask.Title = "WindowsPhoneGeek";
shareLinkTask.LinkUri = new Uri("http://windowsphonegeek.com", UriKind.Absolute);
shareLinkTask.Message = "The ultimate resource for Windows Phone Development.";
shareLinkTask.Show();
ShareStatusTask
Basically ShareStatusTask launches a dialog that enables the user to share a status message on the social networks (Facebook, Windows Live, etc.).
To start using it you will need to include the following namespace:
Namespace: Microsoft.Phone.Tasks
Assembly: Microsoft.Phone (in Microsoft.Phone.dll)
All you need to do in order to this launchers in your application is:
Step1: Create an instance of ShareStatusTask,
Step2: Set desired propertied: Status.
Step3. Call Show():
ShareStatusTask shareStatusTask = new ShareStatusTask();
shareStatusTask.Status = "Current Status: Developing WP7 apps.";
shareStatusTask.Show();
That was all about using ShareLinkTask and ShareStatusTask in a Windows Phone Mango application. You can find the full source code of the demo here:
ShareLinkTask shareLinkTask = new ShareLinkTask();shareLinkTask.Title = "WindowsPhoneGeek";shareLinkTask.LinkUri = new Uri("http://windowsphonegeek.com", UriKind.Absolute);shareLinkTask.Message = "The ultimate resource for Windows Phone Development.";shareLinkTask.Show();
ShareStatusTask
Basically ShareStatusTask launches a dialog that enables the user to share a status message on the social networks (Facebook, Windows Live, etc.).
To start using it you will need to include the following namespace:
Namespace: Microsoft.Phone.Tasks
Assembly: Microsoft.Phone (in Microsoft.Phone.dll)
All you need to do in order to this launchers in your application is:
Step1: Create an instance of ShareStatusTask,
Step2: Set desired propertied: Status.
Step3. Call Show():
ShareStatusTask shareStatusTask = new ShareStatusTask();
shareStatusTask.Status = "Current Status: Developing WP7 apps.";
shareStatusTask.Show();
That was all about using ShareLinkTask and ShareStatusTask in a Windows Phone Mango application. You can find the full source code of the demo here:
Windows Phone Developmentmay be the latest smart phone platform, but it has already taken significant market share and poses a big aggressive threat to iPhone, Android, and BlackBerry.
ReplyDelete