Home > OS >  Xamarin forms changes color of png icons by itself
Xamarin forms changes color of png icons by itself

Time:11-11

Icons with PNG extension are white, but xamarin forms also show up in another color. Just buttons and menu

CodePudding user response:

I order to change the color of an image, Xamarin Community Toolkit offers an Effect called Icon Tint Color

By adding the Effect to an Image View, you can change the color of the image.

This will work better for png images that are white and have transparency.

You can check the Sample to have a better knowledge on how to use it

<Image
     Source="https://image.flaticon.com/icons/png/512/48/48639.png"
     xct:IconTintColorEffect.TintColor="Red" />
  • Related