using System; using System.Windows; using Microsoft.Phone.Controls; using Microsoft.Phone.Tasks; namespace PhoneApp.ApplicationId { public partial class MainPage : PhoneApplicationPage { public MainPage() { InitializeComponent(); } private void ButtonShowId_Click(object sender, RoutedEventArgs e) { MessageBox.Show(ApplicationProperties.GetId().ToString(), "My id is:", MessageBoxButton.OK); } private void ButtonShare_Click(object sender, RoutedEventArgs e) { ShareLinkTask shareLinkTask = new ShareLinkTask(); shareLinkTask.Title = "Check this app!"; shareLinkTask.LinkUri = new Uri(string.Format("http://www.windowsphone.com/s?appid={0}", ApplicationProperties.GetId()), UriKind.Absolute); shareLinkTask.Show(); } } }