1
votes

A popup, defined by my parent Window, is being covered by a child Window. I would like the popup to be displayed on top of all application windows.

My parent Window has Topmost="True" and contains the popup (with Placement="AbsolutePoint"), as well as an interaction request to launch the child Window. In the interaction request this occurs:

  1. Child Window is created with Topmost="True" and Owner=parentWindow
  2. Topmost is set to false on the parent window
  3. ShowDialog is called for the child Window

The popup is displayed on top of the parent Window, but below the child Window. I have tried turning ChildWindow.Topmost to "False", but this does not help.

1
"The popup is displayed on top of the parent Window, but below the child Window." - Could you provide a screenshot of what is happening?Mike Eason
Displaying a child window using the ShowDialog() method means that this window will be modal for the whole application, so there should be no other window that would be on-top of it. Do you need to make your child window modal?dymanoid
@Mike Eason - I will have to supply a screenshot when I get home, but imagine this z-order: ParentWindow, Popup, ChildWindow (with the ChildWindow at the forefront, on top of everything)Julius
@dymanoid - That's an interesting point. I would like the modal relationship between my windows, but I will try with the child window launched in a non-modal way and report back. Thanks.Julius
Question is: what are you trying to do? Popups are menu-like windows, belonging to parent window (it's like a part of window). Windows are in turn entity what is managed by OS (z-order, positioning, modal-parent relations, alt-tab, etc.). If you are using MDI-like interface, then popup will work properly (because in this case child windows are a part of parent window itself and popup is able to project itself over them). Your best bet is to provide a draft what you are trying to do.Sinatr

1 Answers

0
votes

Slightly unsatisfactory, but I'm going to redesign my approach so that I am using 2 popups, rather than 1 popup and 1 child window, which should have a z-order related to the order in which they are opened. This prevents another window showing on the taskbar also.

I believe the problem is stemming from the fact that popups are really just windows, and it is difficult to make 3 windows play nicely together. I have not found out which property/properties are responsible, but it will be some combination of Topmost, Owner and which window is currently Activated tripping me up.