548 references to Backward
PresentationFramework (545)
MS\Internal\Annotations\Anchoring\FixedTextSelectionProcessor.cs (3)
114ITextPointer endPointer = segment.End.CreatePointer(LogicalDirection.Backward); 576if (!end.IsAtInsertionPosition && !end.MoveToNextInsertionPosition(LogicalDirection.Backward)) 611end = textView.TextSegments[textView.TextSegments.Count - 1].End.CreatePointer(LogicalDirection.Backward);
MS\Internal\Annotations\Anchoring\TextSelectionHelper.cs (1)
433ITextPointer end = segment.End.CreatePointer(LogicalDirection.Backward);
MS\Internal\Annotations\Component\AnnotationHighlightLayer.cs (6)
253((highlightSegment.Segment.Start.CompareTo(textPosition) == 0) && (direction == LogicalDirection.Backward))) 260((highlightSegment.Segment.End.CompareTo(textPosition) == 0) && (direction == LogicalDirection.Backward))) 773((ps.CompareTo(_segment.End) == 0) && (side == LogicalDirection.Backward))) 835IList<HighlightSegment> r2 = r1[i].Split(ps2, LogicalDirection.Backward); 852res = Split(ps2, LogicalDirection.Backward); 1080ITextPointer 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)
121textPointer = textPointer.GetInsertionPosition(LogicalDirection.Backward); 225(theirSegment.End.LogicalDirection == LogicalDirection.Backward)) 674end = end.GetInsertionPosition(LogicalDirection.Backward); 681if (start.LogicalDirection == LogicalDirection.Backward) 684start = end.GetFrozenPointer(LogicalDirection.Backward);
MS\Internal\Documents\TableTextElementCollectionInternal.cs (2)
157TextPointer startPosition = new TextPointer(item.TextContainer, item.TextElementNode, ElementEdge.BeforeStart, LogicalDirection.Backward); 158TextPointer endPosition = new TextPointer(item.TextContainer, item.TextElementNode, ElementEdge.AfterEnd, LogicalDirection.Backward);
MS\Internal\Documents\TextBoxLine.cs (3)
119ITextPointer position = _owner.Host.TextContainer.CreatePointerAtOffset(dcp, LogicalDirection.Backward); 124int runLength = Math.Min(128, position.GetTextRunLength(LogicalDirection.Backward)); 126position.GetTextInRun(LogicalDirection.Backward, text, 0, runLength);
MS\Internal\Documents\TextBoxView.cs (27)
633if (offset > 0 && position.LogicalDirection == LogicalDirection.Backward) 664if (position.LogicalDirection == LogicalDirection.Backward && position.Offset > 0) 706lastLineIndex = Math.Min(lastLineIndex, GetLineIndexFromOffset(endOffset, LogicalDirection.Backward)); 745ITextPointer endOfLinePosition = _host.TextContainer.CreatePointerAtOffset(_lineMetrics[lineIndex].EndOffset, LogicalDirection.Backward); 746if (TextPointerBase.IsNextToPlainLineBreak(endOfLinePosition, LogicalDirection.Backward)) 829else if (position.LogicalDirection == LogicalDirection.Backward) 860if (position.Offset == 0 && direction == LogicalDirection.Backward) 866return position.GetFrozenPointer(LogicalDirection.Backward); 897logicalDirection = LogicalDirection.Backward; 905direction == LogicalDirection.Backward) 915logicalDirection = LogicalDirection.Backward; 920logicalDirection = (nextCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 942int lineIndex = GetLineIndexFromPosition(position, LogicalDirection.Backward); 963logicalDirection = LogicalDirection.Backward; 968logicalDirection = (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)
96_textContainer.CreatePointerAtOffset(_cpLast, LogicalDirection.Backward), 106_textContainer.CreatePointerAtOffset(_ranges[i * 2 + 1], LogicalDirection.Backward), 124if (cpPos == _cpFirst && position.LogicalDirection == LogicalDirection.Backward || 141if (cpPos == _ranges[i * 2] && position.LogicalDirection == LogicalDirection.Backward || 172endPosition = _textContainer.CreatePointerAtOffset(IsSimple ? _cpLast : _ranges[(_size - 1) * 2 + 1], LogicalDirection.Backward); 463element = position.GetAdjacentElement(LogicalDirection.Backward); 467positionsEnd.Insert(0, position.CreatePointer(LogicalDirection.Backward));
MS\Internal\Documents\TextDocumentView.cs (10)
492if (segment.Start.LogicalDirection == LogicalDirection.Backward) 501if (position.LogicalDirection == LogicalDirection.Backward) 524if (position.TextContainer.Start.CompareTo(position) == 0 && position.LogicalDirection == LogicalDirection.Backward) 771position = paragraph.EndPosition.CreatePointer(LogicalDirection.Backward); 877position = blockUIContainer.ContentEnd.CreatePointer(LogicalDirection.Backward); 891position = paragraph.EndPosition.CreatePointer(LogicalDirection.Backward); 2402lineRange = new TextSegment(blockUIContainer.ContentStart.CreatePointer(LogicalDirection.Forward), blockUIContainer.ContentEnd.CreatePointer(LogicalDirection.Backward)); 2909positionOut = blockUIContainer.ContentEnd.CreatePointer(LogicalDirection.Backward); 3290segmentEnd = _textContainer.Start.CreatePointer(backgroundFormatInfo.CPInterrupted, LogicalDirection.Backward); 3488if (textPointer.LogicalDirection == LogicalDirection.Backward && textPointer.CompareTo(textElement.ElementEnd) == 0)
MS\Internal\Documents\TextParagraphView.cs (2)
410if (position.LogicalDirection == LogicalDirection.Backward && lineIndex != 0) 422( position.LogicalDirection == LogicalDirection.Backward ||
MS\Internal\PtsHost\Line.cs (3)
208while (position.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.Text && 217string precedingTextString = position.GetTextInRun(LogicalDirection.Backward); 613type = position.GetPointerContext((charIndex.TrailingLength == 0) ? LogicalDirection.Forward : LogicalDirection.Backward);
MS\Internal\PtsHost\OptimalTextSource.cs (2)
157while (position.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.Text && 166string precedingTextString = position.GetTextInRun(LogicalDirection.Backward);
MS\Internal\PtsHost\TextParaClient.cs (21)
685if (position.LogicalDirection == LogicalDirection.Backward && dcp > 0) 1097LogicalDirection logicalDirection = (charHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 1703if (orientation == LogicalDirection.Backward && originalDcp > 0 && (context == TextPointerContext.Text || context == TextPointerContext.EmbeddedElement)) 1797if (orientation == LogicalDirection.Backward && originalDcp > 0 && (context == TextPointerContext.Text || context == TextPointerContext.EmbeddedElement)) 2042return (TextPointerBase.IsNextToAnyBreak(position, LogicalDirection.Backward)); 2404if (position.LogicalDirection == LogicalDirection.Backward) 2507if (position.LogicalDirection == LogicalDirection.Backward) 2614if (dcp == lineDesc.dcpFirst && direction == LogicalDirection.Backward) 2674logicalDirection = LogicalDirection.Backward; 2681else if ((nextCharacterHit.FirstCharacterIndex + nextCharacterHit.TrailingLength == lineDesc.dcpFirst) && direction == LogicalDirection.Backward) 2691logicalDirection = LogicalDirection.Backward; 2696logicalDirection = (nextCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 2748if (dcp == element.dcpFirst && direction == LogicalDirection.Backward) 2837logicalDirection = LogicalDirection.Backward; 2845else if ((nextCharacterHit.FirstCharacterIndex + nextCharacterHit.TrailingLength == element.dcpFirst) && direction == LogicalDirection.Backward) 2856logicalDirection = LogicalDirection.Backward; 2861logicalDirection = (nextCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 2948logicalDirection = LogicalDirection.Backward; 2953logicalDirection = (backspaceCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 3074logicalDirection = LogicalDirection.Backward; 3079logicalDirection = (backspaceCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward;
MS\Internal\PtsHost\TextParagraph.cs (2)
590StructuralCache.CurrentFormatContext.DependentMax = StructuralCache.TextContainer.CreatePointerAtOffset(dcpDependAbsolute, LogicalDirection.Backward); 774StructuralCache.CurrentFormatContext.DependentMax = StructuralCache.TextContainer.CreatePointerAtOffset(dcpDependAbsolute, LogicalDirection.Backward);
MS\Internal\PtsHost\TextParaLineResult.cs (2)
112return _owner.GetTextPosition(_dcp + _cchContent, LogicalDirection.Backward); 191_endPosition = _owner.GetTextPosition(_dcp + _cch, LogicalDirection.Backward);
MS\Internal\Text\ComplexLine.cs (4)
94ITextPointer position = _owner.TextContainer.CreatePointerAtOffset(dcp, LogicalDirection.Backward); 97while (position.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.Text && 105string precedingTextString = position.GetTextInRun(LogicalDirection.Backward); 300type = position.GetPointerContext(LogicalDirection.Backward);
MS\Internal\Text\TextLineResult.cs (2)
106return _owner.TextContainer.CreatePointerAtOffset(_dcp + _cchContent, LogicalDirection.Backward); 189_endPosition = _owner.TextContainer.CreatePointerAtOffset(_dcp + _cch, LogicalDirection.Backward);
System\Windows\Annotations\AnnotationHelper.cs (2)
687start.MoveToNextInsertionPosition(LogicalDirection.Backward); 872(selection.End.LogicalDirection == LogicalDirection.Backward)))
System\Windows\Controls\PasswordTextContainer.cs (5)
517return new PasswordTextPointer(this, LogicalDirection.Backward, 0); 743if (position.LogicalDirection == LogicalDirection.Backward) 821(position.LogicalDirection == gravity || gravity == LogicalDirection.Backward)) 845lastLogicalDirection = LogicalDirection.Backward; 857position.LogicalDirection == LogicalDirection.Backward &&
System\Windows\Controls\PasswordTextNavigator.cs (2)
142if ((direction == LogicalDirection.Backward && _offset == 0) || 429if (direction == LogicalDirection.Backward)
System\Windows\Controls\TextAdaptor.cs (4)
119TextRangeAdaptor.MoveToInsertionPosition(end, LogicalDirection.Backward); 279FrameworkContentElement element = pointer.GetAdjacentElement(LogicalDirection.Backward) as FrameworkContentElement; 625rangeEnd = position.CreatePointer(LogicalDirection.Backward); 635rangeEnd = position.CreatePointer(LogicalDirection.Backward);
System\Windows\Controls\TextBlock.cs (12)
2156logicalDirection = (charIndex.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 2188if (orientedPosition.LogicalDirection == LogicalDirection.Backward && characterIndex > 0) 2256if (orientedPosition.LogicalDirection == LogicalDirection.Backward && originalCharacterIndex > 0) 2349&& TextPointerBase.IsNextToAnyBreak(endOfLineTextPointer, LogicalDirection.Backward)) 2400if (position.LogicalDirection == LogicalDirection.Backward) 2467if (characterIndex == dcp && direction == LogicalDirection.Backward) 2540logicalDirection = LogicalDirection.Backward; 2547else if ((nextCharacterHit.FirstCharacterIndex + nextCharacterHit.TrailingLength == dcp) && direction == LogicalDirection.Backward) 2557logicalDirection = LogicalDirection.Backward; 2562logicalDirection = (nextCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 2645logicalDirection = LogicalDirection.Backward; 2650logicalDirection = (backspaceCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward;
System\Windows\Controls\TextBox.cs (5)
221return (textPointer.LogicalDirection == LogicalDirection.Backward) ? offset - 1 : offset; 444TextPointer textPointer = TextContainer.CreatePointerAtOffset(charIndex, LogicalDirection.Backward); 445textPointer = textPointer.GetInsertionPosition(LogicalDirection.Backward); 454textPointer = textPointer.GetPositionAtOffset(0, LogicalDirection.Backward); 490spellingError = this.TextEditor.GetSpellingErrorAtPosition(position, LogicalDirection.Backward);
System\Windows\Controls\TextRangeAdaptor.cs (29)
530TextPointerBase.MoveToNextInsertionPosition(_start, LogicalDirection.Backward); 541MoveToNextWordBoundary(_start, LogicalDirection.Backward); 558TextPointerContext backwardContext = _start.GetPointerContext(LogicalDirection.Backward); 566_start.MoveToNextContextPosition(LogicalDirection.Backward); 572TextPointerContext backwardContext = _end.GetPointerContext(LogicalDirection.Backward); 816position.SetLogicalDirection(isStart ? LogicalDirection.Forward : LogicalDirection.Backward); 838previousLineEnd = GetInsertionPosition(previousLineEnd, LogicalDirection.Backward); 843position.SetLogicalDirection(isStart ? LogicalDirection.Forward : LogicalDirection.Backward); 873position.SetLogicalDirection(isStart ? LogicalDirection.Forward : LogicalDirection.Backward); 884if (previousParagraphEnd.MoveToNextInsertionPosition(LogicalDirection.Backward)) 894position.SetLogicalDirection(isStart ? LogicalDirection.Forward : LogicalDirection.Backward); 941if (position.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.ElementStart) 947Invariant.Assert(position.MoveToNextContextPosition(LogicalDirection.Backward)); 949MoveToInsertionPosition(position, LogicalDirection.Backward); 958if (position.CompareTo(GetInsertionPosition(position.TextContainer.End, LogicalDirection.Backward)) != 0) 996LogicalDirection direction = (count > 0) ? LogicalDirection.Forward : LogicalDirection.Backward; 1053if (direction == LogicalDirection.Backward) 1055while (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.Text) 1057if (!position.MoveToNextContextPosition(LogicalDirection.Backward)) 1094position.MoveToNextInsertionPosition(LogicalDirection.Backward); 1145if (direction == LogicalDirection.Backward) 1148MoveToInsertionPosition(position, LogicalDirection.Backward); 1220while (IsElementBoundary(end.GetPointerContext(LogicalDirection.Backward))) 1222if (!end.MoveToNextContextPosition(LogicalDirection.Backward) || start.CompareTo(end) >= 0) 1675ITextPointer position = _end.CreatePointer(LogicalDirection.Backward); 1686attrEnd = position.CreatePointer(LogicalDirection.Backward); 1697if (!position.MoveToNextContextPosition(LogicalDirection.Backward)) 1724attrEnd = position.CreatePointer(LogicalDirection.Backward); 1949if (MoveToUnitBoundary(position, start, count < 0 ? LogicalDirection.Backward : LogicalDirection.Forward, unit))
System\Windows\Documents\CompositionAdorner.cs (3)
329ITextPointer rangeEnd = end.CreatePointer(LogicalDirection.Backward); 486ITextPointer end = _textView.TextContainer.Start.CreatePointer(_endOffset, LogicalDirection.Backward); 607endLinePointer = textSegment.End.CreatePointer(LogicalDirection.Backward);
System\Windows\Documents\DocumentSequenceTextPointer.cs (6)
367if (!isAtCaretUnitBoundary && ((ITextPointer)this).LogicalDirection == LogicalDirection.Backward) 897Debug.Assert(direction == LogicalDirection.Backward); 974tp2.ChildPointer.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.None) 1038LogicalDirection scanDir = (distance > 0 ? LogicalDirection.Forward : LogicalDirection.Backward); 1066if (scanDir == LogicalDirection.Backward) 1074if (!((cdb.IsHead && scanDir == LogicalDirection.Backward)
System\Windows\Documents\FixedFindEngine.cs (6)
153end = new DocumentSequenceTextPointer(childBlock, new FixedTextPointer(false, LogicalDirection.Backward, fixedDoc.FixedContainer.FixedTextBuilder.GetPageEndFlowPosition(translatedPageNumber))); 159end = new DocumentSequenceTextPointer(childBlock, new FixedTextPointer(false, LogicalDirection.Backward, fixedDoc.FixedContainer.FixedTextBuilder.GetPageEndFlowPosition(translatedPageNumber))); 168end = new FixedTextPointer(false, LogicalDirection.Backward, textBuilder.GetPageEndFlowPosition(pageNumber)); 174end = new FixedTextPointer(false, LogicalDirection.Backward, textBuilder.GetPageEndFlowPosition(pageNumber)); 326new FixedTextPointer(false, LogicalDirection.Backward, pageEndFlowPosition)); 332firstSearchPageEnd = new FixedTextPointer(false, LogicalDirection.Backward, startAsFTP.FixedTextContainer.FixedTextBuilder.GetPageEndFlowPosition(pageNumber));
System\Windows\Documents\FixedTextBuilder.cs (1)
427textdir == LogicalDirection.Backward &&
System\Windows\Documents\FixedTextContainer.cs (2)
586_start = new FixedTextPointer(false, LogicalDirection.Backward, new FlowPosition(this, this.FixedTextBuilder.FixedFlowMap.FlowStartEdge, 1)); 596FixedTextPointer eStart = new FixedTextPointer(false, LogicalDirection.Backward, pStart);
System\Windows\Documents\FixedTextPointer.cs (1)
576if (!isAtCaretUnitBoundary && this.LogicalDirection == LogicalDirection.Backward)
System\Windows\Documents\FixedTextView.cs (12)
83textPos = _CreateTextPointer(fixedp, LogicalDirection.Backward); 368scanDir = LogicalDirection.Backward; 407if (scanDir == LogicalDirection.Backward) 540edge = LogicalDirection.Backward; 619ITextPointer end = _CreateTextPointer(new FixedPosition(lastNode, lastIndex), LogicalDirection.Backward); 652(tp.CompareTo(this.End) == 0 && (tp.LogicalDirection == LogicalDirection.Backward || this.IsContainerEnd)) 759_end = new FixedTextPointer(false, LogicalDirection.Backward, flowEnd); 819edge = (hit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 881itp = ((ITextPointer)this.End).CreatePointer(LogicalDirection.Backward); 882itp.MoveToInsertionPosition(LogicalDirection.Backward); 1106textdir = LogicalDirection.Backward; 1147dir = LogicalDirection.Backward;
System\Windows\Documents\FlowPosition.cs (8)
178Debug.Assert(dir == LogicalDirection.Forward || dir == LogicalDirection.Backward); 289(tst = flowScan.GetPointerContext(LogicalDirection.Backward))!= TextPointerContext.None) 295FlowPosition flowEnd = flowScan.GetClingPosition(LogicalDirection.Backward); 305flowScan.Move(LogicalDirection.Backward); 314LogicalDirection dir = (distance >= 0 ? LogicalDirection.Forward : LogicalDirection.Backward); 428Debug.Assert(dir == LogicalDirection.Backward); 586Debug.Assert(dir == LogicalDirection.Backward); 636Debug.Assert(dir == LogicalDirection.Backward);
System\Windows\Documents\FrameworkRichTextComposition.cs (2)
49return _ResultStart == null ? null : (TextPointer)_ResultStart.GetFrozenPointer(LogicalDirection.Backward); 71return _CompositionStart == null ? null : (TextPointer)_CompositionStart.GetFrozenPointer(LogicalDirection.Backward);
System\Windows\Documents\FrameworkTextComposition.cs (2)
199_resultStart = start.GetFrozenPointer(LogicalDirection.Backward); 220_compositionStart = start.GetFrozenPointer(LogicalDirection.Backward);
System\Windows\Documents\ImmComposition.cs (11)
656ITextPointer endPosition = endNavigator.CreatePointer(LogicalDirection.Backward); 777rectCaret = view.GetRectangleFromTextPosition(_editor.Selection.End.CreatePointer(LogicalDirection.Backward)); 1188ITextPointer startAttribute = _startComposition.CreatePointer(startOffset, LogicalDirection.Backward); 1419switch (navigator.GetPointerContext(LogicalDirection.Backward)) 1423int copied = navigator.GetTextInRun(LogicalDirection.Backward, buffer, 0, buffer.Length); 1437if (!navigator.GetElementType(LogicalDirection.Backward).IsSubclassOf(typeof(Inline))) 1441navigator.MoveToNextContextPosition(LogicalDirection.Backward); 1450navigator.MoveToNextContextPosition(LogicalDirection.Backward); 1543ITextPointer start = range.Start.CreatePointer(LogicalDirection.Backward); 1570switch (position.GetPointerContext(LogicalDirection.Backward)) 1677positionNext.MoveToNextInsertionPosition(LogicalDirection.Backward);
System\Windows\Documents\List.cs (1)
250listItem = block.ElementStart.GetAdjacentElement(LogicalDirection.Backward) as ListItem;
System\Windows\Documents\NullTextContainer.cs (1)
39_start = new NullTextPointer(this, LogicalDirection.Backward);
System\windows\Documents\SelectionWordBreaker.cs (1)
53if (insideWordDirection == LogicalDirection.Backward)
System\Windows\Documents\Span.cs (2)
224if (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 226position = position.GetNextContextPosition(LogicalDirection.Backward);
System\Windows\Documents\Speller.cs (17)
194ExpandToWordBreakAndContext(error.Start, LogicalDirection.Backward, language, out ITextPointer contentStart, out ITextPointer contextStart); 711wordBreakLeft = SearchForWordBreaks(caretPosition, LogicalDirection.Backward, language, 1, false /* stopOnError */); 727FindPositionInSegmentList(textMap, LogicalDirection.Backward, segments, out leftBreakOffset, out rightBreakOffset); 797ExpandToWordBreakAndContext(start, LogicalDirection.Backward, language, out contentStart, out contextStart); 1125inwardDirection = direction == LogicalDirection.Forward ? LogicalDirection.Backward : LogicalDirection.Forward; 1131if (direction == LogicalDirection.Backward) 1166if (direction == LogicalDirection.Backward) 1183if (direction == LogicalDirection.Backward) 1210if (direction == LogicalDirection.Backward) 1298if (direction == LogicalDirection.Backward) 1345searchPosition.MoveByOffset(direction == LogicalDirection.Backward ? -ContextBlockSize : +ContextBlockSize); 1350if (direction == LogicalDirection.Backward && closestErrorPosition.CompareTo(searchPosition) > 0 || 1361if (direction == LogicalDirection.Backward && closestLanguageTransition.CompareTo(searchPosition) > 0 || 1368if (direction == LogicalDirection.Backward) 1396(direction == LogicalDirection.Backward && navigator.CompareTo(haltPosition) > 0)) 1406(direction == LogicalDirection.Backward && navigator.CompareTo(haltPosition) < 0)) 1662_basePosition = contextStart.GetFrozenPointer(LogicalDirection.Backward);
System\Windows\Documents\SpellerError.cs (1)
36_end = end.GetFrozenPointer(LogicalDirection.Backward);
System\Windows\Documents\SpellerStatusTable.cs (6)
351direction == LogicalDirection.Backward && position.CompareTo(run.Position) <= 0) 357direction == LogicalDirection.Backward && position.CompareTo(GetRunEndPosition(index)) > 0) 394endIndex = FindIndex(end.CreateStaticPointer(), LogicalDirection.Backward); 429endIndex = FindIndex(end.CreateStaticPointer(), LogicalDirection.Backward); 594index = FindIndex(position.CreateStaticPointer(), LogicalDirection.Backward); 801_position = position.GetFrozenPointer(LogicalDirection.Backward);
System\Windows\Documents\TextContainer.cs (11)
523edge = node.GetEdgeFromOffset(nodeOffset, LogicalDirection.Backward); 635edge = (direction == LogicalDirection.Backward) ? ElementEdge.AfterStart : ElementEdge.BeforeEnd; 646edge = (direction == LogicalDirection.Backward) ? ElementEdge.BeforeStart : ElementEdge.AfterEnd; 657edge = node.GetEdgeFromOffset(nodeOffset, LogicalDirection.Backward); 863originalPosition = this.HasListeners ? new TextPointer(position, LogicalDirection.Backward) : null; 875direction = LogicalDirection.Backward; 888if ((direction == LogicalDirection.Backward && textNode.AfterEndReferenceCount) || 1597if (!_rootNode.CaretUnitBoundaryCache && position.LogicalDirection == LogicalDirection.Backward) 1640startPosition = new TextPointer(this, _rootNode, ElementEdge.AfterStart, LogicalDirection.Backward); 2793startPosition = new TextPointer(this, elementNode, ElementEdge.BeforeStart, LogicalDirection.Backward); 2798endPosition = new TextPointer(this, elementNode, ElementEdge.AfterEnd, LogicalDirection.Backward);
System\windows\Documents\TextEditor.cs (2)
1218string textAdjacent = textContainer.TextSelection.AnchorPosition.GetTextInRun(LogicalDirection.Backward); 1519lastCharacterRect = cursorPosition.GetCharacterRect(LogicalDirection.Backward);
System\windows\Documents\TextEditorContextMenu.cs (1)
183direction = LogicalDirection.Backward;
System\windows\Documents\TextEditorCopyPaste.cs (2)
411This.Selection.SetCaretToPosition(This.Selection.End, LogicalDirection.Backward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/true); 962start = start.GetPositionAtOffset(0, LogicalDirection.Backward);
System\windows\Documents\TextEditorDragDrop.cs (2)
565selection.SetCaretToPosition(dropPosition, LogicalDirection.Backward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/true); 593selection.SetCaretToPosition(dropPosition, LogicalDirection.Backward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/true);
System\windows\Documents\TextEditorMouse.cs (2)
579Rect lastCharacterRect = snappedCursorPosition.GetCharacterRect(LogicalDirection.Backward); 750LogicalDirection.Backward : LogicalDirection.Forward;
System\windows\Documents\TextEditorSelection.cs (35)
130ITextPointer lineEnd = position.CreatePointer(LogicalDirection.Backward); 203LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Backward : LogicalDirection.Forward; 219LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Forward : LogicalDirection.Backward; 236LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Backward : LogicalDirection.Forward; 252LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Forward : LogicalDirection.Backward; 418ITextPointer previousPosition = lineStartPosition.GetNextInsertionPosition(LogicalDirection.Backward); 483This.Selection.SetCaretToPosition(paragraphRange.Start, LogicalDirection.Backward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false); 488This.Selection.SetCaretToPosition(paragraphRange.End, LogicalDirection.Backward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false); 532This.Selection.SetCaretToPosition(paragraphRange.Start, LogicalDirection.Backward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false); 537if (movingPointer.MoveToNextInsertionPosition(LogicalDirection.Backward)) 541This.Selection.SetCaretToPosition(paragraphRange.Start, LogicalDirection.Backward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false); 867LogicalDirection orientation = TextPointerBase.IsNextToPlainLineBreak(lineRange.End, LogicalDirection.Backward) ? LogicalDirection.Forward : LogicalDirection.Backward; 930This.Selection.SetCaretToPosition(This.TextContainer.End, LogicalDirection.Backward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false); 961LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Backward : LogicalDirection.Forward; 977LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Forward : LogicalDirection.Backward; 993LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Backward : LogicalDirection.Forward; 1009LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Forward : LogicalDirection.Backward; 1157newMovingPosition = newMovingPosition.GetFrozenPointer(LogicalDirection.Backward); 1199if (This.Selection.ExtendToNextTableRow(LogicalDirection.Backward)) 1275ITextPointer previousPosition = lineStartPosition.GetNextInsertionPosition(LogicalDirection.Backward); 1384if (movingPointer.MoveToNextInsertionPosition(LogicalDirection.Backward)) 1685TextPointerBase.IsNextToParagraphBreak(This.Selection.AnchorPosition, LogicalDirection.Backward)) 1703destination = destination.GetFrozenPointer(LogicalDirection.Backward); 2082LogicalDirection contentDirection = direction == LogicalDirection.Forward ? LogicalDirection.Backward : LogicalDirection.Forward; 2136textEditor.Selection.SetCaretToPosition(textEditor.Selection.End, LogicalDirection.Backward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false); 2145textEditor.Selection.SetCaretToPosition(wordBoundary, LogicalDirection.Backward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false); 2163TextPointerBase.MoveToNextWordBoundary(wordBoundary, LogicalDirection.Backward); 2209wordBoundary.SetLogicalDirection(direction == LogicalDirection.Forward ? LogicalDirection.Backward : LogicalDirection.Forward); 2321movingPosition.LogicalDirection == LogicalDirection.Backward && 2323TextPointerBase.IsNextToAnyBreak(movingPosition, LogicalDirection.Backward)) 2325movingPosition = movingPosition.GetNextInsertionPosition(LogicalDirection.Backward); 2329if (TextPointerBase.IsNextToPlainLineBreak(movingPosition, LogicalDirection.Backward)) 2411ITextPointer position = This.Selection.Start.GetNextInsertionPosition(LogicalDirection.Backward); 2427ITextPointer cellEnd = position.GetNextInsertionPosition(LogicalDirection.Backward);
System\windows\Documents\TextEditorSpelling.cs (7)
68direction = (direction == LogicalDirection.Forward) ? LogicalDirection.Backward : LogicalDirection.Forward; 83direction = (direction == LogicalDirection.Forward) ? LogicalDirection.Backward : LogicalDirection.Forward; 92direction = LogicalDirection.Backward; 185textStart = spellingError.Start.CreatePointer(LogicalDirection.Backward); 193textEnd.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.Text) 195textEnd.MoveToNextContextPosition(LogicalDirection.Backward); 203Invariant.Assert(textEnd.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.Text &&
System\windows\Documents\TextEditorTyping.cs (22)
629ITextPointer deletePosition = position.GetNextInsertionPosition(LogicalDirection.Backward); 654position = position.GetFrozenPointer(LogicalDirection.Backward); 661position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.Text) 683This.Selection.ExtendToNextInsertionPosition(LogicalDirection.Backward); 691else if (backspacePosition.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.Text) 700This.Selection.ExtendToNextInsertionPosition(LogicalDirection.Backward); 732This.Selection.SetCaretToPosition(position, LogicalDirection.Backward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/true); 748LogicalDirection directionOfDelete = position.CompareTo(deletePosition) < 0 ? LogicalDirection.Forward : LogicalDirection.Backward; 782if (directionOfDelete == LogicalDirection.Backward) 819position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 825while (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 832position = position.GetNextContextPosition(LogicalDirection.Backward); 833if (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 841position = position.GetNextContextPosition(LogicalDirection.Backward); 852if (position.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.ElementStart) 866while (navigator.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 873if (!(navigator.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 981TextPointerBase.MoveToNextWordBoundary(wordBoundary, LogicalDirection.Backward); 1385if (HandleTabInTables(This, LogicalDirection.Backward)) 1417This.Selection.SetCaretToPosition(This.Selection.Start, LogicalDirection.Backward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false); 1565ITextPointer caretPosition = This.Selection.End.CreatePointer(LogicalDirection.Backward); 1568This.Selection.SetCaretToPosition(caretPosition, LogicalDirection.Backward, /*allowStopAtLineEnd:*/true, /*allowStopNearSpace:*/true);
System\Windows\Documents\TextElement.cs (3)
303TextPointer contentStart = new TextPointer(tree, _textElementNode, ElementEdge.AfterStart, LogicalDirection.Backward); 362contentStart = new TextPointer(tree, _textElementNode, ElementEdge.AfterStart, LogicalDirection.Backward); 436elementEnd = new TextPointer(tree, _textElementNode, ElementEdge.AfterEnd, LogicalDirection.Backward);
System\Windows\Documents\TextElementEnumerator.cs (1)
141Invariant.Assert(_navigator.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart,
System\Windows\Documents\TextFindEngine.cs (5)
202direction = LogicalDirection.Backward; 312hasPreceedingSeparatorChar = HasNeighboringSeparatorChar(oppositeEndPosition, LogicalDirection.Backward); 317hasPreceedingSeparatorChar = HasNeighboringSeparatorChar(position, LogicalDirection.Backward); 920context = pointer.GetPointerContext(LogicalDirection.Backward); 923TextSchema.IsFormattingType(pointer.GetElementType(LogicalDirection.Backward)))
System\Windows\Documents\TextPointer.cs (14)
501/// is <see cref="System.Windows.Documents.LogicalDirection.Backward"/>, or if it is positioned 1330LogicalDirection direction = count < 0 ? LogicalDirection.Backward : LogicalDirection.Forward; 1615TextPointerContext backwardContext = position.GetPointerContext(LogicalDirection.Backward); 1619TextSchema.IsFormattingType(position.GetAdjacentElement(LogicalDirection.Backward).GetType())) 1621position.MoveToNextContextPosition(LogicalDirection.Backward); 1622backwardContext = position.GetPointerContext(LogicalDirection.Backward); 1803if (direction == LogicalDirection.Backward) 2703oppositeDirection = (contentDirection == LogicalDirection.Forward) ? LogicalDirection.Backward : LogicalDirection.Forward; 3498symbolType = previousNode.GetPointerContext(LogicalDirection.Backward); 3518symbolType = lastChildNode.GetPointerContext(LogicalDirection.Backward); 3527symbolType = node.GetPointerContext(LogicalDirection.Backward); 4001if (gravity == LogicalDirection.Backward) 4027if (gravity == LogicalDirection.Backward) 4060return (this.Edge == ElementEdge.BeforeStart || this.Edge == ElementEdge.BeforeEnd) ? LogicalDirection.Forward : LogicalDirection.Backward;
System\Windows\Documents\TextPointerBase.cs (36)
90else if (direction == LogicalDirection.Backward && limit.CompareTo(thisPointer) >= 0) 185Type backwardType = backwardPosition.GetElementType(LogicalDirection.Backward); 189TextPointerContext backwardContext = backwardPosition.GetPointerContext(LogicalDirection.Backward); 230TextPointerContext backwardContext = position.GetPointerContext(LogicalDirection.Backward); 255TextPointerContext backwardContext = position.GetPointerContext(LogicalDirection.Backward); 272position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart; 388return IsAtNonMergeableInlineEdge(position, LogicalDirection.Backward); 423if (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 554MoveToNextWordBoundary(navigator, direction == LogicalDirection.Backward ? LogicalDirection.Forward : LogicalDirection.Backward); 558if (direction == LogicalDirection.Backward) 567wordStart = RestrictWithinBlock(thisPosition, wordStart, LogicalDirection.Backward); 573wordStart = wordStart.GetFrozenPointer(LogicalDirection.Backward); 578wordStart = wordEnd.GetFrozenPointer(LogicalDirection.Backward); 588Invariant.Assert(!(direction == LogicalDirection.Backward) || position.CompareTo(limit) >= 0, "for backward direction position must be >= than limit"); 591while (direction == LogicalDirection.Backward ? position.CompareTo(limit) > 0 : position.CompareTo(limit) < 0) 612return limit.GetInsertionPosition(direction == LogicalDirection.Backward ? LogicalDirection.Forward : LogicalDirection.Backward); 631(direction == LogicalDirection.Backward && IsCharUnicodeNewLine(textBuffer[1])) 715thisPosition.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.ElementStart; 726thisPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementEnd && 727!typeof(Inline).IsAssignableFrom(thisPosition.GetElementType(LogicalDirection.Backward)); 741while (pointer.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 747pointer = pointer.GetNextContextPosition(LogicalDirection.Backward); 779paragraphOrBlockUIContainer.ElementStart.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 983(direction == LogicalDirection.Backward && thisNavigator.CompareTo(initialPosition) < 0)) 1013if (direction == LogicalDirection.Backward) 1151oppositeDirection = LogicalDirection.Backward; 1264symbolCount += LeaveNonMergeableAncestor(thisNavigator, LogicalDirection.Backward); 1269if (direction == LogicalDirection.Backward && IsAtNonMergeableInlineStart(thisNavigator)) 1271symbolCount += LeaveNonMergeableAncestor(thisNavigator, LogicalDirection.Backward); 1332TextPointerContext backwardContext = position.GetPointerContext(LogicalDirection.Backward); 1367if (position.GetTextInRun(LogicalDirection.Backward, neighborhood, 0, 1) == 1 && 1426runLength = Math.Min(navigator.GetTextRunLength(LogicalDirection.Backward), SelectionWordBreaker.MinContextLength - preceedingCount); 1436navigator.MoveToInsertionPosition(LogicalDirection.Backward); 1438while (navigator.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.Text);
System\Windows\Documents\TextRangeBase.cs (24)
81textPointer = textPointer.GetFormatNormalizedPosition(LogicalDirection.Backward); 195normalizedPosition.MoveToInsertionPosition(LogicalDirection.Backward); 211!TextPointerBase.IsAtWordBoundary(thisRange.Start, LogicalDirection.Backward)) 305(TextPointerBase.IsNextToAnyBreak(thisRange.End, LogicalDirection.Backward) || 308ITextPointer newEnd = thisRange.End.GetNextInsertionPosition(LogicalDirection.Backward); 336SkipParagraphContent(start, LogicalDirection.Backward); 354nextContext == TextPointerContext.ElementEnd && direction == LogicalDirection.Backward) && // 359nextContext == TextPointerContext.ElementStart && direction == LogicalDirection.Backward) && // 475position.MoveToNextContextPosition(LogicalDirection.Backward)) ; 519endNavigator.MoveToInsertionPosition(LogicalDirection.Backward); 765bool theParagraphIsTheFirstInCollection = navigator.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart; 1254while (start.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 1258start = start.GetNextContextPosition(LogicalDirection.Backward); 1314if (thisRange.Start.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.Text && 1361(insertPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.None || 1362insertPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) && 1375ITextPointer newStart = insertPosition.GetFrozenPointer(LogicalDirection.Backward); 1629context = end.GetPointerContext(LogicalDirection.Backward); 1632end.MoveToNextContextPosition(LogicalDirection.Backward); 1633context = end.GetPointerContext(LogicalDirection.Backward); 1725end = GetNormalizedPosition(thisRange, end, LogicalDirection.Backward); 1732if (start.LogicalDirection == LogicalDirection.Backward) 1735start = end.GetFrozenPointer(LogicalDirection.Backward); 1962!TextPointerBase.IsAtInsertionPosition(end, LogicalDirection.Backward))
System\Windows\Documents\TextRangeEdit.cs (31)
68if (!keepEmptyFormatting && splitPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 265while (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 280position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementEnd && 282(firstInline = position.GetAdjacentElement(LogicalDirection.Backward) as Inline) != null && 332inline.ElementStart.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 419if (start.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 541else if (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 557Invariant.Assert(position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementEnd, "position must be after ElementEnd"); 969TextPointer start = firstChild.ElementStart.GetFrozenPointer(LogicalDirection.Backward); 978lastChild = (Inline)end.GetAdjacentElement(LogicalDirection.Backward); 1033if (pointer.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 1250if (rangeStart.CompareTo(rangeEnd) < 0 && rangeEnd.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 1252rangeEnd = rangeEnd.GetNextInsertionPosition(LogicalDirection.Backward); 1260rangeEnd = rangeEnd.GetInsertionPosition(LogicalDirection.Backward); 1269TextPointerContext backwardContext = position.GetPointerContext(LogicalDirection.Backward); 1280while (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 1300while (previousPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementEnd && 1301TextSchema.IsMergeableInline(previousPosition.GetAdjacentElement(LogicalDirection.Backward).GetType())) 1303previousPosition = ((Inline)previousPosition.GetAdjacentElement(LogicalDirection.Backward)).ContentEnd; 1441while (startPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 1589oppositeDirection = LogicalDirection.Backward; 1597direction = LogicalDirection.Backward; 1615Invariant.Assert(direction == LogicalDirection.Forward && nextPosition.CompareTo(end) < 0 || direction == LogicalDirection.Backward && nextPosition.CompareTo(end) > 0, 1627if (direction == LogicalDirection.Forward && nextPosition.CompareTo(end) > 0 || direction == LogicalDirection.Backward && nextPosition.CompareTo(end) < 0) 1641if (direction == LogicalDirection.Forward && nextPosition.CompareTo(end) >= 0 || direction == LogicalDirection.Backward && nextPosition.CompareTo(end) <= 0) 2055Span parent = (Span)end.GetAdjacentElement(LogicalDirection.Backward); 2120if (start.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 2165DependencyObject backwardElement = end.GetAdjacentElement(LogicalDirection.Backward); 2189start.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 2191start.GetAdjacentElement(LogicalDirection.Backward) == commonAncestor) 2236if (start.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart &&
System\Windows\Documents\TextRangeEditLists.cs (9)
78while (secondParagraphOrBlockUIContainer.ElementStart.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 102TextElement previousBlock = secondParagraphOrBlockUIContainer.ElementStart.GetAdjacentElement(LogicalDirection.Backward) as TextElement; 150ListItem precedingListItem = positionAfterSecondParagraph.GetAdjacentElement(LogicalDirection.Backward) as ListItem; 155Invariant.Assert(positionAfterSecondParagraph.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementEnd); 188while (navigator.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 190navigator.MoveToNextContextPosition(LogicalDirection.Backward); 211if (mergePosition.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.ElementEnd || 217List precedingList = mergePosition.GetAdjacentElement(LogicalDirection.Backward) as List; 764TextPointer adjustedEnd = list.ElementEnd.GetInsertionPosition(LogicalDirection.Backward);
System\Windows\Documents\TextRangeEditTables.cs (13)
69TextPointer lastCellPointer = (TextPointer)range.TextSegments[0].End.GetNextInsertionPosition(LogicalDirection.Backward); 451if (direction == LogicalDirection.Backward && movingCell == anchorCell) 570row.ContentStart.GetNextInsertionPosition(LogicalDirection.Backward); 602row.ContentStart.GetNextInsertionPosition(LogicalDirection.Backward); 748bool insertBefore = position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart; 815while (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementEnd) 817position = position.GetNextContextPosition(LogicalDirection.Backward); 898else if (position.GetAdjacentElementFromOuterPosition(LogicalDirection.Backward) is Run) 901insertionPosition.MoveToNextContextPosition(LogicalDirection.Backward); 1077TextPointer end = ((TextPointer)textSegment.End).GetNextInsertionPosition(LogicalDirection.Backward); 1965endPosition = endPosition.GetInsertionPosition(LogicalDirection.Backward); 2054movingPosition = movingPosition.GetInsertionPosition(LogicalDirection.Backward); 2092movingPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart &&
System\Windows\Documents\TextRangeSerialization.cs (17)
82range.End.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.ElementStart; 211while (rangeEnd.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 213rangeEnd = rangeEnd.GetNextContextPosition(LogicalDirection.Backward); 552InlineUIContainer inlineUIContainer = textReader.GetAdjacentElement(LogicalDirection.Backward) as InlineUIContainer; 553BlockUIContainer blockUIContainer = textReader.GetAdjacentElement(LogicalDirection.Backward) as BlockUIContainer; 1420while (positionBeforeParagraph.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 1423positionBeforeParagraph = positionBeforeParagraph.GetNextContextPosition(LogicalDirection.Backward); 1425while (positionBeforeParagraph.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 1429positionBeforeParagraph = positionBeforeParagraph.GetNextContextPosition(LogicalDirection.Backward); 1463if (navigator.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementEnd) 1465navigator = navigator.GetNextContextPosition(LogicalDirection.Backward); 1519TextPointerContext backwardFromEnd = end.GetPointerContext(LogicalDirection.Backward); 1524Invariant.Assert(itemType.IsAssignableFrom(end.GetAdjacentElement(LogicalDirection.Backward).GetType()), 1528TextPointerContext backwardFromStart = start.GetPointerContext(LogicalDirection.Backward); 1531Invariant.Assert(!(backwardFromStart == TextPointerContext.ElementEnd) || itemType.IsAssignableFrom(start.GetAdjacentElement(LogicalDirection.Backward).GetType()), 1616TextPointerContext passedContext = start.GetPointerContext(LogicalDirection.Backward); 1929while (hyperlinkStart.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart &&
System\Windows\Documents\TextSchema.cs (1)
163TextElement leftElement = position.GetAdjacentElementFromOuterPosition(LogicalDirection.Backward);
System\windows\Documents\TextSegment.cs (1)
76_start = startPosition.GetFrozenPointer(preserveLogicalDirection ? startPosition.LogicalDirection : LogicalDirection.Backward);
System\windows\Documents\TextSelection.cs (27)
469ITextPointer reversePosition = caretPosition.CreatePointer(direction == LogicalDirection.Forward ? LogicalDirection.Backward : LogicalDirection.Forward); 475TextPointerBase.IsNextToPlainLineBreak(caretPosition, LogicalDirection.Backward) || 476TextSchema.IsBreak(caretPosition.GetElementType(LogicalDirection.Backward)))) 484if (caretPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.Text && 507LogicalDirection oppositeDirection = direction == LogicalDirection.Forward ? LogicalDirection.Backward : LogicalDirection.Forward; 640LogicalDirection.Backward : LogicalDirection.Forward; 844movingPosition = cursorWordRange.End.GetFrozenPointer(LogicalDirection.Backward); 848startPosition = anchorWordRange.End.GetFrozenPointer(LogicalDirection.Backward); 966anchorWordRange.Contains(cursorPosition.GetInsertionPosition(LogicalDirection.Backward))) 1389this.SetCaretToPosition(cellStart, LogicalDirection.Backward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false); 1553Invariant.Assert(this.Start.LogicalDirection == LogicalDirection.Backward); 1759return (This.Start.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.Text && 1761This.Start.GetNextInsertionPosition(LogicalDirection.Backward) == null && 1998cursorPosition.LogicalDirection == LogicalDirection.Backward && cursorMousePoint.X < objectEdgeRect.X)) 2004cursorPosition.LogicalDirection == LogicalDirection.Backward && cursorMousePoint.X > objectEdgeRect.X)) 2013cursorPosition.LogicalDirection == LogicalDirection.Backward && cursorMousePoint.X > objectEdgeRect.X)) 2019cursorPosition.LogicalDirection == LogicalDirection.Backward && cursorMousePoint.X < objectEdgeRect.X)) 2181if ((caretPosition.LogicalDirection == LogicalDirection.Backward && // 2182caretPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) || // 2189caretPosition.MoveToNextInsertionPosition(LogicalDirection.Backward); 2198if (caretPosition.LogicalDirection == LogicalDirection.Backward && // 2199caretPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && // 2200(caretPosition.GetNextInsertionPosition(LogicalDirection.Backward) == null || // 2201TextPointerBase.IsNextToAnyBreak(caretPosition, LogicalDirection.Backward))) 2284nextCharacterPosition.SetLogicalDirection(LogicalDirection.Backward); 2292nextCharacterPosition = focusedTextSelection.End.CreatePointer(LogicalDirection.Backward); 2297nextCharacterPosition.MoveToNextInsertionPosition(LogicalDirection.Backward);
System\windows\Documents\TextSelectionHighlightLayer.cs (1)
93(direction == LogicalDirection.Backward && textSegment.Start.CompareTo(textPosition) < 0 && textPosition.CompareTo(textSegment.End) <= 0))
System\Windows\Documents\TextStore.cs (26)
378this.TextSelection.SetCaretToPosition(start, LogicalDirection.Backward, /*allowStopAtLineEnd:*/true, /*allowStopNearSpace:*/true); 696startNavigator.SetLogicalDirection(LogicalDirection.Backward); 992ITextPointer positionCur = position.CreatePointer(LogicalDirection.Backward); 994positionPrev.MoveToNextInsertionPosition(LogicalDirection.Backward); 1080endPointer = CreatePointerAtCharOffset(endIndex, LogicalDirection.Backward); 1081endPointer.MoveToInsertionPosition(LogicalDirection.Backward); 2022this.TextSelection.SetCaretToPosition(range.End, LogicalDirection.Backward, /*allowStopAtLineEnd:*/true, /*allowStopNearSpace:*/true); 2396_previousCompositionStart = (_previousCompositionStartOffset == -1) ? null : textEditor.TextContainer.CreatePointerAtOffset(_previousCompositionStartOffset, LogicalDirection.Backward); 2415_previousCompositionStart = (_previousCompositionStartOffset == -1) ? null : textEditor.TextContainer.CreatePointerAtOffset(_previousCompositionStartOffset, LogicalDirection.Backward); 2913start = CreatePointerAtCharOffset(startIndex, LogicalDirection.Backward); 3045positionNext.MoveToNextInsertionPosition(LogicalDirection.Backward); 3185lineBounds.Union(end.GetCharacterRect(LogicalDirection.Backward)); 3191TextPointerContext context = navigator.GetPointerContext(LogicalDirection.Backward); 3195lineBounds.Union(navigator.GetCharacterRect(LogicalDirection.Backward)); 3200lineBounds.Union(navigator.GetCharacterRect(LogicalDirection.Backward)); 3418TextPointer previousPosition = start.GetNextInsertionPosition(LogicalDirection.Backward); 3431if (start.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 3433start = start.GetNextInsertionPosition(LogicalDirection.Backward); 3466end = (startCharOffset == endCharOffset) ? start : CreatePointerAtCharOffset(endCharOffset, LogicalDirection.Backward); 3498start = start.GetFormatNormalizedPosition(LogicalDirection.Backward); 3503start = start.GetFormatNormalizedPosition(LogicalDirection.Backward); 3504end = end.GetFormatNormalizedPosition(LogicalDirection.Backward); 3646ITextPointer start = this.TextContainer.CreatePointerAtOffset(record.StartOffsetBefore, LogicalDirection.Backward); 3808start = end.GetFrozenPointer(LogicalDirection.Backward); 3986ITextPointer anchor = this.TextContainer.CreatePointerAtOffset(imeSelectionAnchorOffset, LogicalDirection.Backward); 3987ITextPointer moving = this.TextContainer.CreatePointerAtOffset(imeSelectionMovingOffset, LogicalDirection.Backward);
System\Windows\Documents\TextTreeDeleteContentUndoUnit.cs (1)
428navigator.MoveToNextContextPosition(LogicalDirection.Backward);
System\Windows\Documents\TextTreeExtractElementUndoUnit.cs (1)
73end.MoveToNextContextPosition(LogicalDirection.Backward);
System\Windows\Documents\TextTreePropertyUndoUnit.cs (1)
53Invariant.Assert(position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart, "TextTree undo unit out of sync with TextTree.");
System\Windows\Documents\ValidationHelper.cs (1)
74direction != LogicalDirection.Backward)
System.Windows.Controls.Ribbon (3)
Microsoft\Windows\Controls\Ribbon\RibbonTwoLineText.cs (3)
304string firstLineText = secondLinePointer.GetTextInRun(LogicalDirection.Backward); 413lastCharacter = nextLinePointer.GetCharacterRect(LogicalDirection.Backward); 421lastCharacter = _textBlock1.ContentEnd.GetCharacterRect(LogicalDirection.Backward);