コード例 #1
0
        /// <summary>
        /// Updates the linesize for visible lines to be "1" for LineScrollAxis
        /// </summary>
        private void UpdateDistances()
        {
            int repeatSizeCount;

            for (int index = 0; index < LineCount; index++)
            {
                bool hide    = ScrollLinesHost.GetHidden(index, out repeatSizeCount);
                var  value   = hide == true ? 0 : 1.0;
                int  rangeTo = GetRangeToHelper(index, LineCount - 1, repeatSizeCount);
                distances.SetRange(index, rangeTo, value);
                index = rangeTo;
            }
        }
コード例 #2
0
        /// <summary>
        /// Called when lines were removed in ScrollLinesHost.
        /// </summary>
        /// <param name="removeAt">Index of the first removed line.</param>
        /// <param name="count">The count.</param>
        //protected override void OnLinesRemoved(int removeAt, int count)
        //{
        //    distances.Remove(removeAt, count);
        //}

        /// <summary>
        /// Called when lines were inserted in ScrollLinesHost.
        /// </summary>
        /// <param name="insertAt">Index of the first inserted line.</param>
        /// <param name="count">The count.</param>
        protected override void OnLinesInserted(int insertAt, int count)
        {
            ////distances.Insert(insertAt, count);
            int to = insertAt + count - 1;
            int repeatSizeCount;

            for (int index = insertAt; index <= to; index++)
            {
                bool hide    = ScrollLinesHost.GetHidden(index, out repeatSizeCount);
                var  value   = hide == true ? 0 : 1.0;
                int  rangeTo = GetRangeToHelper(index, to, repeatSizeCount);
                distances.SetRange(index, rangeTo, value);
                index = rangeTo;
            }

            //if (distances != null)
            //    DistancesUtil.OnInserted(distances, ScrollLinesHost, insertAt, count);
        }