Fix IconTintColorBehavior not tinting UriImageSource and TintColor binding not working on Windows #1929
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Change
On Windows, the IconTintColorBehavior did not tint images with a URL source and in the CommunityToolkit sample, the ImageButton with the TintColor binding was not changing color when pressed. These issues did not happen on Mac or iOS. The issue was with the
OnImageOpened()
function not getting called with for URL images. There was a change made in a previous pull request #1370 that fixed an issue described in #1333 on Windows where applying the IconTintColorBehavior caused the image to not show up, but when reverting this change, the URL image was tinted correctly and the ImageButton worked. Reverting the change did not cause the issue in #1333 to reappear.Below is an image of the tests I wrote in the sample solution to see the change:
![image](https://private-user-images.githubusercontent.com/80227988/339077485-939054dc-33fc-4ddb-94e9-209578ea9ca0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE1MTY4MzIsIm5iZiI6MTcyMTUxNjUzMiwicGF0aCI6Ii84MDIyNzk4OC8zMzkwNzc0ODUtOTM5MDU0ZGMtMzNmYy00ZGRiLTk0ZTktMjA5NTc4ZWE5Y2EwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzIwVDIzMDIxMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTkzMmVkMzAwYzZhNjk1MjRlNGQ2ODNhYjhjMDk3MTQ2N2RkMmFiODIyZmFiNDYwNTgyOWRkYjYyODQwNTUyYjUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.zEPEjT4xP8SYY9SCksIRJs3zKXoYkCI4R0ZudV-rfIE)
This is what it looks like without the change:
![image](https://private-user-images.githubusercontent.com/80227988/339077144-ecc9b3e3-e778-4188-b6a2-542f5a13ecc0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE1MTY4MzIsIm5iZiI6MTcyMTUxNjUzMiwicGF0aCI6Ii84MDIyNzk4OC8zMzkwNzcxNDQtZWNjOWIzZTMtZTc3OC00MTg4LWI2YTItNTQyZjVhMTNlY2MwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzIwVDIzMDIxMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTI4YzY4YmZiNzEwMjA4N2E5ZWUzNDIwOGFmYjdkYWUyOWIxOTg5MDU3M2U1ZGFlZmE5YjQxYThlZmVhZTZlOTYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.19jOwUM973YCMJY7uvHWtHltMuBYgbmy3aaxZhNRoGI)
Linked Issues
PR Checklist
approved
(bug) orChampioned
(feature/proposal)main
at time of PRAdditional Information
Tested on Windows 10