-
Book Overview & Buying
-
Table Of Contents
Windows Application Development Cookbook
By :
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 step through this recipe, you only need the automatically generated project.
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 the Assets 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 the MainPage.xaml file as follows:
<Page (...) Background="Black">
<Grid (...)>
<Image
Source="/Assets/Image.jpg"
...