In this article, we will discuss how to set the source of an image. For this follow these steps:
Step 1
A simple way to set the source of an image
First we take an Image control from the Toolbox and go into the Properties tab. After that we select the Source property like this:
When we click on the Button the following window will be appear:
After that we click on add and select the Photo and then we click the Ok button.
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
<Image Name="img" Source="/images;component/Images/Desert.jpg"></Image>
</Grid>
The output will be:

Step 2
With the help of the web
Here we set the image source via the web like this:
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
<Image Name="img" ManipulationStarted="img_ManipulationStarted" Source="http://www.sendflowerstojaipur.in/products/12Apr20120502PM1.jpg"></Image>



Comments
Join the conversation! Your thoughts help the community grow.