Exemplo n.º 1
0
        public PointHitTestResult HitTest(Point point)
        {
            var result = new TopMostHitResult();

            VisualTreeHelper.HitTest(this, new PointHitTestParameters(point), null, result.HitTestResult);
            return(result.HitResult);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Return top most visual of a hit test.  If include2DOn3D is true we will
        /// hit test in to 2D on 3D children, otherwise we will ignore that part of 
        /// the tree.
        /// </summary>
        internal HitTestResult HitTest(Point point, bool include2DOn3D)
        {
            // 

            TopMostHitResult result = new TopMostHitResult();

            VisualTreeHelper.HitTest(
                this,
                include2DOn3D? null : new HitTestFilterCallback(result.NoNested2DFilter),
                new HitTestResultCallback(result.HitTestResult),
                new PointHitTestParameters(point));

            return result._hitResult;
        }