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

FileImageSource from File System?

$
0
0

Hi,

I'm trying to set the icon for a toolbar item and hit a snag. I'd like to load the image from an "icon pack" downloaded by the user. I have the icons downloading properly, but they don't seem to load for the display.

var tb = new Forms.ToolbarItem();
tb.Icon = new Forms.FileImageSource { File = "add.png" };

It does, however, seem to work when I manually mark them as an android resource in the build (which I would not be able to allow users to use "icon packs" I would presume). Is it not possible to use the FileImageSource for local files?


Viewing all articles
Browse latest Browse all 58056

Trending Articles