Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Images no longer render in Preview 13 #4735

Closed
mobycorp opened this issue Feb 17, 2022 · 5 comments
Closed

Images no longer render in Preview 13 #4735

mobycorp opened this issue Feb 17, 2022 · 5 comments
Labels
area-controls-image Image control platform/windows 🪟 t/bug Something isn't working

Comments

@mobycorp
Copy link

Description

I have ensured that all of the .svg files are have a build type of MauiIcon per the documentation on Images, yet they do not show up. I also tried to set all image files to have a build type of MauiImage to no avail.

Here is a screen shot from Preview 12. Notice the icon in the flyout head and all of the flyout item icons are drawn correctly.

Screenshot 2022-02-14 092501

Here is the same page in Preview 13.
Preview 13

Something is also going on with the flyout header margin (I have it set to 0,-40,0,0 so that it will align with the header row, but I need to do some more digging on that. Right now, I'm more concerned about the images not being drawn...

Steps to Reproduce

  1. Create new .NET Maui app
  2. Run the app (with no changes)
  3. It complains about the splash screen icon not being found (so I simply commented it out in the Platforms\Windows\Package.appxmanifest file - this too is a bug which I will file separately)
  4. Notice the dotnet_bot image does not appear.

Version with bug

Preview 13 (current)

Last version that worked well

Preview 12

Affected platforms

Windows

Affected platform versions

Dependency net6.0-windows10.0.19041

Did you find any workaround?

No

Relevant log output

N/A
@mobycorp mobycorp added the t/bug Something isn't working label Feb 17, 2022
@jsuarezruiz jsuarezruiz added the area-image Image loading, sources, caching label Feb 17, 2022
@MartinUbl
Copy link

I can confirm this bug - I just upgraded my environment and project from Preview 12 to 13.

It may be worth noting, that images drawn from memory streams (created e.g.; using ImageSource.FromStream()) render just fine.

@JohnHDev
Copy link

From your screenshot I see its a windows app, this might help: https://github.com/dotnet/maui/wiki/Migrating-to-Preview-13

@mobycorp
Copy link
Author

As I indicated in issue #4736, I discovered an element in the header of App.xaml that was pointing to Assets as the image directory. Namely, windows:Application.ImageDirectory="Assets" I bumble-stumbled upon that when I was looking at something else. When I removed that line, images started to appear!

I will not close this issue. I will let @jsuarezruiz close it so that he knows how I resolved the issue.

@egvijayanand
Copy link
Contributor

Since that platform-specific attribute (windows:Application.ImageDirectory="Assets") needs to be removed from App.xaml, that also needs to be mentioned in the migration guide.

Since I removed it in an attempt to resolve the build error even before finding the migration link, couldn't recall it while adding this #4736 (comment).

@jfversluis
Copy link
Member

@egvijayanand it's now added to the migration guide, glad this was figured out! 🐳

@ghost ghost locked as resolved and limited conversation to collaborators Mar 20, 2022
@Eilon Eilon added area-controls-image Image control and removed area-image Image loading, sources, caching labels May 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-image Image control platform/windows 🪟 t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants