Pop-up tied to toggle push button

I would like a button that opens a popup. Basically like a dropdown that displays a popup window. My solution is to take a Toggle Button and when the property changes check if the button is pressed, if it is open the popup, if it’s not close the popup. For the most part this works but what I am running into is I want the popup, if open, to close if I switch screens.

What are the events that change windows? Depending on on how you implement your navigation you can detect this and close the windows you desire.

I’m swapping windows. My other thought was to ditch the popup and just have the button hide or show the contents from that popup window.

I don’t know if you need to be allowed to move a popup, but you could just always make this “popup” as another container within the window, and tie the visibility property of the container to the selected property of the toggle button. I do this. You won’t be able to move the container around, but otherwise it looks and feels like a popup.

This also makes it easier for the parent window to get the data from the container instead of passing data from one window to another.


Exactly what I was thinking, I’ll give this a try.

1 Like

This seems to work out nicely, I wanted to make it such that when the drop down popup is out and I switch screen that when I come back to the screen the popup is closed. I made the popup close if a property change occurs, as far as I know there is no issue with doing this but I would’ve liked a way to actually detect when the window closes and change the state of the button to close the popup.

1 Like