views:

330

answers:

1

I'm trying to hit test items within a listbox but to no avail. Is it possible? The VisualTreeHelper shows the x,y coordinates returning 0,0 for each and every item within which would seem to rule hit testing out. Does anyone know of a solution or workaround?

+1  A: 

What have you tried? Have you tried the UIElement.InputHitTest method? The VisualTreeHelper.HitTest method? Have you read through this?

Based on your question I guess you're calling VisualTreeHelper.GetOffset? If so, the offset is relative to the parent, which may very well be 0,0.

You need to give us more information with which to help you.

HTH, Kent

Kent Boogaart