Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/chridpkm/chrisrios.com/wp-includes/functions.php on line 6114
Open Websites and Emails from a Windows Phone 7 Silverlight App - Christian Rios' Blog

Open Websites and Emails from a Windows Phone 7 Silverlight App

First,  make sure to reference the Microsoft.Phone.Tasks Library

In your XAML you can add a HyperlinkButton with a click even like this:

<HyperlinkButton x:Name="Email" Content="email@domain.com" Click="Email_Click"/>

Then use the EmailComposeTask class to bring up the mail client.

private void Email_Click(object sender, RoutedEventArgs e)
{
EmailComposeTask email = new EmailComposeTask();
email.To = "email@domain.com";
email.Subject = "Thanks";
email.Show();
}

In a similar manner, you instantiate WebBrowserTask to bring up the browser with the provided link

private void MyBlog_Click(object sender, RoutedEventArgs e)
{
WebBrowserTask web = new WebBrowserTask();
web.URL = "http://chrisrios.com";
web.Show();
}


Copyright 2011 Christian Rios

All trademarks and copyrights contained in this document are owned by their
respective trademark and copyright holders.