897 references to Forward
PresentationFramework (893)
MS\Internal\Annotations\Anchoring\FixedTextSelectionProcessor.cs (3)
107ITextPointer startPointer = segment.Start.CreatePointer(LogicalDirection.Forward); 552if (!start.IsAtInsertionPosition && !start.MoveToNextInsertionPosition(LogicalDirection.Forward)) 610start = textView.TextSegments[0].Start.CreatePointer(LogicalDirection.Forward);
MS\Internal\Annotations\Anchoring\TextSelectionHelper.cs (4)
144current.MoveToNextContextPosition(LogicalDirection.Forward); 199IDocumentPaginatorSource content = GetPointerPage(pointer.CreatePointer(LogicalDirection.Forward), out pageNumber); 240return GetAnchorPointForPointer(anchor.Start.CreatePointer(LogicalDirection.Forward)); 432ITextPointer start = segment.Start.CreatePointer(LogicalDirection.Forward);
MS\Internal\Annotations\Component\AnnotationHighlightLayer.cs (10)
282if (direction == LogicalDirection.Forward) 772if (((ps.CompareTo(_segment.Start) == 0) && (side == LogicalDirection.Forward)) || 830IList<HighlightSegment> r1 = Split(ps1, LogicalDirection.Forward); 998TextPointerContext nextContext = cursor.GetPointerContext(LogicalDirection.Forward); 1001Type elementType = cursor.GetElementType(LogicalDirection.Forward); 1015cursor.MoveToNextContextPosition(LogicalDirection.Forward); 1035cursor.MoveToNextContextPosition(LogicalDirection.Forward); 1043cursor.MoveToNextContextPosition(LogicalDirection.Forward); 1063segmentStart = cursor.GetInsertionPosition(LogicalDirection.Forward); 1110ITextView 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)
117textPointer = textPointer.GetInsertionPosition(LogicalDirection.Forward); 219(theirSegment.Start.LogicalDirection == LogicalDirection.Forward)) 670start = start.GetInsertionPosition(LogicalDirection.Forward);
MS\Internal\Documents\DocumentGrid.cs (1)
306tp = tp.CreatePointer(LogicalDirection.Forward);
MS\Internal\Documents\DocumentViewerHelper.cs (1)
404contextMenuPosition = textContainer.TextSelection.Start.CreatePointer(LogicalDirection.Forward);
MS\Internal\Documents\HostedElements.cs (9)
102_currentPosition.MoveToNextContextPosition(LogicalDirection.Forward); 111if (_currentPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart || 112_currentPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.EmbeddedElement) 118_currentPosition.MoveToNextContextPosition(LogicalDirection.Forward); 184switch (_currentPosition.GetPointerContext(LogicalDirection.Forward)) 187Debug.Assert(_currentPosition.GetAdjacentElementFromOuterPosition(LogicalDirection.Forward) is IInputElement); 188currentElement = _currentPosition.GetAdjacentElementFromOuterPosition(LogicalDirection.Forward); 191Debug.Assert(_currentPosition.GetAdjacentElement(LogicalDirection.Forward) is IInputElement); 192currentElement = (IInputElement)_currentPosition.GetAdjacentElement(LogicalDirection.Forward);
MS\Internal\Documents\TextBoxLine.cs (5)
81switch (position.GetPointerContext(LogicalDirection.Forward)) 431StaticTextPointer endOfRunPosition = _owner.Host.TextContainer.Highlights.GetNextPropertyChangePosition(position, LogicalDirection.Forward); 443TextDecorationCollection highlightDecorations = highlights.GetHighlightValue(position, LogicalDirection.Forward, typeof(SpellerHighlightLayer)) as TextDecorationCollection; 461&& highlights.GetHighlightValue(position, LogicalDirection.Forward, typeof(TextSelection)) != DependencyProperty.UnsetValue) 490int charactersCopied = position.GetTextInRun(LogicalDirection.Forward, textBuffer, 0, textBuffer.Length);
MS\Internal\Documents\TextBoxView.cs (20)
657if (position.LogicalDirection == LogicalDirection.Forward || position.Offset == 0) 705firstLineIndex = Math.Max(firstLineIndex, GetLineIndexFromOffset(startOffset, LogicalDirection.Forward)); 785nextLinePosition = _host.TextContainer.CreatePointerAtOffset(_lineMetrics[lineIndex + linesMoved].Offset, LogicalDirection.Forward); 824if (position.LogicalDirection == LogicalDirection.Forward) 862return position.GetFrozenPointer(LogicalDirection.Forward); 864else if (position.Offset == _host.TextContainer.SymbolCount && direction == LogicalDirection.Forward) 876if (direction == LogicalDirection.Forward) 891direction == LogicalDirection.Forward) 901logicalDirection = LogicalDirection.Forward; 911logicalDirection = LogicalDirection.Forward; 920logicalDirection = (nextCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 939return position.GetFrozenPointer(LogicalDirection.Forward); 959logicalDirection = LogicalDirection.Forward; 968logicalDirection = (backspaceCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 986ITextPointer start = _host.TextContainer.CreatePointerAtOffset(_lineMetrics[lineIndex].Offset, LogicalDirection.Forward); 987ITextPointer 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)
95_textContainer.CreatePointerAtOffset(_cpFirst, LogicalDirection.Forward), 105_textContainer.CreatePointerAtOffset(_ranges[i * 2], LogicalDirection.Forward), 125cpPos == _cpLast && position.LogicalDirection == LogicalDirection.Forward) 142cpPos == _ranges[i * 2 + 1] && position.LogicalDirection == LogicalDirection.Forward) 160startPosition = _textContainer.CreatePointerAtOffset(IsSimple ? _cpFirst : _ranges[0], LogicalDirection.Forward); 324if (start.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart) 327element = start.GetAdjacentElement(LogicalDirection.Forward); 339start.MoveToNextContextPosition(LogicalDirection.Forward); 345else if (start.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.EmbeddedElement) 348element = start.GetAdjacentElement(LogicalDirection.Forward); 381if (!start.MoveToNextContextPosition(LogicalDirection.Forward)) 409object element = position.GetAdjacentElement(LogicalDirection.Forward); 447element = position.GetAdjacentElement(LogicalDirection.Forward); 451positionsStart.Insert(0, position.CreatePointer(LogicalDirection.Forward)); 552textPointer = textContainer.CreatePointerAtOffset(0, LogicalDirection.Forward); // Start
MS\Internal\Documents\TextDocumentView.cs (15)
482if (position.LogicalDirection == LogicalDirection.Forward) 511if (segment.End.LogicalDirection == LogicalDirection.Forward) 528else if (position.TextContainer.End.CompareTo(position) == 0 && position.LogicalDirection == LogicalDirection.Forward) 767position = paragraph.StartPosition.CreatePointer(LogicalDirection.Forward); 873position = blockUIContainer.ContentStart.CreatePointer(LogicalDirection.Forward); 887position = paragraph.StartPosition.CreatePointer(LogicalDirection.Forward); 2402lineRange = new TextSegment(blockUIContainer.ContentStart.CreatePointer(LogicalDirection.Forward), blockUIContainer.ContentEnd.CreatePointer(LogicalDirection.Backward)); 2530positionOut = lines[lineIndex].StartPosition.CreatePointer(LogicalDirection.Forward); 2550positionOut = lines[0].StartPosition.CreatePointer(LogicalDirection.Forward); 2562positionOut = lines[lines.Count - 1].StartPosition.CreatePointer(LogicalDirection.Forward); 2905positionOut = blockUIContainer.ContentStart.CreatePointer(LogicalDirection.Forward); 3012positionOut = lines[lineIndex].StartPosition.CreatePointer(LogicalDirection.Forward); 3027positionOut = lines[0].StartPosition.CreatePointer(LogicalDirection.Forward); 3039positionOut = lines[lines.Count - 1].StartPosition.CreatePointer(LogicalDirection.Forward); 3483if (textPointer.LogicalDirection == LogicalDirection.Forward && textPointer.CompareTo(textElement.ElementStart) == 0)
MS\Internal\Documents\TextParagraphView.cs (3)
184positionOut = lines[lineIndex].StartPosition.CreatePointer(LogicalDirection.Forward); 403if (position.LogicalDirection == LogicalDirection.Forward && (lineIndex != lines.Count - 1)) 423(position.LogicalDirection == LogicalDirection.Forward && (lineIndex == lines.Count - 1)))));
MS\Internal\PtsHost\ContainerParagraph.cs (3)
249ITextPointer textPointer = TextContainerHelper.GetTextPointerFromCP(StructuralCache.TextContainer, prevParagraph.ParagraphEndCharacterPosition, LogicalDirection.Forward); 1032switch (textPointer.GetPointerContext(LogicalDirection.Forward)) 1065TextElement element = ((TextPointer)textPointer).GetAdjacentElementFromOuterPosition(LogicalDirection.Forward);
MS\Internal\PtsHost\FlowDocumentPage.cs (3)
963switch (searchPosition.GetPointerContext(LogicalDirection.Forward)) 966DependencyObject embeddedObject = searchPosition.GetAdjacentElement(LogicalDirection.Forward); 980searchPosition.MoveToNextContextPosition(LogicalDirection.Forward);
MS\Internal\PtsHost\Line.cs (6)
158switch (position.GetPointerContext(LogicalDirection.Forward)) 204ITextPointer startPosition = TextContainerHelper.GetTextPointerFromCP(_paraClient.Paragraph.StructuralCache.TextContainer, _cpPara, LogicalDirection.Forward); 205ITextPointer position = TextContainerHelper.GetTextPointerFromCP(_paraClient.Paragraph.StructuralCache.TextContainer, _cpPara + dcp, LogicalDirection.Forward); 608position = TextContainerHelper.GetTextPointerFromCP(_paraClient.Paragraph.StructuralCache.TextContainer, cp, LogicalDirection.Forward) as TextPointer; 613type = position.GetPointerContext((charIndex.TrailingLength == 0) ? LogicalDirection.Forward : LogicalDirection.Backward); 623element = position.GetAdjacentElementFromOuterPosition(LogicalDirection.Forward);
MS\Internal\PtsHost\LineBase.cs (9)
92Invariant.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text, "TextPointer does not point to characters."); 112endOfRunPosition = position.TextContainer.Highlights.GetNextPropertyChangePosition(position, LogicalDirection.Forward); 127int charactersCopied = position.GetTextInRun(LogicalDirection.Forward, textBuffer, 0, textBuffer.Length); 141Invariant.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart, "TextPointer does not point to element start edge."); 145TextElement element = (TextElement)position.GetAdjacentElement(LogicalDirection.Forward); 256Invariant.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd, "TextPointer does not point to element end edge."); 267TextElement element = (TextElement)position.GetAdjacentElement(LogicalDirection.Forward); 310Invariant.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.EmbeddedElement, "TextPointer does not point to embedded object."); 313DependencyObject embeddedObject = position.GetAdjacentElement(LogicalDirection.Forward) as DependencyObject;
MS\Internal\PtsHost\ListParagraph.cs (4)
80TextPointerContext runType = textPointer.GetPointerContext(LogicalDirection.Forward); 83TextElement element = ((TextPointer)textPointer).GetAdjacentElementFromOuterPosition(LogicalDirection.Forward); 129textPointer.MoveToNextContextPosition(LogicalDirection.Forward); 139textPointer.MoveToNextContextPosition(LogicalDirection.Forward);
MS\Internal\PtsHost\OptimalTextSource.cs (4)
106switch (position.GetPointerContext(LogicalDirection.Forward)) 153ITextPointer startPosition = TextContainerHelper.GetTextPointerFromCP(_paraClient.Paragraph.StructuralCache.TextContainer, _cpPara, LogicalDirection.Forward); 154ITextPointer position = TextContainerHelper.GetTextPointerFromCP(_paraClient.Paragraph.StructuralCache.TextContainer, _cpPara + dcp, LogicalDirection.Forward); 192ITextPointer position = TextContainerHelper.GetTextPointerFromCP(_paraClient.Paragraph.StructuralCache.TextContainer, _cpPara + dcp, LogicalDirection.Forward);
MS\Internal\PtsHost\TextParaClient.cs (24)
649RectFromDcpSimpleLines(0, 0, LogicalDirection.Forward, TextPointerContext.Text, ref textDetails.u.full, ref rect, ref vrBaseline); 654RectFromDcpCompositeLines(0, 0, LogicalDirection.Forward, TextPointerContext.Text, ref textDetails.u.full, ref rect, ref vrBaseline); 1097LogicalDirection logicalDirection = (charHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 1690if (orientation == LogicalDirection.Forward) 1787if (orientation == LogicalDirection.Forward) 2040ITextPointer position = Paragraph.StructuralCache.TextContainer.CreatePointerAtOffset(Paragraph.ParagraphStartCharacterPosition + dcp, LogicalDirection.Forward); 2429else if (position.LogicalDirection == LogicalDirection.Forward) 2553else if (position.LogicalDirection == LogicalDirection.Forward) 2629else if (dcp >= lineDesc.dcpLim - 1 && direction == LogicalDirection.Forward) 2658if (direction == LogicalDirection.Forward) 2668if ((nextCharacterHit.FirstCharacterIndex + nextCharacterHit.TrailingLength == lineDesc.dcpLim) && direction == LogicalDirection.Forward) 2678logicalDirection = LogicalDirection.Forward; 2687logicalDirection = LogicalDirection.Forward; 2696logicalDirection = (nextCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 2788else if (dcp >= element.dcpLim - 1 && direction == LogicalDirection.Forward) 2821if (direction == LogicalDirection.Forward) 2831if ((nextCharacterHit.FirstCharacterIndex + nextCharacterHit.TrailingLength == element.dcpLim) && direction == LogicalDirection.Forward) 2842logicalDirection = LogicalDirection.Forward; 2851logicalDirection = LogicalDirection.Forward; 2861logicalDirection = (nextCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 2944logicalDirection = LogicalDirection.Forward; 2953logicalDirection = (backspaceCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 3070logicalDirection = LogicalDirection.Forward; 3079logicalDirection = (backspaceCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward;
MS\Internal\PtsHost\TextParagraph.cs (10)
885ITextPointer textPointer = TextContainerHelper.GetTextPointerFromCP(StructuralCache.TextContainer, ParagraphStartCharacterPosition + dcpFirst, LogicalDirection.Forward); 888while(textPointer.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart) 890TextElement element = ((TextPointer)textPointer).GetAdjacentElementFromOuterPosition(LogicalDirection.Forward); 909ITextPointer textPointer = TextContainerHelper.GetTextPointerFromCP(StructuralCache.TextContainer, ParagraphStartCharacterPosition + dcpFirst, LogicalDirection.Forward); 918if(textPointer.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart) 920TextElement element = ((TextPointer)textPointer).GetAdjacentElementFromOuterPosition(LogicalDirection.Forward); 929textPointer.MoveToNextContextPosition(LogicalDirection.Forward); 934textPointer.MoveToNextContextPosition(LogicalDirection.Forward); 1220if (position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart) 1222invalid = (objectElement != position.GetAdjacentElement(LogicalDirection.Forward));
MS\Internal\PtsHost\TextParaLineResult.cs (2)
124return _owner.GetTextPosition(_dcp + _cch - _cchEllipses, LogicalDirection.Forward); 176_startPosition = _owner.GetTextPosition(_dcp, LogicalDirection.Forward);
MS\Internal\Text\ComplexLine.cs (13)
47switch (position.GetPointerContext(LogicalDirection.Forward)) 288position = new TextPointer(_owner.ContentStart, CalcPositionOffset(charHit), LogicalDirection.Forward); 295type = position.GetPointerContext(LogicalDirection.Forward); 311element = position.GetAdjacentElementFromOuterPosition(LogicalDirection.Forward); 339Debug.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text, "TextPointer does not point to characters."); 358endOfRunPosition = _owner.Highlights.GetNextPropertyChangePosition(position, LogicalDirection.Forward); 373int charactersCopied = position.GetTextInRun(LogicalDirection.Forward, textBuffer, 0, textBuffer.Length); 386Debug.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart, "TextPointer does not point to element start edge."); 390TextElement element = (TextElement)position.GetAdjacentElement(LogicalDirection.Forward); 477Debug.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd, "TextPointer does not point to element end edge."); 481TextElement element = (TextElement)position.GetAdjacentElement(LogicalDirection.Forward); 527Debug.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.EmbeddedElement, "TextPointer does not point to embedded object."); 530DependencyObject element = position.GetAdjacentElement(LogicalDirection.Forward) as DependencyObject;
MS\Internal\Text\DynamicPropertyReader.cs (1)
260selected = position.TextContainer.Highlights.GetHighlightValue(position, LogicalDirection.Forward, typeof(TextSelection));
MS\Internal\Text\TextLineResult.cs (2)
122return _owner.TextContainer.CreatePointerAtOffset(_dcp + _cch - _cchEllipses, LogicalDirection.Forward); 174_startPosition = _owner.TextContainer.CreatePointerAtOffset(_dcp, LogicalDirection.Forward);
MS\Internal\Text\TextProperties.cs (1)
236textDecorations = highlights.GetHighlightValue(highlightPosition, LogicalDirection.Forward, typeof(SpellerHighlightLayer)) as TextDecorationCollection;
System\Windows\Annotations\AnnotationHelper.cs (2)
688end.MoveToNextInsertionPosition(LogicalDirection.Forward); 870(selection.Start.LogicalDirection == LogicalDirection.Forward)) ||
System\Windows\Automation\Peers\TextElementAutomationPeer.cs (1)
121TextPointer endPosition = textElement.ContentStart.GetNextInsertionPosition(LogicalDirection.Forward);
System\Windows\Controls\AccessText.cs (6)
579TextPointerContext symbolType = navigator.GetPointerContext(LogicalDirection.Forward); 583string text = navigator.GetTextInRun(LogicalDirection.Forward); 616navigator.MoveToNextContextPosition(LogicalDirection.Forward); 625TextPointerContext symbolType = navigator.GetPointerContext(LogicalDirection.Forward); 629string text = navigator.GetTextInRun(LogicalDirection.Forward); 652navigator.MoveToNextContextPosition(LogicalDirection.Forward);
System\Windows\Controls\FlowDocumentReader.cs (1)
2009LogicalDirection cpDirection = LogicalDirection.Forward;
System\Windows\Controls\FlowDocumentScrollViewer.cs (1)
1940LogicalDirection cpDirection = LogicalDirection.Forward;
System\Windows\Controls\PasswordBox.cs (2)
1085while (start-- > 0 && selectionStart.MoveToNextInsertionPosition(LogicalDirection.Forward)) 1091while (length-- > 0 && selectionEnd.MoveToNextInsertionPosition(LogicalDirection.Forward))
System\Windows\Controls\PasswordTextContainer.cs (6)
233return new StaticTextPointer(this, ((ITextContainer)this).CreatePointerAtOffset(offset, LogicalDirection.Forward)); 531return new PasswordTextPointer(this, LogicalDirection.Forward, this.SymbolCount); 673textPosition = new PasswordTextPointer(this, LogicalDirection.Forward, offset); 710index = FindIndex(offset, LogicalDirection.Forward); 862Invariant.Assert(lastLogicalDirection != LogicalDirection.Forward); 913Debug.Write($"({position.DebugId}) {position.Offset}/{((position.LogicalDirection == LogicalDirection.Forward) ? "f " : "b ")}");
System\Windows\Controls\PasswordTextNavigator.cs (3)
143(direction == LogicalDirection.Forward && _offset == _container.SymbolCount)) 174if (direction == LogicalDirection.Forward) 198if (direction == LogicalDirection.Forward)
System\Windows\Controls\SinglePageViewer.cs (1)
1539LogicalDirection cpDirection = LogicalDirection.Forward;
System\Windows\Controls\TextAdaptor.cs (8)
118TextRangeAdaptor.MoveToInsertionPosition(start, LogicalDirection.Forward); 618TextPointerContext context = position.GetPointerContext(LogicalDirection.Forward); 621if (childElement == position.GetAdjacentElement(LogicalDirection.Forward)) 623rangeStart = position.CreatePointer(LogicalDirection.Forward); 631if (childElement == position.GetAdjacentElement(LogicalDirection.Forward)) 633rangeStart = position.CreatePointer(LogicalDirection.Forward); 634position.MoveToNextContextPosition(LogicalDirection.Forward); 639position.MoveToNextContextPosition(LogicalDirection.Forward);
System\Windows\Controls\TextBlock.cs (13)
2156logicalDirection = (charIndex.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 2246if (orientedPosition.LogicalDirection == LogicalDirection.Forward || originalCharacterIndex == 0) 2414else if (position.LogicalDirection == LogicalDirection.Forward) 2484else if (characterIndex == (dcp + GetLine(lineIndex).Length) && direction == LogicalDirection.Forward) 2520if (direction == LogicalDirection.Forward) 2534if ((nextCharacterHit.FirstCharacterIndex + nextCharacterHit.TrailingLength == (dcp + GetLine(lineIndex).Length)) && direction == LogicalDirection.Forward) 2544logicalDirection = LogicalDirection.Forward; 2553logicalDirection = LogicalDirection.Forward; 2562logicalDirection = (nextCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 2641logicalDirection = LogicalDirection.Forward; 2650logicalDirection = (backspaceCharacterHit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 3669switch (position.GetPointerContext(LogicalDirection.Forward)) 3672DependencyObject embeddedObject = position.GetAdjacentElement(LogicalDirection.Forward);
System\Windows\Controls\TextBox.cs (18)
166TextPointer newStart = this.TextContainer.CreatePointerAtOffset(start, LogicalDirection.Forward); 170newStart = newStart.GetInsertionPosition(LogicalDirection.Forward); 178TextPointer newEnd = new TextPointer(newStart, length, LogicalDirection.Forward); 181newEnd = newEnd.GetInsertionPosition(LogicalDirection.Forward); 269TextPointer position = this.TextContainer.CreatePointerAtOffset(charIndex, LogicalDirection.Forward); 450textPointer = textPointer.GetNextInsertionPosition(LogicalDirection.Forward); 459textPointer = textPointer.GetPositionAtOffset(0, LogicalDirection.Forward); 484TextPointer position = this.TextContainer.CreatePointerAtOffset(charIndex, LogicalDirection.Forward); 485SpellingError spellingError = this.TextEditor.GetSpellingErrorAtPosition(position, LogicalDirection.Forward); 489position = this.TextContainer.CreatePointerAtOffset(charIndex + 1, LogicalDirection.Forward); 816TextPointer newEnd = new TextPointer(TextSelectionInternal.Start, value, LogicalDirection.Forward); 819newEnd = newEnd.GetInsertionPosition(LogicalDirection.Forward); 860TextPointer newStart = TextContainer.CreatePointerAtOffset(value, LogicalDirection.Forward); 864newStart = newStart.GetInsertionPosition(LogicalDirection.Forward); 872TextPointer newEnd = new TextPointer(newStart, selectionLength, LogicalDirection.Forward); 875newEnd = newEnd.GetInsertionPosition(LogicalDirection.Forward); 1482if (TextPointerBase.IsNextToPlainLineBreak(textPointer, LogicalDirection.Forward)) 1484textPointer.MoveToNextInsertionPosition(LogicalDirection.Forward);
System\Windows\Controls\TextRangeAdaptor.cs (43)
534TextPointerBase.MoveToNextInsertionPosition(_end, LogicalDirection.Forward); 545MoveToNextWordBoundary(_end, LogicalDirection.Forward); 555TextPointerContext forwardContext = _start.GetPointerContext(LogicalDirection.Forward); 575TextPointerContext forwardContext = _end.GetPointerContext(LogicalDirection.Forward); 583_end.MoveToNextContextPosition(LogicalDirection.Forward); 589_start.SetLogicalDirection(LogicalDirection.Forward); 590_end.SetLogicalDirection(LogicalDirection.Forward); 765if (moved && direction == LogicalDirection.Forward) 769TextPointerContext context = position.GetPointerContext(LogicalDirection.Forward); 774position.MoveToNextContextPosition(LogicalDirection.Forward); 793if (direction == LogicalDirection.Forward) 811nextLineStart = GetInsertionPosition(nextLineStart, LogicalDirection.Forward); 816position.SetLogicalDirection(isStart ? LogicalDirection.Forward : LogicalDirection.Backward); 843position.SetLogicalDirection(isStart ? LogicalDirection.Forward : LogicalDirection.Backward); 856if (direction == LogicalDirection.Forward) 863if (nextParagraphStart.MoveToNextInsertionPosition(LogicalDirection.Forward)) 873position.SetLogicalDirection(isStart ? LogicalDirection.Forward : LogicalDirection.Backward); 894position.SetLogicalDirection(isStart ? LogicalDirection.Forward : LogicalDirection.Backward); 923if (direction == LogicalDirection.Forward) 927if (position.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.ElementEnd) 933Invariant.Assert(position.MoveToNextContextPosition(LogicalDirection.Forward)); 935MoveToInsertionPosition(position, LogicalDirection.Forward); 956if (direction == LogicalDirection.Forward) 966if (position.CompareTo(GetInsertionPosition(position.TextContainer.Start, LogicalDirection.Forward)) != 0) 996LogicalDirection direction = (count > 0) ? LogicalDirection.Forward : LogicalDirection.Backward; 1077position.SetLogicalDirection(LogicalDirection.Forward); 1099MoveToInsertionPosition(position, LogicalDirection.Forward); 1114position.MoveToPosition(direction == LogicalDirection.Forward ? paragraphRange.End : paragraphRange.Start); 1153MoveToInsertionPosition(position, LogicalDirection.Forward); 1165if (direction == LogicalDirection.Forward) 1198return (direction == LogicalDirection.Forward) ? moved : -moved; 1213while (IsElementBoundary(start.GetPointerContext(LogicalDirection.Forward))) 1215if (!start.MoveToNextContextPosition(LogicalDirection.Forward) || start.CompareTo(end) >= 0) 1237if (!start.MoveToNextContextPosition(LogicalDirection.Forward) || start.CompareTo(end) > 0) 1448return TextPointerBase.IsAtWordBoundary(position, LogicalDirection.Forward); 1482position.SetLogicalDirection(LogicalDirection.Forward); 1640_end.MoveToNextInsertionPosition(LogicalDirection.Forward); 1693attrStart = position.CreatePointer(LogicalDirection.Forward); 1706ITextPointer position = _start.CreatePointer(LogicalDirection.Forward); 1717attrStart = position.CreatePointer(LogicalDirection.Forward); 1728if (!position.MoveToNextContextPosition(LogicalDirection.Forward)) 1911_end.MoveToNextInsertionPosition(LogicalDirection.Forward); 1949if (MoveToUnitBoundary(position, start, count < 0 ? LogicalDirection.Backward : LogicalDirection.Forward, unit))
System\Windows\Documents\BlockUIContainer.cs (1)
73return 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)
328ITextPointer rangeStart = start.CreatePointer(LogicalDirection.Forward); 485ITextPointer start = _textView.TextContainer.Start.CreatePointer(_startOffset, LogicalDirection.Forward); 488while (start.CompareTo(end) < 0 && start.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.Text) 490start.MoveToNextContextPosition(LogicalDirection.Forward); 493Invariant.Assert(start.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text); 622startLinePointer = textSegment.End.CreatePointer(LogicalDirection.Forward); 627while ((startLinePointer.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.None) && 628(startLinePointer.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.Text)) 630startLinePointer.MoveToNextContextPosition(LogicalDirection.Forward);
System\Windows\Documents\DocumentSequenceTextContainer.cs (12)
129return new StaticTextPointer(this, ((ITextContainer)this).CreatePointerAtOffset(offset, LogicalDirection.Forward)); 677if (!highlights.IsContentHighlighted(highlightTransitionPosition, LogicalDirection.Forward)) 679highlightTransitionPosition = highlights.GetNextHighlightChangePosition(highlightTransitionPosition, LogicalDirection.Forward); 687selected = highlights.GetHighlightValue(highlightTransitionPosition, LogicalDirection.Forward, typeof(TextSelection)); 691highlightTransitionPosition = highlights.GetNextHighlightChangePosition(highlightTransitionPosition, LogicalDirection.Forward); 698if (highlightRangeStart.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.Text) 705TextPointerBase.GetTextWithLimit(highlightRangeStart.CreateDynamicTextPointer(LogicalDirection.Forward), LogicalDirection.Forward, sb, 0, 256, highlightTransitionPosition.CreateDynamicTextPointer(LogicalDirection.Forward)); 1005ITextPointer dynamicTextPointer = textPosition.CreateDynamicTextPointer(LogicalDirection.Forward); 1029DocumentSequenceTextPointer parentChangePosition = textPosition.CreateDynamicTextPointer(LogicalDirection.Forward) as DocumentSequenceTextPointer; 1042childTp = direction == LogicalDirection.Forward ?
System\Windows\Documents\DocumentSequenceTextPointer.cs (9)
375ITextPointer positionForwardGravity = ((ITextPointer)this).CreatePointer(LogicalDirection.Forward); 832moved = xGapAwareScan(thisTp, (direction == LogicalDirection.Forward ? 1 : -1)); 884if (direction == LogicalDirection.Forward) 973if (tp1.ChildPointer.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.None || 983if (block.ChildContainer.Start.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.None) 1038LogicalDirection scanDir = (distance > 0 ? LogicalDirection.Forward : LogicalDirection.Backward); 1075|| (cdb.IsTail && scanDir == LogicalDirection.Forward) 1079cdb = (scanDir == LogicalDirection.Forward ? cdb.NextBlock : cdb.PreviousBlock); 1080childTn = (scanDir == LogicalDirection.Forward ?
System\Windows\Documents\DocumentSequenceTextView.cs (2)
82LogicalDirection edge = LogicalDirection.Forward; 213LogicalDirection newEdge = LogicalDirection.Forward;
System\Windows\Documents\FixedDocument.cs (11)
509fixedTextPointer = new FixedTextPointer(true, LogicalDirection.Forward, flowPosition); 1080if (!highlights.IsContentHighlighted(highlightTransitionPosition, LogicalDirection.Forward)) 1082highlightTransitionPosition = highlights.GetNextHighlightChangePosition(highlightTransitionPosition, LogicalDirection.Forward); 1093selected = highlights.GetHighlightValue(highlightTransitionPosition, LogicalDirection.Forward, typeof(TextSelection)); 1111highlightTransitionPosition = highlights.GetNextHighlightChangePosition(highlightTransitionPosition, LogicalDirection.Forward); 1114while (highlights.GetHighlightValue(highlightTransitionPosition, LogicalDirection.Forward, typeof(TextSelection)) != DependencyProperty.UnsetValue); 1123LogicalDirection.Forward, typeof(HighlightComponent)) as AnnotationHighlightLayer.HighlightSegment; 1127highlightTransitionPosition = highlights.GetNextHighlightChangePosition(highlightTransitionPosition, LogicalDirection.Forward); 1137this.FixedContainer.GetMultiHighlights((FixedTextPointer)highlightRangeStart.CreateDynamicTextPointer(LogicalDirection.Forward), 1138(FixedTextPointer)highlightTransitionPosition.CreateDynamicTextPointer(LogicalDirection.Forward), 1443return new FixedTextPointer(true, LogicalDirection.Forward, flowPosition);
System\Windows\Documents\FixedElement.cs (6)
271TextPointerContext tpc = pos.GetPointerContext(LogicalDirection.Forward); 274root.AddText(pos.GetTextInRun(LogicalDirection.Forward)); 278root.AddChild(pos.GetAdjacentElement(LogicalDirection.Forward)); 282object obj = pos.GetAdjacentElement(LogicalDirection.Forward); 286pos.MoveToNextContextPosition(LogicalDirection.Forward); 291pos.MoveToNextContextPosition(LogicalDirection.Forward);
System\Windows\Documents\FixedFindEngine.cs (6)
154start = new DocumentSequenceTextPointer(childBlock, new FixedTextPointer(false, LogicalDirection.Forward, fixedDoc.FixedContainer.FixedTextBuilder.GetPageStartFlowPosition(translatedPageNumber))); 158start = new DocumentSequenceTextPointer(childBlock, new FixedTextPointer(false, LogicalDirection.Forward, fixedDoc.FixedContainer.FixedTextBuilder.GetPageStartFlowPosition(translatedPageNumber))); 169start = new FixedTextPointer(false, LogicalDirection.Forward, textBuilder.GetPageStartFlowPosition(pageNumber)); 173start = new FixedTextPointer(false, LogicalDirection.Forward, textBuilder.GetPageStartFlowPosition(pageNumber)); 306new FixedTextPointer(false, LogicalDirection.Forward,pageStartFlowPosition)); 312firstSearchPageStart = new FixedTextPointer(false, LogicalDirection.Forward, endAsFTP.FixedTextContainer.FixedTextBuilder.GetPageStartFlowPosition(pageNumber));
System\Windows\Documents\FixedTextContainer.cs (3)
114return new StaticTextPointer(this, ((ITextContainer)this).CreatePointerAtOffset(offset, LogicalDirection.Forward)); 587_end = new FixedTextPointer(false, LogicalDirection.Forward, new FlowPosition(this, this.FixedTextBuilder.FixedFlowMap.FlowEndEdge, 0)); 597FixedTextPointer eEnd = new FixedTextPointer(false, LogicalDirection.Forward, pEnd);
System\Windows\Documents\FixedTextPointer.cs (1)
584ITextPointer positionForwardGravity = ((ITextPointer)this).CreatePointer(LogicalDirection.Forward);
System\Windows\Documents\FixedTextView.cs (18)
107pos = _CreateTextPointer(fixedp, LogicalDirection.Forward); 115pos = _CreateTextPointer(fixedp, LogicalDirection.Forward); 186if (position.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.None) 347LogicalDirection scanDir = LogicalDirection.Forward; 382linesMoved = (scanDir == LogicalDirection.Forward) ? 1 : -1; 531CharacterHit next = (direction == LogicalDirection.Forward) ? 537LogicalDirection edge = LogicalDirection.Forward; 618ITextPointer begin = _CreateTextPointer(new FixedPosition(fixedNodes[0], 0), LogicalDirection.Forward); 651(tp.CompareTo(this.Start) == 0 && (tp.LogicalDirection == LogicalDirection.Forward || this.IsContainerStart)) || 746_start = new FixedTextPointer(false, LogicalDirection.Forward, flowStart); 801edge = LogicalDirection.Forward; 819edge = (hit.TrailingLength > 0) ? LogicalDirection.Backward : LogicalDirection.Forward; 876itp = ((ITextPointer)this.Start).CreatePointer(LogicalDirection.Forward); 877itp.MoveToInsertionPosition(LogicalDirection.Forward); 896FixedNode[] fixedNodes = Container.FixedTextBuilder.GetNextLine(fixedp.Node, (scanDir == LogicalDirection.Forward), ref count); 1103textdir = LogicalDirection.Forward; 1143LogicalDirection dir = LogicalDirection.Forward; 1212int 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)
166int scan = flowScan._vScan(LogicalDirection.Forward, -1); 178Debug.Assert(dir == LogicalDirection.Forward || dir == LogicalDirection.Backward); 189if (dir == LogicalDirection.Forward) 210if (dir == LogicalDirection.Forward) 227if (dir == LogicalDirection.Forward) 314LogicalDirection dir = (distance >= 0 ? LogicalDirection.Forward : LogicalDirection.Backward); 380FlowPosition flowScan = GetClingPosition(LogicalDirection.Forward); 388int scan = flowScan._vScan(LogicalDirection.Forward, distance); 406if (dir == LogicalDirection.Forward) 558if (dir == LogicalDirection.Forward) 620if (dir == LogicalDirection.Forward)
System\Windows\Documents\FrameworkRichTextComposition.cs (2)
60return _ResultEnd == null ? null : (TextPointer)_ResultEnd.GetFrozenPointer(LogicalDirection.Forward); 82return _CompositionEnd == null ? null : (TextPointer)_CompositionEnd.GetFrozenPointer(LogicalDirection.Forward);
System\Windows\Documents\FrameworkTextComposition.cs (2)
200_resultEnd = end.GetFrozenPointer(LogicalDirection.Forward); 221_compositionEnd = end.GetFrozenPointer(LogicalDirection.Forward);
System\Windows\Documents\Highlights.cs (7)
138else if (direction == LogicalDirection.Forward) 189characterRunEndPosition = textPosition.GetNextContextPosition(LogicalDirection.Forward); 354if (!highlightLayer.IsContentHighlighted(highlightTransitionPosition, LogicalDirection.Forward)) 356highlightTransitionPosition = highlightLayer.GetNextChangePosition(highlightTransitionPosition, LogicalDirection.Forward); 364highlightTransitionPosition = highlightLayer.GetNextChangePosition(highlightTransitionPosition, LogicalDirection.Forward); 367ranges.Add(new TextSegment(highlightRangeStart.CreateDynamicTextPointer(LogicalDirection.Forward), highlightTransitionPosition.CreateDynamicTextPointer(LogicalDirection.Forward)));
System\Windows\Documents\Hyperlink.cs (2)
111Hyperlink hyperlink = navigator.GetAdjacentElement(LogicalDirection.Forward) as Hyperlink; 119navigator.MoveToNextContextPosition(LogicalDirection.Forward);
System\Windows\Documents\ImmComposition.cs (14)
648caretNavigator = _caretOffset > 0 ? _startComposition.CreatePointer(_caretOffset, LogicalDirection.Forward) : _endComposition; 655ITextPointer startPosition = startNavigator.CreatePointer(LogicalDirection.Forward); 657ITextPointer caretPosition = caretNavigator.CreatePointer(LogicalDirection.Forward); 1145start = range.Start.CreatePointer(resultLength, LogicalDirection.Forward); 1149ITextPointer caretPosition = _caretOffset >= 0 ? start.CreatePointer(_caretOffset, LogicalDirection.Forward) : end; 1189ITextPointer endAttribute = _startComposition.CreatePointer(i + 1, LogicalDirection.Forward); 1471switch (navigator.GetPointerContext(LogicalDirection.Forward)) 1475int copied = navigator.GetTextInRun(LogicalDirection.Forward, buffer, 0, buffer.Length); 1488if (!navigator.GetElementType(LogicalDirection.Forward).IsSubclassOf(typeof(Inline))) 1492navigator.MoveToNextContextPosition(LogicalDirection.Forward); 1500navigator.MoveToNextContextPosition(LogicalDirection.Forward); 1548ITextPointer end = start.CreatePointer(LogicalDirection.Forward); 1586switch (position.GetPointerContext(LogicalDirection.Forward)) 1673positionNext.MoveToNextInsertionPosition(LogicalDirection.Forward);
System\Windows\Documents\InlineUIContainer.cs (1)
107return 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)
40_end = new NullTextPointer(this, LogicalDirection.Forward); 102return 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)
104switch (_navigator.GetPointerContext(LogicalDirection.Forward)) 112runLength = _navigator.GetTextRunLength(LogicalDirection.Forward); 114_navigator.GetTextInRun(LogicalDirection.Forward, _buffer, offset, runLength); 116_navigator.MoveToNextContextPosition(LogicalDirection.Forward); 118while (_navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text); 126_currentCache = _navigator.GetAdjacentElement(LogicalDirection.Forward); 129_navigator.MoveToNextContextPosition(LogicalDirection.Forward); 134_navigator.MoveToNextContextPosition(LogicalDirection.Forward); 180switch (_navigator.GetPointerContext(LogicalDirection.Forward)) 187_navigator.MoveToNextContextPosition(LogicalDirection.Forward); 189while (_navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text && _navigator.CompareTo(_end) < 0); 194_navigator.MoveToNextContextPosition(LogicalDirection.Forward); 199_navigator.MoveToNextContextPosition(LogicalDirection.Forward);
System\Windows\Documents\RubberbandSelector.cs (1)
339return new FixedTextPointer(false, LogicalDirection.Forward, flowHit);
System\Windows\Documents\Span.cs (2)
228else if (position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd) 230position = position.GetNextContextPosition(LogicalDirection.Forward);
System\Windows\Documents\Speller.cs (21)
195ExpandToWordBreakAndContext(error.End, LogicalDirection.Forward, language, out ITextPointer contentEnd, out ITextPointer contextEnd); 240if (_statusTable.GetError(pointer, LogicalDirection.Forward, out errorStart, out errorEnd)) 250pointer = _statusTable.GetNextErrorTransition(pointer, LogicalDirection.Forward); 670end = GetNextLanguageTransition(start, LogicalDirection.Forward, language, end); 712wordBreakRight = SearchForWordBreaks(caretPosition, LogicalDirection.Forward, language, 1, false /* stopOnError */); 798ExpandToWordBreakAndContext(end, LogicalDirection.Forward, language, out contentEnd, out contextEnd); 1125inwardDirection = direction == LogicalDirection.Forward ? LogicalDirection.Backward : LogicalDirection.Forward; 1337closestErrorPosition = nextErrorTransition.CreateDynamicTextPointer(LogicalDirection.Forward); 1351direction == LogicalDirection.Forward && closestErrorPosition.CompareTo(searchPosition) < 0) 1362direction == LogicalDirection.Forward && closestLanguageTransition.CompareTo(searchPosition) < 0) 1395while ((direction == LogicalDirection.Forward && navigator.CompareTo(haltPosition) < 0) || 1405if ((direction == LogicalDirection.Forward && navigator.CompareTo(haltPosition) > 0) || 1473if (direction == LogicalDirection.Forward) 1689switch (position.GetPointerContext(LogicalDirection.Forward)) 1692runCount = position.GetTextRunLength(LogicalDirection.Forward); 1696position.GetTextInRun(LogicalDirection.Forward, _text, _textLength, runCount); 1732position.MoveToNextContextPosition(LogicalDirection.Forward); 1740position.MoveToNextContextPosition(LogicalDirection.Forward); 1807context = pointer.GetPointerContext(LogicalDirection.Forward); 1810TextSchema.IsFormattingType(pointer.GetElementType(LogicalDirection.Forward)))
System\Windows\Documents\SpellerError.cs (1)
35_start = start.GetFrozenPointer(LogicalDirection.Forward);
System\Windows\Documents\SpellerStatusTable.cs (8)
93for (index = FindIndex(searchStart.CreateStaticPointer(), LogicalDirection.Forward); index >= 0 && index < _runList.Count; index++) 129runIndex = FindIndex(start.CreateStaticPointer(), LogicalDirection.Forward); 195else if (direction == LogicalDirection.Forward) 280end = (direction == LogicalDirection.Forward) ? GetRunEndPosition(index) : run.Position.CreateStaticPointer(); 350if (direction == LogicalDirection.Forward && position.CompareTo(run.Position) < 0 || 356else if (direction == LogicalDirection.Forward && position.CompareTo(GetRunEndPosition(index)) >= 0 || 393startIndex = FindIndex(start.CreateStaticPointer(), LogicalDirection.Forward); 753return GetRunEndPosition(index).CreateDynamicTextPointer(LogicalDirection.Forward);
System\Windows\Documents\TextContainer.cs (15)
516else if (direction == LogicalDirection.Forward) 518edge = node.GetEdgeFromOffset(nodeOffset, LogicalDirection.Forward); 641TextTreeTextNode nextTextNode = ((direction == LogicalDirection.Forward) ? node.GetNextNode() : node.GetPreviousNode()) as TextTreeTextNode; 650else if (direction == LogicalDirection.Forward) 652edge = node.GetEdgeFromOffset(nodeOffset, LogicalDirection.Forward); 879direction = LogicalDirection.Forward; 889(direction == LogicalDirection.Forward && textNode.BeforeStartReferenceCount)) 1049newFirstIMEVisibleNode = startPosition.GetAdjacentTextElementNodeSibling(LogicalDirection.Forward); 1271deletePosition = new TextPointer(startPosition, LogicalDirection.Forward); 1605TextPointer positionForwardGravity = position.GetPositionAtOffset(0, LogicalDirection.Forward); 1671endPosition = new TextPointer(this, _rootNode, ElementEdge.BeforeEnd, LogicalDirection.Forward); 2437node = startPosition.GetAdjacentSiblingNode(LogicalDirection.Forward); 2438stopNode = endPosition.GetAdjacentSiblingNode(LogicalDirection.Forward); 3422TextElement adjacentElement = startPosition.GetAdjacentElement(LogicalDirection.Forward) as TextElement; 3425nextIMEVisibleNode = (TextTreeTextElementNode)endPosition.GetAdjacentSiblingNode(LogicalDirection.Forward);
System\Windows\Documents\TextContainerChangeEventArgs.cs (1)
34_textPosition = textPosition.GetFrozenPointer(LogicalDirection.Forward);
System\windows\Documents\TextEditor.cs (1)
1515if (cursorPosition.GetNextInsertionPosition(LogicalDirection.Forward) == null &&
System\windows\Documents\TextEditorContextMenu.cs (4)
191direction = LogicalDirection.Forward; 195direction = LogicalDirection.Forward; 402while (position.GetAdjacentElement(LogicalDirection.Forward) is Inline) 404position = position.GetNextContextPosition(LogicalDirection.Forward);
System\windows\Documents\TextEditorCopyPaste.cs (1)
963TextPointer end = start.GetPositionAtOffset(0, LogicalDirection.Forward);
System\windows\Documents\TextEditorDragDrop.cs (3)
481!TextPointerBase.IsAtWordBoundary(dropPosition, /*insideWordDirection:*/LogicalDirection.Forward) && 484TextPointerBase.IsAtWordBoundary(_dragSourceTextRange.Start, LogicalDirection.Forward) && // 485TextPointerBase.IsAtWordBoundary(_dragSourceTextRange.End, LogicalDirection.Forward))
System\windows\Documents\TextEditorMouse.cs (3)
575if (snappedCursorPosition.GetNextInsertionPosition(LogicalDirection.Forward) == null && 749LogicalDirection otherEdgeDirection = (mouseMovePosition.LogicalDirection == LogicalDirection.Forward) ? 750LogicalDirection.Backward : LogicalDirection.Forward;
System\windows\Documents\TextEditorSelection.cs (43)
128ITextPointer lineStart = position.CreatePointer(LogicalDirection.Forward); 203LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Backward : LogicalDirection.Forward; 219LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Forward : LogicalDirection.Backward; 236LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Backward : LogicalDirection.Forward; 252LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Forward : LogicalDirection.Backward; 328ITextPointer nextPosition = lineEndPosition.GetNextInsertionPosition(LogicalDirection.Forward); 479if (movingPointer.MoveToNextInsertionPosition(LogicalDirection.Forward)) 818ITextPointer caretPosition = lineRange.Start.GetFrozenPointer(LogicalDirection.Forward); 821This.Selection.SetCaretToPosition(caretPosition, LogicalDirection.Forward, /*allowStopAtLineEnd:*/true, /*allowStopNearSpace:*/true); 867LogicalDirection orientation = TextPointerBase.IsNextToPlainLineBreak(lineRange.End, LogicalDirection.Backward) ? LogicalDirection.Forward : LogicalDirection.Backward; 901This.Selection.SetCaretToPosition(This.TextContainer.Start, LogicalDirection.Forward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false); 961LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Backward : LogicalDirection.Forward; 977LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Forward : LogicalDirection.Backward; 993LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Backward : LogicalDirection.Forward; 1009LogicalDirection movementDirection = IsFlowDirectionRightToLeftThenTopToBottom(This) ? LogicalDirection.Forward : LogicalDirection.Backward; 1027if (This.Selection.ExtendToNextTableRow(LogicalDirection.Forward)) 1085ITextPointer nextPosition = lineEndPosition.GetNextInsertionPosition(LogicalDirection.Forward); 1137if (TextPointerBase.IsNextToAnyBreak(newMovingPosition, LogicalDirection.Forward) || 1138newMovingPosition.GetNextInsertionPosition(LogicalDirection.Forward) == null) 1147newMovingPosition = newMovingPosition.GetInsertionPosition(LogicalDirection.Forward); 1148newMovingPosition = newMovingPosition.GetNextInsertionPosition(LogicalDirection.Forward); 1175if (newMovingPosition.GetNextInsertionPosition(LogicalDirection.Forward) == null) 1336if (movingPointer.MoveToNextInsertionPosition(LogicalDirection.Forward)) 1618ExtendSelectionAndBringIntoView(lineRange.Start.CreatePointer(LogicalDirection.Forward), This); 1670if (TextPointerBase.IsNextToPlainLineBreak(destination, LogicalDirection.Forward) || 1671TextPointerBase.IsNextToRichLineBreak(destination, LogicalDirection.Forward)) 1680destination = destination.GetNextInsertionPosition(LogicalDirection.Forward); 1684else if (TextPointerBase.IsNextToParagraphBreak(destination, LogicalDirection.Forward) && 1689ITextPointer newDestination = destination.GetNextInsertionPosition(LogicalDirection.Forward); 2072ITextPointer movingEnd = (direction == LogicalDirection.Forward ? textEditor.Selection.End : textEditor.Selection.Start); 2082LogicalDirection contentDirection = direction == LogicalDirection.Forward ? LogicalDirection.Backward : LogicalDirection.Forward; 2130if (direction == LogicalDirection.Forward) 2133if (!textEditor.Selection.IsEmpty && TextPointerBase.IsAtWordBoundary(textEditor.Selection.End, LogicalDirection.Forward)) 2143TextPointerBase.MoveToNextWordBoundary(wordBoundary, LogicalDirection.Forward); 2153if (!textEditor.Selection.IsEmpty && TextPointerBase.IsAtWordBoundary(textEditor.Selection.Start, LogicalDirection.Forward)) 2156textEditor.Selection.SetCaretToPosition(textEditor.Selection.Start, LogicalDirection.Forward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false); 2165textEditor.Selection.SetCaretToPosition(wordBoundary, LogicalDirection.Forward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false); 2209wordBoundary.SetLogicalDirection(direction == LogicalDirection.Forward ? LogicalDirection.Backward : LogicalDirection.Forward); 2331movingPosition = movingPosition.GetFrozenPointer(LogicalDirection.Forward); 2348return This.Selection.IsEmpty ? This.Selection.Start : This.Selection.Start.GetFrozenPointer(LogicalDirection.Forward); 2414This.Selection.SetCaretToPosition(position, LogicalDirection.Forward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false);
System\windows\Documents\TextEditorSpelling.cs (11)
60LogicalDirection direction = This.Selection.IsEmpty ? This.Selection.Start.LogicalDirection : LogicalDirection.Forward; 68direction = (direction == LogicalDirection.Forward) ? LogicalDirection.Backward : LogicalDirection.Forward; 83direction = (direction == LogicalDirection.Forward) ? LogicalDirection.Backward : LogicalDirection.Forward; 88direction = LogicalDirection.Forward; 149caretPosition = textStart.CreatePointer(+correctedText.Length, LogicalDirection.Forward); 187textStart.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.Text) 189textStart.MoveToNextContextPosition(LogicalDirection.Forward); 198if (textStart.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.Text || 317position = GetNextTextPosition(position, limit, LogicalDirection.Forward, out character);
System\windows\Documents\TextEditorTyping.cs (12)
552ITextPointer deletePosition = position.GetNextInsertionPosition(LogicalDirection.Forward); 575This.Selection.ExtendToNextInsertionPosition(LogicalDirection.Forward); 748LogicalDirection directionOfDelete = position.CompareTo(deletePosition) < 0 ? LogicalDirection.Forward : LogicalDirection.Backward; 755if (directionOfDelete == LogicalDirection.Forward) 820position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd) 858position.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.ElementEnd) 922TextPointerBase.MoveToNextWordBoundary(wordBoundary, LogicalDirection.Forward); 1090This.Selection.SetCaretToPosition(This.Selection.End, LogicalDirection.Forward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false); 1181This.Selection.SetCaretToPosition(range.Start, LogicalDirection.Forward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false); 1353if (HandleTabInTables(This, LogicalDirection.Forward)) 1430if (direction == LogicalDirection.Forward) 1467if (direction == LogicalDirection.Forward)
System\Windows\Documents\TextEffectResolver.cs (4)
105while (navigator.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.Text 106&& navigator.MoveToNextContextPosition(LogicalDirection.Forward)) ; 115while (navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text 117&& navigator.MoveToNextContextPosition(LogicalDirection.Forward)) ;
System\Windows\Documents\TextElement.cs (4)
306TextPointer contentEnd = new TextPointer(tree, _textElementNode, ElementEdge.BeforeEnd, LogicalDirection.Forward); 329elementStart = new TextPointer(tree, _textElementNode, ElementEdge.BeforeStart, LogicalDirection.Forward); 395contentEnd = new TextPointer(tree, _textElementNode, ElementEdge.BeforeEnd, LogicalDirection.Forward); 1009beforeStart = new TextPointer(tree, _textElementNode, ElementEdge.BeforeStart, LogicalDirection.Forward);
System\Windows\Documents\TextElementEnumerator.cs (2)
136_navigator.MoveToNextContextPosition(LogicalDirection.Forward); 145_navigator.MoveToNextContextPosition(LogicalDirection.Forward);
System\Windows\Documents\TextFindEngine.cs (8)
207direction = LogicalDirection.Forward; 313hasFollowingSeparatorChar = HasNeighboringSeparatorChar(position, LogicalDirection.Forward); 318hasFollowingSeparatorChar = HasNeighboringSeparatorChar(oppositeEndPosition, LogicalDirection.Forward); 349LogicalDirection.Forward, 361if (direction == LogicalDirection.Forward) 903if (direction == LogicalDirection.Forward) 905context = pointer.GetPointerContext(LogicalDirection.Forward); 908TextSchema.IsFormattingType(pointer.GetElementType(LogicalDirection.Forward)))
System\Windows\Documents\TextPointer.cs (22)
306Initialize(tree, node, edge, LogicalDirection.Forward, tree.PositionGeneration, false, false, tree.LayoutGeneration); 503/// <see cref="System.Windows.Documents.LogicalDirection.Forward"/>.</para> 552return (direction == LogicalDirection.Forward) ? GetPointerContextForward(_node, this.Edge) : GetPointerContextBackward(_node, this.Edge); 587if (direction == LogicalDirection.Forward) 603textNode = ((direction == LogicalDirection.Forward) ? textNode.GetNextNode() : textNode.GetPreviousNode()) as TextTreeTextNode; 1071return GetInsertionPosition(LogicalDirection.Forward); 1227position.SetLogicalDirection(LogicalDirection.Forward); 1330LogicalDirection direction = count < 0 ? LogicalDirection.Backward : LogicalDirection.Forward; 1782skipCount = (direction == LogicalDirection.Forward) ? nodeOffset : textNode.SymbolCount - nodeOffset; 1799textNode = ((direction == LogicalDirection.Forward) ? textNode.GetNextNode() : textNode.GetPreviousNode()) as TextTreeTextNode; 1985if (direction == LogicalDirection.Forward) 2703oppositeDirection = (contentDirection == LogicalDirection.Forward) ? LogicalDirection.Backward : LogicalDirection.Forward; 2854if (direction == LogicalDirection.Forward) 3010if (GetGravityInternal() == LogicalDirection.Forward) 3441symbolType = node.GetPointerContext(LogicalDirection.Forward); 3448symbolType = firstContainedNode.GetPointerContext(LogicalDirection.Forward); 3466symbolType = nextNode.GetPointerContext(LogicalDirection.Forward); 4014if (gravity == LogicalDirection.Forward) 4040if (gravity == LogicalDirection.Forward) 4060return (this.Edge == ElementEdge.BeforeStart || this.Edge == ElementEdge.BeforeEnd) ? LogicalDirection.Forward : LogicalDirection.Backward; 4141if (GetGravityInternal() == LogicalDirection.Forward)
System\Windows\Documents\TextPointerBase.cs (49)
85else if (direction == LogicalDirection.Forward && limit.CompareTo(thisPointer) <= 0) 102if (direction == LogicalDirection.Forward) 184Type forwardType = forwardPosition.GetElementType(LogicalDirection.Forward); 188TextPointerContext forwardContext = forwardPosition.GetPointerContext(LogicalDirection.Forward); 231TextPointerContext forwardContext = position.GetPointerContext(LogicalDirection.Forward); 254TextPointerContext forwardContext = position.GetPointerContext(LogicalDirection.Forward); 259typeof(Table).IsAssignableFrom(position.GetElementType(LogicalDirection.Forward))); 278position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd; 323BorderingElementCategory category = GetBorderingElementCategory(navigator, LogicalDirection.Forward); 330navigator.MoveToNextContextPosition(LogicalDirection.Forward); 332while (GetBorderingElementCategory(navigator, LogicalDirection.Forward) == BorderingElementCategory.MergeableScopingInline); 338elementType = navigator.GetElementType(LogicalDirection.Forward); 342navigator.MoveToNextContextPosition(LogicalDirection.Forward); 359elementType = navigator.GetElementType(LogicalDirection.Forward); 362navigator.MoveToNextInsertionPosition(LogicalDirection.Forward); 375navigator.MoveToNextContextPosition(LogicalDirection.Forward); 377while (navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart); 394return IsAtNonMergeableInlineEdge(position, LogicalDirection.Forward); 424position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd) 512return GetWordRange(thisPosition, LogicalDirection.Forward); 547if (moved && IsAtWordBoundary(thisPosition, /*insideWordDirection:*/LogicalDirection.Forward)) 554MoveToNextWordBoundary(navigator, direction == LogicalDirection.Backward ? LogicalDirection.Forward : LogicalDirection.Backward); 568wordEnd = RestrictWithinBlock(thisPosition, wordEnd, LogicalDirection.Forward); 574wordEnd = wordEnd.GetFrozenPointer(LogicalDirection.Forward); 589Invariant.Assert(!(direction == LogicalDirection.Forward) || position.CompareTo(limit) <= 0, "for forward direcion position must be <= than linit"); 612return limit.GetInsertionPosition(direction == LogicalDirection.Backward ? LogicalDirection.Forward : LogicalDirection.Backward); 633(direction == LogicalDirection.Forward && IsCharUnicodeNewLine(textBuffer[0])) 699bool isAtLineWrappingPosition = position.LogicalDirection == LogicalDirection.Forward 714thisPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd && 725return thisPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.None && 965int increment = direction == LogicalDirection.Forward ? +1 : -1; 982if ((direction == LogicalDirection.Forward && initialPosition.CompareTo(thisNavigator) < 0) || 1026while (TextSchema.IsFormattingType(thisNavigator.GetElementType(LogicalDirection.Forward)) 1037if (direction == LogicalDirection.Forward) 1088if (IsAtWordBoundary(thisNavigator, /*insideWordDirection:*/LogicalDirection.Forward)) 1148if (direction == LogicalDirection.Forward) 1158oppositeDirection = LogicalDirection.Forward; 1258if (direction == LogicalDirection.Forward && IsAtNonMergeableInlineEnd(thisNavigator)) 1260symbolCount += LeaveNonMergeableAncestor(thisNavigator, LogicalDirection.Forward); 1275symbolCount += LeaveNonMergeableAncestor(thisNavigator, LogicalDirection.Forward); 1286int increment = (direction == LogicalDirection.Forward) ? +1 : -1; 1331TextPointerContext forwardContext = position.GetPointerContext(LogicalDirection.Forward); 1368position.GetTextInRun(LogicalDirection.Forward, neighborhood, 1, 1) == 1) 1430navigator.GetTextInRun(LogicalDirection.Forward, preceedingText, SelectionWordBreaker.MinContextLength - preceedingCount, runLength); 1445runLength = Math.Min(navigator.GetTextRunLength(LogicalDirection.Forward), SelectionWordBreaker.MinContextLength - followingCount); 1447navigator.GetTextInRun(LogicalDirection.Forward, followingText, followingCount, runLength); 1456navigator.MoveToInsertionPosition(LogicalDirection.Forward); 1458while (navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text); 1491TextPointerContext context = (direction == LogicalDirection.Forward) ? TextPointerContext.ElementEnd : TextPointerContext.ElementStart;
System\Windows\Documents\TextRangeBase.cs (41)
77textPointer = textPointer.GetFormatNormalizedPosition(LogicalDirection.Forward); 210!TextPointerBase.IsAtWordBoundary(thisRange.Start, LogicalDirection.Forward) && // 286!TextPointerBase.IsNextToAnyBreak(thisRange.End, LogicalDirection.Forward)) 292nextPosition.MoveToNextInsertionPosition(LogicalDirection.Forward); 337SkipParagraphContent(end, LogicalDirection.Forward); 353(nextContext == TextPointerContext.ElementStart && direction == LogicalDirection.Forward || // 358(nextContext == TextPointerContext.ElementEnd && direction == LogicalDirection.Forward || // 414if (position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text) 416moved = position.MoveToNextContextPosition(LogicalDirection.Forward); 420moved = position.MoveToInsertionPosition(LogicalDirection.Forward); 425moved = position.MoveToNextInsertionPosition(LogicalDirection.Forward); 496moved = position.MoveToNextContextPosition(LogicalDirection.Forward); 681TextPointerContext symbolType = navigator.GetPointerContext(LogicalDirection.Forward); 697navigator.MoveToNextContextPosition(LogicalDirection.Forward); 707navigator.MoveToNextContextPosition(LogicalDirection.Forward); 712navigator.MoveToNextContextPosition(LogicalDirection.Forward); 715elementType = navigator.GetElementType(LogicalDirection.Forward); 735navigator.MoveToNextContextPosition(LogicalDirection.Forward); 751int runLength = navigator.GetTextRunLength(LogicalDirection.Forward); 753runLength = TextPointerBase.GetTextWithLimit(navigator, LogicalDirection.Forward, charArray, 0, runLength, endPosition); 755navigator.MoveToNextContextPosition(LogicalDirection.Forward); 766navigator.MoveToNextContextPosition(LogicalDirection.Forward); 768TextPointerContext symbolType = navigator.GetPointerContext(LogicalDirection.Forward); 775navigator.MoveToNextContextPosition(LogicalDirection.Forward); 776symbolType = navigator.GetPointerContext(LogicalDirection.Forward); 799List list = (List)navigator.GetAdjacentElement(LogicalDirection.Forward); 820navigator.MoveToNextContextPosition(LogicalDirection.Forward); 830ListItem listItem = (ListItem)navigator.GetAdjacentElement(LogicalDirection.Forward); 862object element = navigator.GetAdjacentElement(LogicalDirection.Forward); 1315thisRange.End.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text) 1363(insertPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.None || 1364insertPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd); 1376ITextPointer newEnd = insertPosition.CreatePointer(LogicalDirection.Forward); 1381TextPointer insertionPosition = (TextPointer)newStart.CreatePointer(LogicalDirection.Forward); 1419newEnd = newEnd.GetNextInsertionPosition(LogicalDirection.Forward); 1620TextPointerContext context = start.GetPointerContext(LogicalDirection.Forward); 1623start.MoveToNextContextPosition(LogicalDirection.Forward); 1624context = start.GetPointerContext(LogicalDirection.Forward); 1637return start.GetAdjacentElement(LogicalDirection.Forward) as UIElement; 1718start = GetNormalizedPosition(thisRange, start, LogicalDirection.Forward); 1961!TextPointerBase.IsAtInsertionPosition(start, LogicalDirection.Forward) ||
System\Windows\Documents\TextRangeEdit.cs (43)
74else if (!keepEmptyFormatting && splitPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd) 270while (position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd && 281position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart && 283(secondInline = position.GetAdjacentElement(LogicalDirection.Forward) as Inline) != null) 333inline.ElementEnd.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd) 460start = start.GetNextContextPosition(LogicalDirection.Forward); 534if (position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd) 558Invariant.Assert(position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart, "position must be before ElementStart"); 658while (!(breakPosition.Parent is Paragraph) && breakPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart) 660breakPosition = breakPosition.GetNextContextPosition(LogicalDirection.Forward); 664breakPosition = breakPosition.GetInsertionPosition(LogicalDirection.Forward); 701return lineBreak.ElementEnd.GetInsertionPosition(LogicalDirection.Forward); 800start = block.ElementEnd.GetPositionAtOffset(0, LogicalDirection.Forward); 807TextPointer contentStart = block.ContentStart.GetPositionAtOffset(0, LogicalDirection.Forward); // Normalize forward; 808contentStart = contentStart.GetNextContextPosition(LogicalDirection.Forward); // Leave scope of initial List. 828start = block.ElementEnd.GetPositionAtOffset(0, LogicalDirection.Forward); 970TextPointer end = lastChild.ElementEnd.GetFrozenPointer(LogicalDirection.Forward); 977firstChild = (Inline)start.GetAdjacentElement(LogicalDirection.Forward); 1051pointer = pointer.GetNextContextPosition(LogicalDirection.Forward); 1270TextPointerContext forwardContext = position.GetPointerContext(LogicalDirection.Forward); 1285while (position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd && 1309while (nextPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart && 1310TextSchema.IsMergeableInline(nextPosition.GetAdjacentElement(LogicalDirection.Forward).GetType())) 1312nextPosition = ((Inline)nextPosition.GetAdjacentElement(LogicalDirection.Forward)).ContentStart; 1442startPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd) 1588direction = LogicalDirection.Forward; 1598oppositeDirection = LogicalDirection.Forward; 1615Invariant.Assert(direction == LogicalDirection.Forward && nextPosition.CompareTo(end) < 0 || direction == LogicalDirection.Backward && nextPosition.CompareTo(end) > 0, 1627if (direction == LogicalDirection.Forward && nextPosition.CompareTo(end) > 0 || direction == LogicalDirection.Backward && nextPosition.CompareTo(end) < 0) 1641if (direction == LogicalDirection.Forward && nextPosition.CompareTo(end) >= 0 || direction == LogicalDirection.Backward && nextPosition.CompareTo(end) <= 0) 1895TextPointer nextRunPosition = run.ElementEnd.GetPositionAtOffset(0, LogicalDirection.Forward); 1903nextRunPosition = nextRunPosition.GetNextContextPosition(LogicalDirection.Forward); 2085if (pointer.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart && 2086(run = pointer.GetAdjacentElement(LogicalDirection.Forward) as Run) != null) 2100pointer = pointer.GetNextContextPosition(LogicalDirection.Forward); 2112start = start.GetPositionAtOffset(0, LogicalDirection.Forward); 2116start = start.GetNextContextPosition(LogicalDirection.Forward); 2130start = start.GetNextContextPosition(LogicalDirection.Forward); 2151run = (Run)start.GetAdjacentElement(LogicalDirection.Forward); 2164DependencyObject forwardElement = start.GetAdjacentElement(LogicalDirection.Forward); 2170Inline inline = (Inline)start.GetAdjacentElement(LogicalDirection.Forward); 2190end.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd && 2248start = start.GetNextContextPosition(LogicalDirection.Forward);
System\Windows\Documents\TextRangeEditLists.cs (18)
97TextPointer positionAfterSecondParagraph = secondParagraphOrBlockUIContainer.ElementEnd.GetFrozenPointer(LogicalDirection.Forward); 146ListItem followingListItem = positionAfterSecondParagraph.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart 147? positionAfterSecondParagraph.GetAdjacentElement(LogicalDirection.Forward) as ListItem : null; 154Invariant.Assert(positionAfterSecondParagraph.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart); 176while (navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd) 178navigator.MoveToNextContextPosition(LogicalDirection.Forward); 212mergePosition.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.ElementStart) 218List followingList = mergePosition.GetAdjacentElement(LogicalDirection.Forward) as List; 310Block 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)
456else if (direction == LogicalDirection.Forward && 469if (direction == LogicalDirection.Forward) 530movingPosition = movingCell.ContentEnd.GetInsertionPosition().GetNextInsertionPosition(LogicalDirection.Forward); 540if (direction == LogicalDirection.Forward) 569return (direction == LogicalDirection.Forward) ? row.ContentEnd.GetNextInsertionPosition(LogicalDirection.Forward) : 601return (direction == LogicalDirection.Forward) ? row.ContentEnd.GetNextInsertionPosition(LogicalDirection.Forward) : 786nextInsertionPosition = nextInsertionPosition.GetNextInsertionPosition(LogicalDirection.Forward); 811while (position.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart) 813position = position.GetNextContextPosition(LogicalDirection.Forward); 892if (position.GetAdjacentElementFromOuterPosition(LogicalDirection.Forward) is Run) 895insertionPosition.MoveToNextContextPosition(LogicalDirection.Forward); 1085cellEnd.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart) 1087cell = (TableCell)cellEnd.GetAdjacentElement(LogicalDirection.Forward); 1962startPosition = startPosition.GetInsertionPosition(LogicalDirection.Forward); 1990TextPointer start = startCell.ContentStart.GetInsertionPosition(LogicalDirection.Forward); 1994TextPointer end = endCell.ContentEnd.GetNextInsertionPosition(LogicalDirection.Forward); 2051anchorPosition = anchorPosition.GetInsertionPosition(LogicalDirection.Forward);
System\Windows\Documents\TextRangeSerialization.cs (37)
219TextPointerContext runType = textReader.GetPointerContext(LogicalDirection.Forward); 224TextElement nextElement = (TextElement)textReader.GetAdjacentElement(LogicalDirection.Forward); 233textReader.MoveToNextContextPosition(LogicalDirection.Forward); 253textReader.MoveToNextContextPosition(LogicalDirection.Forward); 261textReader.MoveToNextContextPosition(LogicalDirection.Forward); 271if (ignoreWriteHyperlinkEnd && (textReader.GetAdjacentElement(LogicalDirection.Forward) is Hyperlink)) 275textReader.MoveToNextContextPosition(LogicalDirection.Forward); 288textReader.MoveToNextContextPosition(LogicalDirection.Forward); 305textReader.MoveToNextContextPosition(LogicalDirection.Forward); 309int textLength = textReader.GetTextRunLength(LogicalDirection.Forward); 312textLength = TextPointerBase.GetTextWithLimit(textReader, LogicalDirection.Forward, text, 0, textLength, rangeEnd); 319textReader.MoveToNextContextPosition(LogicalDirection.Forward); 323object embeddedObject = textReader.GetAdjacentElement(LogicalDirection.Forward); 324textReader.MoveToNextContextPosition(LogicalDirection.Forward); 331textReader.MoveToNextContextPosition(LogicalDirection.Forward); 1232TextElement uiContainer = fragment.ContentStart.GetAdjacentElement(LogicalDirection.Forward) as TextElement; 1338fragmentEnd = fragment.ElementEnd.GetPositionAtOffset(0, LogicalDirection.Forward); // need forward orientation to stick with the following content during merge at fragmentStart position 1366fragmentEnd = fragmentEnd.GetInsertionPosition(LogicalDirection.Forward); 1481if (navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart) 1483navigator = navigator.GetNextContextPosition(LogicalDirection.Forward); 1518TextPointerContext forwardFromStart = start.GetPointerContext(LogicalDirection.Forward); 1522Invariant.Assert(itemType.IsAssignableFrom(start.GetAdjacentElement(LogicalDirection.Forward).GetType()), 1529TextPointerContext forwardFromEnd = end.GetPointerContext(LogicalDirection.Forward); 1534Invariant.Assert(!(forwardFromEnd == TextPointerContext.ElementStart) || itemType.IsAssignableFrom(end.GetAdjacentElement(LogicalDirection.Forward).GetType()), 1556((Section)fragment).HasTrailingParagraphBreakOnPaste = range.End.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.None; 1612start = start.GetNextContextPosition(LogicalDirection.Forward); 1656start = start.GetNextContextPosition(LogicalDirection.Forward); 1663start = start.GetNextContextPosition(LogicalDirection.Forward); 1853Invariant.Assert(textReader.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart); 1858elementEnd.MoveToNextContextPosition(LogicalDirection.Forward); 1880Invariant.Assert(textReader.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart); 1881Invariant.Assert(typeof(Hyperlink).IsAssignableFrom(textReader.GetElementType(LogicalDirection.Forward))); 1886Hyperlink hyperlink = (Hyperlink)textReader.GetAdjacentElement(LogicalDirection.Forward); 1891hyperlinkEnd.MoveToNextContextPosition(LogicalDirection.Forward); 1906InlineUIContainer inlineUIContainer = hyperlinkNavigation.GetAdjacentElement(LogicalDirection.Forward) as InlineUIContainer; 1913hyperlinkNavigation.MoveToNextContextPosition(LogicalDirection.Forward); 1928hyperlinkStart = range.Start.CreatePointer(LogicalDirection.Forward);
System\Windows\Documents\TextSchema.cs (4)
164TextElement rightElement = position.GetAdjacentElementFromOuterPosition(LogicalDirection.Forward); 894TextPointerContext forwardContext = start.GetPointerContext(LogicalDirection.Forward); 897TextElement nextElement = (TextElement)start.GetAdjacentElement(LogicalDirection.Forward); 910start = start.GetNextContextPosition(LogicalDirection.Forward);
System\windows\Documents\TextSegment.cs (1)
77_end = endPosition.GetFrozenPointer(preserveLogicalDirection ? endPosition.LogicalDirection : LogicalDirection.Forward);
System\windows\Documents\TextSelection.cs (28)
303((ITextSelection)this).SetCaretToPosition(((ITextRange)this).End, LogicalDirection.Forward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false); 469ITextPointer reversePosition = caretPosition.CreatePointer(direction == LogicalDirection.Forward ? LogicalDirection.Backward : LogicalDirection.Forward); 480caretPosition.SetLogicalDirection(LogicalDirection.Forward); 485caretPosition.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text) 507LogicalDirection oppositeDirection = direction == LogicalDirection.Forward ? LogicalDirection.Backward : LogicalDirection.Forward; 619if (newMovingPosition == null && direction == LogicalDirection.Forward) 640LogicalDirection.Backward : LogicalDirection.Forward; 843startPosition = anchorWordRange.Start.GetFrozenPointer(LogicalDirection.Forward); 849movingPosition = cursorWordRange.Start.GetFrozenPointer(LogicalDirection.Forward); 965anchorWordRange.Contains(cursorPosition.GetInsertionPosition(LogicalDirection.Forward)) || 978TextPointerBase.IsAtWordBoundary(anchorPosition, /*insideWordDirection:*/LogicalDirection.Forward)) 992TextPointerBase.IsAtWordBoundary(cursorPosition, /*insideWordDirection:*/LogicalDirection.Forward)) 1055if (direction == LogicalDirection.Forward) 1084movingPosition.MoveToNextInsertionPosition(LogicalDirection.Forward); 1554Invariant.Assert(this.End.LogicalDirection == LogicalDirection.Forward); 1760This.End.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.Text && 1762This.End.GetNextInsertionPosition(LogicalDirection.Forward) == null); 1997(cursorPosition.LogicalDirection == LogicalDirection.Forward && objectEdgeRect.X < cursorMousePoint.X || 2003(cursorPosition.LogicalDirection == LogicalDirection.Forward && objectEdgeRect.X > cursorMousePoint.X || 2012(cursorPosition.LogicalDirection == LogicalDirection.Forward && objectEdgeRect.X > cursorMousePoint.X || 2018(cursorPosition.LogicalDirection == LogicalDirection.Forward && objectEdgeRect.X < cursorMousePoint.X || 2190caretPosition.SetLogicalDirection(LogicalDirection.Forward); 2204caretPosition.SetLogicalDirection(LogicalDirection.Forward); 2278nextCharacterPosition = focusedTextSelection.Start.CreatePointer(LogicalDirection.Forward); 2283nextCharacterPosition.MoveToNextInsertionPosition(LogicalDirection.Forward); 2298nextCharacterPosition.SetLogicalDirection(LogicalDirection.Forward);
System\windows\Documents\TextSelectionHighlightLayer.cs (2)
92if ((direction == LogicalDirection.Forward && textSegment.Start.CompareTo(textPosition) <= 0 && textPosition.CompareTo(textSegment.End) < 0) || // 117if (direction == LogicalDirection.Forward)
System\Windows\Documents\TextServicesPropertyRanges.cs (2)
138start = _textstore.CreatePointerAtCharOffset(startIndex, LogicalDirection.Forward); 139end = _textstore.CreatePointerAtCharOffset(startIndex + length, LogicalDirection.Forward);
System\Windows\Documents\TextStore.cs (46)
418navigator = CreatePointerAtCharOffset(startIndex, LogicalDirection.Forward); 419limit = (endIndex >= 0) ? CreatePointerAtCharOffset(endIndex, LogicalDirection.Forward) : null; 426TextPointerContext context = navigator.GetPointerContext(LogicalDirection.Forward); 440TextElement element = (TextElement)((TextPointer)navigator).GetAdjacentElement(LogicalDirection.Forward); 449navigator.MoveToNextContextPosition(LogicalDirection.Forward); 455navigator.MoveToNextContextPosition(LogicalDirection.Forward); 502start = start.GetNextInsertionPosition(LogicalDirection.Forward); 698endNavigator.SetLogicalDirection(LogicalDirection.Forward); 876position = CreatePointerAtCharOffset(index, LogicalDirection.Forward); 993ITextPointer positionPrev = position.CreatePointer(LogicalDirection.Forward); 1061startPointer = CreatePointerAtCharOffset(startIndex, LogicalDirection.Forward); 1062startPointer.MoveToInsertionPosition(LogicalDirection.Forward); 1072Rect rectStart = startPointer.GetCharacterRect(LogicalDirection.Forward); 1102lineRect = navigator.GetCharacterRect(LogicalDirection.Forward); 1103moved = navigator.MoveToNextInsertionPosition(LogicalDirection.Forward); 1497navigator.MoveToInsertionPosition(LogicalDirection.Forward); 1502if (navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text) 1508navigator.GetTextInRun(LogicalDirection.Forward, nextChars, 0, nextChars.Length); 1514TextSelection.ExtendToNextInsertionPosition(LogicalDirection.Forward); 2397_previousCompositionEnd = (_previousCompositionEndOffset == -1) ? null : textEditor.TextContainer.CreatePointerAtOffset(_previousCompositionEndOffset, LogicalDirection.Forward); 2416_previousCompositionEnd = (_previousCompositionEndOffset == -1) ? null : textEditor.TextContainer.CreatePointerAtOffset(_previousCompositionEndOffset, LogicalDirection.Forward); 2463Invariant.Assert(navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.Text); 2470runCount = TextPointerBase.GetTextWithLimit(navigator, LogicalDirection.Forward, text, charsCopied, Math.Min(cchReq, text.Length - charsCopied), limit); 2479runCount = navigator.GetTextRunLength(LogicalDirection.Forward); 2480navigator.MoveToNextContextPosition(LogicalDirection.Forward); 2522Invariant.Assert(navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.EmbeddedElement); 2532navigator.MoveToNextContextPosition(LogicalDirection.Forward); 2564Invariant.Assert(navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart || navigator.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementEnd); 2582char ch = (navigator.GetAdjacentElement(LogicalDirection.Forward) is TableCell) ? UnsafeNativeMethods.TS_CHAR_REGION : '\n'; 2914end = CreatePointerAtCharOffset(startIndex + length, LogicalDirection.Forward); 2916while (start.CompareTo(end) < 0 && start.GetPointerContext(LogicalDirection.Forward) != TextPointerContext.Text) 2918start.MoveToNextContextPosition(LogicalDirection.Forward); 3041positionNext.MoveToNextInsertionPosition(LogicalDirection.Forward); 3184Rect lineBounds = start.GetCharacterRect(LogicalDirection.Forward); 3188ITextPointer navigator = start.CreatePointer(LogicalDirection.Forward); 3189while (navigator.MoveToNextContextPosition(LogicalDirection.Forward) == true && navigator.CompareTo(end) < 0) 3437start = start.GetNextInsertionPosition(LogicalDirection.Forward); 3445start = start.GetNextInsertionPosition(LogicalDirection.Forward); 3465start = CreatePointerAtCharOffset(startCharOffset, LogicalDirection.Forward); 3471TextPointerContext forwardContext = start.GetPointerContext(LogicalDirection.Forward); 3475TextElement element = start.GetAdjacentElement(LogicalDirection.Forward) as TextElement; 3487start.MoveToNextContextPosition(LogicalDirection.Forward); 3647ITextPointer end = this.TextContainer.CreatePointerAtOffset(record.EndOffsetBefore, LogicalDirection.Forward); 3965ITextPointer anchor = this.TextContainer.CreatePointerAtOffset(appSelectionAnchorOffset, LogicalDirection.Forward); 3966ITextPointer moving = this.TextContainer.CreatePointerAtOffset(appSelectionMovingOffset, LogicalDirection.Forward);
System\Windows\Documents\TextTreeDeleteContentUndoUnit.cs (5)
42node = start.GetAdjacentNode(LogicalDirection.Forward); 43haltNode = end.GetAdjacentNode(LogicalDirection.Forward); 76navigator = new TextPointer(this.TextContainer, this.SymbolOffset, LogicalDirection.Forward); 444navigator.MoveToNextContextPosition(LogicalDirection.Forward); 476TextPointer textPointerTable = new TextPointer(navigator.TextContainer.Start, _cpTable, LogicalDirection.Forward);
System\Windows\Documents\TextTreeExtractElementUndoUnit.cs (2)
62start = new TextPointer(this.TextContainer, this.SymbolOffset, LogicalDirection.Forward); 63end = new TextPointer(this.TextContainer, this.SymbolOffset + _symbolCount - 2, LogicalDirection.Forward);
System\Windows\Documents\TextTreeInsertElementUndoUnit.cs (3)
55start = new TextPointer(this.TextContainer, this.SymbolOffset, LogicalDirection.Forward); 57Invariant.Assert(start.GetPointerContext(LogicalDirection.Forward) == TextPointerContext.ElementStart, "TextTree undo unit out of sync with TextTree."); 59element = start.GetAdjacentElementFromOuterPosition(LogicalDirection.Forward);
System\Windows\Documents\TextTreeInsertUndoUnit.cs (2)
55start = new TextPointer(this.TextContainer, this.SymbolOffset, LogicalDirection.Forward); 56end = new TextPointer(this.TextContainer, this.SymbolOffset + _symbolCount, LogicalDirection.Forward);
System\Windows\Documents\TextTreeNode.cs (2)
472return GetEdgeFromOffset(nodeOffset, LogicalDirection.Forward); 484edge = (bias == LogicalDirection.Forward) ? ElementEdge.AfterEnd : ElementEdge.BeforeStart;
System\Windows\Documents\TextTreePropertyUndoUnit.cs (1)
51position = new TextPointer(this.TextContainer, this.SymbolOffset, LogicalDirection.Forward);
System\Windows\Documents\TextTreeTextElementNode.cs (1)
81return (direction == LogicalDirection.Forward) ? TextPointerContext.ElementStart : TextPointerContext.ElementEnd;
System\Windows\Documents\ValidationHelper.cs (1)
73if (direction != LogicalDirection.Forward &&
System.Windows.Controls.Ribbon (4)
Microsoft\Windows\Controls\Ribbon\RibbonComboBox.cs (1)
865strValue += textElement.ContentStart.GetTextInRun(LogicalDirection.Forward);
Microsoft\Windows\Controls\Ribbon\RibbonTwoLineText.cs (3)
305string secondLineText = secondLinePointer.GetTextInRun(LogicalDirection.Forward); 414firstCharacter = currentLinePointer.GetCharacterRect(LogicalDirection.Forward); 422firstCharacter = currentLinePointer.GetCharacterRect(LogicalDirection.Forward);