The accepted answer is true that you cannot drop StreamImageSource to FileImageSource , I think the real question is how to transfer images to PCL and use them on buttons, just as you would when creating Image form control.
The answer is to have a Grid that contains both a Button and an Image object, where Image overlaps the Button .
For example, C # code might look like this:
ImageSource imageSource = ImageSource.FromStream(() => new MemoryStream(imageAsBytes)); Button iconButton = new Button (); iconButton.VerticalOptions = LayoutOptions.FillAndExpand; iconButton.HorizontalOptions = LayoutOptions.FillAndExpand; var image = new Image(); image.Source = imageSource;
You may need to play around with the dimensions and thickness values, but this should lead to a click on the icon button.
Victor chelaru
source share