Ejemplo n.º 1
0
        public int RowIndexFromPoint(float y)
        {
            if (!HasVariableHeightRows)
            {
                //return (int)((y - VerticalOffset) / RowHeight + 0.5f);
                return((int)((int)(y - VerticalOffset) / RowHeight));
            }
            else
            {
                if (RowOffsets == null || RowOffsets.Count == 0)
                {
                    return(-1);
                }

                y -= VerticalOffset;
                return(RowOffsets.IndexOfElementOrSuccessor(y));
            }
        }