none
WPF Popup displays above every window

    Question

  • How can I make the WPF Popup control only display above my window.  Right now when it pops up in the background, it displays above every single window on my desktop and is extremely annoying.

    Is there a way to change this?  I tried setting Panel.ZIndex on the popup but that doesn't seem to be working.

    Thanks.
    Wednesday, August 12, 2009 4:25 PM

Answers

  • Hi,
    The Popup is a control that it is very useful in XBAP where you cannot (or if you do it someway you get a security warning) open a second window because of permissions and the Popup is a convienient way to display message box. If you are working in a normal WPF I recommend you to use a normal window (with WindowStyle.None if you want) instead of a Popup.

    Said that, as far as I know the Popup is always shown on top and I didn't find anyway to avoid this.

    Regards,


    Federico Benitez
    My blog
    • Proposed as answer by Federico Benitez Friday, August 14, 2009 10:30 AM
    • Marked as answer by Zhi-Xin Ye Monday, August 17, 2009 7:36 AM
    Wednesday, August 12, 2009 4:50 PM

All replies

  • Hi,
    The Popup is a control that it is very useful in XBAP where you cannot (or if you do it someway you get a security warning) open a second window because of permissions and the Popup is a convienient way to display message box. If you are working in a normal WPF I recommend you to use a normal window (with WindowStyle.None if you want) instead of a Popup.

    Said that, as far as I know the Popup is always shown on top and I didn't find anyway to avoid this.

    Regards,


    Federico Benitez
    My blog
    • Proposed as answer by Federico Benitez Friday, August 14, 2009 10:30 AM
    • Marked as answer by Zhi-Xin Ye Monday, August 17, 2009 7:36 AM
    Wednesday, August 12, 2009 4:50 PM
  • Thanks Federico.
    Saturday, October 03, 2009 6:25 PM