CommunityToolkit / Maui

The .NET MAUI Community Toolkit is a community-created library that contains .NET MAUI Extensions, Advanced UI/UX Controls, and Behaviors to help make your life as a .NET MAUI developer easier
https://learn.microsoft.com/dotnet/communitytoolkit/maui
MIT License
2.24k stars 388 forks source link

[BUG] IconTintColorBehavior Not Reapplied When Reusing Views #2275

Open RiyashameedM opened 6 days ago

RiyashameedM commented 6 days ago

Is there an existing issue for this?

Did you read the "Reporting a bug" section on Contributing file?

Current Behavior

The IconTintColorBehavior does not correctly reapply the tint color when switching views in a ContentView and returning to a previously used view. When a view that uses IconTintColorBehavior is recycled and displayed again, the tint color is not applied to the image. The converter is not invoked when the recycled view is displayed. I have attached a sample to replicate the issue. I tested it with a background color instead of the tint color for a view, and it worked as expected.

Expected Behavior

IconTintColor Should be applied for the recycled view.

Steps To Reproduce

1.click the button 3 times 2.check the image color.

Link to public reproduction project repository

https://github.com/RiyashameedM/TintColorSample/tree/main

Environment

Anything else?

No response

TheSundayDev commented 1 day ago

I have the same issue.