Esempio n. 1
0
        public override Element Hit(Vector2 point)
        {
            var hit = base.Hit(point);

            if (hit == null || hit == this)
            {
                return(hit);
            }

            if (point.Y >= 0 && point.Y <= GetPadTop() && point.X >= 0 && point.X <= width)
            {
                // Hit the title bar, don't use the hit child if it is in the Window's table.
                Element current = hit;
                while (current.GetParent() != this)
                {
                    current = current.GetParent();
                }

                if (GetCell(current) != null)
                {
                    return(this);
                }
            }

            return(hit);
        }