If I have a Usercontrol
, which is overlayed by another control (a Grid
for example), is there an event or trigger to find out that the UserControl
is currently covered by something? Maybe an event from VisualTree or some kind of listener?
Asked
Active
Viewed 135 times
0

Johannes Wanzek
- 2,825
- 2
- 29
- 47
-
You can use Panel.ZIndex property to place UserControl on top. http://stackoverflow.com/questions/5450985/how-to-make-overlay-control-above-all-other-controls – Alex Erygin May 23 '14 at 09:26
-
I don't want to place the UserControl on top, I want an event if the UserControl is covered by another control. – Johannes Wanzek May 23 '14 at 09:32
-
Can you use Panel.GetZIndex? Also, what action would your code perform in response to the event? – Jamleck May 23 '14 at 09:37
-
No this whon't work I think. Im trying to solve the Airspace Problem when using a HWND. I think a possible Solution would be to detect if the control is covered somehow and then show a Bitmap Image instead. – Johannes Wanzek May 23 '14 at 09:57