Forum Xamarin.Forms
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Toolbar item image showing as blue square in iOS - works in Android

JeffBrown.9666JeffBrown.9666 USMember, University

I have been developing a Xamarin forms project and can't get my ToolbarItem to show my log out image. The image shows up fine in Android but in iOS it just comes up as a blue square. This may be a separate issue but clicking the log out button also will not show my notification, although that part works in Android also.

string logOutButton = Device.OnPlatform("Logout2.png", "Logout.png", "Logout.png"); home.ToolbarItems.Add(new ToolbarItem("Filter", "logOutButton", async () => { var close = DisplayAlert("Confirm Logout", "Are you sure you want to log out?", "Yes", "Cancel"); if (await close) Navigation.PopModalAsync(); }));

I attached Logout2.png so you can see the image I am trying to use

Best Answer

Answers

  • JeffBrown.9666JeffBrown.9666 USMember, University

    Thanks, did not know all toolbar icons are tinted in iOS.

    It turns out my displayalert error was based on this issue for anyone experiencing the same thing: http://stackoverflow.com/questions/11862883/whose-view-is-not-in-the-window-hierarchy

Sign In or Register to comment.