Getting Image's Uri in Windows Phone -



Getting Image's Uri in Windows Phone -

i should image's uri when seek it giving error.

image's urisource able casting bitmapimage bitmapimage's properties throwing errors. how can image's source?

img0.source = getimageforindex(0, names, file, path).imgsource; imagelisttemplate getimageforindex(int index, list<string> names, isolatedstoragefile file, string path) { using (isolatedstoragefilestream stream = file.openfile(path + names[index], filemode.open, fileaccess.read)) { bitmapimage tempimage = new bitmapimage(); tempimage.setsource(stream); imagepath = path + names[index]; homecoming new imagelisttemplate() { imgsource = tempimage }; } }

imgsource's type bitmapimage already.

you're not setting uri source image, you're loading stream of info instead.

the bitmapimage can populated stream or uri. can read urisource if set, creating image uri.

based on code, if want reference original info source when querying selecteditem, i'd suggest storing path/file info in tag property. alternatively add together property of bound items datasource , query that.

windows-phone-8 windows-phone uri bitmapimage

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -