[PopupButton] Popup will close even if StaysOpen is true

WPF Studio, Themes, and Shared Library for WPF Forum

Posted 5 months ago by Yuki
Version: 22.1.2
Avatar

Hello,

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 5 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

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 5 months ago by Yuki
Avatar

Hello,

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
    MainControl
    .xaml
      - popupButtonWithPopup
        - Remove PopupContentTemplate property

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

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.4) was released 3 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.