Prism icon indicating copy to clipboard operation
Prism copied to clipboard

[BUG] ContentPage ToolbarItem Icon not displaying

Open pierreszelag opened this issue 2 years ago • 7 comments

Description

Inside a ContentPage, when a ToolbarItem with an IconImageSource is added, the icon is not visible.

image Icons are supposed to be the same as the image in th middle of the page.

In the same demo project, a test was made without Prism and the ToolbarItem Icon was visible.

.NET version : 8 VS : 2022 Preview 17.9.0

Steps to Reproduce

  1. Open Demo Probject
  2. Run Windows App
  3. Bug is visible on MainPage

Demo Project : MauiApp1.zip

Platform with bug

.NET MAUI

Affected platforms

Windows

Did you find any workaround?

No

Relevant log output

No response

pierreszelag avatar Dec 06 '23 11:12 pierreszelag

Thanks for reporting this issue. We are currently looking into this but it's hard to say when we'll be able to resolve or if we can resolve it directly. There seems to be something breaking specifically in .NET MAUI for the ToolbarItem Icons as the MenuBar and TabbedPage Icons all work just fine as well as general Image Sources across the application.

We are working with the MAUI team to try to identify how/where this could be breaking.

dansiegel avatar Jan 06 '24 23:01 dansiegel

I have noticed the same issue, toolbar icons are working on Android and iOS, but not on Windows

anpin avatar Jan 20 '24 08:01 anpin

@anpin thank you for confirming that this is working for you on Android and iOS.

dansiegel avatar Jan 20 '24 13:01 dansiegel

this was fixed for me in the latest MAUI versions. @pierreszelag can you confirm?

anpin avatar May 01 '24 14:05 anpin

@anpin it is still not working for me with MAUI 8.0.21. Do you have a sample project to share ?

pierreszelag avatar May 03 '24 10:05 pierreszelag

In MAUI 8.0.40 still the issue... I know the Maui team is overload with PR, 200 right now... I found a few PR for iOS that could be part of this issue and others related to PRISM. Can any body help to get this PR on production, we are stuck with iOS issues

[iOS] Shell toolbar items #20510 https://github.com/dotnet/maui/pull/20510

[iOS] Shell/NavigationPage TitleView #20959 https://github.com/dotnet/maui/pull/20959

carlosxjose avatar May 24 '24 19:05 carlosxjose

After reading all the issues responses and answers from @dansiegel today... I try today one more time the iOS navigation and everything start working as before just after avoid to register the NavigationPage. Navigation bar and icons working as expected.

At RegisterTypes method just commented this

containerRegistry.RegisterForNavigation<NavigationPage>();

Strangely on Android this do not create any issue but on iOS using /NavigationPage as parameter won't work or create an exception... In this case I could ignore my last post referring Maui PR issues. I did my test on Maui 8.0.40.

carlosxjose avatar May 31 '24 01:05 carlosxjose