Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Mouse.DirectlyOver returns the wrong UIElement in WPF

$
0
0
Hi All,

While i try to mouse over on the "Label" element , Mouse.DirectlyOver it returns the "TextBlock" as a result. Why it happen like this?

     private void Dynamic_Design_PreviewMouseMove(object sender, MouseEventArgs e)
        {
            if(e.LeftButton == MouseButtonState.Pressed)
            {
                 var uiElement = Mouse.DirectlyOver as UIElement;
            }
        }
Any idea on this..?


Thanks,
Sowndaiyan

Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>