Ajay
Ajay

Reputation: 6590

Windows Phone get image source path in String

I am trying to get image source path in string but not able to get it.

Here is my code

String tempJPEG = imgUpload.Source.ToString() ;

Here imgUpload is <Image x:Name="imgUpload" ></Image>

I am getting this "System.Windows.Media.Imaging.BitmapImage" in tempJPEG.

How can I get image path?

Upvotes: 0

Views: 551

Answers (1)

gleb.kudr
gleb.kudr

Reputation: 1508

The source property of the image control contains BitmapImage itself. Therefore you need to use the BitmapImage.UriSource property.

Upvotes: 1

Related Questions