Maui icon indicating copy to clipboard operation
Maui copied to clipboard

[BUG] IconTintColorBehavior Not Reapplied When Reusing Views

Open RiyashameedM opened this issue 1 year ago • 1 comments

Is there an existing issue for this?

  • [x] I have searched the existing issues

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

  • [x] I have read the "Reporting a bug" section on Contributing file: https://github.com/CommunityToolkit/Maui/blob/main/CONTRIBUTING.md#reporting-a-bug

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

  • .NET MAUI CommunityToolkit:9.0.1
  • OS:android ios
  • .NET MAUI:8.0.82

Anything else?

No response

RiyashameedM avatar Oct 11 '24 11:10 RiyashameedM

I have the same issue.

TheSundayDev avatar Oct 16 '24 20:10 TheSundayDev

Hope to see this issue close in order to finally migrate to MUAI from XF. Thanks

TheSundayDev avatar Nov 08 '24 14:11 TheSundayDev

hi all, just to know if I can help in order to fix this issue. thanks

TheSundayDev avatar Dec 04 '24 11:12 TheSundayDev

Hi, seems working now with version 10. thanks

TheSundayDev avatar Dec 23 '24 10:12 TheSundayDev

Thanks for confirming!

TheCodeTraveler avatar Dec 23 '24 18:12 TheCodeTraveler