In our WPF app we have one Main Window and a bunch of buttons that open pop-up Edit/ReadOnly Windows. In the Main Window we also have a ContentControl that gives notifications in the bottom right corner.
What I want to achieve is to have these notifications pop-up in the very front of all Windows. I know I can use Panel.ZIndex
to make it the front View-Element inside the (Main) Window itself, but I'd also want it on top of the pop-up Windows that might be in front of it.
Is there a way to achieve this? I know I could put this ContentControl with Notifications inside a seperate Window instead of the MainWindow itself, but then I'd had to remove the borders and bar of the Window, remove it from the Windows Taskbar at the bottom and a bunch of other stuff to make it look/act the same as it is right now, which I preferably avoid.
So, what is the best way to approach this and is it even possible without putting it in a seperate Window, and have that pop up in front of every other window every time a new Notifications comes up?
Unfortunately, you don't have a choice to make as the only way to make your
ContentControl
appear on top of otherWindow
s is to put it into its ownWindow
and set itsTopMost
property totrue
. As it is, thePanel.ZIndex
will only affect the Z index of the control within theMainWindow
... you can't set it to be displayed above the level of the parentWindow
.So in short, your solution is to add your
ContentControl
to a customWindow
and make that appear on top.