예제 #1
0
        /// <summary>
        /// Indicates whether a mouse click at the specified point should be handled by the control.
        /// </summary>
        /// <param name="point">A Point indicating the position at which the mouse was clicked, in screen coordinates.</param>
        /// <returns>true if a click at the specified point is to be handled by the control; otherwise, false.</returns>
        protected override bool GetHitTest(Point point)
        {
            if (_header != null)
            {
                // Ask the control if it wants to process the point
                bool ret = _header.DesignerGetHitTest(_header.PointToClient(point));

                // If the navigator does not want the mouse point then make sure the
                // tracking element is informed that the mouse has left the control
                if (!ret && _lastHitTest)
                {
                    _header.DesignerMouseLeave();
                }

                // Cache the last answer recovered
                _lastHitTest = ret;

                return(ret);
            }
            else
            {
                return(false);
            }
        }
        /// <summary>
        /// Receives a call when the mouse leaves the control.
        /// </summary>
        protected override void OnMouseLeave()
        {
            _header?.DesignerMouseLeave();

            base.OnMouseLeave();
        }