Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Store Image Bytes or Image Path in SQLite and load images in listview

$
0
0

I have a new requirement in Xamarin forms, wherein I have to give the user an option to take a picture from either camera or upload it from a file picker, and then subsequently load the image taken/selected in listview.

On taking a picture or selecting an image from file picker, I thought of saving the filepath in database, and on the XAML page I have an image tag under ListView whose Source is binded to this path retrieved from database. Is this a good approach or should I store image bytes in database and use converters and then use that to bind to the image?. The only issue while saving image bytes is how to save the image in bytes wherein user selects image from file picker.

I have not yet tried any code logic yet, but any starters on where to look for the same (links, similar questions etc).

Also another question is that in file picker if I give user option to select any other file as well apart from image file (say pdf etc), then how to show that in a list view and open on user tap for viewing.


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>