I'm displaying a few 3D-models as Model3DGroups. They are surrounded by Viewport3D which catches MouseDown-events.
I want to determine which Model3DGroup (they all have names) was clicked. I'm starting with this:
Point location = e.GetPosition(karte.ZAM3DViewport3D);
HitTestResult hitResult = VisualTreeHelper.HitTest(karte.ZAM3DViewport3D, location);
if (hitResult != null )
{
Debug.WriteLine("BREAKPOINT");
// Hit the visual.
}
After hitting the breakpoint set at the WriteLine-command I'm looking at the local-view to find the right variable but can't find it. Can you help me out which path I need to take to find the group, the modelvisual3d belongs to?
Here is a screenshot of the tree: