Xamarin toolbar Icon not showing.

I'm having trouble with showing icons on the toolbar.

      this.ToolbarItems.Add (new ToolbarItem {
          Text = "Menu",
          Icon = "MasterTest.images.Menu.png",
          Order = ToolbarItemOrder.Primary,
          //  Command = new Command (() => Navigation.PushAsync (new LaunchPage ()))
      });

I have tried forward slashes, just "Menu.png", jpegs Placing the image on the IOS folder. Nothing is working. When debugged it comes with " incorrect number or types of arguments" on Icon
Any help is appreciated.

Best Answer

Answers

  • JacobPoulsen_JacobPoulsen_ DKMember ✭✭✭

    Would it work just to add the Image to the Resources Folder in the iOS project, and reference it like this:
    Icon ="MasterTestMenu.png" ?

  • ashalvaashalva GEMember ✭✭✭
    edited March 2016

    @JacobPoulsen_ ,

    Yes it should work, but be careful about the properties. If you have an image in the project tree and you are dragging it into resources file the properties might mismatch. So instead delete the image from the project and than add it to the resources file directly.

Sign In or Register to comment.