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

How to retrieve png image from SpecialFolder.LocalApplicationData and show on UI as button.Image ?

$
0
0

I'm sending image by TCP and save on SpecialFolder.LocalApplicationData. Next I want to retrieve this image and show as button.Image in runtime,
but the image doesn't show, only empty button.

`button.Data.ThumbnailPath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.LocalApplicationData) + // + fileName;

if (File.Exists(button.Data.ThumbnailPath))
{
button.Image = (FileImageSource)ImageSource.FromFile(button.Data.ThumbnailPath);
MainGrid.Children.Add(button, 0, 0);
}`


Viewing all articles
Browse latest Browse all 77050

Trending Articles



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