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

ToolbarItem icon

$
0
0

I'm trying to add a Icon to a toolbaritem but when i do, the app on android crashes with an unhandled exception.
With only text it works like a charm.

Working code snippet:

ToolbarItems.Add(new ToolbarItem("Menu", null, () =>
                {
                    IsPresented = !IsPresented;
                }));

Non working code snippet:

ToolbarItems.Add(new ToolbarItem("Menu", "icon.png", () =>
                {
                    IsPresented = !IsPresented;
                }));

The icon is present because it is used in the app on other places.


Viewing all articles
Browse latest Browse all 91519

Trending Articles



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