Forum Xamarin.Forms


The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

Bug in Plugin.CrossPlatformTintedImage on UWP

I am seeing a bug in the Plugin.CrossPlatformTintedImage package available here:

The GitHub repo has been archived by the author so I don't think he will be fixing it. However, since it seem to be a fairly popular project, I thought I'd see if anyone has any ideas about it.

On UWP, I see some of my images with a "ghost" as shown in the following image.

The grey arrow seems to be the original image while the yellow one is after applying the tint color.

I think I only see this in cases where I have specified both a RequestedWidth and a RequestedHeight for the image

        Margin="0, 0, 15, 0"
        TintColor="{x:Static local:Utility.TintColor}"
        Aspect="AspectFit" />

If I only specify one or the other the bug is not seen. In this particular case I could actually get away with only specifying either the width or height since I'm using AspectFit. But it would still be nice to know what is causing this and possibly fix it in a local copy of the repo.

It sort of seems like the image is being draw twice, once before tinting and once after but the "canvas" is not being erased in between the two draws.

Any thoughts would be appreciated.



  • btschumybtschumy Member ✭✭

    Also, if anyone knows of a different way to get tinted images on iOS, Android and UWP, I'd like to know about it (I know how to do it on iOS and Android, but UWP is the thought one).

  • YelinzhYelinzh Member, Xamarin Team Xamurai

    I am seeing a bug in the Plugin.CrossPlatformTintedImage package

    The repository is no longer maintained. To achieve this function on uwp, try using the Win2D nuget package. Win2D is an easy-to-use Windows Runtime API for immediate mode 2D graphics rendering with GPU acceleration.

    You could google with the keyword as UWP Composition Effects: Temperature and Tint to check the related tutorial.

Sign In or Register to comment.