-
Notifications
You must be signed in to change notification settings - Fork 423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Windows IconTintColorBehavior Navigate away and then back to a page and the tint is removed #1595
Comments
Thanks @SamuelJames101 for reporting the issue. I have verified the issue. |
@vhugogarcia I have created a fix in my code but I have a question, why do we remove the tint when we un-attach the behaviour? As that is where the issue lies, if we don't remove the tint but instead make sure the view (the image with the attached behaviour) only has one IconTintBehaviour at any given time then that resolved it for me. |
@SamuelJames101 can you attach your workaround? |
Also having this issue, ETA on a fix? @SamuelJames101 Would also like to see your workaround if possible. |
I think it he fix for this is to apply a similar approach to how StatusBarBehavior works - allowing a developer to define when the behavior is applied and make the default do it in OnNavigatedTo. I'm away for just over a week but happy to look at this when I return if there isn't any progress. |
I am also running into this issue on windows. The first time the view is displayed it works fine, but navigating back to the view results in no tint. Hopefully a fix is coming in the near future. The work around that I am using requires re-setting of the image's source in the view's Loaded event. private IconTintColorBehavior myIconTint = new();
private void MyView_Loaded(object sender, EventArgs e)
{
if (myImage.Behaviors.Contains(myIconTint))
{
var source = myImage.Source;
myImage.Source = null;
myImage.Source = source;
}
else
{
myImage.Behaviors.Add(myIconTint);
}
} |
Any progress on this? Or a way to overwrite all images to fix this for now? |
Is there an existing issue for this?
Did you read the "Reporting a bug" section on Contributing file?
Current Behavior
Navigating away from a page which has an image and a tint, and then back to removes a the tint
Expected Behavior
The tint remains
Steps To Reproduce
1.Have a page with an image with a tint
2.Navigate to a second page
3.Navigate back to the first page
Screen.Recording.2023-12-08.at.16.09.43.mov
Link to public reproduction project repository
https://github.com/SamuelJames101/IconTintColourWindowsIssue
Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: