Ejemplo n.º 1
0
        private int?GetSeriesIndexOnPosition(double position, int headerSize, SeriesSizes series, int firstVisible)
        {
            if (position <= headerSize)
            {
                return(null);
            }
            int frozenSize = series.FrozenSize;

            if (position <= headerSize + frozenSize)
            {
                return(series.GetFrozenIndexOnPosition((int)Math.Round(position - headerSize)));
            }
            return(series.GetScrollIndexOnPosition(
                       (int)Math.Round(position - headerSize - frozenSize) + series.GetPositionByScrollIndex(firstVisible)
                       ) + series.FrozenCount);
        }