I had a lot of problems with the standard popups in WPF because they are actually a new window with their own handle. This means that if you drag the application around the screen, the pop-up window remains (it does not move with your window). It also means that your popup has strange behavior and does not interact with your application, as other controls usually do.
I created 2 decorator classes to solve this problem:
PopupDecorator.cs and TimeoutPopupDecorator.cs
It is quite easy to use:
Add a namespace declaration for new popup classes. i.e.
XMLNS: dday_wpf = "CLR Names: DDay.WPF"
Surround the area in which you want the popup to be displayed using the decorator. i.e.
<dday_wpf: PopupDecorator x: Name = "popup"> <dday_wpf: PopupDecorator.Popup> ... the contents of the pop-up window here ... </ dday_wpf: PopupDecorator.Popup> ... the contents of the go here panel ... </ dday_wpf : PopupDecorator>
It works pretty much identical to the normal Popup from now on.
This may not solve all your problems, but hopefully it helps.
Doug
source share