[PopupButton] Popup will close even if StaysOpen is true

WPF Studio, Themes, and Shared Library for WPF Forum

Posted 22 days ago by Yuki
Version: 22.1.2


It seems that Popup will close even if StaysOpen is true when show modal dialog. (Window.ShowDialog())

Is this true behavior? I want not to close Popup.

When show modeless dialog(Window.Show()), Popup will stay opening.

Comments (3)

Posted 22 days ago by Actipro Software Support - Cleveland, OH, USA


Are you sure you're on the version you listed above?  I'm not seeing it close when showing a modal dialog.

That being said, we did notice an issue where the popup was closing on focus loss in a certain scenario and have fixed that for the upcoming v22.1.3 maintenance release.

Actipro Software Support

Posted 21 days ago by Yuki


Thank you for replying.

Though I checked it with 22.1.3-beta.9, the issue was not solved.

You can see the issue by the following modification of SampleBrowser source code.
Would you please check it?

  • ActiproSoftware.ProductSamples.SharedSamples.QuickStart.PopupButtonIntro
      - popupButtonWithPopup
        - Remove PopupContentTemplate property

      - OnPopupButtonPopupOpening
        - Add the following code.
    var button = new Button() { Content = "Show Dialog" };
    button.Click += (_, __) =>
    	var window = new Window();
    popupButtonWithPopup.PopupContent = button;​
Posted 21 days ago by Actipro Software Support - Cleveland, OH, USA

Thank you for the repro steps.  The change we made yesterday for the upcoming maintenance release appears to have fixed this issue. 

If I set StaysOpen="True", I didn't see the popup close in our latest codebase when opening the dialog.  But if I reverted that recent code change, I was able to reproduce the problem.

Actipro Software Support

The latest build of this product (v22.1.3) was released 20 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.