How To Add Image Control In Universal Windows App

Prerequisites

  • Visual Studio 2015

Now, let's get started with the following steps.

Step 1 - Create Windows Universal Project

Open Visual Studio 2015 and Click File -> New -> Project Option for New Universal App.

New

Step 2- Giving the Project Name

Then, New Project window will open. There, you can select Installed -> Template -> Visual C# -> Windows -> Universal, and select a Blank App (Universal Windows).

Give your project a name, such as ImageAppp and click the OK button.

Blank App

Step 3- Setting the Platform Versions

Here, we choose the Target Version and Minimum Version for our Universal Windows application. Click OK button.

Versions

Step 4- Choose Designer Window

Now, we go to the Solution Explorer and open the MainPage.xaml for design.

Solution Explorer

Step 5 - Designing the App

In the MainPage.xaml designing page, drag the Image button control from the tool box. Then, go to the Property window and change the name as TajImage.

Designing

Next, go to the Solution Explorer and right click on the Assets folder. Choose Add->Existing Item, for adding an image.

Existing Item

Now, choose a desired image and click Add. The image is now added into the Assets Folder.

Add

Then, select the image control and go the property. Click on the source and select the image (Taj.jpg).

property

Now, the designing page looks like the following.

page

Step 6- Run the Application

Now, we are ready to run our project. Just click the Local Machine icon in the top ribbon for running the Application.

Application

Output

Output

Conclusion

I hope you understood Image Control in Universal Windows, and how to run it.


Similar Articles