SmtHm
SmtHm

Reputation: 15

Xamarin forms changes color of png icons by itself

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

Upvotes: 1

Views: 639

Answers (1)

Juan Sturla
Juan Sturla

Reputation: 1304

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" />

Upvotes: 2

Related Questions