I have a simple scene: There are some TextBox controls and TextBlock controls in canvas.
I want to use "HitTest" to determine which control i selected when i click mouse on the contorls.
But i only capture the TextBlock and can't capture TextBox
I add a breakpoint and find that: the type is "System.Windows.Controls.TextBoxView" which the "htr.VisualHit" return....
But I can't find the System.Windows.Controls.TextBoxView in c#
These are my code
void canvas1_PreviewMouseDown(object sender, MouseButtonEventArgs e)
VisualTreeHelper.HitTest((UIElement)sender, null, resultCallback, new PointHitTestParameters(e.GetPosition((UIElement)sender)));
HitTestResultBehavior resultCallback(HitTestResult htr)
any suggestion would be appreciated...