MessageBox showing behind Popup in UserControl

I've a UserControl in my WPF app that creates a Popup. A button on the Popup creates a MessageBox, but the MessageBox is showing up behind the Popup. I've tried setting the Panel.ZIndex on the Popup, but that isn't making a difference. I can't really change who the parent window is on the MessageBox because I have only one window, unless there's some way to set the parent to my Popup control? Does anybody know how to remedy my problem?

Answers


Personally, I hate WPF's built-in popup. One of my biggest pet peeves with it is that it gets drawn on top of all other windows (which includes windows that are not part of the WPF application)

As an alternative, I have created my own Popup for WPF which is just a UserControl that can be added to your main Visual Tree.


Need Your Help

Problem in orientation in iPad app

iphone xcode mpmovieplayercontroller mpmovieplayer

I am creating a application in which I can need to play a video which I do by mpmovieplayer controller .Now i nee to do this for both orientation .But the frame doesnt get set properly .

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.