In the first recipe, you will learn how to open a given website in a default browser available in the system. Such a task is really easy and just requires you to provide a URL of the website for the LaunchUriAsync
method. Let's start!
To prepare an example that opens a website in a default browser available in the system, perform the following steps:
Add a button (opening a website in a default web browser) to the page by modifying the content of the
MainPage.xaml
file, as follows:<Page (...)> <StackPanel (...)> <Button Content="Open website" (...) Click="BtnOpenWebsite_Click" /> </StackPanel> </Page>
Define the
BtnOpenWebsite_Click
method to open the http://jamro.biz website in a default web browser after clicking...