548 references to Backward
PresentationFramework (545)
MS\Internal\Annotations\Anchoring\FixedTextSelectionProcessor.cs (3)
103ITextPointer endPointer = segment.End.CreatePointer(LogicalDirection.Backward); 568if (!end.IsAtInsertionPosition && !end.MoveToNextInsertionPosition(LogicalDirection.Backward)) 603end = textView.TextSegments[textView.TextSegments.Count - 1].End.CreatePointer(LogicalDirection.Backward);
MS\Internal\Annotations\Anchoring\TextSelectionHelper.cs (1)
424ITextPointer end = segment.End.CreatePointer(LogicalDirection.Backward);
MS\Internal\Annotations\Component\AnnotationHighlightLayer.cs (6)
246((highlightSegment.Segment.Start.CompareTo(textPosition) == 0) && (direction == LogicalDirection.Backward))) 253((highlightSegment.Segment.End.CompareTo(textPosition) == 0) && (direction == LogicalDirection.Backward))) 766((ps.CompareTo(_segment.End) == 0) && (side == LogicalDirection.Backward))) 828IList<HighlightSegment> r2 = r1[i].Split(ps2, LogicalDirection.Backward); 845res = Split(ps2, LogicalDirection.Backward); 1073ITextPointer segmentEnd = cursor.GetInsertionPosition(LogicalDirection.Backward);
MS\Internal\Annotations\Component\MarkedHighlightComponent.cs (4)
662ITextPointer end = anchor.End.CreatePointer(LogicalDirection.Backward); 827nextPointer = nextPointer.CreatePointer(direction == LogicalDirection.Backward ? LogicalDirection.Forward : LogicalDirection.Backward); 858if (direction == LogicalDirection.Backward)
MS\Internal\Annotations\TextAnchor.cs (5)
118textPointer = textPointer.GetInsertionPosition(LogicalDirection.Backward); 222(theirSegment.End.LogicalDirection == LogicalDirection.Backward)) 671end = end.GetInsertionPosition(LogicalDirection.Backward); 678if (start.LogicalDirection == LogicalDirection.Backward) 681start = end.GetFrozenPointer(LogicalDirection.Backward);
MS\Internal\Documents\TableTextElementCollectionInternal.cs (2)
153TextPointer startPosition = new TextPointer(item.TextContainer, item.TextElementNode, ElementEdge.BeforeStart, LogicalDirection.Backward); 154TextPointer endPosition = new TextPointer(item.TextContainer, item.TextElementNode, ElementEdge.AfterEnd, LogicalDirection.Backward);
MS\Internal\Documents\TextBoxLine.cs (3)
112ITextPointer position = _owner.Host.TextContainer.CreatePointerAtOffset(dcp, LogicalDirection.Backward); 117int runLength = Math.Min(128, position.GetTextRunLength(LogicalDirection.Backward)); 119position.GetTextInRun(LogicalDirection.Backward, text, 0, runLength);
MS\Internal\Documents\TextBoxView.cs (27)
631if (offset > 0 && position.LogicalDirection == LogicalDirection.Backward) 662if (position.LogicalDirection == LogicalDirection.Backward && position.Offset > 0) 704lastLineIndex = Math.Min(lastLineIndex, GetLineIndexFromOffset(endOffset, LogicalDirection.Backward)); 743ITextPointer endOfLinePosition = _host.TextContainer.CreatePointerAtOffset(_lineMetrics[lineIndex].EndOffset, LogicalDirection.Backward); 744if (TextPointerBase.IsNextToPlainLineBreak(endOfLinePosition, LogicalDirection.Backward)) 827else if (position.LogicalDirection == LogicalDirection.Backward) 858if (position.Offset == 0 && direction == LogicalDirection.Backward) 864return position.GetFrozenPointer(LogicalDirection.Backward); 895logicalDirection = LogicalDirection.Backward; 903direction == LogicalDirection.Backward) 913logicalDirection = LogicalDirection.Backward; 918logicalDirection = (nextCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 940int lineIndex = GetLineIndexFromPosition(position, LogicalDirection.Backward); 961logicalDirection = LogicalDirection.Backward; 966logicalDirection = (backspaceCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 1307ITextPointer start = _host.TextContainer.CreatePointerAtOffset(_lineMetrics[0].Offset, LogicalDirection.Backward); 1710if (offset > 0 && direction == LogicalDirection.Backward) 1762logicalDirection = (charIndex.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 1939int lastLineIndex = GetLineIndexFromOffset(endOffset, LogicalDirection.Backward); 2059ITextPointer position = _host.TextContainer.CreatePointerAtOffset(unclippedStartOffset, LogicalDirection.Backward); 2060if (TextPointerBase.IsNextToPlainLineBreak(position, LogicalDirection.Backward)) 2104ITextPointer endOfLinePosition = _host.TextContainer.CreatePointerAtOffset(endOffset, LogicalDirection.Backward); 2106if (TextPointerBase.IsNextToPlainLineBreak(endOfLinePosition, LogicalDirection.Backward)) 2155ITextPointer position = _host.TextContainer.CreatePointerAtOffset(unclippedStartOffset, LogicalDirection.Backward); 2156if (TextPointerBase.IsNextToPlainLineBreak(position, LogicalDirection.Backward)) 2183ITextPointer endOfLinePosition = _host.TextContainer.CreatePointerAtOffset(endOffset, LogicalDirection.Backward); 2185if (TextPointerBase.IsNextToPlainLineBreak(endOfLinePosition, LogicalDirection.Backward))
MS\Internal\Documents\TextContainerHelper.cs (7)
93_textContainer.CreatePointerAtOffset(_cpLast, LogicalDirection.Backward), 103_textContainer.CreatePointerAtOffset(_ranges[i * 2 + 1], LogicalDirection.Backward), 121if (cpPos == _cpFirst && position.LogicalDirection == LogicalDirection.Backward || 138if (cpPos == _ranges[i * 2] && position.LogicalDirection == LogicalDirection.Backward || 169endPosition = _textContainer.CreatePointerAtOffset(IsSimple ? _cpLast : _ranges[(_size - 1) * 2 + 1], LogicalDirection.Backward); 460element = position.GetAdjacentElement(LogicalDirection.Backward); 464positionsEnd.Insert(0, position.CreatePointer(LogicalDirection.Backward));
MS\Internal\Documents\TextDocumentView.cs (10)
489if (segment.Start.LogicalDirection == LogicalDirection.Backward) 498if (position.LogicalDirection == LogicalDirection.Backward) 521if (position.TextContainer.Start.CompareTo(position) == 0 && position.LogicalDirection == LogicalDirection.Backward) 768position = paragraph.EndPosition.CreatePointer(LogicalDirection.Backward); 871position = blockUIContainer.ContentEnd.CreatePointer(LogicalDirection.Backward); 885position = paragraph.EndPosition.CreatePointer(LogicalDirection.Backward); 2371lineRange = new TextSegment(blockUIContainer.ContentStart.CreatePointer(LogicalDirection.Forward), blockUIContainer.ContentEnd.CreatePointer(LogicalDirection.Backward)); 2875positionOut = blockUIContainer.ContentEnd.CreatePointer(LogicalDirection.Backward); 3253segmentEnd = _textContainer.Start.CreatePointer(backgroundFormatInfo.CPInterrupted, LogicalDirection.Backward); 3451if (textPointer.LogicalDirection == LogicalDirection.Backward && textPointer.CompareTo(textElement.ElementEnd) == 0)
MS\Internal\Documents\TextParagraphView.cs (2)
404if (position.LogicalDirection == LogicalDirection.Backward && lineIndex != 0) 416( position.LogicalDirection == LogicalDirection.Backward ||
MS\Internal\PtsHost\Line.cs (3)
194while (position.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.Text && 203string precedingTextString = position.GetTextInRun(LogicalDirection.Backward); 598type = position.GetPointerContext((charIndex.TrailingLength == 0) ? LogicalDirection.Forward : LogicalDirection.Backward);
MS\Internal\PtsHost\OptimalTextSource.cs (2)
142while (position.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.Text && 151string precedingTextString = position.GetTextInRun(LogicalDirection.Backward);
MS\Internal\PtsHost\TextParaClient.cs (21)
679if (position.LogicalDirection == LogicalDirection.Backward && dcp > 0) 1091LogicalDirection logicalDirection = (charHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 1697if (orientation == LogicalDirection.Backward && originalDcp > 0 && (context == TextPointerContext.Text || context == TextPointerContext.EmbeddedElement)) 1791if (orientation == LogicalDirection.Backward && originalDcp > 0 && (context == TextPointerContext.Text || context == TextPointerContext.EmbeddedElement)) 2036return (TextPointerBase.IsNextToAnyBreak(position, LogicalDirection.Backward)); 2398if (position.LogicalDirection == LogicalDirection.Backward) 2501if (position.LogicalDirection == LogicalDirection.Backward) 2608if (dcp == lineDesc.dcpFirst && direction == LogicalDirection.Backward) 2668logicalDirection = LogicalDirection.Backward; 2675else if ((nextCharacterHit.FirstCharacterIndex + nextCharacterHit.TrailingLength == lineDesc.dcpFirst) && direction == LogicalDirection.Backward) 2685logicalDirection = LogicalDirection.Backward; 2690logicalDirection = (nextCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 2742if (dcp == element.dcpFirst && direction == LogicalDirection.Backward) 2831logicalDirection = LogicalDirection.Backward; 2839else if ((nextCharacterHit.FirstCharacterIndex + nextCharacterHit.TrailingLength == element.dcpFirst) && direction == LogicalDirection.Backward) 2850logicalDirection = LogicalDirection.Backward; 2855logicalDirection = (nextCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 2942logicalDirection = LogicalDirection.Backward; 2947logicalDirection = (backspaceCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 3068logicalDirection = LogicalDirection.Backward; 3073logicalDirection = (backspaceCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward;
MS\Internal\PtsHost\TextParagraph.cs (2)
570StructuralCache.CurrentFormatContext.DependentMax = StructuralCache.TextContainer.CreatePointerAtOffset(dcpDependAbsolute, LogicalDirection.Backward); 751StructuralCache.CurrentFormatContext.DependentMax = StructuralCache.TextContainer.CreatePointerAtOffset(dcpDependAbsolute, LogicalDirection.Backward);
MS\Internal\PtsHost\TextParaLineResult.cs (2)
109return _owner.GetTextPosition(_dcp + _cchContent, LogicalDirection.Backward); 188_endPosition = _owner.GetTextPosition(_dcp + _cch, LogicalDirection.Backward);
MS\Internal\Text\ComplexLine.cs (4)
89ITextPointer position = _owner.TextContainer.CreatePointerAtOffset(dcp, LogicalDirection.Backward); 92while (position.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.Text && 100string precedingTextString = position.GetTextInRun(LogicalDirection.Backward); 295type = position.GetPointerContext(LogicalDirection.Backward);
MS\Internal\Text\TextLineResult.cs (2)
102return _owner.TextContainer.CreatePointerAtOffset(_dcp + _cchContent, LogicalDirection.Backward); 185_endPosition = _owner.TextContainer.CreatePointerAtOffset(_dcp + _cch, LogicalDirection.Backward);
System\Windows\Annotations\AnnotationHelper.cs (2)
673start.MoveToNextInsertionPosition(LogicalDirection.Backward); 858(selection.End.LogicalDirection == LogicalDirection.Backward)))
System\Windows\Controls\PasswordTextContainer.cs (5)
514return new PasswordTextPointer(this, LogicalDirection.Backward, 0); 740if (position.LogicalDirection == LogicalDirection.Backward) 818(position.LogicalDirection == gravity || gravity == LogicalDirection.Backward)) 842lastLogicalDirection = LogicalDirection.Backward; 854position.LogicalDirection == LogicalDirection.Backward &&
System\Windows\Controls\PasswordTextNavigator.cs (2)
138if ((direction == LogicalDirection.Backward && _offset == 0) || 425if (direction == LogicalDirection.Backward)
System\Windows\Controls\TextAdaptor.cs (4)
116TextRangeAdaptor.MoveToInsertionPosition(end, LogicalDirection.Backward); 276FrameworkContentElement element = pointer.GetAdjacentElement(LogicalDirection.Backward) as FrameworkContentElement; 622rangeEnd = position.CreatePointer(LogicalDirection.Backward); 632rangeEnd = position.CreatePointer(LogicalDirection.Backward);
System\Windows\Controls\TextBlock.cs (12)
2144logicalDirection = (charIndex.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 2176if (orientedPosition.LogicalDirection == LogicalDirection.Backward && characterIndex > 0) 2244if (orientedPosition.LogicalDirection == LogicalDirection.Backward && originalCharacterIndex > 0) 2337&& TextPointerBase.IsNextToAnyBreak(endOfLineTextPointer, LogicalDirection.Backward)) 2388if (position.LogicalDirection == LogicalDirection.Backward) 2455if (characterIndex == dcp && direction == LogicalDirection.Backward) 2528logicalDirection = LogicalDirection.Backward; 2535else if ((nextCharacterHit.FirstCharacterIndex + nextCharacterHit.TrailingLength == dcp) && direction == LogicalDirection.Backward) 2545logicalDirection = LogicalDirection.Backward; 2550logicalDirection = (nextCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 2633logicalDirection = LogicalDirection.Backward; 2638logicalDirection = (backspaceCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward;
System\Windows\Controls\TextBox.cs (5)
216return (textPointer.LogicalDirection == LogicalDirection.Backward) ? offset - 1 : offset; 439TextPointer textPointer = TextContainer.CreatePointerAtOffset(charIndex, LogicalDirection.Backward); 440textPointer = textPointer.GetInsertionPosition(LogicalDirection.Backward); 449textPointer = textPointer.GetPositionAtOffset(0, LogicalDirection.Backward); 485spellingError = this.TextEditor.GetSpellingErrorAtPosition(position, LogicalDirection.Backward);
System\Windows\Controls\TextRangeAdaptor.cs (29)
528TextPointerBase.MoveToNextInsertionPosition(_start, LogicalDirection.Backward); 539MoveToNextWordBoundary(_start, LogicalDirection.Backward); 556TextPointerContext backwardContext = _start.GetPointerContext(LogicalDirection.Backward); 564_start.MoveToNextContextPosition(LogicalDirection.Backward); 570TextPointerContext backwardContext = _end.GetPointerContext(LogicalDirection.Backward); 814position.SetLogicalDirection(isStart ? LogicalDirection.Forward : LogicalDirection.Backward); 836previousLineEnd = GetInsertionPosition(previousLineEnd, LogicalDirection.Backward); 841position.SetLogicalDirection(isStart ? LogicalDirection.Forward : LogicalDirection.Backward); 871position.SetLogicalDirection(isStart ? LogicalDirection.Forward : LogicalDirection.Backward); 882if (previousParagraphEnd.MoveToNextInsertionPosition(LogicalDirection.Backward)) 892position.SetLogicalDirection(isStart ? LogicalDirection.Forward : LogicalDirection.Backward); 939if (position.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.ElementStart) 945Invariant.Assert(position.MoveToNextContextPosition(LogicalDirection.Backward)); 947MoveToInsertionPosition(position, LogicalDirection.Backward); 956if (position.CompareTo(GetInsertionPosition(position.TextContainer.End, LogicalDirection.Backward)) != 0) 994LogicalDirection direction = (count > 0) ? LogicalDirection.Forward : LogicalDirection.Backward; 1051if (direction == LogicalDirection.Backward) 1053while (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.Text) 1055if (!position.MoveToNextContextPosition(LogicalDirection.Backward)) 1092position.MoveToNextInsertionPosition(LogicalDirection.Backward); 1143if (direction == LogicalDirection.Backward) 1146MoveToInsertionPosition(position, LogicalDirection.Backward); 1218while (IsElementBoundary(end.GetPointerContext(LogicalDirection.Backward))) 1220if (!end.MoveToNextContextPosition(LogicalDirection.Backward) || start.CompareTo(end) >= 0) 1673ITextPointer position = _end.CreatePointer(LogicalDirection.Backward); 1684attrEnd = position.CreatePointer(LogicalDirection.Backward); 1695if (!position.MoveToNextContextPosition(LogicalDirection.Backward)) 1722attrEnd = position.CreatePointer(LogicalDirection.Backward); 1947if (MoveToUnitBoundary(position, start, count < 0 ? LogicalDirection.Backward : LogicalDirection.Forward, unit))
System\Windows\Documents\CompositionAdorner.cs (3)
328ITextPointer rangeEnd = end.CreatePointer(LogicalDirection.Backward); 485ITextPointer end = _textView.TextContainer.Start.CreatePointer(_endOffset, LogicalDirection.Backward); 606endLinePointer = textSegment.End.CreatePointer(LogicalDirection.Backward);
System\Windows\Documents\DocumentSequenceTextPointer.cs (6)
359if (!isAtCaretUnitBoundary && ((ITextPointer)this).LogicalDirection == LogicalDirection.Backward) 888Debug.Assert(direction == LogicalDirection.Backward); 965tp2.ChildPointer.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.None) 1029LogicalDirection scanDir = (distance > 0 ? LogicalDirection.Forward : LogicalDirection.Backward); 1057if (scanDir == LogicalDirection.Backward) 1065if (!((cdb.IsHead && scanDir == LogicalDirection.Backward)
System\Windows\Documents\FixedFindEngine.cs (6)
151end = new DocumentSequenceTextPointer(childBlock, new FixedTextPointer(false, LogicalDirection.Backward, fixedDoc.FixedContainer.FixedTextBuilder.GetPageEndFlowPosition(translatedPageNumber))); 157end = new DocumentSequenceTextPointer(childBlock, new FixedTextPointer(false, LogicalDirection.Backward, fixedDoc.FixedContainer.FixedTextBuilder.GetPageEndFlowPosition(translatedPageNumber))); 166end = new FixedTextPointer(false, LogicalDirection.Backward, textBuilder.GetPageEndFlowPosition(pageNumber)); 172end = new FixedTextPointer(false, LogicalDirection.Backward, textBuilder.GetPageEndFlowPosition(pageNumber)); 324new FixedTextPointer(false, LogicalDirection.Backward, pageEndFlowPosition)); 330firstSearchPageEnd = new FixedTextPointer(false, LogicalDirection.Backward, startAsFTP.FixedTextContainer.FixedTextBuilder.GetPageEndFlowPosition(pageNumber));
System\Windows\Documents\FixedTextBuilder.cs (1)
421textdir == LogicalDirection.Backward &&
System\Windows\Documents\FixedTextContainer.cs (2)
569_start = new FixedTextPointer(false, LogicalDirection.Backward, new FlowPosition(this, this.FixedTextBuilder.FixedFlowMap.FlowStartEdge, 1)); 579FixedTextPointer eStart = new FixedTextPointer(false, LogicalDirection.Backward, pStart);
System\Windows\Documents\FixedTextPointer.cs (1)
569if (!isAtCaretUnitBoundary && this.LogicalDirection == LogicalDirection.Backward)
System\Windows\Documents\FixedTextView.cs (12)
75textPos = _CreateTextPointer(fixedp, LogicalDirection.Backward); 357scanDir = LogicalDirection.Backward; 396if (scanDir == LogicalDirection.Backward) 527edge = LogicalDirection.Backward; 606ITextPointer end = _CreateTextPointer(new FixedPosition(lastNode, lastIndex), LogicalDirection.Backward); 639(tp.CompareTo(this.End) == 0 && (tp.LogicalDirection == LogicalDirection.Backward || this.IsContainerEnd)) 746_end = new FixedTextPointer(false, LogicalDirection.Backward, flowEnd); 806edge = (hit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 868itp = ((ITextPointer)this.End).CreatePointer(LogicalDirection.Backward); 869itp.MoveToInsertionPosition(LogicalDirection.Backward); 1093textdir = LogicalDirection.Backward; 1134dir = LogicalDirection.Backward;
System\Windows\Documents\FlowPosition.cs (8)
174Debug.Assert(dir == LogicalDirection.Forward || dir == LogicalDirection.Backward); 285(tst = flowScan.GetPointerContext(LogicalDirection.Backward))!= TextPointerContext.None) 291FlowPosition flowEnd = flowScan.GetClingPosition(LogicalDirection.Backward); 301flowScan.Move(LogicalDirection.Backward); 310LogicalDirection dir = (distance >= 0 ? LogicalDirection.Forward : LogicalDirection.Backward); 424Debug.Assert(dir == LogicalDirection.Backward); 582Debug.Assert(dir == LogicalDirection.Backward); 632Debug.Assert(dir == LogicalDirection.Backward);
System\Windows\Documents\FrameworkRichTextComposition.cs (2)
45return _ResultStart == null ? null : (TextPointer)_ResultStart.GetFrozenPointer(LogicalDirection.Backward); 67return _CompositionStart == null ? null : (TextPointer)_CompositionStart.GetFrozenPointer(LogicalDirection.Backward);
System\Windows\Documents\FrameworkTextComposition.cs (2)
195_resultStart = start.GetFrozenPointer(LogicalDirection.Backward); 216_compositionStart = start.GetFrozenPointer(LogicalDirection.Backward);
System\Windows\Documents\ImmComposition.cs (11)
633ITextPointer endPosition = endNavigator.CreatePointer(LogicalDirection.Backward); 754rectCaret = view.GetRectangleFromTextPosition(_editor.Selection.End.CreatePointer(LogicalDirection.Backward)); 1167ITextPointer startAttribute = _startComposition.CreatePointer(startOffset, LogicalDirection.Backward); 1398switch (navigator.GetPointerContext(LogicalDirection.Backward)) 1402int copied = navigator.GetTextInRun(LogicalDirection.Backward, buffer, 0, buffer.Length); 1416if (!navigator.GetElementType(LogicalDirection.Backward).IsSubclassOf(typeof(Inline))) 1420navigator.MoveToNextContextPosition(LogicalDirection.Backward); 1429navigator.MoveToNextContextPosition(LogicalDirection.Backward); 1522ITextPointer start = range.Start.CreatePointer(LogicalDirection.Backward); 1549switch (position.GetPointerContext(LogicalDirection.Backward)) 1656positionNext.MoveToNextInsertionPosition(LogicalDirection.Backward);
System\Windows\Documents\List.cs (1)
250listItem = block.ElementStart.GetAdjacentElement(LogicalDirection.Backward) as ListItem;
System\Windows\Documents\NullTextContainer.cs (1)
35_start = new NullTextPointer(this, LogicalDirection.Backward);
System\windows\Documents\SelectionWordBreaker.cs (1)
53if (insideWordDirection == LogicalDirection.Backward)
System\Windows\Documents\Span.cs (2)
223if (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 225position = position.GetNextContextPosition(LogicalDirection.Backward);
System\Windows\Documents\Speller.cs (17)
190ExpandToWordBreakAndContext(error.Start, LogicalDirection.Backward, language, out ITextPointer contentStart, out ITextPointer contextStart); 707wordBreakLeft = SearchForWordBreaks(caretPosition, LogicalDirection.Backward, language, 1, false /* stopOnError */); 723FindPositionInSegmentList(textMap, LogicalDirection.Backward, segments, out leftBreakOffset, out rightBreakOffset); 793ExpandToWordBreakAndContext(start, LogicalDirection.Backward, language, out contentStart, out contextStart); 1121inwardDirection = direction == LogicalDirection.Forward ? LogicalDirection.Backward : LogicalDirection.Forward; 1127if (direction == LogicalDirection.Backward) 1162if (direction == LogicalDirection.Backward) 1179if (direction == LogicalDirection.Backward) 1206if (direction == LogicalDirection.Backward) 1294if (direction == LogicalDirection.Backward) 1341searchPosition.MoveByOffset(direction == LogicalDirection.Backward ? -ContextBlockSize : +ContextBlockSize); 1346if (direction == LogicalDirection.Backward && closestErrorPosition.CompareTo(searchPosition) > 0 || 1357if (direction == LogicalDirection.Backward && closestLanguageTransition.CompareTo(searchPosition) > 0 || 1364if (direction == LogicalDirection.Backward) 1392(direction == LogicalDirection.Backward && navigator.CompareTo(haltPosition) > 0)) 1402(direction == LogicalDirection.Backward && navigator.CompareTo(haltPosition) < 0)) 1658_basePosition = contextStart.GetFrozenPointer(LogicalDirection.Backward);
System\Windows\Documents\SpellerError.cs (1)
34_end = end.GetFrozenPointer(LogicalDirection.Backward);
System\Windows\Documents\SpellerStatusTable.cs (6)
349direction == LogicalDirection.Backward && position.CompareTo(run.Position) <= 0) 355direction == LogicalDirection.Backward && position.CompareTo(GetRunEndPosition(index)) > 0) 392endIndex = FindIndex(end.CreateStaticPointer(), LogicalDirection.Backward); 427endIndex = FindIndex(end.CreateStaticPointer(), LogicalDirection.Backward); 592index = FindIndex(position.CreateStaticPointer(), LogicalDirection.Backward); 799_position = position.GetFrozenPointer(LogicalDirection.Backward);
System\Windows\Documents\TextContainer.cs (11)
518edge = node.GetEdgeFromOffset(nodeOffset, LogicalDirection.Backward); 630edge = (direction == LogicalDirection.Backward) ? ElementEdge.AfterStart : ElementEdge.BeforeEnd; 641edge = (direction == LogicalDirection.Backward) ? ElementEdge.BeforeStart : ElementEdge.AfterEnd; 652edge = node.GetEdgeFromOffset(nodeOffset, LogicalDirection.Backward); 858originalPosition = this.HasListeners ? new TextPointer(position, LogicalDirection.Backward) : null; 870direction = LogicalDirection.Backward; 883if ((direction == LogicalDirection.Backward && textNode.AfterEndReferenceCount) || 1592if (!_rootNode.CaretUnitBoundaryCache && position.LogicalDirection == LogicalDirection.Backward) 1635startPosition = new TextPointer(this, _rootNode, ElementEdge.AfterStart, LogicalDirection.Backward); 2788startPosition = new TextPointer(this, elementNode, ElementEdge.BeforeStart, LogicalDirection.Backward); 2793endPosition = new TextPointer(this, elementNode, ElementEdge.AfterEnd, LogicalDirection.Backward);
System\windows\Documents\TextEditor.cs (2)
1209string textAdjacent = textContainer.TextSelection.AnchorPosition.GetTextInRun(LogicalDirection.Backward); 1510lastCharacterRect = cursorPosition.GetCharacterRect(LogicalDirection.Backward);
System\windows\Documents\TextEditorContextMenu.cs (1)
181direction = LogicalDirection.Backward;
System\windows\Documents\TextEditorCopyPaste.cs (2)
398This.Selection.SetCaretToPosition(This.Selection.End, LogicalDirection.Backward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/true); 951start = start.GetPositionAtOffset(0, LogicalDirection.Backward);
System\windows\Documents\TextEditorDragDrop.cs (2)
548selection.SetCaretToPosition(dropPosition, LogicalDirection.Backward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/true); 576selection.SetCaretToPosition(dropPosition, LogicalDirection.Backward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/true);
System\windows\Documents\TextEditorMouse.cs (2)
565Rect lastCharacterRect = snappedCursorPosition.GetCharacterRect(LogicalDirection.Backward); 736LogicalDirection.Backward : LogicalDirection.Forward;
System\windows\Documents\TextEditorSelection.cs (35)
115ITextPointer lineEnd = position.CreatePointer(LogicalDirection.Backward); 188LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Backward : LogicalDirection.Forward; 204LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Forward : LogicalDirection.Backward; 221LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Backward : LogicalDirection.Forward; 237LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Forward : LogicalDirection.Backward; 403ITextPointer previousPosition = lineStartPosition.GetNextInsertionPosition(LogicalDirection.Backward); 468This.Selection.SetCaretToPosition(paragraphRange.Start, LogicalDirection.Backward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false); 473This.Selection.SetCaretToPosition(paragraphRange.End, LogicalDirection.Backward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false); 517This.Selection.SetCaretToPosition(paragraphRange.Start, LogicalDirection.Backward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false); 522if (movingPointer.MoveToNextInsertionPosition(LogicalDirection.Backward)) 526This.Selection.SetCaretToPosition(paragraphRange.Start, LogicalDirection.Backward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false); 852LogicalDirection orientation = TextPointerBase.IsNextToPlainLineBreak(lineRange.End, LogicalDirection.Backward) ? LogicalDirection.Forward : LogicalDirection.Backward; 915This.Selection.SetCaretToPosition(This.TextContainer.End, LogicalDirection.Backward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false); 946LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Backward : LogicalDirection.Forward; 962LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Forward : LogicalDirection.Backward; 978LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Backward : LogicalDirection.Forward; 994LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Forward : LogicalDirection.Backward; 1142newMovingPosition = newMovingPosition.GetFrozenPointer(LogicalDirection.Backward); 1184if (This.Selection.ExtendToNextTableRow(LogicalDirection.Backward)) 1260ITextPointer previousPosition = lineStartPosition.GetNextInsertionPosition(LogicalDirection.Backward); 1369if (movingPointer.MoveToNextInsertionPosition(LogicalDirection.Backward)) 1670TextPointerBase.IsNextToParagraphBreak(This.Selection.AnchorPosition, LogicalDirection.Backward)) 1688destination = destination.GetFrozenPointer(LogicalDirection.Backward); 2067LogicalDirection contentDirection = direction == LogicalDirection.Forward ? LogicalDirection.Backward : LogicalDirection.Forward; 2121textEditor.Selection.SetCaretToPosition(textEditor.Selection.End, LogicalDirection.Backward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false); 2130textEditor.Selection.SetCaretToPosition(wordBoundary, LogicalDirection.Backward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false); 2148TextPointerBase.MoveToNextWordBoundary(wordBoundary, LogicalDirection.Backward); 2194wordBoundary.SetLogicalDirection(direction == LogicalDirection.Forward ? LogicalDirection.Backward : LogicalDirection.Forward); 2306movingPosition.LogicalDirection == LogicalDirection.Backward && 2308TextPointerBase.IsNextToAnyBreak(movingPosition, LogicalDirection.Backward)) 2310movingPosition = movingPosition.GetNextInsertionPosition(LogicalDirection.Backward); 2314if (TextPointerBase.IsNextToPlainLineBreak(movingPosition, LogicalDirection.Backward)) 2396ITextPointer position = This.Selection.Start.GetNextInsertionPosition(LogicalDirection.Backward); 2412ITextPointer cellEnd = position.GetNextInsertionPosition(LogicalDirection.Backward);
System\windows\Documents\TextEditorSpelling.cs (7)
67direction = (direction == LogicalDirection.Forward) ? LogicalDirection.Backward : LogicalDirection.Forward; 82direction = (direction == LogicalDirection.Forward) ? LogicalDirection.Backward : LogicalDirection.Forward; 91direction = LogicalDirection.Backward; 184textStart = spellingError.Start.CreatePointer(LogicalDirection.Backward); 192textEnd.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.Text) 194textEnd.MoveToNextContextPosition(LogicalDirection.Backward); 202Invariant.Assert(textEnd.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.Text &&
System\windows\Documents\TextEditorTyping.cs (22)
620ITextPointer deletePosition = position.GetNextInsertionPosition(LogicalDirection.Backward); 645position = position.GetFrozenPointer(LogicalDirection.Backward); 652position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.Text) 674This.Selection.ExtendToNextInsertionPosition(LogicalDirection.Backward); 682else if (backspacePosition.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.Text) 691This.Selection.ExtendToNextInsertionPosition(LogicalDirection.Backward); 723This.Selection.SetCaretToPosition(position, LogicalDirection.Backward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/true); 739LogicalDirection directionOfDelete = position.CompareTo(deletePosition) < 0 ? LogicalDirection.Forward : LogicalDirection.Backward; 773if (directionOfDelete == LogicalDirection.Backward) 810position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 816while (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 823position = position.GetNextContextPosition(LogicalDirection.Backward); 824if (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 832position = position.GetNextContextPosition(LogicalDirection.Backward); 843if (position.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.ElementStart) 857while (navigator.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 864if (!(navigator.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 972TextPointerBase.MoveToNextWordBoundary(wordBoundary, LogicalDirection.Backward); 1376if (HandleTabInTables(This, LogicalDirection.Backward)) 1408This.Selection.SetCaretToPosition(This.Selection.Start, LogicalDirection.Backward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false); 1556ITextPointer caretPosition = This.Selection.End.CreatePointer(LogicalDirection.Backward); 1559This.Selection.SetCaretToPosition(caretPosition, LogicalDirection.Backward, /*allowStopAtLineEnd:*/true, /*allowStopNearSpace:*/true);
System\Windows\Documents\TextElement.cs (3)
288TextPointer contentStart = new TextPointer(tree, _textElementNode, ElementEdge.AfterStart, LogicalDirection.Backward); 347contentStart = new TextPointer(tree, _textElementNode, ElementEdge.AfterStart, LogicalDirection.Backward); 421elementEnd = new TextPointer(tree, _textElementNode, ElementEdge.AfterEnd, LogicalDirection.Backward);
System\Windows\Documents\TextElementEnumerator.cs (1)
131Invariant.Assert(_navigator.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart,
System\Windows\Documents\TextFindEngine.cs (5)
193direction = LogicalDirection.Backward; 303hasPreceedingSeparatorChar = HasNeighboringSeparatorChar(oppositeEndPosition, LogicalDirection.Backward); 308hasPreceedingSeparatorChar = HasNeighboringSeparatorChar(position, LogicalDirection.Backward); 911context = pointer.GetPointerContext(LogicalDirection.Backward); 914TextSchema.IsFormattingType(pointer.GetElementType(LogicalDirection.Backward)))
System\Windows\Documents\TextPointer.cs (14)
496/// is <see cref="System.Windows.Documents.LogicalDirection.Backward"/>, or if it is positioned 1325LogicalDirection direction = count < 0 ? LogicalDirection.Backward : LogicalDirection.Forward; 1610TextPointerContext backwardContext = position.GetPointerContext(LogicalDirection.Backward); 1614TextSchema.IsFormattingType(position.GetAdjacentElement(LogicalDirection.Backward).GetType())) 1616position.MoveToNextContextPosition(LogicalDirection.Backward); 1617backwardContext = position.GetPointerContext(LogicalDirection.Backward); 1798if (direction == LogicalDirection.Backward) 2698oppositeDirection = (contentDirection == LogicalDirection.Forward) ? LogicalDirection.Backward : LogicalDirection.Forward; 3493symbolType = previousNode.GetPointerContext(LogicalDirection.Backward); 3513symbolType = lastChildNode.GetPointerContext(LogicalDirection.Backward); 3522symbolType = node.GetPointerContext(LogicalDirection.Backward); 3996if (gravity == LogicalDirection.Backward) 4022if (gravity == LogicalDirection.Backward) 4055return (this.Edge == ElementEdge.BeforeStart || this.Edge == ElementEdge.BeforeEnd) ? LogicalDirection.Forward : LogicalDirection.Backward;
System\Windows\Documents\TextPointerBase.cs (36)
88else if (direction == LogicalDirection.Backward && limit.CompareTo(thisPointer) >= 0) 183Type backwardType = backwardPosition.GetElementType(LogicalDirection.Backward); 187TextPointerContext backwardContext = backwardPosition.GetPointerContext(LogicalDirection.Backward); 228TextPointerContext backwardContext = position.GetPointerContext(LogicalDirection.Backward); 253TextPointerContext backwardContext = position.GetPointerContext(LogicalDirection.Backward); 270position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart; 386return IsAtNonMergeableInlineEdge(position, LogicalDirection.Backward); 421if (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 552MoveToNextWordBoundary(navigator, direction == LogicalDirection.Backward ? LogicalDirection.Forward : LogicalDirection.Backward); 556if (direction == LogicalDirection.Backward) 565wordStart = RestrictWithinBlock(thisPosition, wordStart, LogicalDirection.Backward); 571wordStart = wordStart.GetFrozenPointer(LogicalDirection.Backward); 576wordStart = wordEnd.GetFrozenPointer(LogicalDirection.Backward); 586Invariant.Assert(!(direction == LogicalDirection.Backward) || position.CompareTo(limit) >= 0, "for backward direction position must be >= than limit"); 589while (direction == LogicalDirection.Backward ? position.CompareTo(limit) > 0 : position.CompareTo(limit) < 0) 610return limit.GetInsertionPosition(direction == LogicalDirection.Backward ? LogicalDirection.Forward : LogicalDirection.Backward); 629(direction == LogicalDirection.Backward && IsCharUnicodeNewLine(textBuffer[1])) 713thisPosition.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.ElementStart; 724thisPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementEnd && 725!typeof(Inline).IsAssignableFrom(thisPosition.GetElementType(LogicalDirection.Backward)); 739while (pointer.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 745pointer = pointer.GetNextContextPosition(LogicalDirection.Backward); 777paragraphOrBlockUIContainer.ElementStart.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 981(direction == LogicalDirection.Backward && thisNavigator.CompareTo(initialPosition) < 0)) 1011if (direction == LogicalDirection.Backward) 1149oppositeDirection = LogicalDirection.Backward; 1262symbolCount += LeaveNonMergeableAncestor(thisNavigator, LogicalDirection.Backward); 1267if (direction == LogicalDirection.Backward && IsAtNonMergeableInlineStart(thisNavigator)) 1269symbolCount += LeaveNonMergeableAncestor(thisNavigator, LogicalDirection.Backward); 1330TextPointerContext backwardContext = position.GetPointerContext(LogicalDirection.Backward); 1365if (position.GetTextInRun(LogicalDirection.Backward, neighborhood, 0, 1) == 1 && 1424runLength = Math.Min(navigator.GetTextRunLength(LogicalDirection.Backward), SelectionWordBreaker.MinContextLength - preceedingCount); 1434navigator.MoveToInsertionPosition(LogicalDirection.Backward); 1436while (navigator.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.Text);
System\Windows\Documents\TextRangeBase.cs (24)
78textPointer = textPointer.GetFormatNormalizedPosition(LogicalDirection.Backward); 192normalizedPosition.MoveToInsertionPosition(LogicalDirection.Backward); 208!TextPointerBase.IsAtWordBoundary(thisRange.Start, LogicalDirection.Backward)) 302(TextPointerBase.IsNextToAnyBreak(thisRange.End, LogicalDirection.Backward) || 305ITextPointer newEnd = thisRange.End.GetNextInsertionPosition(LogicalDirection.Backward); 333SkipParagraphContent(start, LogicalDirection.Backward); 351nextContext == TextPointerContext.ElementEnd && direction == LogicalDirection.Backward) && // 356nextContext == TextPointerContext.ElementStart && direction == LogicalDirection.Backward) && // 472position.MoveToNextContextPosition(LogicalDirection.Backward)) ; 516endNavigator.MoveToInsertionPosition(LogicalDirection.Backward); 762bool theParagraphIsTheFirstInCollection = navigator.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart; 1251while (start.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 1255start = start.GetNextContextPosition(LogicalDirection.Backward); 1311if (thisRange.Start.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.Text && 1358(insertPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.None || 1359insertPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) && 1372ITextPointer newStart = insertPosition.GetFrozenPointer(LogicalDirection.Backward); 1626context = end.GetPointerContext(LogicalDirection.Backward); 1629end.MoveToNextContextPosition(LogicalDirection.Backward); 1630context = end.GetPointerContext(LogicalDirection.Backward); 1722end = GetNormalizedPosition(thisRange, end, LogicalDirection.Backward); 1729if (start.LogicalDirection == LogicalDirection.Backward) 1732start = end.GetFrozenPointer(LogicalDirection.Backward); 1958!TextPointerBase.IsAtInsertionPosition(end, LogicalDirection.Backward))
System\Windows\Documents\TextRangeEdit.cs (31)
66if (!keepEmptyFormatting && splitPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 263while (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 278position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementEnd && 280(firstInline = position.GetAdjacentElement(LogicalDirection.Backward) as Inline) != null && 330inline.ElementStart.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 417if (start.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 539else if (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 555Invariant.Assert(position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementEnd, "position must be after ElementEnd"); 967TextPointer start = firstChild.ElementStart.GetFrozenPointer(LogicalDirection.Backward); 976lastChild = (Inline)end.GetAdjacentElement(LogicalDirection.Backward); 1031if (pointer.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 1248if (rangeStart.CompareTo(rangeEnd) < 0 && rangeEnd.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 1250rangeEnd = rangeEnd.GetNextInsertionPosition(LogicalDirection.Backward); 1258rangeEnd = rangeEnd.GetInsertionPosition(LogicalDirection.Backward); 1267TextPointerContext backwardContext = position.GetPointerContext(LogicalDirection.Backward); 1278while (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 1298while (previousPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementEnd && 1299TextSchema.IsMergeableInline(previousPosition.GetAdjacentElement(LogicalDirection.Backward).GetType())) 1301previousPosition = ((Inline)previousPosition.GetAdjacentElement(LogicalDirection.Backward)).ContentEnd; 1439while (startPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 1587oppositeDirection = LogicalDirection.Backward; 1595direction = LogicalDirection.Backward; 1613Invariant.Assert(direction == LogicalDirection.Forward && nextPosition.CompareTo(end) < 0 || direction == LogicalDirection.Backward && nextPosition.CompareTo(end) > 0, 1625if (direction == LogicalDirection.Forward && nextPosition.CompareTo(end) > 0 || direction == LogicalDirection.Backward && nextPosition.CompareTo(end) < 0) 1639if (direction == LogicalDirection.Forward && nextPosition.CompareTo(end) >= 0 || direction == LogicalDirection.Backward && nextPosition.CompareTo(end) <= 0) 2053Span parent = (Span)end.GetAdjacentElement(LogicalDirection.Backward); 2118if (start.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 2163DependencyObject backwardElement = end.GetAdjacentElement(LogicalDirection.Backward); 2187start.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 2189start.GetAdjacentElement(LogicalDirection.Backward) == commonAncestor) 2234if (start.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart &&
System\Windows\Documents\TextRangeEditLists.cs (9)
76while (secondParagraphOrBlockUIContainer.ElementStart.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 100TextElement previousBlock = secondParagraphOrBlockUIContainer.ElementStart.GetAdjacentElement(LogicalDirection.Backward) as TextElement; 148ListItem precedingListItem = positionAfterSecondParagraph.GetAdjacentElement(LogicalDirection.Backward) as ListItem; 153Invariant.Assert(positionAfterSecondParagraph.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementEnd); 186while (navigator.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 188navigator.MoveToNextContextPosition(LogicalDirection.Backward); 209if (mergePosition.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.ElementEnd || 215List precedingList = mergePosition.GetAdjacentElement(LogicalDirection.Backward) as List; 764TextPointer adjustedEnd = list.ElementEnd.GetInsertionPosition(LogicalDirection.Backward);
System\Windows\Documents\TextRangeEditTables.cs (13)
67TextPointer lastCellPointer = (TextPointer)range.TextSegments[0].End.GetNextInsertionPosition(LogicalDirection.Backward); 449if (direction == LogicalDirection.Backward && movingCell == anchorCell) 568row.ContentStart.GetNextInsertionPosition(LogicalDirection.Backward); 600row.ContentStart.GetNextInsertionPosition(LogicalDirection.Backward); 750bool insertBefore = position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart; 817while (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementEnd) 819position = position.GetNextContextPosition(LogicalDirection.Backward); 900else if (position.GetAdjacentElementFromOuterPosition(LogicalDirection.Backward) is Run) 903insertionPosition.MoveToNextContextPosition(LogicalDirection.Backward); 1079TextPointer end = ((TextPointer)textSegment.End).GetNextInsertionPosition(LogicalDirection.Backward); 1967endPosition = endPosition.GetInsertionPosition(LogicalDirection.Backward); 2056movingPosition = movingPosition.GetInsertionPosition(LogicalDirection.Backward); 2094movingPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart &&
System\Windows\Documents\TextRangeSerialization.cs (17)
76range.End.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.ElementStart; 205while (rangeEnd.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 207rangeEnd = rangeEnd.GetNextContextPosition(LogicalDirection.Backward); 546InlineUIContainer inlineUIContainer = textReader.GetAdjacentElement(LogicalDirection.Backward) as InlineUIContainer; 547BlockUIContainer blockUIContainer = textReader.GetAdjacentElement(LogicalDirection.Backward) as BlockUIContainer; 1414while (positionBeforeParagraph.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 1417positionBeforeParagraph = positionBeforeParagraph.GetNextContextPosition(LogicalDirection.Backward); 1419while (positionBeforeParagraph.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 1423positionBeforeParagraph = positionBeforeParagraph.GetNextContextPosition(LogicalDirection.Backward); 1457if (navigator.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementEnd) 1459navigator = navigator.GetNextContextPosition(LogicalDirection.Backward); 1513TextPointerContext backwardFromEnd = end.GetPointerContext(LogicalDirection.Backward); 1518Invariant.Assert(itemType.IsAssignableFrom(end.GetAdjacentElement(LogicalDirection.Backward).GetType()), 1522TextPointerContext backwardFromStart = start.GetPointerContext(LogicalDirection.Backward); 1525Invariant.Assert(!(backwardFromStart == TextPointerContext.ElementEnd) || itemType.IsAssignableFrom(start.GetAdjacentElement(LogicalDirection.Backward).GetType()), 1610TextPointerContext passedContext = start.GetPointerContext(LogicalDirection.Backward); 1923while (hyperlinkStart.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart &&
System\Windows\Documents\TextSchema.cs (1)
162TextElement leftElement = position.GetAdjacentElementFromOuterPosition(LogicalDirection.Backward);
System\windows\Documents\TextSegment.cs (1)
75_start = startPosition.GetFrozenPointer(preserveLogicalDirection ? startPosition.LogicalDirection : LogicalDirection.Backward);
System\windows\Documents\TextSelection.cs (27)
466ITextPointer reversePosition = caretPosition.CreatePointer(direction == LogicalDirection.Forward ? LogicalDirection.Backward : LogicalDirection.Forward); 472TextPointerBase.IsNextToPlainLineBreak(caretPosition, LogicalDirection.Backward) || 473TextSchema.IsBreak(caretPosition.GetElementType(LogicalDirection.Backward)))) 481if (caretPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.Text && 504LogicalDirection oppositeDirection = direction == LogicalDirection.Forward ? LogicalDirection.Backward : LogicalDirection.Forward; 637LogicalDirection.Backward : LogicalDirection.Forward; 841movingPosition = cursorWordRange.End.GetFrozenPointer(LogicalDirection.Backward); 845startPosition = anchorWordRange.End.GetFrozenPointer(LogicalDirection.Backward); 963anchorWordRange.Contains(cursorPosition.GetInsertionPosition(LogicalDirection.Backward))) 1386this.SetCaretToPosition(cellStart, LogicalDirection.Backward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false); 1550Invariant.Assert(this.Start.LogicalDirection == LogicalDirection.Backward); 1756return (This.Start.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.Text && 1758This.Start.GetNextInsertionPosition(LogicalDirection.Backward) == null && 1995cursorPosition.LogicalDirection == LogicalDirection.Backward && cursorMousePoint.X < objectEdgeRect.X)) 2001cursorPosition.LogicalDirection == LogicalDirection.Backward && cursorMousePoint.X > objectEdgeRect.X)) 2010cursorPosition.LogicalDirection == LogicalDirection.Backward && cursorMousePoint.X > objectEdgeRect.X)) 2016cursorPosition.LogicalDirection == LogicalDirection.Backward && cursorMousePoint.X < objectEdgeRect.X)) 2178if ((caretPosition.LogicalDirection == LogicalDirection.Backward && // 2179caretPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) || // 2186caretPosition.MoveToNextInsertionPosition(LogicalDirection.Backward); 2195if (caretPosition.LogicalDirection == LogicalDirection.Backward && // 2196caretPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && // 2197(caretPosition.GetNextInsertionPosition(LogicalDirection.Backward) == null || // 2198TextPointerBase.IsNextToAnyBreak(caretPosition, LogicalDirection.Backward))) 2281nextCharacterPosition.SetLogicalDirection(LogicalDirection.Backward); 2289nextCharacterPosition = focusedTextSelection.End.CreatePointer(LogicalDirection.Backward); 2294nextCharacterPosition.MoveToNextInsertionPosition(LogicalDirection.Backward);
System\windows\Documents\TextSelectionHighlightLayer.cs (1)
91(direction == LogicalDirection.Backward && textSegment.Start.CompareTo(textPosition) < 0 && textPosition.CompareTo(textSegment.End) <= 0))
System\Windows\Documents\TextStore.cs (26)
367this.TextSelection.SetCaretToPosition(start, LogicalDirection.Backward, /*allowStopAtLineEnd:*/true, /*allowStopNearSpace:*/true); 685startNavigator.SetLogicalDirection(LogicalDirection.Backward); 981ITextPointer positionCur = position.CreatePointer(LogicalDirection.Backward); 983positionPrev.MoveToNextInsertionPosition(LogicalDirection.Backward); 1069endPointer = CreatePointerAtCharOffset(endIndex, LogicalDirection.Backward); 1070endPointer.MoveToInsertionPosition(LogicalDirection.Backward); 2011this.TextSelection.SetCaretToPosition(range.End, LogicalDirection.Backward, /*allowStopAtLineEnd:*/true, /*allowStopNearSpace:*/true); 2385_previousCompositionStart = (_previousCompositionStartOffset == -1) ? null : textEditor.TextContainer.CreatePointerAtOffset(_previousCompositionStartOffset, LogicalDirection.Backward); 2404_previousCompositionStart = (_previousCompositionStartOffset == -1) ? null : textEditor.TextContainer.CreatePointerAtOffset(_previousCompositionStartOffset, LogicalDirection.Backward); 2904start = CreatePointerAtCharOffset(startIndex, LogicalDirection.Backward); 3036positionNext.MoveToNextInsertionPosition(LogicalDirection.Backward); 3176lineBounds.Union(end.GetCharacterRect(LogicalDirection.Backward)); 3182TextPointerContext context = navigator.GetPointerContext(LogicalDirection.Backward); 3186lineBounds.Union(navigator.GetCharacterRect(LogicalDirection.Backward)); 3191lineBounds.Union(navigator.GetCharacterRect(LogicalDirection.Backward)); 3409TextPointer previousPosition = start.GetNextInsertionPosition(LogicalDirection.Backward); 3422if (start.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 3424start = start.GetNextInsertionPosition(LogicalDirection.Backward); 3457end = (startCharOffset == endCharOffset) ? start : CreatePointerAtCharOffset(endCharOffset, LogicalDirection.Backward); 3489start = start.GetFormatNormalizedPosition(LogicalDirection.Backward); 3494start = start.GetFormatNormalizedPosition(LogicalDirection.Backward); 3495end = end.GetFormatNormalizedPosition(LogicalDirection.Backward); 3637ITextPointer start = this.TextContainer.CreatePointerAtOffset(record.StartOffsetBefore, LogicalDirection.Backward); 3799start = end.GetFrozenPointer(LogicalDirection.Backward); 3977ITextPointer anchor = this.TextContainer.CreatePointerAtOffset(imeSelectionAnchorOffset, LogicalDirection.Backward); 3978ITextPointer moving = this.TextContainer.CreatePointerAtOffset(imeSelectionMovingOffset, LogicalDirection.Backward);
System\Windows\Documents\TextTreeDeleteContentUndoUnit.cs (1)
426navigator.MoveToNextContextPosition(LogicalDirection.Backward);
System\Windows\Documents\TextTreeExtractElementUndoUnit.cs (1)
70end.MoveToNextContextPosition(LogicalDirection.Backward);
System\Windows\Documents\TextTreePropertyUndoUnit.cs (1)
52Invariant.Assert(position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart, "TextTree undo unit out of sync with TextTree.");
System\Windows\Documents\ValidationHelper.cs (1)
72direction != LogicalDirection.Backward)
System.Windows.Controls.Ribbon (3)
Microsoft\Windows\Controls\Ribbon\RibbonTwoLineText.cs (3)
301string firstLineText = secondLinePointer.GetTextInRun(LogicalDirection.Backward); 410lastCharacter = nextLinePointer.GetCharacterRect(LogicalDirection.Backward); 418lastCharacter = _textBlock1.ContentEnd.GetCharacterRect(LogicalDirection.Backward);