コード例 #1
0
        bool MoveToNextTextRun()
        {
#if DEBUG
            if (currentTextRun.IsLineBreak)
            {
                throw new NotSupportedException();
            }
#endif


            EditableRun nextTextRun = currentTextRun.NextTextRun;
            if (nextTextRun != null && !nextTextRun.IsLineBreak)
            {
                rCharOffset   += currentTextRun.CharacterCount;
                rPixelOffset  += currentTextRun.Width;
                currentTextRun = nextTextRun;
                charIndex      = rCharOffset;
                caretXPos      = rPixelOffset + currentTextRun.GetCharWidth(0);

                return(true);
            }
            return(false);
        }