Open CraigBelser opened 2 months ago
@CraigBelser , Popup is not designed to reuse instances. After modifying it as below, it should work as intended.
public partial class MainPage : ContentPage
{
private TestPopup testPopup;
public MainPage()
{
InitializeComponent();
}
private void OnPopupButtonClicked(object? sender, EventArgs e)
{
//part of this test is reusing the popup to maintain state. Creating a new one would bypass the issue.
testPopup = new TestPopup();
this.ShowPopup(testPopup);
}
}
@cat0363 My apologies for missing that reference. However; beyond the community toolkit popup example that is part of the code repro, it also happens in custom dropdowns for other controls like the Telerik combo box dropdown and other third party dropdowns. This issue is for most other popups across windows. I will update the repro to show a couple of additional examples.
Is there an existing issue for this?
Did you read the "Reporting a bug" section on Contributing file?
Current Behavior
The IconTintColorBehavior when used in a community in toolkit popup on the windows platform loses the tint color when the popup is reopened. The color will initially show up on the first use, but subsequent uses lose the tint color. Beyond the community toolkit popup that is part of the code repro, it also happens in custom dropdowns for other controls like the Telerik combo box dropdown and other third party dropdowns.
https://github.com/user-attachments/assets/501031b4-c3b9-4360-966b-ce5c9d27eb80
Expected Behavior
Tint color will remain on the target control when the popup reopens.
Steps To Reproduce
Link to public reproduction project repository
https://github.com/ImpySoft/TintColorIssue
Environment
Anything else?
No response