PopupButton, what triggers closing of popup?

WPF Studio, Themes, and Shared Library for WPF Forum

Posted 9 years ago by jeff jarrell
Version: 9.2.0512
Avatar
I have a situation where I am using a PopupButton as an Adorner on a Element on a canvas. In the content of the adorner.PopupButton i have a property Grid with just a few properties. Now as an PropertyEditor I have another Popup button that holds a user control as popup content.

It works except that when the PropertyEditor.PopupButton's popup content section closes it also closes the adorner.PopupButton.Popup.

I could set StaysOpen = true (on the adorner popup button) and manage the closing the the Adorner.Popup button if I had a better understanding of what normally triggers the closing of the popup. Or I could short-circuit what event is resulting the the PropertyEditor.PopupButton that is causing outer popupButton popup to close.

Suggestions?

Thanks,
jeff

Comments (1)

Posted 9 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Jeff,

The code in the PopupButton will close the associated popup when the Escape key is pressed. Aside from that, the associated Popup will close itself. Generally, this occurs when the focus is moved out of the popup or one of it's controls.

You could probably add a general handler for the PopupButton.PopupClosedEvent, and then add breakpoints to see what is trigger both popups to close. But I suspect it has something to do with focus.


Actipro Software Support

The latest build of this product (v2019.1 build 0681) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.