How would i go about opening the webbrowser with a specific url on button click.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Put the following code in the button Click event handler:
var task = new Microsoft.Phone.Tasks.WebBrowserTask
{
URL = uri
};
task.Show();
回答2:
with this code on button handler event you can navigate to the url assigned to var URL
WebBrowserTask wbTask = new WebBrowserTask();
var URL = "http://create.msdn.com";
wbTask.Uri = new Uri(URL, UriKind.RelativeOrAbsolute);
wbTask.Show();