60 references to TrailingLength
PresentationCore (17)
MS\Internal\TextFormatting\FullTextLine.cs (6)
1010|| characterHit.TrailingLength != 0 1039characterHit.TrailingLength != 0, 1158if (caretStopIndex <= characterHit.FirstCharacterIndex && characterHit.TrailingLength != 0) 1236&& characterHit.TrailingLength == 0) 1259&& characterHit.TrailingLength == 0 2213return _cpFirst + _metrics._cchLength - characterHit.FirstCharacterIndex - characterHit.TrailingLength;
MS\Internal\TextFormatting\SimpleTextLine.cs (5)
665first += runIndex.TrailingLength; 677return new CharacterHit(first, runIndex.TrailingLength); 692return DistanceFromCp(characterHit.FirstCharacterIndex + (characterHit.TrailingLength != 0 ? 1 : 0)); 709if (characterHit.TrailingLength == 0) 745bool trailingHit = (characterHit.TrailingLength != 0);
MS\Internal\TextFormatting\TextFormatterImp.cs (1)
485ArgumentOutOfRangeException.ThrowIfNegative(characterHit.TrailingLength, nameof(cchLength));
System\Windows\Media\GlyphRun.cs (4)
497if (codePointsUntilNextStop == -1 && characterHit.TrailingLength != 0) 503int caretCodePoint = characterHit.TrailingLength == 0 ? caretStopIndex : caretStopIndex + codePointsUntilNextStop; 723if (characterHit.TrailingLength == 0) 769if (characterHit.TrailingLength != 0)
System\Windows\Media\textformatting\TextLine.cs (1)
145if (characterHit.TrailingLength == 0)
PresentationFramework (43)
MS\Internal\Documents\TextBoxView.cs (9)
888if (nextCharacterHit.FirstCharacterIndex + nextCharacterHit.TrailingLength == _lineMetrics[lineIndex].EndOffset && 902else if (nextCharacterHit.FirstCharacterIndex + nextCharacterHit.TrailingLength == _lineMetrics[lineIndex].Offset && 918logicalDirection = (nextCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 921ITextPointer nextCaretUnitPosition = _host.TextContainer.CreatePointerAtOffset(nextCharacterHit.FirstCharacterIndex + nextCharacterHit.TrailingLength, logicalDirection); 951if (backspaceCharacterHit.FirstCharacterIndex + backspaceCharacterHit.TrailingLength == _lineMetrics[lineIndex].Offset) 966logicalDirection = (backspaceCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 969ITextPointer backspaceUnitPosition = _host.TextContainer.CreatePointerAtOffset(backspaceCharacterHit.FirstCharacterIndex + backspaceCharacterHit.TrailingLength, logicalDirection); 1762logicalDirection = (charIndex.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 1765return _host.TextContainer.CreatePointerAtOffset(charIndex.FirstCharacterIndex + charIndex.TrailingLength, logicalDirection);
MS\Internal\PtsHost\Line.cs (2)
592cp = _paraClient.Paragraph.ParagraphStartCharacterPosition + charIndex.FirstCharacterIndex + charIndex.TrailingLength; 598type = position.GetPointerContext((charIndex.TrailingLength == 0) ? LogicalDirection.Forward : LogicalDirection.Backward);
MS\Internal\PtsHost\TextParaClient.cs (16)
1083int cpPosition = charHit.FirstCharacterIndex + charHit.TrailingLength; 1091LogicalDirection logicalDirection = (charHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 2662if ((nextCharacterHit.FirstCharacterIndex + nextCharacterHit.TrailingLength == lineDesc.dcpLim) && direction == LogicalDirection.Forward) 2675else if ((nextCharacterHit.FirstCharacterIndex + nextCharacterHit.TrailingLength == lineDesc.dcpFirst) && direction == LogicalDirection.Backward) 2690logicalDirection = (nextCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 2692nextCaretPosition = GetTextPosition(nextCharacterHit.FirstCharacterIndex + nextCharacterHit.TrailingLength, logicalDirection); 2825if ((nextCharacterHit.FirstCharacterIndex + nextCharacterHit.TrailingLength == element.dcpLim) && direction == LogicalDirection.Forward) 2839else if ((nextCharacterHit.FirstCharacterIndex + nextCharacterHit.TrailingLength == element.dcpFirst) && direction == LogicalDirection.Backward) 2855logicalDirection = (nextCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 2857nextCaretPosition = GetTextPosition(nextCharacterHit.FirstCharacterIndex + nextCharacterHit.TrailingLength, logicalDirection); 2932if (backspaceCharacterHit.FirstCharacterIndex + backspaceCharacterHit.TrailingLength == lineDesc.dcpFirst) 2947logicalDirection = (backspaceCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 2949backspaceCaretPosition = GetTextPosition(backspaceCharacterHit.FirstCharacterIndex + backspaceCharacterHit.TrailingLength, logicalDirection); 3058if (backspaceCharacterHit.FirstCharacterIndex + backspaceCharacterHit.TrailingLength == element.dcpFirst) 3073logicalDirection = (backspaceCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 3075backspaceCaretPosition = GetTextPosition(backspaceCharacterHit.FirstCharacterIndex + backspaceCharacterHit.TrailingLength, logicalDirection);
MS\Internal\Text\ComplexLine.cs (2)
287if (charHit.TrailingLength == 0) 555int offset = charHit.FirstCharacterIndex + charHit.TrailingLength;
System\Windows\Controls\TextBlock.cs (9)
2144logicalDirection = (charIndex.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 2145pos = _complexContent.TextContainer.Start.CreatePointer(charIndex.FirstCharacterIndex + charIndex.TrailingLength, logicalDirection); 2522if ((nextCharacterHit.FirstCharacterIndex + nextCharacterHit.TrailingLength == (dcp + GetLine(lineIndex).Length)) && direction == LogicalDirection.Forward) 2535else if ((nextCharacterHit.FirstCharacterIndex + nextCharacterHit.TrailingLength == dcp) && direction == LogicalDirection.Backward) 2550logicalDirection = (nextCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 2552ITextPointer nextCaretPosition = _complexContent.TextContainer.Start.CreatePointer(nextCharacterHit.FirstCharacterIndex + nextCharacterHit.TrailingLength, logicalDirection); 2623if (backspaceCharacterHit.FirstCharacterIndex + backspaceCharacterHit.TrailingLength == dcp) 2638logicalDirection = (backspaceCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 2640ITextPointer backspaceCaretPosition = _complexContent.TextContainer.Start.CreatePointer(backspaceCharacterHit.FirstCharacterIndex + backspaceCharacterHit.TrailingLength, logicalDirection);
System\Windows\Documents\FixedTextView.cs (4)
525if (next.TrailingLength > 0) 530int index = next.FirstCharacterIndex + next.TrailingLength; 805charIndex = hit.FirstCharacterIndex + hit.TrailingLength; 806edge = (hit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward;
System\Windows\Documents\RubberbandSelector.cs (1)
484return hit.FirstCharacterIndex + hit.TrailingLength;