WPF,XAML: How to set the ZIndex of a particular control to the topmost.

Posted by Sudhakar Singh on Stack Overflow See other posts from Stack Overflow or by Sudhakar Singh
Published on 2011-01-09T10:27:27Z Indexed on 2011/01/09 10:53 UTC
Read the original article Hit count: 261

Filed under:
|

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.

© Stack Overflow or respective owner

Related posts about wpf

Related posts about xaml