zzh123456789
Topic Author
Posts: 4
Joined: 04 Dec 2018, 04:26

how to know mouse/touch hit on the noesis gui?

29 Dec 2018, 16:48

I use easytouch and noesis both. when press on the gui, I want to ignore easytouch handle. but I dont know how to test if current mouse/touch hit on the noesis gui?
 
User avatar
sfernandez
Site Admin
Posts: 1574
Joined: 22 Dec 2011, 19:20

Re: how to know mouse/touch hit on the noesis gui?

31 Dec 2018, 11:30

You can use VisualTreeHelper.HitTest static method to determine if mouse/touch position is over any UI element.
HitTestResult hit = VisualTreeHelper.HitTest(VisualTreeHelper.GetRoot(anyUIElement), mousePos);
if (hit.VisualHit != null)
{
  // mouse is over a UI element
}

Who is online

Users browsing this forum: No registered users and 4 guests