コード例 #1
0
        public bool HitTest(Point point)
        {
            if (InputPassThroughElement is object)
            {
                var hit = VisualRoot?.GetVisualAt(point, x => x != this);

                if (hit is object)
                {
                    return(!InputPassThroughElement.IsVisualAncestorOf(hit));
                }
            }

            return(true);
        }
コード例 #2
0
        public bool HitTest(Point point)
        {
            if (InputPassThroughElement is object)
            {
                var p = point.Transform(this.TransformToVisual(VisualRoot)!.Value);
                var hit = VisualRoot.GetVisualAt(p, x => x != this);

                if (hit is object)
                {
                    return !InputPassThroughElement.IsVisualAncestorOf(hit);
                }
            }

            return true;
        }