how do i set any control to the topmost of the screen. For e.g. i have a textblock in a datatemplate or a hierarchichal data template..etc... now i would like to set this textblock to the topmost on mouseover. Setting the Grid.ZIndex value to 1 in the trigger for IsMouseOver doesn't work many times. In order to do that i set the ZIndex value for all the contols to -1 in the window. it worked in one scenario but doesn't work other times.
If anyone can get me the details of ZIndex and how to set the control to the topmost without worrying about the other controls, it would be of great help.
Note: setting the value of ZIndex to a higher value e.g. 99999 also doesn't work.
preguntado el 09 de enero de 11 a las 10:01
ZIndex is relative to other controls in the same
Panel. A number higher than another control will ensure it appears "above" that control.
If your controls aren't all in the same
ZIndex won't help you. You may need to give more information on exactly what you're doing, but it sounds like an
Adorner will be of more use to you.