Modern applications often contain attractive designs that include images. In this recipe, you will learn how to present images in your application using the Image
control.
To add a .jpg
file to the project, add the Image
control, and handle the Tapped
event, perform the following steps:
Add the
Image.jpg
file to theAssets
directory within the project. To do so, refer to these steps:Navigate to Add | Existing Item... from the context menu of the Assets node in the Solution Explorer window.
Choose the file in the Add Existing Item window.
Click on the Add button.
Place the
Image
control on the page and adjust its appearance by modifying the content of theMainPage.xaml
file as follows:<Page (...) Background="Black"> <Grid (...)> <Image Source="/Assets/Image.jpg" ...