Launch a browser from Silverlight application

2. June 2010 12:43 PM

It is a question in my mind about how to make my Silverlight application to launch a new instance of browser just like the some hyperlink in normal html/aspx page. After a quick search from the MSDN library and found the answer. Infact, it is very simple, as simple as 1 line of code :)

 

System.Windows.Browser.HtmlPage.Window.Navigate(new Uri("http://www.google.com", UriKind.Absolute), "_blank");

 

or

 

System.Windows.Browser.HtmlPage.Window.Navigate(new Uri("MyPage.aspx", UriKind.Relative));

Quick Tips

Add comment



  Country flag
biuquote
Loading