I know itβs rather late to answer this, but here we are talking about: another approach is to override HitTestCore in UserControl and provide it with the default behavior that you would expect from it:
protected override System.Windows.Media.HitTestResult HitTestCore(System.Windows.Media.PointHitTestParameters hitTestParameters) { return new PointHitTestResult(this, hitTestParameters.HitPoint); }
(of course, you could complicate the situation and try out actual children or a combination of your bounding boxes, but for me the bounding box of the user control was good enough, and if you want to test against geometry you also need to override this second overload.)
This makes it work as early as possible, filtering out the children when using HitTestFilterBehavior.ContinueSkipChildren in the filter.
source share