Reputation: 35
I've got a problem: In my Xamarin Forms project I want to show an Icon in the top left corner, but the image is only via url available.
var toolbaricon = new ToolbarItem();
toolbaricon.Icon = "urlToImage";
ToolbarItems.Add(toolbaricon);
The Item gets added to the ToolbarItems, but doesn't show up. But if I use a local Image (image from drawable (android)) it works fine.
Is there a solution for this?
Best Regards
Upvotes: 2
Views: 643
Reputation: 2981
The ToolBarItem
inherits MenuItem
which needs a FileImageSource
as its Icon
property. This means it only accepts images from the platform resource folder. That means that you can't use an image from a URL.
Upvotes: 1