You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] TintColorBehavior does not work correctly within a popup control #2137
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.
PopupTintLoss.mp4
Expected Behavior
Tint color will remain on the target control when the popup reopens.
Steps To Reproduce
Open and run the attached repro
press the popup button
see the tint
close the popup using the close button on the popup
@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.
Activity
cat0363 commentedon Aug 21, 2024
@CraigBelser , Popup is not designed to reuse instances.
After modifying it as below, it should work as intended.
FYI. #1377
CraigBelser commentedon Aug 21, 2024
@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.