コード例 #1
0
        /// <summary>
        /// Gets the start visual column from the specified text line.
        /// </summary>
        public int GetTextLineVisualStartColumn(TextLine textLine)
        {
            if (!TextLines.Contains(textLine))
            {
                throw new ArgumentException("textLine is not a line in this VisualLine");
            }

            return(TextLines.TakeWhile(tl => tl != textLine).Sum(tl => tl.Length));
        }