543 references to Backward
PresentationFramework (543)
src\Framework\MS\Internal\Annotations\Anchoring\FixedTextSelectionProcessor.cs (3)
117ITextPointer endPointer = segment.End.CreatePointer(LogicalDirection.Backward); 591if (!end.IsAtInsertionPosition && !end.MoveToNextInsertionPosition(LogicalDirection.Backward)) 627end = textView.TextSegments[textView.TextSegments.Count - 1].End.CreatePointer(LogicalDirection.Backward);
src\Framework\MS\Internal\Annotations\Anchoring\TextSelectionHelper.cs (1)
443ITextPointer end = segment.End.CreatePointer(LogicalDirection.Backward);
src\Framework\MS\Internal\Annotations\Component\AnnotationHighlightLayer.cs (6)
260((highlightSegment.Segment.Start.CompareTo(textPosition) == 0) && (direction == LogicalDirection.Backward))) 267((highlightSegment.Segment.End.CompareTo(textPosition) == 0) && (direction == LogicalDirection.Backward))) 788((ps.CompareTo(_segment.End) == 0) && (side == LogicalDirection.Backward)) ) 850IList<HighlightSegment> r2 = r1[i].Split(ps2, LogicalDirection.Backward); 868res = Split(ps2, LogicalDirection.Backward); 1099ITextPointer segmentEnd = cursor.GetInsertionPosition(LogicalDirection.Backward);
src\Framework\MS\Internal\Annotations\Component\MArkedHighlightComponent.cs (4)
683ITextPointer end = anchor.End.CreatePointer(LogicalDirection.Backward); 849nextPointer = nextPointer.CreatePointer(direction == LogicalDirection.Backward ? LogicalDirection.Forward : LogicalDirection.Backward); 880if (direction == LogicalDirection.Backward)
src\Framework\MS\Internal\Annotations\TextAnchor.cs (5)
127textPointer = textPointer.GetInsertionPosition(LogicalDirection.Backward); 231(theirSegment.End.LogicalDirection == LogicalDirection.Backward)) 681end = end.GetInsertionPosition(LogicalDirection.Backward); 688if (start.LogicalDirection == LogicalDirection.Backward) 691start = end.GetFrozenPointer(LogicalDirection.Backward);
src\Framework\MS\Internal\Documents\TableTextElementCollectionInternal.cs (2)
162TextPointer startPosition = new TextPointer(item.TextContainer, item.TextElementNode, ElementEdge.BeforeStart, LogicalDirection.Backward); 163TextPointer endPosition = new TextPointer(item.TextContainer, item.TextElementNode, ElementEdge.AfterEnd, LogicalDirection.Backward);
src\Framework\MS\Internal\Documents\TextBoxLine.cs (3)
121ITextPointer position = _owner.Host.TextContainer.CreatePointerAtOffset(dcp, LogicalDirection.Backward); 126int runLength = Math.Min(128, position.GetTextRunLength(LogicalDirection.Backward)); 128position.GetTextInRun(LogicalDirection.Backward, text, 0, runLength);
src\Framework\MS\Internal\Documents\TextBoxView.cs (27)
637if (offset > 0 && position.LogicalDirection == LogicalDirection.Backward) 668if (position.LogicalDirection == LogicalDirection.Backward && position.Offset > 0) 710lastLineIndex = Math.Min(lastLineIndex, GetLineIndexFromOffset(endOffset, LogicalDirection.Backward)); 749ITextPointer endOfLinePosition = _host.TextContainer.CreatePointerAtOffset(_lineMetrics[lineIndex].EndOffset, LogicalDirection.Backward); 750if (TextPointerBase.IsNextToPlainLineBreak(endOfLinePosition, LogicalDirection.Backward)) 833else if (position.LogicalDirection == LogicalDirection.Backward) 864if (position.Offset == 0 && direction == LogicalDirection.Backward) 870return position.GetFrozenPointer(LogicalDirection.Backward); 901logicalDirection = LogicalDirection.Backward; 909direction == LogicalDirection.Backward) 919logicalDirection = LogicalDirection.Backward; 924logicalDirection = (nextCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 946int lineIndex = GetLineIndexFromPosition(position, LogicalDirection.Backward); 967logicalDirection = LogicalDirection.Backward; 972logicalDirection = (backspaceCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 1309ITextPointer start = _host.TextContainer.CreatePointerAtOffset(_lineMetrics[0].Offset, LogicalDirection.Backward); 1708if (offset > 0 && direction == LogicalDirection.Backward) 1760logicalDirection = (charIndex.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 1937int lastLineIndex = GetLineIndexFromOffset(endOffset, LogicalDirection.Backward); 2055ITextPointer position = _host.TextContainer.CreatePointerAtOffset(unclippedStartOffset, LogicalDirection.Backward); 2056if (TextPointerBase.IsNextToPlainLineBreak(position, LogicalDirection.Backward)) 2100ITextPointer endOfLinePosition = _host.TextContainer.CreatePointerAtOffset(endOffset, LogicalDirection.Backward); 2102if (TextPointerBase.IsNextToPlainLineBreak(endOfLinePosition, LogicalDirection.Backward)) 2151ITextPointer position = _host.TextContainer.CreatePointerAtOffset(unclippedStartOffset, LogicalDirection.Backward); 2152if (TextPointerBase.IsNextToPlainLineBreak(position, LogicalDirection.Backward)) 2179ITextPointer endOfLinePosition = _host.TextContainer.CreatePointerAtOffset(endOffset, LogicalDirection.Backward); 2181if (TextPointerBase.IsNextToPlainLineBreak(endOfLinePosition, LogicalDirection.Backward))
src\Framework\MS\Internal\Documents\TextContainerHelper.cs (7)
101_textContainer.CreatePointerAtOffset(_cpLast, LogicalDirection.Backward), 111_textContainer.CreatePointerAtOffset(_ranges[i * 2 + 1], LogicalDirection.Backward), 129if (cpPos == _cpFirst && position.LogicalDirection == LogicalDirection.Backward || 146if (cpPos == _ranges[i * 2] && position.LogicalDirection == LogicalDirection.Backward || 177endPosition = _textContainer.CreatePointerAtOffset(IsSimple ? _cpLast : _ranges[(_size - 1) * 2 + 1], LogicalDirection.Backward); 468element = position.GetAdjacentElement(LogicalDirection.Backward); 472positionsEnd.Insert(0, position.CreatePointer(LogicalDirection.Backward));
src\Framework\MS\Internal\Documents\TextDocumentView.cs (10)
499if (segment.Start.LogicalDirection == LogicalDirection.Backward) 508if (position.LogicalDirection == LogicalDirection.Backward) 531if (position.TextContainer.Start.CompareTo(position) == 0 && position.LogicalDirection == LogicalDirection.Backward) 779position = paragraph.EndPosition.CreatePointer(LogicalDirection.Backward); 885position = blockUIContainer.ContentEnd.CreatePointer(LogicalDirection.Backward); 899position = paragraph.EndPosition.CreatePointer(LogicalDirection.Backward); 2410lineRange = new TextSegment(blockUIContainer.ContentStart.CreatePointer(LogicalDirection.Forward), blockUIContainer.ContentEnd.CreatePointer(LogicalDirection.Backward)); 2918positionOut = blockUIContainer.ContentEnd.CreatePointer(LogicalDirection.Backward); 3299segmentEnd = _textContainer.Start.CreatePointer(backgroundFormatInfo.CPInterrupted, LogicalDirection.Backward); 3497if (textPointer.LogicalDirection == LogicalDirection.Backward && textPointer.CompareTo(textElement.ElementEnd) == 0)
src\Framework\MS\Internal\Documents\TextParagraphView.cs (1)
435if (position.LogicalDirection == LogicalDirection.Backward && lineIndex != 0)
src\Framework\MS\Internal\PtsHost\Line.cs (3)
211while (position.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.Text && 220string precedingTextString = position.GetTextInRun(LogicalDirection.Backward); 616type = position.GetPointerContext((charIndex.TrailingLength == 0) ? LogicalDirection.Forward : LogicalDirection.Backward);
src\Framework\MS\Internal\PtsHost\OptimalTextSource.cs (2)
161while (position.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.Text && 170string precedingTextString = position.GetTextInRun(LogicalDirection.Backward);
src\Framework\MS\Internal\PtsHost\TextParaClient.cs (21)
785if (position.LogicalDirection == LogicalDirection.Backward && dcp > 0) 1245LogicalDirection logicalDirection = (charHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 1903if (orientation == LogicalDirection.Backward && originalDcp > 0 && (context == TextPointerContext.Text || context == TextPointerContext.EmbeddedElement)) 2002if (orientation == LogicalDirection.Backward && originalDcp > 0 && (context == TextPointerContext.Text || context == TextPointerContext.EmbeddedElement)) 2256return (TextPointerBase.IsNextToAnyBreak(position, LogicalDirection.Backward)); 2626if (position.LogicalDirection == LogicalDirection.Backward) 2733if (position.LogicalDirection == LogicalDirection.Backward) 2845if (dcp == lineDesc.dcpFirst && direction == LogicalDirection.Backward) 2905logicalDirection = LogicalDirection.Backward; 2912else if ((nextCharacterHit.FirstCharacterIndex + nextCharacterHit.TrailingLength == lineDesc.dcpFirst) && direction == LogicalDirection.Backward) 2922logicalDirection = LogicalDirection.Backward; 2927logicalDirection = (nextCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 2983if (dcp == element.dcpFirst && direction == LogicalDirection.Backward) 3073logicalDirection = LogicalDirection.Backward; 3081else if ((nextCharacterHit.FirstCharacterIndex + nextCharacterHit.TrailingLength == element.dcpFirst) && direction == LogicalDirection.Backward) 3092logicalDirection = LogicalDirection.Backward; 3097logicalDirection = (nextCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 3188logicalDirection = LogicalDirection.Backward; 3193logicalDirection = (backspaceCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 3318logicalDirection = LogicalDirection.Backward; 3323logicalDirection = (backspaceCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward;
src\Framework\MS\Internal\PtsHost\TextParagraph.cs (2)
596StructuralCache.CurrentFormatContext.DependentMax = StructuralCache.TextContainer.CreatePointerAtOffset(dcpDependAbsolute, LogicalDirection.Backward); 781StructuralCache.CurrentFormatContext.DependentMax = StructuralCache.TextContainer.CreatePointerAtOffset(dcpDependAbsolute, LogicalDirection.Backward);
src\Framework\MS\Internal\PtsHost\TextParaLineResult.cs (2)
117return _owner.GetTextPosition(_dcp + _cchContent, LogicalDirection.Backward); 196_endPosition = _owner.GetTextPosition(_dcp + _cch, LogicalDirection.Backward);
src\Framework\MS\Internal\Text\ComplexLine.cs (4)
97ITextPointer position = _owner.TextContainer.CreatePointerAtOffset(dcp, LogicalDirection.Backward); 100while (position.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.Text && 108string precedingTextString = position.GetTextInRun(LogicalDirection.Backward); 304type = position.GetPointerContext(LogicalDirection.Backward);
src\Framework\MS\Internal\Text\TextLineResult.cs (2)
111return _owner.TextContainer.CreatePointerAtOffset(_dcp + _cchContent, LogicalDirection.Backward); 194_endPosition = _owner.TextContainer.CreatePointerAtOffset(_dcp + _cch, LogicalDirection.Backward);
src\Framework\System\Windows\Annotations\AnnotationHelper.cs (2)
694start.MoveToNextInsertionPosition(LogicalDirection.Backward); 879(selection.End.LogicalDirection == LogicalDirection.Backward)))
src\Framework\System\Windows\Controls\PasswordTextContainer.cs (5)
523return new PasswordTextPointer(this, LogicalDirection.Backward, 0); 749if (position.LogicalDirection == LogicalDirection.Backward) 827(position.LogicalDirection == gravity || gravity == LogicalDirection.Backward)) 851lastLogicalDirection = LogicalDirection.Backward; 863position.LogicalDirection == LogicalDirection.Backward &&
src\Framework\System\Windows\Controls\PasswordTextNavigator.cs (2)
144if ((direction == LogicalDirection.Backward && _offset == 0) || 431if (direction == LogicalDirection.Backward)
src\Framework\System\Windows\Controls\TextAdaptor.cs (4)
127TextRangeAdaptor.MoveToInsertionPosition(end, LogicalDirection.Backward); 287FrameworkContentElement element = pointer.GetAdjacentElement(LogicalDirection.Backward) as FrameworkContentElement; 609rangeEnd = position.CreatePointer(LogicalDirection.Backward); 619rangeEnd = position.CreatePointer(LogicalDirection.Backward);
src\Framework\System\Windows\Controls\TextBlock.cs (12)
2243logicalDirection = (charIndex.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 2275if (orientedPosition.LogicalDirection == LogicalDirection.Backward && characterIndex > 0) 2344if (orientedPosition.LogicalDirection == LogicalDirection.Backward && originalCharacterIndex > 0) 2437&& TextPointerBase.IsNextToAnyBreak(endOfLineTextPointer, LogicalDirection.Backward)) 2488if (position.LogicalDirection == LogicalDirection.Backward) 2555if (characterIndex == dcp && direction == LogicalDirection.Backward) 2629logicalDirection = LogicalDirection.Backward; 2636else if ((nextCharacterHit.FirstCharacterIndex + nextCharacterHit.TrailingLength == dcp) && direction == LogicalDirection.Backward) 2646logicalDirection = LogicalDirection.Backward; 2651logicalDirection = (nextCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 2734logicalDirection = LogicalDirection.Backward; 2739logicalDirection = (backspaceCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward;
src\Framework\System\Windows\Controls\TextBox.cs (5)
234return (textPointer.LogicalDirection == LogicalDirection.Backward) ? offset - 1 : offset; 469TextPointer textPointer = TextContainer.CreatePointerAtOffset(charIndex, LogicalDirection.Backward); 470textPointer = textPointer.GetInsertionPosition(LogicalDirection.Backward); 479textPointer = textPointer.GetPositionAtOffset(0, LogicalDirection.Backward); 517spellingError = this.TextEditor.GetSpellingErrorAtPosition(position, LogicalDirection.Backward);
src\Framework\System\Windows\Controls\TextRangeAdaptor.cs (29)
538TextPointerBase.MoveToNextInsertionPosition(_start, LogicalDirection.Backward); 549MoveToNextWordBoundary(_start, LogicalDirection.Backward); 566TextPointerContext backwardContext = _start.GetPointerContext(LogicalDirection.Backward); 574_start.MoveToNextContextPosition(LogicalDirection.Backward); 580TextPointerContext backwardContext = _end.GetPointerContext(LogicalDirection.Backward); 824position.SetLogicalDirection(isStart ? LogicalDirection.Forward : LogicalDirection.Backward); 846previousLineEnd = GetInsertionPosition(previousLineEnd, LogicalDirection.Backward); 851position.SetLogicalDirection(isStart ? LogicalDirection.Forward : LogicalDirection.Backward); 881position.SetLogicalDirection(isStart ? LogicalDirection.Forward : LogicalDirection.Backward); 892if (previousParagraphEnd.MoveToNextInsertionPosition(LogicalDirection.Backward)) 902position.SetLogicalDirection(isStart ? LogicalDirection.Forward : LogicalDirection.Backward); 949if (position.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.ElementStart) 955Invariant.Assert(position.MoveToNextContextPosition(LogicalDirection.Backward)); 957MoveToInsertionPosition(position, LogicalDirection.Backward); 967if (position.CompareTo(GetInsertionPosition(position.TextContainer.End, LogicalDirection.Backward)) != 0) 1005LogicalDirection direction = (count > 0) ? LogicalDirection.Forward : LogicalDirection.Backward; 1062if (direction == LogicalDirection.Backward) 1064while (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.Text) 1066if (!position.MoveToNextContextPosition(LogicalDirection.Backward)) 1103position.MoveToNextInsertionPosition(LogicalDirection.Backward); 1154if (direction == LogicalDirection.Backward) 1157MoveToInsertionPosition(position, LogicalDirection.Backward); 1229while (IsElementBoundary(end.GetPointerContext(LogicalDirection.Backward))) 1231if (!end.MoveToNextContextPosition(LogicalDirection.Backward) || start.CompareTo(end) >= 0) 1693ITextPointer position = _end.CreatePointer(LogicalDirection.Backward); 1704attrEnd = position.CreatePointer(LogicalDirection.Backward); 1715if (!position.MoveToNextContextPosition(LogicalDirection.Backward)) 1742attrEnd = position.CreatePointer(LogicalDirection.Backward); 1970if (MoveToUnitBoundary(position, start, count < 0 ? LogicalDirection.Backward : LogicalDirection.Forward, unit))
src\Framework\System\Windows\Documents\CompositionAdorner.cs (3)
331ITextPointer rangeEnd = end.CreatePointer(LogicalDirection.Backward); 488ITextPointer end = _textView.TextContainer.Start.CreatePointer(_endOffset, LogicalDirection.Backward); 609endLinePointer = textSegment.End.CreatePointer(LogicalDirection.Backward);
src\Framework\System\Windows\Documents\DocumentSequenceTextPointer.cs (6)
371if (!isAtCaretUnitBoundary && ((ITextPointer)this).LogicalDirection == LogicalDirection.Backward) 914Debug.Assert(direction == LogicalDirection.Backward); 991tp2.ChildPointer.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.None) 1055LogicalDirection scanDir = (distance > 0 ? LogicalDirection.Forward : LogicalDirection.Backward); 1083if (scanDir == LogicalDirection.Backward) 1091if (!((cdb.IsHead && scanDir == LogicalDirection.Backward)
src\Framework\System\Windows\Documents\FixedFindEngine.cs (6)
157end = new DocumentSequenceTextPointer(childBlock, new FixedTextPointer(false, LogicalDirection.Backward, fixedDoc.FixedContainer.FixedTextBuilder.GetPageEndFlowPosition(translatedPageNumber))); 163end = new DocumentSequenceTextPointer(childBlock, new FixedTextPointer(false, LogicalDirection.Backward, fixedDoc.FixedContainer.FixedTextBuilder.GetPageEndFlowPosition(translatedPageNumber))); 172end = new FixedTextPointer(false, LogicalDirection.Backward, textBuilder.GetPageEndFlowPosition(pageNumber)); 178end = new FixedTextPointer(false, LogicalDirection.Backward, textBuilder.GetPageEndFlowPosition(pageNumber)); 331new FixedTextPointer(false, LogicalDirection.Backward, pageEndFlowPosition)); 337firstSearchPageEnd = new FixedTextPointer(false, LogicalDirection.Backward, startAsFTP.FixedTextContainer.FixedTextBuilder.GetPageEndFlowPosition(pageNumber));
src\Framework\System\Windows\Documents\FixedTextBuilder.cs (1)
443textdir == LogicalDirection.Backward &&
src\Framework\System\Windows\Documents\FixedTextContainer.cs (2)
593_start = new FixedTextPointer(false, LogicalDirection.Backward, new FlowPosition(this, this.FixedTextBuilder.FixedFlowMap.FlowStartEdge, 1)); 604FixedTextPointer eStart = new FixedTextPointer(false, LogicalDirection.Backward, pStart);
src\Framework\System\Windows\Documents\FixedTextPointer.cs (1)
594if (!isAtCaretUnitBoundary && this.LogicalDirection == LogicalDirection.Backward)
src\Framework\System\Windows\Documents\FixedTextView.cs (12)
90textPos = _CreateTextPointer(fixedp, LogicalDirection.Backward); 376scanDir = LogicalDirection.Backward; 416if (scanDir == LogicalDirection.Backward) 549edge = LogicalDirection.Backward; 628ITextPointer end = _CreateTextPointer(new FixedPosition(lastNode, lastIndex), LogicalDirection.Backward); 661(tp.CompareTo(this.End) == 0 && (tp.LogicalDirection == LogicalDirection.Backward || this.IsContainerEnd)) 769_end = new FixedTextPointer(false, LogicalDirection.Backward, flowEnd); 830edge = (hit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 893itp = ((ITextPointer)this.End).CreatePointer(LogicalDirection.Backward); 894itp.MoveToInsertionPosition(LogicalDirection.Backward); 1118textdir = LogicalDirection.Backward; 1159dir = LogicalDirection.Backward;
src\Framework\System\Windows\Documents\FlowPosition.cs (8)
185Debug.Assert(dir == LogicalDirection.Forward || dir == LogicalDirection.Backward); 296(tst = flowScan.GetPointerContext(LogicalDirection.Backward))!= TextPointerContext.None) 302FlowPosition flowEnd = flowScan.GetClingPosition(LogicalDirection.Backward); 312flowScan.Move(LogicalDirection.Backward); 321LogicalDirection dir = (distance >= 0 ? LogicalDirection.Forward : LogicalDirection.Backward); 435Debug.Assert(dir == LogicalDirection.Backward); 593Debug.Assert(dir == LogicalDirection.Backward); 643Debug.Assert(dir == LogicalDirection.Backward);
src\Framework\System\Windows\Documents\FrameworkRichTextComposition.cs (2)
55return _ResultStart == null ? null : (TextPointer)_ResultStart.GetFrozenPointer(LogicalDirection.Backward); 77return _CompositionStart == null ? null : (TextPointer)_CompositionStart.GetFrozenPointer(LogicalDirection.Backward);
src\Framework\System\Windows\Documents\FrameworkTextComposition.cs (2)
226_resultStart = start.GetFrozenPointer(LogicalDirection.Backward); 247_compositionStart = start.GetFrozenPointer(LogicalDirection.Backward);
src\Framework\System\Windows\Documents\ImmComposition.cs (11)
752ITextPointer endPosition = endNavigator.CreatePointer(LogicalDirection.Backward); 889rectCaret = view.GetRectangleFromTextPosition(_editor.Selection.End.CreatePointer(LogicalDirection.Backward)); 1320ITextPointer startAttribute = _startComposition.CreatePointer(startOffset, LogicalDirection.Backward); 1566switch (navigator.GetPointerContext(LogicalDirection.Backward)) 1570int copied = navigator.GetTextInRun(LogicalDirection.Backward, buffer, 0, buffer.Length); 1584if (!navigator.GetElementType(LogicalDirection.Backward).IsSubclassOf(typeof(Inline))) 1588navigator.MoveToNextContextPosition(LogicalDirection.Backward); 1597navigator.MoveToNextContextPosition(LogicalDirection.Backward); 1694ITextPointer start = range.Start.CreatePointer(LogicalDirection.Backward); 1721switch (position.GetPointerContext(LogicalDirection.Backward)) 1851positionNext.MoveToNextInsertionPosition(LogicalDirection.Backward);
src\Framework\System\Windows\Documents\List.cs (1)
260listItem = block.ElementStart.GetAdjacentElement(LogicalDirection.Backward) as ListItem;
src\Framework\System\Windows\Documents\NullTextContainer.cs (1)
42_start = new NullTextPointer(this, LogicalDirection.Backward);
src\Framework\System\windows\Documents\SelectionWordBreaker.cs (1)
53if (insideWordDirection == LogicalDirection.Backward)
src\Framework\System\Windows\Documents\Span.cs (2)
230if (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 232position = position.GetNextContextPosition(LogicalDirection.Backward);
src\Framework\System\Windows\Documents\Speller.cs (17)
216ExpandToWordBreakAndContext(error.Start, LogicalDirection.Backward, language, out contentStart, out contextStart); 778wordBreakLeft = SearchForWordBreaks(caretPosition, LogicalDirection.Backward, language, 1, false /* stopOnError */); 794FindPositionInSegmentList(textMap, LogicalDirection.Backward, segments, out leftBreakOffset, out rightBreakOffset); 869ExpandToWordBreakAndContext(start, LogicalDirection.Backward, language, out contentStart, out contextStart); 1200inwardDirection = direction == LogicalDirection.Forward ? LogicalDirection.Backward : LogicalDirection.Forward; 1206if (direction == LogicalDirection.Backward) 1241if (direction == LogicalDirection.Backward) 1258if (direction == LogicalDirection.Backward) 1285if (direction == LogicalDirection.Backward) 1373if (direction == LogicalDirection.Backward) 1425searchPosition.MoveByOffset(direction == LogicalDirection.Backward ? -ContextBlockSize : +ContextBlockSize); 1430if (direction == LogicalDirection.Backward && closestErrorPosition.CompareTo(searchPosition) > 0 || 1441if (direction == LogicalDirection.Backward && closestLanguageTransition.CompareTo(searchPosition) > 0 || 1448if (direction == LogicalDirection.Backward) 1476(direction == LogicalDirection.Backward && navigator.CompareTo(haltPosition) > 0)) 1486(direction == LogicalDirection.Backward && navigator.CompareTo(haltPosition) < 0)) 1790_basePosition = contextStart.GetFrozenPointer(LogicalDirection.Backward);
src\Framework\System\Windows\Documents\SpellerError.cs (1)
36_end = end.GetFrozenPointer(LogicalDirection.Backward);
src\Framework\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); 802_position = position.GetFrozenPointer(LogicalDirection.Backward);
src\Framework\System\Windows\Documents\TextContainer.cs (11)
538edge = node.GetEdgeFromOffset(nodeOffset, LogicalDirection.Backward); 650edge = (direction == LogicalDirection.Backward) ? ElementEdge.AfterStart : ElementEdge.BeforeEnd; 661edge = (direction == LogicalDirection.Backward) ? ElementEdge.BeforeStart : ElementEdge.AfterEnd; 672edge = node.GetEdgeFromOffset(nodeOffset, LogicalDirection.Backward); 878originalPosition = this.HasListeners ? new TextPointer(position, LogicalDirection.Backward) : null; 890direction = LogicalDirection.Backward; 903if ((direction == LogicalDirection.Backward && textNode.AfterEndReferenceCount) || 1612if (!_rootNode.CaretUnitBoundaryCache && position.LogicalDirection == LogicalDirection.Backward) 1655startPosition = new TextPointer(this, _rootNode, ElementEdge.AfterStart, LogicalDirection.Backward); 2808startPosition = new TextPointer(this, elementNode, ElementEdge.BeforeStart, LogicalDirection.Backward); 2813endPosition = new TextPointer(this, elementNode, ElementEdge.AfterEnd, LogicalDirection.Backward);
src\Framework\System\windows\Documents\TextEditor.cs (2)
1245string textAdjacent = textContainer.TextSelection.AnchorPosition.GetTextInRun(LogicalDirection.Backward); 1547lastCharacterRect = cursorPosition.GetCharacterRect(LogicalDirection.Backward);
src\Framework\System\windows\Documents\TextEditorContextMenu.cs (1)
192direction = LogicalDirection.Backward;
src\Framework\System\windows\Documents\TextEditorCopyPaste.cs (2)
526This.Selection.SetCaretToPosition(This.Selection.End, LogicalDirection.Backward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/true); 1139start = start.GetPositionAtOffset(0, LogicalDirection.Backward);
src\Framework\System\windows\Documents\TextEditorDragDrop.cs (2)
577selection.SetCaretToPosition(dropPosition, LogicalDirection.Backward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/true); 605selection.SetCaretToPosition(dropPosition, LogicalDirection.Backward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/true);
src\Framework\System\windows\Documents\TextEditorMouse.cs (2)
581Rect lastCharacterRect = snappedCursorPosition.GetCharacterRect(LogicalDirection.Backward); 751LogicalDirection.Backward : LogicalDirection.Forward;
src\Framework\System\windows\Documents\TextEditorSelection.cs (35)
138ITextPointer lineEnd = position.CreatePointer(LogicalDirection.Backward); 211LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Backward : LogicalDirection.Forward; 227LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Forward : LogicalDirection.Backward; 244LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Backward : LogicalDirection.Forward; 260LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Forward : LogicalDirection.Backward; 426ITextPointer previousPosition = lineStartPosition.GetNextInsertionPosition(LogicalDirection.Backward); 491This.Selection.SetCaretToPosition(paragraphRange.Start, LogicalDirection.Backward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false); 496This.Selection.SetCaretToPosition(paragraphRange.End, LogicalDirection.Backward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false); 540This.Selection.SetCaretToPosition(paragraphRange.Start, LogicalDirection.Backward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false); 545if (movingPointer.MoveToNextInsertionPosition(LogicalDirection.Backward)) 549This.Selection.SetCaretToPosition(paragraphRange.Start, LogicalDirection.Backward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false); 876LogicalDirection orientation = TextPointerBase.IsNextToPlainLineBreak(lineRange.End, LogicalDirection.Backward) ? LogicalDirection.Forward : LogicalDirection.Backward; 939This.Selection.SetCaretToPosition(This.TextContainer.End, LogicalDirection.Backward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false); 970LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Backward : LogicalDirection.Forward; 986LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Forward : LogicalDirection.Backward; 1002LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Backward : LogicalDirection.Forward; 1018LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Forward : LogicalDirection.Backward; 1166newMovingPosition = newMovingPosition.GetFrozenPointer(LogicalDirection.Backward); 1208if (This.Selection.ExtendToNextTableRow(LogicalDirection.Backward)) 1284ITextPointer previousPosition = lineStartPosition.GetNextInsertionPosition(LogicalDirection.Backward); 1393if (movingPointer.MoveToNextInsertionPosition(LogicalDirection.Backward)) 1694TextPointerBase.IsNextToParagraphBreak(This.Selection.AnchorPosition, LogicalDirection.Backward)) 1712destination = destination.GetFrozenPointer(LogicalDirection.Backward); 2091LogicalDirection contentDirection = direction == LogicalDirection.Forward ? LogicalDirection.Backward : LogicalDirection.Forward; 2145textEditor.Selection.SetCaretToPosition(textEditor.Selection.End, LogicalDirection.Backward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false); 2154textEditor.Selection.SetCaretToPosition(wordBoundary, LogicalDirection.Backward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false); 2172TextPointerBase.MoveToNextWordBoundary(wordBoundary, LogicalDirection.Backward); 2218wordBoundary.SetLogicalDirection(direction == LogicalDirection.Forward ? LogicalDirection.Backward : LogicalDirection.Forward); 2330movingPosition.LogicalDirection == LogicalDirection.Backward && 2332TextPointerBase.IsNextToAnyBreak(movingPosition, LogicalDirection.Backward)) 2334movingPosition = movingPosition.GetNextInsertionPosition(LogicalDirection.Backward); 2338if (TextPointerBase.IsNextToPlainLineBreak(movingPosition, LogicalDirection.Backward)) 2420ITextPointer position = This.Selection.Start.GetNextInsertionPosition(LogicalDirection.Backward); 2436ITextPointer cellEnd = position.GetNextInsertionPosition(LogicalDirection.Backward);
src\Framework\System\windows\Documents\TextEditorSpelling.cs (7)
70direction = (direction == LogicalDirection.Forward) ? LogicalDirection.Backward : LogicalDirection.Forward; 85direction = (direction == LogicalDirection.Forward) ? LogicalDirection.Backward : LogicalDirection.Forward; 94direction = LogicalDirection.Backward; 187textStart = spellingError.Start.CreatePointer(LogicalDirection.Backward); 195textEnd.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.Text) 197textEnd.MoveToNextContextPosition(LogicalDirection.Backward); 205Invariant.Assert(textEnd.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.Text &&
src\Framework\System\windows\Documents\TextEditorTyping.cs (22)
645ITextPointer deletePosition = position.GetNextInsertionPosition(LogicalDirection.Backward); 670position = position.GetFrozenPointer(LogicalDirection.Backward); 677position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.Text) 699This.Selection.ExtendToNextInsertionPosition(LogicalDirection.Backward); 707else if (backspacePosition.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.Text) 716This.Selection.ExtendToNextInsertionPosition(LogicalDirection.Backward); 748This.Selection.SetCaretToPosition(position, LogicalDirection.Backward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/true); 764LogicalDirection directionOfDelete = position.CompareTo(deletePosition) < 0 ? LogicalDirection.Forward : LogicalDirection.Backward; 799if (directionOfDelete == LogicalDirection.Backward) 836position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 842while (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 849position = position.GetNextContextPosition(LogicalDirection.Backward); 850if (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 858position = position.GetNextContextPosition(LogicalDirection.Backward); 869if (position.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.ElementStart) 883while (navigator.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 890if (!(navigator.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 998TextPointerBase.MoveToNextWordBoundary(wordBoundary, LogicalDirection.Backward); 1402if (HandleTabInTables(This, LogicalDirection.Backward)) 1434This.Selection.SetCaretToPosition(This.Selection.Start, LogicalDirection.Backward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false); 1582ITextPointer caretPosition = This.Selection.End.CreatePointer(LogicalDirection.Backward); 1585This.Selection.SetCaretToPosition(caretPosition, LogicalDirection.Backward, /*allowStopAtLineEnd:*/true, /*allowStopNearSpace:*/true);
src\Framework\System\Windows\Documents\TextElement.cs (3)
308TextPointer contentStart = new TextPointer(tree, _textElementNode, ElementEdge.AfterStart, LogicalDirection.Backward); 367contentStart = new TextPointer(tree, _textElementNode, ElementEdge.AfterStart, LogicalDirection.Backward); 441elementEnd = new TextPointer(tree, _textElementNode, ElementEdge.AfterEnd, LogicalDirection.Backward);
src\Framework\System\Windows\Documents\TextElementEnumerator.cs (1)
147Invariant.Assert(_navigator.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart,
src\Framework\System\Windows\Documents\TextFindEngine.cs (5)
207direction = LogicalDirection.Backward; 317hasPreceedingSeparatorChar = HasNeighboringSeparatorChar(oppositeEndPosition, LogicalDirection.Backward); 322hasPreceedingSeparatorChar = HasNeighboringSeparatorChar(position, LogicalDirection.Backward); 931context = pointer.GetPointerContext(LogicalDirection.Backward); 934TextSchema.IsFormattingType(pointer.GetElementType(LogicalDirection.Backward)))
src\Framework\System\Windows\Documents\TextPointer.cs (13)
512/// is <see cref="System.Windows.Documents.LogicalDirection.Backward"/>, or if it is positioned 1344LogicalDirection direction = count < 0 ? LogicalDirection.Backward : LogicalDirection.Forward; 1629TextPointerContext backwardContext = position.GetPointerContext(LogicalDirection.Backward); 1633TextSchema.IsFormattingType(position.GetAdjacentElement(LogicalDirection.Backward).GetType())) 1635position.MoveToNextContextPosition(LogicalDirection.Backward); 1636backwardContext = position.GetPointerContext(LogicalDirection.Backward); 1820if (direction == LogicalDirection.Backward) 3524symbolType = previousNode.GetPointerContext(LogicalDirection.Backward); 3544symbolType = lastChildNode.GetPointerContext(LogicalDirection.Backward); 3553symbolType = node.GetPointerContext(LogicalDirection.Backward); 4027if (gravity == LogicalDirection.Backward) 4053if (gravity == LogicalDirection.Backward) 4086return (this.Edge == ElementEdge.BeforeStart || this.Edge == ElementEdge.BeforeEnd) ? LogicalDirection.Forward : LogicalDirection.Backward;
src\Framework\System\Windows\Documents\TextPointerBase.cs (36)
92else if (direction == LogicalDirection.Backward && limit.CompareTo(thisPointer) >= 0) 187Type backwardType = backwardPosition.GetElementType(LogicalDirection.Backward); 191TextPointerContext backwardContext = backwardPosition.GetPointerContext(LogicalDirection.Backward); 232TextPointerContext backwardContext = position.GetPointerContext(LogicalDirection.Backward); 257TextPointerContext backwardContext = position.GetPointerContext(LogicalDirection.Backward); 274position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart; 390return IsAtNonMergeableInlineEdge(position, LogicalDirection.Backward); 425if (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 556MoveToNextWordBoundary(navigator, direction == LogicalDirection.Backward ? LogicalDirection.Forward : LogicalDirection.Backward); 560if (direction == LogicalDirection.Backward) 569wordStart = RestrictWithinBlock(thisPosition, wordStart, LogicalDirection.Backward); 575wordStart = wordStart.GetFrozenPointer(LogicalDirection.Backward); 580wordStart = wordEnd.GetFrozenPointer(LogicalDirection.Backward); 590Invariant.Assert(!(direction == LogicalDirection.Backward) || position.CompareTo(limit) >= 0, "for backward direction position must be >= than limit"); 593while (direction == LogicalDirection.Backward ? position.CompareTo(limit) > 0 : position.CompareTo(limit) < 0) 614return limit.GetInsertionPosition(direction == LogicalDirection.Backward ? LogicalDirection.Forward : LogicalDirection.Backward); 633(direction == LogicalDirection.Backward && IsCharUnicodeNewLine(textBuffer[1])) 720thisPosition.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.ElementStart; 731thisPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementEnd && 732!typeof(Inline).IsAssignableFrom(thisPosition.GetElementType(LogicalDirection.Backward)); 746while (pointer.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 752pointer = pointer.GetNextContextPosition(LogicalDirection.Backward); 784paragraphOrBlockUIContainer.ElementStart.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 988(direction == LogicalDirection.Backward && thisNavigator.CompareTo(initialPosition) < 0)) 1018if (direction == LogicalDirection.Backward) 1156oppositeDirection = LogicalDirection.Backward; 1269symbolCount += LeaveNonMergeableAncestor(thisNavigator, LogicalDirection.Backward); 1274if (direction == LogicalDirection.Backward && IsAtNonMergeableInlineStart(thisNavigator)) 1276symbolCount += LeaveNonMergeableAncestor(thisNavigator, LogicalDirection.Backward); 1337TextPointerContext backwardContext = position.GetPointerContext(LogicalDirection.Backward); 1372if (position.GetTextInRun(LogicalDirection.Backward, neighborhood, 0, 1) == 1 && 1431runLength = Math.Min(navigator.GetTextRunLength(LogicalDirection.Backward), SelectionWordBreaker.MinContextLength - preceedingCount); 1441navigator.MoveToInsertionPosition(LogicalDirection.Backward); 1443while (navigator.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.Text);
src\Framework\System\Windows\Documents\TextRangeBase.cs (24)
86textPointer = textPointer.GetFormatNormalizedPosition(LogicalDirection.Backward); 203normalizedPosition.MoveToInsertionPosition(LogicalDirection.Backward); 219!TextPointerBase.IsAtWordBoundary(thisRange.Start, LogicalDirection.Backward)) 316(TextPointerBase.IsNextToAnyBreak(thisRange.End, LogicalDirection.Backward) || 319ITextPointer newEnd = thisRange.End.GetNextInsertionPosition(LogicalDirection.Backward); 347SkipParagraphContent(start, LogicalDirection.Backward); 365nextContext == TextPointerContext.ElementEnd && direction == LogicalDirection.Backward) && // 370nextContext == TextPointerContext.ElementStart && direction == LogicalDirection.Backward) && // 486position.MoveToNextContextPosition(LogicalDirection.Backward)) ; 530endNavigator.MoveToInsertionPosition(LogicalDirection.Backward); 776bool theParagraphIsTheFirstInCollection = navigator.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart; 1265while (start.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 1269start = start.GetNextContextPosition(LogicalDirection.Backward); 1328if (thisRange.Start.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.Text && 1375(insertPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.None || 1376insertPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) && 1389ITextPointer newStart = insertPosition.GetFrozenPointer(LogicalDirection.Backward); 1657context = end.GetPointerContext(LogicalDirection.Backward); 1660end.MoveToNextContextPosition(LogicalDirection.Backward); 1661context = end.GetPointerContext(LogicalDirection.Backward); 1753end = GetNormalizedPosition(thisRange, end, LogicalDirection.Backward); 1760if (start.LogicalDirection == LogicalDirection.Backward) 1763start = end.GetFrozenPointer(LogicalDirection.Backward); 1990!TextPointerBase.IsAtInsertionPosition(end, LogicalDirection.Backward))
src\Framework\System\Windows\Documents\TextRangeEdit.cs (31)
70if (!keepEmptyFormatting && splitPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 267while (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 282position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementEnd && 284(firstInline = position.GetAdjacentElement(LogicalDirection.Backward) as Inline) != null && 334inline.ElementStart.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 421if (start.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 543else if (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 559Invariant.Assert(position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementEnd, "position must be after ElementEnd"); 971TextPointer start = firstChild.ElementStart.GetFrozenPointer(LogicalDirection.Backward); 980lastChild = (Inline)end.GetAdjacentElement(LogicalDirection.Backward); 1035if (pointer.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 1252if (rangeStart.CompareTo(rangeEnd) < 0 && rangeEnd.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 1254rangeEnd = rangeEnd.GetNextInsertionPosition(LogicalDirection.Backward); 1262rangeEnd = rangeEnd.GetInsertionPosition(LogicalDirection.Backward); 1271TextPointerContext backwardContext = position.GetPointerContext(LogicalDirection.Backward); 1282while (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 1302while (previousPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementEnd && 1303TextSchema.IsMergeableInline(previousPosition.GetAdjacentElement(LogicalDirection.Backward).GetType())) 1305previousPosition = ((Inline)previousPosition.GetAdjacentElement(LogicalDirection.Backward)).ContentEnd; 1443while (startPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 1591oppositeDirection = LogicalDirection.Backward; 1599direction = LogicalDirection.Backward; 1617Invariant.Assert(direction == LogicalDirection.Forward && nextPosition.CompareTo(end) < 0 || direction == LogicalDirection.Backward && nextPosition.CompareTo(end) > 0, 1629if (direction == LogicalDirection.Forward && nextPosition.CompareTo(end) > 0 || direction == LogicalDirection.Backward && nextPosition.CompareTo(end) < 0) 1643if (direction == LogicalDirection.Forward && nextPosition.CompareTo(end) >= 0 || direction == LogicalDirection.Backward && nextPosition.CompareTo(end) <= 0) 2057Span parent = (Span)end.GetAdjacentElement(LogicalDirection.Backward); 2122if (start.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 2167DependencyObject backwardElement = end.GetAdjacentElement(LogicalDirection.Backward); 2191start.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 2193start.GetAdjacentElement(LogicalDirection.Backward) == commonAncestor) 2238if (start.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart &&
src\Framework\System\Windows\Documents\TextRangeEditLists.cs (9)
80while (secondParagraphOrBlockUIContainer.ElementStart.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 104TextElement previousBlock = secondParagraphOrBlockUIContainer.ElementStart.GetAdjacentElement(LogicalDirection.Backward) as TextElement; 152ListItem precedingListItem = positionAfterSecondParagraph.GetAdjacentElement(LogicalDirection.Backward) as ListItem; 157Invariant.Assert(positionAfterSecondParagraph.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementEnd); 190while (navigator.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 192navigator.MoveToNextContextPosition(LogicalDirection.Backward); 213if (mergePosition.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.ElementEnd || 219List precedingList = mergePosition.GetAdjacentElement(LogicalDirection.Backward) as List; 766TextPointer adjustedEnd = list.ElementEnd.GetInsertionPosition(LogicalDirection.Backward);
src\Framework\System\Windows\Documents\TextRangeEditTables.cs (13)
71TextPointer lastCellPointer = (TextPointer)range.TextSegments[0].End.GetNextInsertionPosition(LogicalDirection.Backward); 454if (direction == LogicalDirection.Backward && movingCell == anchorCell) 573row.ContentStart.GetNextInsertionPosition(LogicalDirection.Backward); 605row.ContentStart.GetNextInsertionPosition(LogicalDirection.Backward); 751bool insertBefore = position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart; 818while (position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementEnd) 820position = position.GetNextContextPosition(LogicalDirection.Backward); 901else if (position.GetAdjacentElementFromOuterPosition(LogicalDirection.Backward) is Run) 904insertionPosition.MoveToNextContextPosition(LogicalDirection.Backward); 1080TextPointer end = ((TextPointer)textSegment.End).GetNextInsertionPosition(LogicalDirection.Backward); 1968endPosition = endPosition.GetInsertionPosition(LogicalDirection.Backward); 2057movingPosition = movingPosition.GetInsertionPosition(LogicalDirection.Backward); 2095movingPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart &&
src\Framework\System\Windows\Documents\TextRangeSerialization.cs (17)
84range.End.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.ElementStart; 217while (rangeEnd.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 219rangeEnd = rangeEnd.GetNextContextPosition(LogicalDirection.Backward); 558InlineUIContainer inlineUIContainer = textReader.GetAdjacentElement(LogicalDirection.Backward) as InlineUIContainer; 559BlockUIContainer blockUIContainer = textReader.GetAdjacentElement(LogicalDirection.Backward) as BlockUIContainer; 1444while (positionBeforeParagraph.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 1447positionBeforeParagraph = positionBeforeParagraph.GetNextContextPosition(LogicalDirection.Backward); 1449while (positionBeforeParagraph.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && 1453positionBeforeParagraph = positionBeforeParagraph.GetNextContextPosition(LogicalDirection.Backward); 1487if (navigator.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementEnd) 1489navigator = navigator.GetNextContextPosition(LogicalDirection.Backward); 1543TextPointerContext backwardFromEnd = end.GetPointerContext(LogicalDirection.Backward); 1547Invariant.Assert(itemType.IsAssignableFrom(end.GetAdjacentElement(LogicalDirection.Backward).GetType()), "The last pasted fragment item is expected to be a " + itemType.Name); 1550TextPointerContext backwardFromStart = start.GetPointerContext(LogicalDirection.Backward); 1553Invariant.Assert(!(backwardFromStart == TextPointerContext.ElementEnd) || itemType.IsAssignableFrom(start.GetAdjacentElement(LogicalDirection.Backward).GetType()), "An element preceding a pasted fragment is expected to be a " + itemType.Name); 1636TextPointerContext passedContext = start.GetPointerContext(LogicalDirection.Backward); 1949while (hyperlinkStart.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart &&
src\Framework\System\Windows\Documents\TextSchema.cs (1)
165TextElement leftElement = position.GetAdjacentElementFromOuterPosition(LogicalDirection.Backward);
src\Framework\System\windows\Documents\TextSegment.cs (1)
78_start = startPosition.GetFrozenPointer(preserveLogicalDirection ? startPosition.LogicalDirection : LogicalDirection.Backward);
src\Framework\System\windows\Documents\TextSelection.cs (27)
472ITextPointer reversePosition = caretPosition.CreatePointer(direction == LogicalDirection.Forward ? LogicalDirection.Backward : LogicalDirection.Forward); 478TextPointerBase.IsNextToPlainLineBreak(caretPosition, LogicalDirection.Backward) || 479TextSchema.IsBreak(caretPosition.GetElementType(LogicalDirection.Backward)))) 487if (caretPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.Text && 510LogicalDirection oppositeDirection = direction == LogicalDirection.Forward ? LogicalDirection.Backward : LogicalDirection.Forward; 643LogicalDirection.Backward : LogicalDirection.Forward; 847movingPosition = cursorWordRange.End.GetFrozenPointer(LogicalDirection.Backward); ; 851startPosition = anchorWordRange.End.GetFrozenPointer(LogicalDirection.Backward); 969anchorWordRange.Contains(cursorPosition.GetInsertionPosition(LogicalDirection.Backward))) 1392this.SetCaretToPosition(cellStart, LogicalDirection.Backward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false); 1556Invariant.Assert(this.Start.LogicalDirection == LogicalDirection.Backward); 1767return (This.Start.GetPointerContext(LogicalDirection.Backward) != TextPointerContext.Text && 1769This.Start.GetNextInsertionPosition(LogicalDirection.Backward) == null && 2006cursorPosition.LogicalDirection == LogicalDirection.Backward && cursorMousePoint.X < objectEdgeRect.X)) 2012cursorPosition.LogicalDirection == LogicalDirection.Backward && cursorMousePoint.X > objectEdgeRect.X)) 2021cursorPosition.LogicalDirection == LogicalDirection.Backward && cursorMousePoint.X > objectEdgeRect.X)) 2027cursorPosition.LogicalDirection == LogicalDirection.Backward && cursorMousePoint.X < objectEdgeRect.X)) 2189if ((caretPosition.LogicalDirection == LogicalDirection.Backward && // 2190caretPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) || // 2197caretPosition.MoveToNextInsertionPosition(LogicalDirection.Backward); 2206if (caretPosition.LogicalDirection == LogicalDirection.Backward && // 2207caretPosition.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart && // 2208(caretPosition.GetNextInsertionPosition(LogicalDirection.Backward) == null || // 2209TextPointerBase.IsNextToAnyBreak(caretPosition, LogicalDirection.Backward))) 2292nextCharacterPosition.SetLogicalDirection(LogicalDirection.Backward); 2300nextCharacterPosition = focusedTextSelection.End.CreatePointer(LogicalDirection.Backward); 2305nextCharacterPosition.MoveToNextInsertionPosition(LogicalDirection.Backward);
src\Framework\System\windows\Documents\TextSelectionHighlightLayer.cs (1)
98(direction == LogicalDirection.Backward && textSegment.Start.CompareTo(textPosition) < 0 && textPosition.CompareTo(textSegment.End) <= 0))
src\Framework\System\Windows\Documents\TextStore.cs (26)
271this.TextSelection.SetCaretToPosition(start, LogicalDirection.Backward, /*allowStopAtLineEnd:*/true, /*allowStopNearSpace:*/true); 564startNavigator.SetLogicalDirection(LogicalDirection.Backward); 861ITextPointer positionCur = position.CreatePointer(LogicalDirection.Backward); 863positionPrev.MoveToNextInsertionPosition(LogicalDirection.Backward); 940endPointer = CreatePointerAtCharOffset(endIndex, LogicalDirection.Backward); 941endPointer.MoveToInsertionPosition(LogicalDirection.Backward); 1900this.TextSelection.SetCaretToPosition(range.End, LogicalDirection.Backward, /*allowStopAtLineEnd:*/true, /*allowStopNearSpace:*/true); 2261_previousCompositionStart = (_previousCompositionStartOffset == -1) ? null : textEditor.TextContainer.CreatePointerAtOffset(_previousCompositionStartOffset, LogicalDirection.Backward); 2280_previousCompositionStart = (_previousCompositionStartOffset == -1) ? null : textEditor.TextContainer.CreatePointerAtOffset(_previousCompositionStartOffset, LogicalDirection.Backward); 2802start = CreatePointerAtCharOffset(startIndex, LogicalDirection.Backward); 2953positionNext.MoveToNextInsertionPosition(LogicalDirection.Backward); 3094lineBounds.Union(end.GetCharacterRect(LogicalDirection.Backward)); 3100TextPointerContext context = navigator.GetPointerContext(LogicalDirection.Backward); 3104lineBounds.Union(navigator.GetCharacterRect(LogicalDirection.Backward)); 3109lineBounds.Union(navigator.GetCharacterRect(LogicalDirection.Backward)); 3340TextPointer previousPosition = start.GetNextInsertionPosition(LogicalDirection.Backward); 3353if (start.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart) 3355start = start.GetNextInsertionPosition(LogicalDirection.Backward); 3388end = (startCharOffset == endCharOffset) ? start : CreatePointerAtCharOffset(endCharOffset, LogicalDirection.Backward); 3420start = start.GetFormatNormalizedPosition(LogicalDirection.Backward); 3425start = start.GetFormatNormalizedPosition(LogicalDirection.Backward); 3426end = end.GetFormatNormalizedPosition(LogicalDirection.Backward); 3548ITextPointer start = this.TextContainer.CreatePointerAtOffset(record.StartOffsetBefore, LogicalDirection.Backward); 3669start = end.GetFrozenPointer(LogicalDirection.Backward); 3829ITextPointer anchor = this.TextContainer.CreatePointerAtOffset(imeSelectionAnchorOffset, LogicalDirection.Backward); 3830ITextPointer moving = this.TextContainer.CreatePointerAtOffset(imeSelectionMovingOffset, LogicalDirection.Backward);
src\Framework\System\Windows\Documents\TextTreeDeleteContentUndoUnit.cs (1)
451navigator.MoveToNextContextPosition(LogicalDirection.Backward);
src\Framework\System\Windows\Documents\TextTreeExtractElementUndoUnit.cs (1)
76end.MoveToNextContextPosition(LogicalDirection.Backward);
src\Framework\System\Windows\Documents\TextTreePropertyUndoUnit.cs (1)
59Invariant.Assert(position.GetPointerContext(LogicalDirection.Backward) == TextPointerContext.ElementStart, "TextTree undo unit out of sync with TextTree.");
src\Framework\System\Windows\Documents\ValidationHelper.cs (1)
82direction != LogicalDirection.Backward)