897 references to Forward
PresentationFramework (893)
MS\Internal\Annotations\Anchoring\FixedTextSelectionProcessor.cs (3)
96ITextPointer startPointer = segment.Start.CreatePointer(LogicalDirection.Forward); 541if (!start.IsAtInsertionPosition && !start.MoveToNextInsertionPosition(LogicalDirection.Forward)) 599start = textView.TextSegments[0].Start.CreatePointer(LogicalDirection.Forward);
MS\Internal\Annotations\Anchoring\TextSelectionHelper.cs (4)
135current.MoveToNextContextPosition(LogicalDirection.Forward); 190IDocumentPaginatorSource content = GetPointerPage(pointer.CreatePointer(LogicalDirection.Forward), out pageNumber); 231return GetAnchorPointForPointer(anchor.Start.CreatePointer(LogicalDirection.Forward)); 423ITextPointer start = segment.Start.CreatePointer(LogicalDirection.Forward);
MS\Internal\Annotations\Component\AnnotationHighlightLayer.cs (10)
275if (direction == LogicalDirection.Forward) 765if (((ps.CompareTo(_segment.Start) == 0) && (side == LogicalDirection.Forward)) || 823IList<HighlightSegment> r1 = Split(ps1, LogicalDirection.Forward); 991TextPointerContext nextContext = cursor.GetPointerContext(LogicalDirection.Forward); 994Type elementType = cursor.GetElementType(LogicalDirection.Forward); 1008cursor.MoveToNextContextPosition(LogicalDirection.Forward); 1028cursor.MoveToNextContextPosition(LogicalDirection.Forward); 1036cursor.MoveToNextContextPosition(LogicalDirection.Forward); 1056segmentStart = cursor.GetInsertionPosition(LogicalDirection.Forward); 1103ITextView parentView = TextSelectionHelper.GetDocumentPageTextView(TopOwner.Range.Start.CreatePointer(LogicalDirection.Forward));
MS\Internal\Annotations\Component\MarkedHighlightComponent.cs (3)
661ITextPointer start = anchor.Start.CreatePointer(LogicalDirection.Forward); 827nextPointer = nextPointer.CreatePointer(direction == LogicalDirection.Backward ? LogicalDirection.Forward : LogicalDirection.Backward); 833if (direction == LogicalDirection.Forward)
MS\Internal\Annotations\TextAnchor.cs (3)
114textPointer = textPointer.GetInsertionPosition(LogicalDirection.Forward); 216(theirSegment.Start.LogicalDirection == LogicalDirection.Forward)) 667start = start.GetInsertionPosition(LogicalDirection.Forward);
MS\Internal\Documents\DocumentGrid.cs (1)
299tp = tp.CreatePointer(LogicalDirection.Forward);
MS\Internal\Documents\DocumentViewerHelper.cs (1)
402contextMenuPosition = textContainer.TextSelection.Start.CreatePointer(LogicalDirection.Forward);
MS\Internal\Documents\HostedElements.cs (9)
92_currentPosition.MoveToNextContextPosition(LogicalDirection.Forward); 101if (_currentPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart || 102_currentPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.EmbeddedElement) 108_currentPosition.MoveToNextContextPosition(LogicalDirection.Forward); 173switch (_currentPosition.GetPointerContext(LogicalDirection.Forward)) 176Debug.Assert(_currentPosition.GetAdjacentElementFromOuterPosition(LogicalDirection.Forward) is IInputElement); 177currentElement = _currentPosition.GetAdjacentElementFromOuterPosition(LogicalDirection.Forward); 180Debug.Assert(_currentPosition.GetAdjacentElement(LogicalDirection.Forward) is IInputElement); 181currentElement = (IInputElement)_currentPosition.GetAdjacentElement(LogicalDirection.Forward);
MS\Internal\Documents\TextBoxLine.cs (5)
74switch (position.GetPointerContext(LogicalDirection.Forward)) 424StaticTextPointer endOfRunPosition = _owner.Host.TextContainer.Highlights.GetNextPropertyChangePosition(position, LogicalDirection.Forward); 436TextDecorationCollection highlightDecorations = highlights.GetHighlightValue(position, LogicalDirection.Forward, typeof(SpellerHighlightLayer)) as TextDecorationCollection; 454&& highlights.GetHighlightValue(position, LogicalDirection.Forward, typeof(TextSelection)) != DependencyProperty.UnsetValue) 483int charactersCopied = position.GetTextInRun(LogicalDirection.Forward, textBuffer, 0, textBuffer.Length);
MS\Internal\Documents\TextBoxView.cs (20)
655if (position.LogicalDirection == LogicalDirection.Forward || position.Offset == 0) 703firstLineIndex = Math.Max(firstLineIndex, GetLineIndexFromOffset(startOffset, LogicalDirection.Forward)); 783nextLinePosition = _host.TextContainer.CreatePointerAtOffset(_lineMetrics[lineIndex + linesMoved].Offset, LogicalDirection.Forward); 822if (position.LogicalDirection == LogicalDirection.Forward) 860return position.GetFrozenPointer(LogicalDirection.Forward); 862else if (position.Offset == _host.TextContainer.SymbolCount && direction == LogicalDirection.Forward) 874if (direction == LogicalDirection.Forward) 889direction == LogicalDirection.Forward) 899logicalDirection = LogicalDirection.Forward; 909logicalDirection = LogicalDirection.Forward; 918logicalDirection = (nextCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 937return position.GetFrozenPointer(LogicalDirection.Forward); 957logicalDirection = LogicalDirection.Forward; 966logicalDirection = (backspaceCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 984ITextPointer start = _host.TextContainer.CreatePointerAtOffset(_lineMetrics[lineIndex].Offset, LogicalDirection.Forward); 985ITextPointer end = _host.TextContainer.CreatePointerAtOffset(_lineMetrics[lineIndex].Offset + _lineMetrics[lineIndex].ContentLength, LogicalDirection.Forward); 1308ITextPointer end = _host.TextContainer.CreatePointerAtOffset(_lineMetrics[_lineMetrics.Count - 1].EndOffset, LogicalDirection.Forward); 1762logicalDirection = (charIndex.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 1937int firstLineIndex = GetLineIndexFromOffset(range.StartIndex, LogicalDirection.Forward); 2386int lineIndex = GetLineIndexFromOffset(range.StartIndex, LogicalDirection.Forward);
MS\Internal\Documents\TextContainerHelper.cs (15)
92_textContainer.CreatePointerAtOffset(_cpFirst, LogicalDirection.Forward), 102_textContainer.CreatePointerAtOffset(_ranges[i * 2], LogicalDirection.Forward), 122cpPos == _cpLast && position.LogicalDirection == LogicalDirection.Forward) 139cpPos == _ranges[i * 2 + 1] && position.LogicalDirection == LogicalDirection.Forward) 157startPosition = _textContainer.CreatePointerAtOffset(IsSimple ? _cpFirst : _ranges[0], LogicalDirection.Forward); 321if (start.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart) 324element = start.GetAdjacentElement(LogicalDirection.Forward); 336start.MoveToNextContextPosition(LogicalDirection.Forward); 342else if (start.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.EmbeddedElement) 345element = start.GetAdjacentElement(LogicalDirection.Forward); 378if (!start.MoveToNextContextPosition(LogicalDirection.Forward)) 406object element = position.GetAdjacentElement(LogicalDirection.Forward); 444element = position.GetAdjacentElement(LogicalDirection.Forward); 448positionsStart.Insert(0, position.CreatePointer(LogicalDirection.Forward)); 549textPointer = textContainer.CreatePointerAtOffset(0, LogicalDirection.Forward); // Start
MS\Internal\Documents\TextDocumentView.cs (15)
479if (position.LogicalDirection == LogicalDirection.Forward) 508if (segment.End.LogicalDirection == LogicalDirection.Forward) 525else if (position.TextContainer.End.CompareTo(position) == 0 && position.LogicalDirection == LogicalDirection.Forward) 764position = paragraph.StartPosition.CreatePointer(LogicalDirection.Forward); 867position = blockUIContainer.ContentStart.CreatePointer(LogicalDirection.Forward); 881position = paragraph.StartPosition.CreatePointer(LogicalDirection.Forward); 2371lineRange = new TextSegment(blockUIContainer.ContentStart.CreatePointer(LogicalDirection.Forward), blockUIContainer.ContentEnd.CreatePointer(LogicalDirection.Backward)); 2499positionOut = lines[lineIndex].StartPosition.CreatePointer(LogicalDirection.Forward); 2519positionOut = lines[0].StartPosition.CreatePointer(LogicalDirection.Forward); 2531positionOut = lines[lines.Count - 1].StartPosition.CreatePointer(LogicalDirection.Forward); 2871positionOut = blockUIContainer.ContentStart.CreatePointer(LogicalDirection.Forward); 2978positionOut = lines[lineIndex].StartPosition.CreatePointer(LogicalDirection.Forward); 2993positionOut = lines[0].StartPosition.CreatePointer(LogicalDirection.Forward); 3005positionOut = lines[lines.Count - 1].StartPosition.CreatePointer(LogicalDirection.Forward); 3446if (textPointer.LogicalDirection == LogicalDirection.Forward && textPointer.CompareTo(textElement.ElementStart) == 0)
MS\Internal\Documents\TextParagraphView.cs (3)
178positionOut = lines[lineIndex].StartPosition.CreatePointer(LogicalDirection.Forward); 397if (position.LogicalDirection == LogicalDirection.Forward && (lineIndex != lines.Count - 1)) 417(position.LogicalDirection == LogicalDirection.Forward && (lineIndex == lines.Count - 1)))));
MS\Internal\PtsHost\ContainerParagraph.cs (3)
231ITextPointer textPointer = TextContainerHelper.GetTextPointerFromCP(StructuralCache.TextContainer, prevParagraph.ParagraphEndCharacterPosition, LogicalDirection.Forward); 1012switch (textPointer.GetPointerContext(LogicalDirection.Forward)) 1045TextElement element = ((TextPointer)textPointer).GetAdjacentElementFromOuterPosition(LogicalDirection.Forward);
MS\Internal\PtsHost\FlowDocumentPage.cs (3)
955switch (searchPosition.GetPointerContext(LogicalDirection.Forward)) 958DependencyObject embeddedObject = searchPosition.GetAdjacentElement(LogicalDirection.Forward); 972searchPosition.MoveToNextContextPosition(LogicalDirection.Forward);
MS\Internal\PtsHost\Line.cs (6)
144switch (position.GetPointerContext(LogicalDirection.Forward)) 190ITextPointer startPosition = TextContainerHelper.GetTextPointerFromCP(_paraClient.Paragraph.StructuralCache.TextContainer, _cpPara, LogicalDirection.Forward); 191ITextPointer position = TextContainerHelper.GetTextPointerFromCP(_paraClient.Paragraph.StructuralCache.TextContainer, _cpPara + dcp, LogicalDirection.Forward); 593position = TextContainerHelper.GetTextPointerFromCP(_paraClient.Paragraph.StructuralCache.TextContainer, cp, LogicalDirection.Forward) as TextPointer; 598type = position.GetPointerContext((charIndex.TrailingLength == 0) ? LogicalDirection.Forward : LogicalDirection.Backward); 608element = position.GetAdjacentElementFromOuterPosition(LogicalDirection.Forward);
MS\Internal\PtsHost\LineBase.cs (9)
82Invariant.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text, "TextPointer does not point to characters."); 102endOfRunPosition = position.TextContainer.Highlights.GetNextPropertyChangePosition(position, LogicalDirection.Forward); 117int charactersCopied = position.GetTextInRun(LogicalDirection.Forward, textBuffer, 0, textBuffer.Length); 131Invariant.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart, "TextPointer does not point to element start edge."); 135TextElement element = (TextElement)position.GetAdjacentElement(LogicalDirection.Forward); 246Invariant.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd, "TextPointer does not point to element end edge."); 257TextElement element = (TextElement)position.GetAdjacentElement(LogicalDirection.Forward); 300Invariant.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.EmbeddedElement, "TextPointer does not point to embedded object."); 303DependencyObject embeddedObject = position.GetAdjacentElement(LogicalDirection.Forward) as DependencyObject;
MS\Internal\PtsHost\ListParagraph.cs (4)
68TextPointerContext runType = textPointer.GetPointerContext(LogicalDirection.Forward); 71TextElement element = ((TextPointer)textPointer).GetAdjacentElementFromOuterPosition(LogicalDirection.Forward); 117textPointer.MoveToNextContextPosition(LogicalDirection.Forward); 127textPointer.MoveToNextContextPosition(LogicalDirection.Forward);
MS\Internal\PtsHost\OptimalTextSource.cs (4)
91switch (position.GetPointerContext(LogicalDirection.Forward)) 138ITextPointer startPosition = TextContainerHelper.GetTextPointerFromCP(_paraClient.Paragraph.StructuralCache.TextContainer, _cpPara, LogicalDirection.Forward); 139ITextPointer position = TextContainerHelper.GetTextPointerFromCP(_paraClient.Paragraph.StructuralCache.TextContainer, _cpPara + dcp, LogicalDirection.Forward); 177ITextPointer position = TextContainerHelper.GetTextPointerFromCP(_paraClient.Paragraph.StructuralCache.TextContainer, _cpPara + dcp, LogicalDirection.Forward);
MS\Internal\PtsHost\TextParaClient.cs (24)
643RectFromDcpSimpleLines(0, 0, LogicalDirection.Forward, TextPointerContext.Text, ref textDetails.u.full, ref rect, ref vrBaseline); 648RectFromDcpCompositeLines(0, 0, LogicalDirection.Forward, TextPointerContext.Text, ref textDetails.u.full, ref rect, ref vrBaseline); 1091LogicalDirection logicalDirection = (charHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 1684if (orientation == LogicalDirection.Forward) 1781if (orientation == LogicalDirection.Forward) 2034ITextPointer position = Paragraph.StructuralCache.TextContainer.CreatePointerAtOffset(Paragraph.ParagraphStartCharacterPosition + dcp, LogicalDirection.Forward); 2423else if (position.LogicalDirection == LogicalDirection.Forward) 2547else if (position.LogicalDirection == LogicalDirection.Forward) 2623else if (dcp >= lineDesc.dcpLim - 1 && direction == LogicalDirection.Forward) 2652if (direction == LogicalDirection.Forward) 2662if ((nextCharacterHit.FirstCharacterIndex + nextCharacterHit.TrailingLength == lineDesc.dcpLim) && direction == LogicalDirection.Forward) 2672logicalDirection = LogicalDirection.Forward; 2681logicalDirection = LogicalDirection.Forward; 2690logicalDirection = (nextCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 2782else if (dcp >= element.dcpLim - 1 && direction == LogicalDirection.Forward) 2815if (direction == LogicalDirection.Forward) 2825if ((nextCharacterHit.FirstCharacterIndex + nextCharacterHit.TrailingLength == element.dcpLim) && direction == LogicalDirection.Forward) 2836logicalDirection = LogicalDirection.Forward; 2845logicalDirection = LogicalDirection.Forward; 2855logicalDirection = (nextCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 2938logicalDirection = LogicalDirection.Forward; 2947logicalDirection = (backspaceCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 3064logicalDirection = LogicalDirection.Forward; 3073logicalDirection = (backspaceCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward;
MS\Internal\PtsHost\TextParagraph.cs (10)
862ITextPointer textPointer = TextContainerHelper.GetTextPointerFromCP(StructuralCache.TextContainer, ParagraphStartCharacterPosition + dcpFirst, LogicalDirection.Forward); 865while(textPointer.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart) 867TextElement element = ((TextPointer)textPointer).GetAdjacentElementFromOuterPosition(LogicalDirection.Forward); 886ITextPointer textPointer = TextContainerHelper.GetTextPointerFromCP(StructuralCache.TextContainer, ParagraphStartCharacterPosition + dcpFirst, LogicalDirection.Forward); 895if(textPointer.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart) 897TextElement element = ((TextPointer)textPointer).GetAdjacentElementFromOuterPosition(LogicalDirection.Forward); 906textPointer.MoveToNextContextPosition(LogicalDirection.Forward); 911textPointer.MoveToNextContextPosition(LogicalDirection.Forward); 1191if (position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart) 1193invalid = (objectElement != position.GetAdjacentElement(LogicalDirection.Forward));
MS\Internal\PtsHost\TextParaLineResult.cs (2)
121return _owner.GetTextPosition(_dcp + _cch - _cchEllipses, LogicalDirection.Forward); 173_startPosition = _owner.GetTextPosition(_dcp, LogicalDirection.Forward);
MS\Internal\Text\ComplexLine.cs (13)
42switch (position.GetPointerContext(LogicalDirection.Forward)) 283position = new TextPointer(_owner.ContentStart, CalcPositionOffset(charHit), LogicalDirection.Forward); 290type = position.GetPointerContext(LogicalDirection.Forward); 306element = position.GetAdjacentElementFromOuterPosition(LogicalDirection.Forward); 334Debug.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text, "TextPointer does not point to characters."); 353endOfRunPosition = _owner.Highlights.GetNextPropertyChangePosition(position, LogicalDirection.Forward); 368int charactersCopied = position.GetTextInRun(LogicalDirection.Forward, textBuffer, 0, textBuffer.Length); 381Debug.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart, "TextPointer does not point to element start edge."); 385TextElement element = (TextElement)position.GetAdjacentElement(LogicalDirection.Forward); 472Debug.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd, "TextPointer does not point to element end edge."); 476TextElement element = (TextElement)position.GetAdjacentElement(LogicalDirection.Forward); 522Debug.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.EmbeddedElement, "TextPointer does not point to embedded object."); 525DependencyObject element = position.GetAdjacentElement(LogicalDirection.Forward) as DependencyObject;
MS\Internal\Text\DynamicPropertyReader.cs (1)
254selected = position.TextContainer.Highlights.GetHighlightValue(position, LogicalDirection.Forward, typeof(TextSelection));
MS\Internal\Text\TextLineResult.cs (2)
118return _owner.TextContainer.CreatePointerAtOffset(_dcp + _cch - _cchEllipses, LogicalDirection.Forward); 170_startPosition = _owner.TextContainer.CreatePointerAtOffset(_dcp, LogicalDirection.Forward);
MS\Internal\Text\TextProperties.cs (1)
234textDecorations = highlights.GetHighlightValue(highlightPosition, LogicalDirection.Forward, typeof(SpellerHighlightLayer)) as TextDecorationCollection;
System\Windows\Annotations\AnnotationHelper.cs (2)
674end.MoveToNextInsertionPosition(LogicalDirection.Forward); 856(selection.Start.LogicalDirection == LogicalDirection.Forward)) ||
System\Windows\Automation\Peers\TextElementAutomationPeer.cs (1)
117TextPointer endPosition = textElement.ContentStart.GetNextInsertionPosition(LogicalDirection.Forward);
System\Windows\Controls\AccessText.cs (6)
579TextPointerContext symbolType = navigator.GetPointerContext(LogicalDirection.Forward); 583string text = navigator.GetTextInRun(LogicalDirection.Forward); 618navigator.MoveToNextContextPosition(LogicalDirection.Forward); 627TextPointerContext symbolType = navigator.GetPointerContext(LogicalDirection.Forward); 631string text = navigator.GetTextInRun(LogicalDirection.Forward); 654navigator.MoveToNextContextPosition(LogicalDirection.Forward);
System\Windows\Controls\FlowDocumentReader.cs (1)
2005LogicalDirection cpDirection = LogicalDirection.Forward;
System\Windows\Controls\FlowDocumentScrollViewer.cs (1)
1943LogicalDirection cpDirection = LogicalDirection.Forward;
System\Windows\Controls\PasswordBox.cs (2)
1068while (start-- > 0 && selectionStart.MoveToNextInsertionPosition(LogicalDirection.Forward)) 1074while (length-- > 0 && selectionEnd.MoveToNextInsertionPosition(LogicalDirection.Forward))
System\Windows\Controls\PasswordTextContainer.cs (6)
230return new StaticTextPointer(this, ((ITextContainer)this).CreatePointerAtOffset(offset, LogicalDirection.Forward)); 528return new PasswordTextPointer(this, LogicalDirection.Forward, this.SymbolCount); 670textPosition = new PasswordTextPointer(this, LogicalDirection.Forward, offset); 707index = FindIndex(offset, LogicalDirection.Forward); 859Invariant.Assert(lastLogicalDirection != LogicalDirection.Forward); 910Debug.Write($"({position.DebugId}) {position.Offset}/{((position.LogicalDirection == LogicalDirection.Forward) ? "f " : "b ")}");
System\Windows\Controls\PasswordTextNavigator.cs (3)
139(direction == LogicalDirection.Forward && _offset == _container.SymbolCount)) 170if (direction == LogicalDirection.Forward) 194if (direction == LogicalDirection.Forward)
System\Windows\Controls\SinglePageViewer.cs (1)
1538LogicalDirection cpDirection = LogicalDirection.Forward;
System\Windows\Controls\TextAdaptor.cs (8)
115TextRangeAdaptor.MoveToInsertionPosition(start, LogicalDirection.Forward); 615TextPointerContext context = position.GetPointerContext(LogicalDirection.Forward); 618if (childElement == position.GetAdjacentElement(LogicalDirection.Forward)) 620rangeStart = position.CreatePointer(LogicalDirection.Forward); 628if (childElement == position.GetAdjacentElement(LogicalDirection.Forward)) 630rangeStart = position.CreatePointer(LogicalDirection.Forward); 631position.MoveToNextContextPosition(LogicalDirection.Forward); 636position.MoveToNextContextPosition(LogicalDirection.Forward);
System\Windows\Controls\TextBlock.cs (13)
2144logicalDirection = (charIndex.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 2234if (orientedPosition.LogicalDirection == LogicalDirection.Forward || originalCharacterIndex == 0) 2402else if (position.LogicalDirection == LogicalDirection.Forward) 2472else if (characterIndex == (dcp + GetLine(lineIndex).Length) && direction == LogicalDirection.Forward) 2508if (direction == LogicalDirection.Forward) 2522if ((nextCharacterHit.FirstCharacterIndex + nextCharacterHit.TrailingLength == (dcp + GetLine(lineIndex).Length)) && direction == LogicalDirection.Forward) 2532logicalDirection = LogicalDirection.Forward; 2541logicalDirection = LogicalDirection.Forward; 2550logicalDirection = (nextCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 2629logicalDirection = LogicalDirection.Forward; 2638logicalDirection = (backspaceCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 3659switch (position.GetPointerContext(LogicalDirection.Forward)) 3662DependencyObject embeddedObject = position.GetAdjacentElement(LogicalDirection.Forward);
System\Windows\Controls\TextBox.cs (18)
161TextPointer newStart = this.TextContainer.CreatePointerAtOffset(start, LogicalDirection.Forward); 165newStart = newStart.GetInsertionPosition(LogicalDirection.Forward); 173TextPointer newEnd = new TextPointer(newStart, length, LogicalDirection.Forward); 176newEnd = newEnd.GetInsertionPosition(LogicalDirection.Forward); 264TextPointer position = this.TextContainer.CreatePointerAtOffset(charIndex, LogicalDirection.Forward); 445textPointer = textPointer.GetNextInsertionPosition(LogicalDirection.Forward); 454textPointer = textPointer.GetPositionAtOffset(0, LogicalDirection.Forward); 479TextPointer position = this.TextContainer.CreatePointerAtOffset(charIndex, LogicalDirection.Forward); 480SpellingError spellingError = this.TextEditor.GetSpellingErrorAtPosition(position, LogicalDirection.Forward); 484position = this.TextContainer.CreatePointerAtOffset(charIndex + 1, LogicalDirection.Forward); 811TextPointer newEnd = new TextPointer(TextSelectionInternal.Start, value, LogicalDirection.Forward); 814newEnd = newEnd.GetInsertionPosition(LogicalDirection.Forward); 855TextPointer newStart = TextContainer.CreatePointerAtOffset(value, LogicalDirection.Forward); 859newStart = newStart.GetInsertionPosition(LogicalDirection.Forward); 867TextPointer newEnd = new TextPointer(newStart, selectionLength, LogicalDirection.Forward); 870newEnd = newEnd.GetInsertionPosition(LogicalDirection.Forward); 1477if (TextPointerBase.IsNextToPlainLineBreak(textPointer, LogicalDirection.Forward)) 1479textPointer.MoveToNextInsertionPosition(LogicalDirection.Forward);
System\Windows\Controls\TextRangeAdaptor.cs (43)
532TextPointerBase.MoveToNextInsertionPosition(_end, LogicalDirection.Forward); 543MoveToNextWordBoundary(_end, LogicalDirection.Forward); 553TextPointerContext forwardContext = _start.GetPointerContext(LogicalDirection.Forward); 573TextPointerContext forwardContext = _end.GetPointerContext(LogicalDirection.Forward); 581_end.MoveToNextContextPosition(LogicalDirection.Forward); 587_start.SetLogicalDirection(LogicalDirection.Forward); 588_end.SetLogicalDirection(LogicalDirection.Forward); 763if (moved && direction == LogicalDirection.Forward) 767TextPointerContext context = position.GetPointerContext(LogicalDirection.Forward); 772position.MoveToNextContextPosition(LogicalDirection.Forward); 791if (direction == LogicalDirection.Forward) 809nextLineStart = GetInsertionPosition(nextLineStart, LogicalDirection.Forward); 814position.SetLogicalDirection(isStart ? LogicalDirection.Forward : LogicalDirection.Backward); 841position.SetLogicalDirection(isStart ? LogicalDirection.Forward : LogicalDirection.Backward); 854if (direction == LogicalDirection.Forward) 861if (nextParagraphStart.MoveToNextInsertionPosition(LogicalDirection.Forward)) 871position.SetLogicalDirection(isStart ? LogicalDirection.Forward : LogicalDirection.Backward); 892position.SetLogicalDirection(isStart ? LogicalDirection.Forward : LogicalDirection.Backward); 921if (direction == LogicalDirection.Forward) 925if (position.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.ElementEnd) 931Invariant.Assert(position.MoveToNextContextPosition(LogicalDirection.Forward)); 933MoveToInsertionPosition(position, LogicalDirection.Forward); 954if (direction == LogicalDirection.Forward) 964if (position.CompareTo(GetInsertionPosition(position.TextContainer.Start, LogicalDirection.Forward)) != 0) 994LogicalDirection direction = (count > 0) ? LogicalDirection.Forward : LogicalDirection.Backward; 1075position.SetLogicalDirection(LogicalDirection.Forward); 1097MoveToInsertionPosition(position, LogicalDirection.Forward); 1112position.MoveToPosition(direction == LogicalDirection.Forward ? paragraphRange.End : paragraphRange.Start); 1151MoveToInsertionPosition(position, LogicalDirection.Forward); 1163if (direction == LogicalDirection.Forward) 1196return (direction == LogicalDirection.Forward) ? moved : -moved; 1211while (IsElementBoundary(start.GetPointerContext(LogicalDirection.Forward))) 1213if (!start.MoveToNextContextPosition(LogicalDirection.Forward) || start.CompareTo(end) >= 0) 1235if (!start.MoveToNextContextPosition(LogicalDirection.Forward) || start.CompareTo(end) > 0) 1446return TextPointerBase.IsAtWordBoundary(position, LogicalDirection.Forward); 1480position.SetLogicalDirection(LogicalDirection.Forward); 1638_end.MoveToNextInsertionPosition(LogicalDirection.Forward); 1691attrStart = position.CreatePointer(LogicalDirection.Forward); 1704ITextPointer position = _start.CreatePointer(LogicalDirection.Forward); 1715attrStart = position.CreatePointer(LogicalDirection.Forward); 1726if (!position.MoveToNextContextPosition(LogicalDirection.Forward)) 1909_end.MoveToNextInsertionPosition(LogicalDirection.Forward); 1947if (MoveToUnitBoundary(position, start, count < 0 ? LogicalDirection.Backward : LogicalDirection.Forward, unit))
System\Windows\Documents\BlockUIContainer.cs (1)
72return this.ContentStart.GetAdjacentElement(LogicalDirection.Forward) as UIElement;
System\Windows\Documents\ColumnResizeUndoUnit.cs (1)
46textPointerTable = new TextPointer(_textContainer.Start, _cpTable, LogicalDirection.Forward);
System\Windows\Documents\CompositionAdorner.cs (9)
327ITextPointer rangeStart = start.CreatePointer(LogicalDirection.Forward); 484ITextPointer start = _textView.TextContainer.Start.CreatePointer(_startOffset, LogicalDirection.Forward); 487while (start.CompareTo(end) < 0 && start.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.Text) 489start.MoveToNextContextPosition(LogicalDirection.Forward); 492Invariant.Assert(start.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text); 621startLinePointer = textSegment.End.CreatePointer(LogicalDirection.Forward); 626while ((startLinePointer.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.None) && 627(startLinePointer.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.Text)) 629startLinePointer.MoveToNextContextPosition(LogicalDirection.Forward);
System\Windows\Documents\DocumentSequenceTextContainer.cs (12)
113return new StaticTextPointer(this, ((ITextContainer)this).CreatePointerAtOffset(offset, LogicalDirection.Forward)); 660if (!highlights.IsContentHighlighted(highlightTransitionPosition, LogicalDirection.Forward)) 662highlightTransitionPosition = highlights.GetNextHighlightChangePosition(highlightTransitionPosition, LogicalDirection.Forward); 670selected = highlights.GetHighlightValue(highlightTransitionPosition, LogicalDirection.Forward, typeof(TextSelection)); 674highlightTransitionPosition = highlights.GetNextHighlightChangePosition(highlightTransitionPosition, LogicalDirection.Forward); 681if (highlightRangeStart.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.Text) 688TextPointerBase.GetTextWithLimit(highlightRangeStart.CreateDynamicTextPointer(LogicalDirection.Forward), LogicalDirection.Forward, sb, 0, 256, highlightTransitionPosition.CreateDynamicTextPointer(LogicalDirection.Forward)); 988ITextPointer dynamicTextPointer = textPosition.CreateDynamicTextPointer(LogicalDirection.Forward); 1012DocumentSequenceTextPointer parentChangePosition = textPosition.CreateDynamicTextPointer(LogicalDirection.Forward) as DocumentSequenceTextPointer; 1025childTp = direction == LogicalDirection.Forward ?
System\Windows\Documents\DocumentSequenceTextPointer.cs (9)
367ITextPointer positionForwardGravity = ((ITextPointer)this).CreatePointer(LogicalDirection.Forward); 823moved = xGapAwareScan(thisTp, (direction == LogicalDirection.Forward ? 1 : -1)); 875if (direction == LogicalDirection.Forward) 964if (tp1.ChildPointer.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.None || 974if (block.ChildContainer.Start.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.None) 1029LogicalDirection scanDir = (distance > 0 ? LogicalDirection.Forward : LogicalDirection.Backward); 1066|| (cdb.IsTail && scanDir == LogicalDirection.Forward) 1070cdb = (scanDir == LogicalDirection.Forward ? cdb.NextBlock : cdb.PreviousBlock); 1071childTn = (scanDir == LogicalDirection.Forward ?
System\Windows\Documents\DocumentSequenceTextView.cs (2)
74LogicalDirection edge = LogicalDirection.Forward; 205LogicalDirection newEdge = LogicalDirection.Forward;
System\Windows\Documents\FixedDocument.cs (11)
498fixedTextPointer = new FixedTextPointer(true, LogicalDirection.Forward, flowPosition); 1071if (!highlights.IsContentHighlighted(highlightTransitionPosition, LogicalDirection.Forward)) 1073highlightTransitionPosition = highlights.GetNextHighlightChangePosition(highlightTransitionPosition, LogicalDirection.Forward); 1084selected = highlights.GetHighlightValue(highlightTransitionPosition, LogicalDirection.Forward, typeof(TextSelection)); 1102highlightTransitionPosition = highlights.GetNextHighlightChangePosition(highlightTransitionPosition, LogicalDirection.Forward); 1105while (highlights.GetHighlightValue(highlightTransitionPosition, LogicalDirection.Forward, typeof(TextSelection)) != DependencyProperty.UnsetValue); 1114LogicalDirection.Forward, typeof(HighlightComponent)) as AnnotationHighlightLayer.HighlightSegment; 1118highlightTransitionPosition = highlights.GetNextHighlightChangePosition(highlightTransitionPosition, LogicalDirection.Forward); 1128this.FixedContainer.GetMultiHighlights((FixedTextPointer)highlightRangeStart.CreateDynamicTextPointer(LogicalDirection.Forward), 1129(FixedTextPointer)highlightTransitionPosition.CreateDynamicTextPointer(LogicalDirection.Forward), 1434return new FixedTextPointer(true, LogicalDirection.Forward, flowPosition);
System\Windows\Documents\FixedElement.cs (6)
267TextPointerContext tpc = pos.GetPointerContext(LogicalDirection.Forward); 270root.AddText(pos.GetTextInRun(LogicalDirection.Forward)); 274root.AddChild(pos.GetAdjacentElement(LogicalDirection.Forward)); 278object obj = pos.GetAdjacentElement(LogicalDirection.Forward); 282pos.MoveToNextContextPosition(LogicalDirection.Forward); 287pos.MoveToNextContextPosition(LogicalDirection.Forward);
System\Windows\Documents\FixedFindEngine.cs (6)
152start = new DocumentSequenceTextPointer(childBlock, new FixedTextPointer(false, LogicalDirection.Forward, fixedDoc.FixedContainer.FixedTextBuilder.GetPageStartFlowPosition(translatedPageNumber))); 156start = new DocumentSequenceTextPointer(childBlock, new FixedTextPointer(false, LogicalDirection.Forward, fixedDoc.FixedContainer.FixedTextBuilder.GetPageStartFlowPosition(translatedPageNumber))); 167start = new FixedTextPointer(false, LogicalDirection.Forward, textBuilder.GetPageStartFlowPosition(pageNumber)); 171start = new FixedTextPointer(false, LogicalDirection.Forward, textBuilder.GetPageStartFlowPosition(pageNumber)); 304new FixedTextPointer(false, LogicalDirection.Forward,pageStartFlowPosition)); 310firstSearchPageStart = new FixedTextPointer(false, LogicalDirection.Forward, endAsFTP.FixedTextContainer.FixedTextBuilder.GetPageStartFlowPosition(pageNumber));
System\Windows\Documents\FixedTextContainer.cs (3)
98return new StaticTextPointer(this, ((ITextContainer)this).CreatePointerAtOffset(offset, LogicalDirection.Forward)); 570_end = new FixedTextPointer(false, LogicalDirection.Forward, new FlowPosition(this, this.FixedTextBuilder.FixedFlowMap.FlowEndEdge, 0)); 580FixedTextPointer eEnd = new FixedTextPointer(false, LogicalDirection.Forward, pEnd);
System\Windows\Documents\FixedTextPointer.cs (1)
577ITextPointer positionForwardGravity = ((ITextPointer)this).CreatePointer(LogicalDirection.Forward);
System\Windows\Documents\FixedTextView.cs (18)
98pos = _CreateTextPointer(fixedp, LogicalDirection.Forward); 105pos = _CreateTextPointer(fixedp, LogicalDirection.Forward); 176if (position.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.None) 336LogicalDirection scanDir = LogicalDirection.Forward; 371linesMoved = (scanDir == LogicalDirection.Forward) ? 1 : -1; 518CharacterHit next = (direction == LogicalDirection.Forward) ? 524LogicalDirection edge = LogicalDirection.Forward; 605ITextPointer begin = _CreateTextPointer(new FixedPosition(fixedNodes[0], 0), LogicalDirection.Forward); 638(tp.CompareTo(this.Start) == 0 && (tp.LogicalDirection == LogicalDirection.Forward || this.IsContainerStart)) || 733_start = new FixedTextPointer(false, LogicalDirection.Forward, flowStart); 788edge = LogicalDirection.Forward; 806edge = (hit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 863itp = ((ITextPointer)this.Start).CreatePointer(LogicalDirection.Forward); 864itp.MoveToInsertionPosition(LogicalDirection.Forward); 883FixedNode[] fixedNodes = Container.FixedTextBuilder.GetNextLine(fixedp.Node, (scanDir == LogicalDirection.Forward), ref count); 1090textdir = LogicalDirection.Forward; 1130LogicalDirection dir = LogicalDirection.Forward; 1199int increment = (dir == LogicalDirection.Forward ? +1 : -1);
System\Windows\Documents\FlowDocument.cs (1)
1491segmentEnd = args.ITextPosition.CreatePointer(args.Count, LogicalDirection.Forward);
System\Windows\Documents\FlowPosition.cs (11)
162int scan = flowScan._vScan(LogicalDirection.Forward, -1); 174Debug.Assert(dir == LogicalDirection.Forward || dir == LogicalDirection.Backward); 185if (dir == LogicalDirection.Forward) 206if (dir == LogicalDirection.Forward) 223if (dir == LogicalDirection.Forward) 310LogicalDirection dir = (distance >= 0 ? LogicalDirection.Forward : LogicalDirection.Backward); 376FlowPosition flowScan = GetClingPosition(LogicalDirection.Forward); 384int scan = flowScan._vScan(LogicalDirection.Forward, distance); 402if (dir == LogicalDirection.Forward) 554if (dir == LogicalDirection.Forward) 616if (dir == LogicalDirection.Forward)
System\Windows\Documents\FrameworkRichTextComposition.cs (2)
56return _ResultEnd == null ? null : (TextPointer)_ResultEnd.GetFrozenPointer(LogicalDirection.Forward); 78return _CompositionEnd == null ? null : (TextPointer)_CompositionEnd.GetFrozenPointer(LogicalDirection.Forward);
System\Windows\Documents\FrameworkTextComposition.cs (2)
196_resultEnd = end.GetFrozenPointer(LogicalDirection.Forward); 217_compositionEnd = end.GetFrozenPointer(LogicalDirection.Forward);
System\Windows\Documents\Highlights.cs (7)
137else if (direction == LogicalDirection.Forward) 188characterRunEndPosition = textPosition.GetNextContextPosition(LogicalDirection.Forward); 353if (!highlightLayer.IsContentHighlighted(highlightTransitionPosition, LogicalDirection.Forward)) 355highlightTransitionPosition = highlightLayer.GetNextChangePosition(highlightTransitionPosition, LogicalDirection.Forward); 363highlightTransitionPosition = highlightLayer.GetNextChangePosition(highlightTransitionPosition, LogicalDirection.Forward); 366ranges.Add(new TextSegment(highlightRangeStart.CreateDynamicTextPointer(LogicalDirection.Forward), highlightTransitionPosition.CreateDynamicTextPointer(LogicalDirection.Forward)));
System\Windows\Documents\Hyperlink.cs (2)
105Hyperlink hyperlink = navigator.GetAdjacentElement(LogicalDirection.Forward) as Hyperlink; 113navigator.MoveToNextContextPosition(LogicalDirection.Forward);
System\Windows\Documents\ImmComposition.cs (14)
625caretNavigator = _caretOffset > 0 ? _startComposition.CreatePointer(_caretOffset, LogicalDirection.Forward) : _endComposition; 632ITextPointer startPosition = startNavigator.CreatePointer(LogicalDirection.Forward); 634ITextPointer caretPosition = caretNavigator.CreatePointer(LogicalDirection.Forward); 1124start = range.Start.CreatePointer(resultLength, LogicalDirection.Forward); 1128ITextPointer caretPosition = _caretOffset >= 0 ? start.CreatePointer(_caretOffset, LogicalDirection.Forward) : end; 1168ITextPointer endAttribute = _startComposition.CreatePointer(i + 1, LogicalDirection.Forward); 1450switch (navigator.GetPointerContext(LogicalDirection.Forward)) 1454int copied = navigator.GetTextInRun(LogicalDirection.Forward, buffer, 0, buffer.Length); 1467if (!navigator.GetElementType(LogicalDirection.Forward).IsSubclassOf(typeof(Inline))) 1471navigator.MoveToNextContextPosition(LogicalDirection.Forward); 1479navigator.MoveToNextContextPosition(LogicalDirection.Forward); 1527ITextPointer end = start.CreatePointer(LogicalDirection.Forward); 1565switch (position.GetPointerContext(LogicalDirection.Forward)) 1652positionNext.MoveToNextInsertionPosition(LogicalDirection.Forward);
System\Windows\Documents\InlineUIContainer.cs (1)
105return this.ContentStart.GetAdjacentElement(LogicalDirection.Forward) as UIElement;
System\Windows\Documents\List.cs (4)
194if (textNav.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart) 196DependencyObject element = textNav.GetAdjacentElementFromOuterPosition(LogicalDirection.Forward); 214textNav.MoveToNextContextPosition(LogicalDirection.Forward); 278block = block == lastBlock ? null : (Block)listItem.ElementEnd.GetAdjacentElement(LogicalDirection.Forward);
System\Windows\Documents\NullTextContainer.cs (2)
36_end = new NullTextPointer(this, LogicalDirection.Forward); 98return new StaticTextPointer(this, ((ITextContainer)this).CreatePointerAtOffset(offset, LogicalDirection.Forward));
System\Windows\Documents\Paragraph.cs (2)
253TextPointerContext symbolType = navigator.GetPointerContext(LogicalDirection.Forward); 261navigator.MoveToNextContextPosition(LogicalDirection.Forward);
System\Windows\Documents\RangeContentEnumerator.cs (13)
94switch (_navigator.GetPointerContext(LogicalDirection.Forward)) 102runLength = _navigator.GetTextRunLength(LogicalDirection.Forward); 104_navigator.GetTextInRun(LogicalDirection.Forward, _buffer, offset, runLength); 106_navigator.MoveToNextContextPosition(LogicalDirection.Forward); 108while (_navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text); 116_currentCache = _navigator.GetAdjacentElement(LogicalDirection.Forward); 119_navigator.MoveToNextContextPosition(LogicalDirection.Forward); 124_navigator.MoveToNextContextPosition(LogicalDirection.Forward); 170switch (_navigator.GetPointerContext(LogicalDirection.Forward)) 177_navigator.MoveToNextContextPosition(LogicalDirection.Forward); 179while (_navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text && _navigator.CompareTo(_end) < 0); 184_navigator.MoveToNextContextPosition(LogicalDirection.Forward); 189_navigator.MoveToNextContextPosition(LogicalDirection.Forward);
System\Windows\Documents\RubberbandSelector.cs (1)
331return new FixedTextPointer(false, LogicalDirection.Forward, flowHit);
System\Windows\Documents\Span.cs (2)
227else if (position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd) 229position = position.GetNextContextPosition(LogicalDirection.Forward);
System\Windows\Documents\Speller.cs (21)
191ExpandToWordBreakAndContext(error.End, LogicalDirection.Forward, language, out ITextPointer contentEnd, out ITextPointer contextEnd); 236if (_statusTable.GetError(pointer, LogicalDirection.Forward, out errorStart, out errorEnd)) 246pointer = _statusTable.GetNextErrorTransition(pointer, LogicalDirection.Forward); 666end = GetNextLanguageTransition(start, LogicalDirection.Forward, language, end); 708wordBreakRight = SearchForWordBreaks(caretPosition, LogicalDirection.Forward, language, 1, false /* stopOnError */); 794ExpandToWordBreakAndContext(end, LogicalDirection.Forward, language, out contentEnd, out contextEnd); 1121inwardDirection = direction == LogicalDirection.Forward ? LogicalDirection.Backward : LogicalDirection.Forward; 1333closestErrorPosition = nextErrorTransition.CreateDynamicTextPointer(LogicalDirection.Forward); 1347direction == LogicalDirection.Forward && closestErrorPosition.CompareTo(searchPosition) < 0) 1358direction == LogicalDirection.Forward && closestLanguageTransition.CompareTo(searchPosition) < 0) 1391while ((direction == LogicalDirection.Forward && navigator.CompareTo(haltPosition) < 0) || 1401if ((direction == LogicalDirection.Forward && navigator.CompareTo(haltPosition) > 0) || 1469if (direction == LogicalDirection.Forward) 1685switch (position.GetPointerContext(LogicalDirection.Forward)) 1688runCount = position.GetTextRunLength(LogicalDirection.Forward); 1692position.GetTextInRun(LogicalDirection.Forward, _text, _textLength, runCount); 1728position.MoveToNextContextPosition(LogicalDirection.Forward); 1736position.MoveToNextContextPosition(LogicalDirection.Forward); 1803context = pointer.GetPointerContext(LogicalDirection.Forward); 1806TextSchema.IsFormattingType(pointer.GetElementType(LogicalDirection.Forward)))
System\Windows\Documents\SpellerError.cs (1)
33_start = start.GetFrozenPointer(LogicalDirection.Forward);
System\Windows\Documents\SpellerStatusTable.cs (8)
91for (index = FindIndex(searchStart.CreateStaticPointer(), LogicalDirection.Forward); index >= 0 && index < _runList.Count; index++) 127runIndex = FindIndex(start.CreateStaticPointer(), LogicalDirection.Forward); 193else if (direction == LogicalDirection.Forward) 278end = (direction == LogicalDirection.Forward) ? GetRunEndPosition(index) : run.Position.CreateStaticPointer(); 348if (direction == LogicalDirection.Forward && position.CompareTo(run.Position) < 0 || 354else if (direction == LogicalDirection.Forward && position.CompareTo(GetRunEndPosition(index)) >= 0 || 391startIndex = FindIndex(start.CreateStaticPointer(), LogicalDirection.Forward); 751return GetRunEndPosition(index).CreateDynamicTextPointer(LogicalDirection.Forward);
System\Windows\Documents\TextContainer.cs (15)
511else if (direction == LogicalDirection.Forward) 513edge = node.GetEdgeFromOffset(nodeOffset, LogicalDirection.Forward); 636TextTreeTextNode nextTextNode = ((direction == LogicalDirection.Forward) ? node.GetNextNode() : node.GetPreviousNode()) as TextTreeTextNode; 645else if (direction == LogicalDirection.Forward) 647edge = node.GetEdgeFromOffset(nodeOffset, LogicalDirection.Forward); 874direction = LogicalDirection.Forward; 884(direction == LogicalDirection.Forward && textNode.BeforeStartReferenceCount)) 1044newFirstIMEVisibleNode = startPosition.GetAdjacentTextElementNodeSibling(LogicalDirection.Forward); 1266deletePosition = new TextPointer(startPosition, LogicalDirection.Forward); 1600TextPointer positionForwardGravity = position.GetPositionAtOffset(0, LogicalDirection.Forward); 1666endPosition = new TextPointer(this, _rootNode, ElementEdge.BeforeEnd, LogicalDirection.Forward); 2432node = startPosition.GetAdjacentSiblingNode(LogicalDirection.Forward); 2433stopNode = endPosition.GetAdjacentSiblingNode(LogicalDirection.Forward); 3417TextElement adjacentElement = startPosition.GetAdjacentElement(LogicalDirection.Forward) as TextElement; 3420nextIMEVisibleNode = (TextTreeTextElementNode)endPosition.GetAdjacentSiblingNode(LogicalDirection.Forward);
System\Windows\Documents\TextContainerChangeEventArgs.cs (1)
32_textPosition = textPosition.GetFrozenPointer(LogicalDirection.Forward);
System\windows\Documents\TextEditor.cs (1)
1506if (cursorPosition.GetNextInsertionPosition(LogicalDirection.Forward) == null &&
System\windows\Documents\TextEditorContextMenu.cs (4)
189direction = LogicalDirection.Forward; 193direction = LogicalDirection.Forward; 400while (position.GetAdjacentElement(LogicalDirection.Forward) is Inline) 402position = position.GetNextContextPosition(LogicalDirection.Forward);
System\windows\Documents\TextEditorCopyPaste.cs (1)
952TextPointer end = start.GetPositionAtOffset(0, LogicalDirection.Forward);
System\windows\Documents\TextEditorDragDrop.cs (3)
464!TextPointerBase.IsAtWordBoundary(dropPosition, /*insideWordDirection:*/LogicalDirection.Forward) && 467TextPointerBase.IsAtWordBoundary(_dragSourceTextRange.Start, LogicalDirection.Forward) && // 468TextPointerBase.IsAtWordBoundary(_dragSourceTextRange.End, LogicalDirection.Forward))
System\windows\Documents\TextEditorMouse.cs (3)
561if (snappedCursorPosition.GetNextInsertionPosition(LogicalDirection.Forward) == null && 735LogicalDirection otherEdgeDirection = (mouseMovePosition.LogicalDirection == LogicalDirection.Forward) ? 736LogicalDirection.Backward : LogicalDirection.Forward;
System\windows\Documents\TextEditorSelection.cs (43)
113ITextPointer lineStart = position.CreatePointer(LogicalDirection.Forward); 188LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Backward : LogicalDirection.Forward; 204LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Forward : LogicalDirection.Backward; 221LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Backward : LogicalDirection.Forward; 237LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Forward : LogicalDirection.Backward; 313ITextPointer nextPosition = lineEndPosition.GetNextInsertionPosition(LogicalDirection.Forward); 464if (movingPointer.MoveToNextInsertionPosition(LogicalDirection.Forward)) 803ITextPointer caretPosition = lineRange.Start.GetFrozenPointer(LogicalDirection.Forward); 806This.Selection.SetCaretToPosition(caretPosition, LogicalDirection.Forward, /*allowStopAtLineEnd:*/true, /*allowStopNearSpace:*/true); 852LogicalDirection orientation = TextPointerBase.IsNextToPlainLineBreak(lineRange.End, LogicalDirection.Backward) ? LogicalDirection.Forward : LogicalDirection.Backward; 886This.Selection.SetCaretToPosition(This.TextContainer.Start, LogicalDirection.Forward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false); 946LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Backward : LogicalDirection.Forward; 962LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Forward : LogicalDirection.Backward; 978LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Backward : LogicalDirection.Forward; 994LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Forward : LogicalDirection.Backward; 1012if (This.Selection.ExtendToNextTableRow(LogicalDirection.Forward)) 1070ITextPointer nextPosition = lineEndPosition.GetNextInsertionPosition(LogicalDirection.Forward); 1122if (TextPointerBase.IsNextToAnyBreak(newMovingPosition, LogicalDirection.Forward) || 1123newMovingPosition.GetNextInsertionPosition(LogicalDirection.Forward) == null) 1132newMovingPosition = newMovingPosition.GetInsertionPosition(LogicalDirection.Forward); 1133newMovingPosition = newMovingPosition.GetNextInsertionPosition(LogicalDirection.Forward); 1160if (newMovingPosition.GetNextInsertionPosition(LogicalDirection.Forward) == null) 1321if (movingPointer.MoveToNextInsertionPosition(LogicalDirection.Forward)) 1603ExtendSelectionAndBringIntoView(lineRange.Start.CreatePointer(LogicalDirection.Forward), This); 1655if (TextPointerBase.IsNextToPlainLineBreak(destination, LogicalDirection.Forward) || 1656TextPointerBase.IsNextToRichLineBreak(destination, LogicalDirection.Forward)) 1665destination = destination.GetNextInsertionPosition(LogicalDirection.Forward); 1669else if (TextPointerBase.IsNextToParagraphBreak(destination, LogicalDirection.Forward) && 1674ITextPointer newDestination = destination.GetNextInsertionPosition(LogicalDirection.Forward); 2057ITextPointer movingEnd = (direction == LogicalDirection.Forward ? textEditor.Selection.End : textEditor.Selection.Start); 2067LogicalDirection contentDirection = direction == LogicalDirection.Forward ? LogicalDirection.Backward : LogicalDirection.Forward; 2115if (direction == LogicalDirection.Forward) 2118if (!textEditor.Selection.IsEmpty && TextPointerBase.IsAtWordBoundary(textEditor.Selection.End, LogicalDirection.Forward)) 2128TextPointerBase.MoveToNextWordBoundary(wordBoundary, LogicalDirection.Forward); 2138if (!textEditor.Selection.IsEmpty && TextPointerBase.IsAtWordBoundary(textEditor.Selection.Start, LogicalDirection.Forward)) 2141textEditor.Selection.SetCaretToPosition(textEditor.Selection.Start, LogicalDirection.Forward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false); 2150textEditor.Selection.SetCaretToPosition(wordBoundary, LogicalDirection.Forward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false); 2194wordBoundary.SetLogicalDirection(direction == LogicalDirection.Forward ? LogicalDirection.Backward : LogicalDirection.Forward); 2316movingPosition = movingPosition.GetFrozenPointer(LogicalDirection.Forward); 2333return This.Selection.IsEmpty ? This.Selection.Start : This.Selection.Start.GetFrozenPointer(LogicalDirection.Forward); 2399This.Selection.SetCaretToPosition(position, LogicalDirection.Forward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false);
System\windows\Documents\TextEditorSpelling.cs (11)
59LogicalDirection direction = This.Selection.IsEmpty ? This.Selection.Start.LogicalDirection : LogicalDirection.Forward; 67direction = (direction == LogicalDirection.Forward) ? LogicalDirection.Backward : LogicalDirection.Forward; 82direction = (direction == LogicalDirection.Forward) ? LogicalDirection.Backward : LogicalDirection.Forward; 87direction = LogicalDirection.Forward; 148caretPosition = textStart.CreatePointer(+correctedText.Length, LogicalDirection.Forward); 186textStart.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.Text) 188textStart.MoveToNextContextPosition(LogicalDirection.Forward); 197if (textStart.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.Text || 316position = GetNextTextPosition(position, limit, LogicalDirection.Forward, out character);
System\windows\Documents\TextEditorTyping.cs (12)
543ITextPointer deletePosition = position.GetNextInsertionPosition(LogicalDirection.Forward); 566This.Selection.ExtendToNextInsertionPosition(LogicalDirection.Forward); 739LogicalDirection directionOfDelete = position.CompareTo(deletePosition) < 0 ? LogicalDirection.Forward : LogicalDirection.Backward; 746if (directionOfDelete == LogicalDirection.Forward) 811position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd) 849position.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.ElementEnd) 913TextPointerBase.MoveToNextWordBoundary(wordBoundary, LogicalDirection.Forward); 1081This.Selection.SetCaretToPosition(This.Selection.End, LogicalDirection.Forward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false); 1172This.Selection.SetCaretToPosition(range.Start, LogicalDirection.Forward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false); 1344if (HandleTabInTables(This, LogicalDirection.Forward)) 1421if (direction == LogicalDirection.Forward) 1458if (direction == LogicalDirection.Forward)
System\Windows\Documents\TextEffectResolver.cs (4)
101while (navigator.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.Text 102&& navigator.MoveToNextContextPosition(LogicalDirection.Forward)) ; 111while (navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text 113&& navigator.MoveToNextContextPosition(LogicalDirection.Forward)) ;
System\Windows\Documents\TextElement.cs (4)
291TextPointer contentEnd = new TextPointer(tree, _textElementNode, ElementEdge.BeforeEnd, LogicalDirection.Forward); 314elementStart = new TextPointer(tree, _textElementNode, ElementEdge.BeforeStart, LogicalDirection.Forward); 380contentEnd = new TextPointer(tree, _textElementNode, ElementEdge.BeforeEnd, LogicalDirection.Forward); 994beforeStart = new TextPointer(tree, _textElementNode, ElementEdge.BeforeStart, LogicalDirection.Forward);
System\Windows\Documents\TextElementEnumerator.cs (2)
126_navigator.MoveToNextContextPosition(LogicalDirection.Forward); 135_navigator.MoveToNextContextPosition(LogicalDirection.Forward);
System\Windows\Documents\TextFindEngine.cs (8)
199direction = LogicalDirection.Forward; 305hasFollowingSeparatorChar = HasNeighboringSeparatorChar(position, LogicalDirection.Forward); 310hasFollowingSeparatorChar = HasNeighboringSeparatorChar(oppositeEndPosition, LogicalDirection.Forward); 341LogicalDirection.Forward, 353if (direction == LogicalDirection.Forward) 895if (direction == LogicalDirection.Forward) 897context = pointer.GetPointerContext(LogicalDirection.Forward); 900TextSchema.IsFormattingType(pointer.GetElementType(LogicalDirection.Forward)))
System\Windows\Documents\TextPointer.cs (22)
301Initialize(tree, node, edge, LogicalDirection.Forward, tree.PositionGeneration, false, false, tree.LayoutGeneration); 498/// <see cref="System.Windows.Documents.LogicalDirection.Forward"/>.</para> 547return (direction == LogicalDirection.Forward) ? GetPointerContextForward(_node, this.Edge) : GetPointerContextBackward(_node, this.Edge); 582if (direction == LogicalDirection.Forward) 598textNode = ((direction == LogicalDirection.Forward) ? textNode.GetNextNode() : textNode.GetPreviousNode()) as TextTreeTextNode; 1066return GetInsertionPosition(LogicalDirection.Forward); 1222position.SetLogicalDirection(LogicalDirection.Forward); 1325LogicalDirection direction = count < 0 ? LogicalDirection.Backward : LogicalDirection.Forward; 1777skipCount = (direction == LogicalDirection.Forward) ? nodeOffset : textNode.SymbolCount - nodeOffset; 1794textNode = ((direction == LogicalDirection.Forward) ? textNode.GetNextNode() : textNode.GetPreviousNode()) as TextTreeTextNode; 1980if (direction == LogicalDirection.Forward) 2698oppositeDirection = (contentDirection == LogicalDirection.Forward) ? LogicalDirection.Backward : LogicalDirection.Forward; 2849if (direction == LogicalDirection.Forward) 3005if (GetGravityInternal() == LogicalDirection.Forward) 3436symbolType = node.GetPointerContext(LogicalDirection.Forward); 3443symbolType = firstContainedNode.GetPointerContext(LogicalDirection.Forward); 3461symbolType = nextNode.GetPointerContext(LogicalDirection.Forward); 4009if (gravity == LogicalDirection.Forward) 4035if (gravity == LogicalDirection.Forward) 4055return (this.Edge == ElementEdge.BeforeStart || this.Edge == ElementEdge.BeforeEnd) ? LogicalDirection.Forward : LogicalDirection.Backward; 4136if (GetGravityInternal() == LogicalDirection.Forward)
System\Windows\Documents\TextPointerBase.cs (49)
83else if (direction == LogicalDirection.Forward && limit.CompareTo(thisPointer) <= 0) 100if (direction == LogicalDirection.Forward) 182Type forwardType = forwardPosition.GetElementType(LogicalDirection.Forward); 186TextPointerContext forwardContext = forwardPosition.GetPointerContext(LogicalDirection.Forward); 229TextPointerContext forwardContext = position.GetPointerContext(LogicalDirection.Forward); 252TextPointerContext forwardContext = position.GetPointerContext(LogicalDirection.Forward); 257typeof(Table).IsAssignableFrom(position.GetElementType(LogicalDirection.Forward))); 276position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd; 321BorderingElementCategory category = GetBorderingElementCategory(navigator, LogicalDirection.Forward); 328navigator.MoveToNextContextPosition(LogicalDirection.Forward); 330while (GetBorderingElementCategory(navigator, LogicalDirection.Forward) == BorderingElementCategory.MergeableScopingInline); 336elementType = navigator.GetElementType(LogicalDirection.Forward); 340navigator.MoveToNextContextPosition(LogicalDirection.Forward); 357elementType = navigator.GetElementType(LogicalDirection.Forward); 360navigator.MoveToNextInsertionPosition(LogicalDirection.Forward); 373navigator.MoveToNextContextPosition(LogicalDirection.Forward); 375while (navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart); 392return IsAtNonMergeableInlineEdge(position, LogicalDirection.Forward); 422position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd) 510return GetWordRange(thisPosition, LogicalDirection.Forward); 545if (moved && IsAtWordBoundary(thisPosition, /*insideWordDirection:*/LogicalDirection.Forward)) 552MoveToNextWordBoundary(navigator, direction == LogicalDirection.Backward ? LogicalDirection.Forward : LogicalDirection.Backward); 566wordEnd = RestrictWithinBlock(thisPosition, wordEnd, LogicalDirection.Forward); 572wordEnd = wordEnd.GetFrozenPointer(LogicalDirection.Forward); 587Invariant.Assert(!(direction == LogicalDirection.Forward) || position.CompareTo(limit) <= 0, "for forward direcion position must be <= than linit"); 610return limit.GetInsertionPosition(direction == LogicalDirection.Backward ? LogicalDirection.Forward : LogicalDirection.Backward); 631(direction == LogicalDirection.Forward && IsCharUnicodeNewLine(textBuffer[0])) 697bool isAtLineWrappingPosition = position.LogicalDirection == LogicalDirection.Forward 712thisPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd && 723return thisPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.None && 963int increment = direction == LogicalDirection.Forward ? +1 : -1; 980if ((direction == LogicalDirection.Forward && initialPosition.CompareTo(thisNavigator) < 0) || 1024while (TextSchema.IsFormattingType(thisNavigator.GetElementType(LogicalDirection.Forward)) 1035if (direction == LogicalDirection.Forward) 1086if (IsAtWordBoundary(thisNavigator, /*insideWordDirection:*/LogicalDirection.Forward)) 1146if (direction == LogicalDirection.Forward) 1156oppositeDirection = LogicalDirection.Forward; 1256if (direction == LogicalDirection.Forward && IsAtNonMergeableInlineEnd(thisNavigator)) 1258symbolCount += LeaveNonMergeableAncestor(thisNavigator, LogicalDirection.Forward); 1273symbolCount += LeaveNonMergeableAncestor(thisNavigator, LogicalDirection.Forward); 1284int increment = (direction == LogicalDirection.Forward) ? +1 : -1; 1329TextPointerContext forwardContext = position.GetPointerContext(LogicalDirection.Forward); 1366position.GetTextInRun(LogicalDirection.Forward, neighborhood, 1, 1) == 1) 1428navigator.GetTextInRun(LogicalDirection.Forward, preceedingText, SelectionWordBreaker.MinContextLength - preceedingCount, runLength); 1443runLength = Math.Min(navigator.GetTextRunLength(LogicalDirection.Forward), SelectionWordBreaker.MinContextLength - followingCount); 1445navigator.GetTextInRun(LogicalDirection.Forward, followingText, followingCount, runLength); 1454navigator.MoveToInsertionPosition(LogicalDirection.Forward); 1456while (navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text); 1489TextPointerContext context = (direction == LogicalDirection.Forward) ? TextPointerContext.ElementEnd : TextPointerContext.ElementStart;
System\Windows\Documents\TextRangeBase.cs (41)
74textPointer = textPointer.GetFormatNormalizedPosition(LogicalDirection.Forward); 207!TextPointerBase.IsAtWordBoundary(thisRange.Start, LogicalDirection.Forward) && // 283!TextPointerBase.IsNextToAnyBreak(thisRange.End, LogicalDirection.Forward)) 289nextPosition.MoveToNextInsertionPosition(LogicalDirection.Forward); 334SkipParagraphContent(end, LogicalDirection.Forward); 350(nextContext == TextPointerContext.ElementStart && direction == LogicalDirection.Forward || // 355(nextContext == TextPointerContext.ElementEnd && direction == LogicalDirection.Forward || // 411if (position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text) 413moved = position.MoveToNextContextPosition(LogicalDirection.Forward); 417moved = position.MoveToInsertionPosition(LogicalDirection.Forward); 422moved = position.MoveToNextInsertionPosition(LogicalDirection.Forward); 493moved = position.MoveToNextContextPosition(LogicalDirection.Forward); 678TextPointerContext symbolType = navigator.GetPointerContext(LogicalDirection.Forward); 694navigator.MoveToNextContextPosition(LogicalDirection.Forward); 704navigator.MoveToNextContextPosition(LogicalDirection.Forward); 709navigator.MoveToNextContextPosition(LogicalDirection.Forward); 712elementType = navigator.GetElementType(LogicalDirection.Forward); 732navigator.MoveToNextContextPosition(LogicalDirection.Forward); 748int runLength = navigator.GetTextRunLength(LogicalDirection.Forward); 750runLength = TextPointerBase.GetTextWithLimit(navigator, LogicalDirection.Forward, charArray, 0, runLength, endPosition); 752navigator.MoveToNextContextPosition(LogicalDirection.Forward); 763navigator.MoveToNextContextPosition(LogicalDirection.Forward); 765TextPointerContext symbolType = navigator.GetPointerContext(LogicalDirection.Forward); 772navigator.MoveToNextContextPosition(LogicalDirection.Forward); 773symbolType = navigator.GetPointerContext(LogicalDirection.Forward); 796List list = (List)navigator.GetAdjacentElement(LogicalDirection.Forward); 817navigator.MoveToNextContextPosition(LogicalDirection.Forward); 827ListItem listItem = (ListItem)navigator.GetAdjacentElement(LogicalDirection.Forward); 859object element = navigator.GetAdjacentElement(LogicalDirection.Forward); 1312thisRange.End.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text) 1360(insertPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.None || 1361insertPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd); 1373ITextPointer newEnd = insertPosition.CreatePointer(LogicalDirection.Forward); 1378TextPointer insertionPosition = (TextPointer)newStart.CreatePointer(LogicalDirection.Forward); 1416newEnd = newEnd.GetNextInsertionPosition(LogicalDirection.Forward); 1617TextPointerContext context = start.GetPointerContext(LogicalDirection.Forward); 1620start.MoveToNextContextPosition(LogicalDirection.Forward); 1621context = start.GetPointerContext(LogicalDirection.Forward); 1634return start.GetAdjacentElement(LogicalDirection.Forward) as UIElement; 1715start = GetNormalizedPosition(thisRange, start, LogicalDirection.Forward); 1957!TextPointerBase.IsAtInsertionPosition(start, LogicalDirection.Forward) ||
System\Windows\Documents\TextRangeEdit.cs (43)
72else if (!keepEmptyFormatting && splitPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd) 268while (position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd && 279position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart && 281(secondInline = position.GetAdjacentElement(LogicalDirection.Forward) as Inline) != null) 331inline.ElementEnd.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd) 458start = start.GetNextContextPosition(LogicalDirection.Forward); 532if (position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd) 556Invariant.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart, "position must be before ElementStart"); 656while (!(breakPosition.Parent is Paragraph) && breakPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart) 658breakPosition = breakPosition.GetNextContextPosition(LogicalDirection.Forward); 662breakPosition = breakPosition.GetInsertionPosition(LogicalDirection.Forward); 699return lineBreak.ElementEnd.GetInsertionPosition(LogicalDirection.Forward); 798start = block.ElementEnd.GetPositionAtOffset(0, LogicalDirection.Forward); 805TextPointer contentStart = block.ContentStart.GetPositionAtOffset(0, LogicalDirection.Forward); // Normalize forward; 806contentStart = contentStart.GetNextContextPosition(LogicalDirection.Forward); // Leave scope of initial List. 826start = block.ElementEnd.GetPositionAtOffset(0, LogicalDirection.Forward); 968TextPointer end = lastChild.ElementEnd.GetFrozenPointer(LogicalDirection.Forward); 975firstChild = (Inline)start.GetAdjacentElement(LogicalDirection.Forward); 1049pointer = pointer.GetNextContextPosition(LogicalDirection.Forward); 1268TextPointerContext forwardContext = position.GetPointerContext(LogicalDirection.Forward); 1283while (position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd && 1307while (nextPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart && 1308TextSchema.IsMergeableInline(nextPosition.GetAdjacentElement(LogicalDirection.Forward).GetType())) 1310nextPosition = ((Inline)nextPosition.GetAdjacentElement(LogicalDirection.Forward)).ContentStart; 1440startPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd) 1586direction = LogicalDirection.Forward; 1596oppositeDirection = LogicalDirection.Forward; 1613Invariant.Assert(direction == LogicalDirection.Forward && nextPosition.CompareTo(end) < 0 || direction == LogicalDirection.Backward && nextPosition.CompareTo(end) > 0, 1625if (direction == LogicalDirection.Forward && nextPosition.CompareTo(end) > 0 || direction == LogicalDirection.Backward && nextPosition.CompareTo(end) < 0) 1639if (direction == LogicalDirection.Forward && nextPosition.CompareTo(end) >= 0 || direction == LogicalDirection.Backward && nextPosition.CompareTo(end) <= 0) 1893TextPointer nextRunPosition = run.ElementEnd.GetPositionAtOffset(0, LogicalDirection.Forward); 1901nextRunPosition = nextRunPosition.GetNextContextPosition(LogicalDirection.Forward); 2083if (pointer.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart && 2084(run = pointer.GetAdjacentElement(LogicalDirection.Forward) as Run) != null) 2098pointer = pointer.GetNextContextPosition(LogicalDirection.Forward); 2110start = start.GetPositionAtOffset(0, LogicalDirection.Forward); 2114start = start.GetNextContextPosition(LogicalDirection.Forward); 2128start = start.GetNextContextPosition(LogicalDirection.Forward); 2149run = (Run)start.GetAdjacentElement(LogicalDirection.Forward); 2162DependencyObject forwardElement = start.GetAdjacentElement(LogicalDirection.Forward); 2168Inline inline = (Inline)start.GetAdjacentElement(LogicalDirection.Forward); 2188end.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd && 2246start = start.GetNextContextPosition(LogicalDirection.Forward);
System\Windows\Documents\TextRangeEditLists.cs (18)
95TextPointer positionAfterSecondParagraph = secondParagraphOrBlockUIContainer.ElementEnd.GetFrozenPointer(LogicalDirection.Forward); 144ListItem followingListItem = positionAfterSecondParagraph.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart 145? positionAfterSecondParagraph.GetAdjacentElement(LogicalDirection.Forward) as ListItem : null; 152Invariant.Assert(positionAfterSecondParagraph.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart); 174while (navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd) 176navigator.MoveToNextContextPosition(LogicalDirection.Forward); 210mergePosition.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.ElementStart) 216List followingList = mergePosition.GetAdjacentElement(LogicalDirection.Forward) as List; 308Block nextBlock = block == lastBlock ? null : block.ElementEnd.GetAdjacentElement(LogicalDirection.Forward) as Block; 374ListItem nextListItem = listItem.ElementEnd.GetAdjacentElement(LogicalDirection.Forward) as ListItem; 560ListItem nextListItem = listItem.ElementEnd.GetAdjacentElement(LogicalDirection.Forward) as ListItem; 607while (end.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd) 613end = end.GetNextContextPosition(LogicalDirection.Forward); 636while (position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd) 643position = position.GetNextContextPosition(LogicalDirection.Forward); 647while (position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart) 656position = position.GetNextContextPosition(LogicalDirection.Forward); 767adjustedEnd = adjustedEnd.GetNextInsertionPosition(LogicalDirection.Forward);
System\Windows\Documents\TextRangeEditTables.cs (19)
454else if (direction == LogicalDirection.Forward && 467if (direction == LogicalDirection.Forward) 528movingPosition = movingCell.ContentEnd.GetInsertionPosition().GetNextInsertionPosition(LogicalDirection.Forward); 538if (direction == LogicalDirection.Forward) 567return (direction == LogicalDirection.Forward) ? row.ContentEnd.GetNextInsertionPosition(LogicalDirection.Forward) : 599return (direction == LogicalDirection.Forward) ? row.ContentEnd.GetNextInsertionPosition(LogicalDirection.Forward) : 788nextInsertionPosition = nextInsertionPosition.GetNextInsertionPosition(LogicalDirection.Forward); 813while (position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart) 815position = position.GetNextContextPosition(LogicalDirection.Forward); 894if (position.GetAdjacentElementFromOuterPosition(LogicalDirection.Forward) is Run) 897insertionPosition.MoveToNextContextPosition(LogicalDirection.Forward); 1087cellEnd.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart) 1089cell = (TableCell)cellEnd.GetAdjacentElement(LogicalDirection.Forward); 1964startPosition = startPosition.GetInsertionPosition(LogicalDirection.Forward); 1992TextPointer start = startCell.ContentStart.GetInsertionPosition(LogicalDirection.Forward); 1996TextPointer end = endCell.ContentEnd.GetNextInsertionPosition(LogicalDirection.Forward); 2053anchorPosition = anchorPosition.GetInsertionPosition(LogicalDirection.Forward);
System\Windows\Documents\TextRangeSerialization.cs (37)
213TextPointerContext runType = textReader.GetPointerContext(LogicalDirection.Forward); 218TextElement nextElement = (TextElement)textReader.GetAdjacentElement(LogicalDirection.Forward); 227textReader.MoveToNextContextPosition(LogicalDirection.Forward); 247textReader.MoveToNextContextPosition(LogicalDirection.Forward); 255textReader.MoveToNextContextPosition(LogicalDirection.Forward); 265if (ignoreWriteHyperlinkEnd && (textReader.GetAdjacentElement(LogicalDirection.Forward) is Hyperlink)) 269textReader.MoveToNextContextPosition(LogicalDirection.Forward); 282textReader.MoveToNextContextPosition(LogicalDirection.Forward); 299textReader.MoveToNextContextPosition(LogicalDirection.Forward); 303int textLength = textReader.GetTextRunLength(LogicalDirection.Forward); 306textLength = TextPointerBase.GetTextWithLimit(textReader, LogicalDirection.Forward, text, 0, textLength, rangeEnd); 313textReader.MoveToNextContextPosition(LogicalDirection.Forward); 317object embeddedObject = textReader.GetAdjacentElement(LogicalDirection.Forward); 318textReader.MoveToNextContextPosition(LogicalDirection.Forward); 325textReader.MoveToNextContextPosition(LogicalDirection.Forward); 1226TextElement uiContainer = fragment.ContentStart.GetAdjacentElement(LogicalDirection.Forward) as TextElement; 1332fragmentEnd = fragment.ElementEnd.GetPositionAtOffset(0, LogicalDirection.Forward); // need forward orientation to stick with the following content during merge at fragmentStart position 1360fragmentEnd = fragmentEnd.GetInsertionPosition(LogicalDirection.Forward); 1475if (navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart) 1477navigator = navigator.GetNextContextPosition(LogicalDirection.Forward); 1512TextPointerContext forwardFromStart = start.GetPointerContext(LogicalDirection.Forward); 1516Invariant.Assert(itemType.IsAssignableFrom(start.GetAdjacentElement(LogicalDirection.Forward).GetType()), 1523TextPointerContext forwardFromEnd = end.GetPointerContext(LogicalDirection.Forward); 1528Invariant.Assert(!(forwardFromEnd == TextPointerContext.ElementStart) || itemType.IsAssignableFrom(end.GetAdjacentElement(LogicalDirection.Forward).GetType()), 1550((Section)fragment).HasTrailingParagraphBreakOnPaste = range.End.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.None; 1606start = start.GetNextContextPosition(LogicalDirection.Forward); 1650start = start.GetNextContextPosition(LogicalDirection.Forward); 1657start = start.GetNextContextPosition(LogicalDirection.Forward); 1847Invariant.Assert(textReader.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart); 1852elementEnd.MoveToNextContextPosition(LogicalDirection.Forward); 1874Invariant.Assert(textReader.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart); 1875Invariant.Assert(typeof(Hyperlink).IsAssignableFrom(textReader.GetElementType(LogicalDirection.Forward))); 1880Hyperlink hyperlink = (Hyperlink)textReader.GetAdjacentElement(LogicalDirection.Forward); 1885hyperlinkEnd.MoveToNextContextPosition(LogicalDirection.Forward); 1900InlineUIContainer inlineUIContainer = hyperlinkNavigation.GetAdjacentElement(LogicalDirection.Forward) as InlineUIContainer; 1907hyperlinkNavigation.MoveToNextContextPosition(LogicalDirection.Forward); 1922hyperlinkStart = range.Start.CreatePointer(LogicalDirection.Forward);
System\Windows\Documents\TextSchema.cs (4)
163TextElement rightElement = position.GetAdjacentElementFromOuterPosition(LogicalDirection.Forward); 888TextPointerContext forwardContext = start.GetPointerContext(LogicalDirection.Forward); 891TextElement nextElement = (TextElement)start.GetAdjacentElement(LogicalDirection.Forward); 904start = start.GetNextContextPosition(LogicalDirection.Forward);
System\windows\Documents\TextSegment.cs (1)
76_end = endPosition.GetFrozenPointer(preserveLogicalDirection ? endPosition.LogicalDirection : LogicalDirection.Forward);
System\windows\Documents\TextSelection.cs (28)
300((ITextSelection)this).SetCaretToPosition(((ITextRange)this).End, LogicalDirection.Forward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false); 466ITextPointer reversePosition = caretPosition.CreatePointer(direction == LogicalDirection.Forward ? LogicalDirection.Backward : LogicalDirection.Forward); 477caretPosition.SetLogicalDirection(LogicalDirection.Forward); 482caretPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text) 504LogicalDirection oppositeDirection = direction == LogicalDirection.Forward ? LogicalDirection.Backward : LogicalDirection.Forward; 616if (newMovingPosition == null && direction == LogicalDirection.Forward) 637LogicalDirection.Backward : LogicalDirection.Forward; 840startPosition = anchorWordRange.Start.GetFrozenPointer(LogicalDirection.Forward); 846movingPosition = cursorWordRange.Start.GetFrozenPointer(LogicalDirection.Forward); 962anchorWordRange.Contains(cursorPosition.GetInsertionPosition(LogicalDirection.Forward)) || 975TextPointerBase.IsAtWordBoundary(anchorPosition, /*insideWordDirection:*/LogicalDirection.Forward)) 989TextPointerBase.IsAtWordBoundary(cursorPosition, /*insideWordDirection:*/LogicalDirection.Forward)) 1052if (direction == LogicalDirection.Forward) 1081movingPosition.MoveToNextInsertionPosition(LogicalDirection.Forward); 1551Invariant.Assert(this.End.LogicalDirection == LogicalDirection.Forward); 1757This.End.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.Text && 1759This.End.GetNextInsertionPosition(LogicalDirection.Forward) == null); 1994(cursorPosition.LogicalDirection == LogicalDirection.Forward && objectEdgeRect.X < cursorMousePoint.X || 2000(cursorPosition.LogicalDirection == LogicalDirection.Forward && objectEdgeRect.X > cursorMousePoint.X || 2009(cursorPosition.LogicalDirection == LogicalDirection.Forward && objectEdgeRect.X > cursorMousePoint.X || 2015(cursorPosition.LogicalDirection == LogicalDirection.Forward && objectEdgeRect.X < cursorMousePoint.X || 2187caretPosition.SetLogicalDirection(LogicalDirection.Forward); 2201caretPosition.SetLogicalDirection(LogicalDirection.Forward); 2275nextCharacterPosition = focusedTextSelection.Start.CreatePointer(LogicalDirection.Forward); 2280nextCharacterPosition.MoveToNextInsertionPosition(LogicalDirection.Forward); 2295nextCharacterPosition.SetLogicalDirection(LogicalDirection.Forward);
System\windows\Documents\TextSelectionHighlightLayer.cs (2)
90if ((direction == LogicalDirection.Forward && textSegment.Start.CompareTo(textPosition) <= 0 && textPosition.CompareTo(textSegment.End) < 0) || // 115if (direction == LogicalDirection.Forward)
System\Windows\Documents\TextServicesPropertyRanges.cs (2)
129start = _textstore.CreatePointerAtCharOffset(startIndex, LogicalDirection.Forward); 130end = _textstore.CreatePointerAtCharOffset(startIndex + length, LogicalDirection.Forward);
System\Windows\Documents\TextStore.cs (46)
407navigator = CreatePointerAtCharOffset(startIndex, LogicalDirection.Forward); 408limit = (endIndex >= 0) ? CreatePointerAtCharOffset(endIndex, LogicalDirection.Forward) : null; 415TextPointerContext context = navigator.GetPointerContext(LogicalDirection.Forward); 429TextElement element = (TextElement)((TextPointer)navigator).GetAdjacentElement(LogicalDirection.Forward); 438navigator.MoveToNextContextPosition(LogicalDirection.Forward); 444navigator.MoveToNextContextPosition(LogicalDirection.Forward); 491start = start.GetNextInsertionPosition(LogicalDirection.Forward); 687endNavigator.SetLogicalDirection(LogicalDirection.Forward); 865position = CreatePointerAtCharOffset(index, LogicalDirection.Forward); 982ITextPointer positionPrev = position.CreatePointer(LogicalDirection.Forward); 1050startPointer = CreatePointerAtCharOffset(startIndex, LogicalDirection.Forward); 1051startPointer.MoveToInsertionPosition(LogicalDirection.Forward); 1061Rect rectStart = startPointer.GetCharacterRect(LogicalDirection.Forward); 1091lineRect = navigator.GetCharacterRect(LogicalDirection.Forward); 1092moved = navigator.MoveToNextInsertionPosition(LogicalDirection.Forward); 1486navigator.MoveToInsertionPosition(LogicalDirection.Forward); 1491if (navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text) 1497navigator.GetTextInRun(LogicalDirection.Forward, nextChars, 0, nextChars.Length); 1503TextSelection.ExtendToNextInsertionPosition(LogicalDirection.Forward); 2386_previousCompositionEnd = (_previousCompositionEndOffset == -1) ? null : textEditor.TextContainer.CreatePointerAtOffset(_previousCompositionEndOffset, LogicalDirection.Forward); 2405_previousCompositionEnd = (_previousCompositionEndOffset == -1) ? null : textEditor.TextContainer.CreatePointerAtOffset(_previousCompositionEndOffset, LogicalDirection.Forward); 2452Invariant.Assert(navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text); 2459runCount = TextPointerBase.GetTextWithLimit(navigator, LogicalDirection.Forward, text, charsCopied, Math.Min(cchReq, text.Length - charsCopied), limit); 2468runCount = navigator.GetTextRunLength(LogicalDirection.Forward); 2469navigator.MoveToNextContextPosition(LogicalDirection.Forward); 2511Invariant.Assert(navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.EmbeddedElement); 2521navigator.MoveToNextContextPosition(LogicalDirection.Forward); 2553Invariant.Assert(navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart || navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd); 2571char ch = (navigator.GetAdjacentElement(LogicalDirection.Forward) is TableCell) ? UnsafeNativeMethods.TS_CHAR_REGION : '\n'; 2905end = CreatePointerAtCharOffset(startIndex + length, LogicalDirection.Forward); 2907while (start.CompareTo(end) < 0 && start.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.Text) 2909start.MoveToNextContextPosition(LogicalDirection.Forward); 3032positionNext.MoveToNextInsertionPosition(LogicalDirection.Forward); 3175Rect lineBounds = start.GetCharacterRect(LogicalDirection.Forward); 3179ITextPointer navigator = start.CreatePointer(LogicalDirection.Forward); 3180while (navigator.MoveToNextContextPosition(LogicalDirection.Forward) == true && navigator.CompareTo(end) < 0) 3428start = start.GetNextInsertionPosition(LogicalDirection.Forward); 3436start = start.GetNextInsertionPosition(LogicalDirection.Forward); 3456start = CreatePointerAtCharOffset(startCharOffset, LogicalDirection.Forward); 3462TextPointerContext forwardContext = start.GetPointerContext(LogicalDirection.Forward); 3466TextElement element = start.GetAdjacentElement(LogicalDirection.Forward) as TextElement; 3478start.MoveToNextContextPosition(LogicalDirection.Forward); 3638ITextPointer end = this.TextContainer.CreatePointerAtOffset(record.EndOffsetBefore, LogicalDirection.Forward); 3956ITextPointer anchor = this.TextContainer.CreatePointerAtOffset(appSelectionAnchorOffset, LogicalDirection.Forward); 3957ITextPointer moving = this.TextContainer.CreatePointerAtOffset(appSelectionMovingOffset, LogicalDirection.Forward);
System\Windows\Documents\TextTreeDeleteContentUndoUnit.cs (5)
40node = start.GetAdjacentNode(LogicalDirection.Forward); 41haltNode = end.GetAdjacentNode(LogicalDirection.Forward); 74navigator = new TextPointer(this.TextContainer, this.SymbolOffset, LogicalDirection.Forward); 442navigator.MoveToNextContextPosition(LogicalDirection.Forward); 474TextPointer textPointerTable = new TextPointer(navigator.TextContainer.Start, _cpTable, LogicalDirection.Forward);
System\Windows\Documents\TextTreeExtractElementUndoUnit.cs (2)
59start = new TextPointer(this.TextContainer, this.SymbolOffset, LogicalDirection.Forward); 60end = new TextPointer(this.TextContainer, this.SymbolOffset + _symbolCount - 2, LogicalDirection.Forward);
System\Windows\Documents\TextTreeInsertElementUndoUnit.cs (3)
54start = new TextPointer(this.TextContainer, this.SymbolOffset, LogicalDirection.Forward); 56Invariant.Assert(start.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart, "TextTree undo unit out of sync with TextTree."); 58element = start.GetAdjacentElementFromOuterPosition(LogicalDirection.Forward);
System\Windows\Documents\TextTreeInsertUndoUnit.cs (2)
54start = new TextPointer(this.TextContainer, this.SymbolOffset, LogicalDirection.Forward); 55end = new TextPointer(this.TextContainer, this.SymbolOffset + _symbolCount, LogicalDirection.Forward);
System\Windows\Documents\TextTreeNode.cs (2)
471return GetEdgeFromOffset(nodeOffset, LogicalDirection.Forward); 483edge = (bias == LogicalDirection.Forward) ? ElementEdge.AfterEnd : ElementEdge.BeforeStart;
System\Windows\Documents\TextTreePropertyUndoUnit.cs (1)
50position = new TextPointer(this.TextContainer, this.SymbolOffset, LogicalDirection.Forward);
System\Windows\Documents\TextTreeTextElementNode.cs (1)
82return (direction == LogicalDirection.Forward) ? TextPointerContext.ElementStart : TextPointerContext.ElementEnd;
System\Windows\Documents\ValidationHelper.cs (1)
71if (direction != LogicalDirection.Forward &&
System.Windows.Controls.Ribbon (4)
Microsoft\Windows\Controls\Ribbon\RibbonComboBox.cs (1)
867strValue += textElement.ContentStart.GetTextInRun(LogicalDirection.Forward);
Microsoft\Windows\Controls\Ribbon\RibbonTwoLineText.cs (3)
302string secondLineText = secondLinePointer.GetTextInRun(LogicalDirection.Forward); 411firstCharacter = currentLinePointer.GetCharacterRect(LogicalDirection.Forward); 419firstCharacter = currentLinePointer.GetCharacterRect(LogicalDirection.Forward);