5 implementations of GetOffsetToPosition
PresentationFramework (5)
System\Windows\Controls\PasswordTextNavigator.cs (1)
118int ITextPointer.GetOffsetToPosition(ITextPointer position)
System\Windows\Documents\DocumentSequenceTextPointer.cs (1)
74int ITextPointer.GetOffsetToPosition(ITextPointer position)
System\Windows\Documents\FixedTextPointer.cs (1)
85int ITextPointer.GetOffsetToPosition(ITextPointer position)
System\Windows\Documents\NullTextNavigator.cs (1)
61int ITextPointer.GetOffsetToPosition(ITextPointer position)
System\Windows\Documents\TextPointer.cs (1)
2378int ITextPointer.GetOffsetToPosition(ITextPointer position)
63 references to GetOffsetToPosition
PresentationFramework (63)
MS\Internal\Annotations\Anchoring\TextSelectionProcessor.cs (4)
223int textRangeLength = elementStart.GetOffsetToPosition(elementEnd); 527startOffset = elementStart.GetOffsetToPosition(segment.Start); 532endOffset = elementStart.GetOffsetToPosition(segment.End); 537endOffset = elementStart.GetOffsetToPosition(elementEnd);
MS\Internal\Annotations\Anchoring\TextViewSelectionProcessor.cs (2)
236startOffset = end.TextContainer.Start.GetOffsetToPosition(start); 237endOffset = end.TextContainer.Start.GetOffsetToPosition(end);
MS\Internal\Documents\TextParagraphView.cs (1)
361int dcp = lines[0].StartPosition.GetOffsetToPosition(position) + lines[0].StartPositionCP;
MS\Internal\LayoutDump.cs (2)
612int cpStart = start.TextContainer.Start.GetOffsetToPosition(start); 613int cpEnd = end.TextContainer.Start.GetOffsetToPosition(end);
MS\Internal\PtsHost\OptimalTextSource.cs (1)
186return position.TextContainer.Start.GetOffsetToPosition(position);
MS\Internal\PtsHost\TextParagraph.cs (4)
892return textPointerContentStart.GetOffsetToPosition(textPointer); 909while(textPointerContentStart.GetOffsetToPosition(textPointer) < dcpLast) 982FigureObject figureObject = new FigureObject(textPointerContentStart.GetOffsetToPosition(textElement.ElementStart), figurePara); 1005FloaterObject floaterObject = new FloaterObject(textPointerContentStart.GetOffsetToPosition(textElement.ElementStart), floaterPara);
System\Windows\Controls\PasswordTextContainer.cs (1)
240return ((ITextPointer)position1.Handle0).GetOffsetToPosition((ITextPointer)position2.Handle0);
System\Windows\Controls\TextBlock.cs (8)
1776int startOffset = _complexContent.TextContainer.Start.GetOffsetToPosition(start); 1777int endOffset = _complexContent.TextContainer.Start.GetOffsetToPosition(end); 2176int characterIndex = _complexContent.TextContainer.Start.GetOffsetToPosition(orientedPosition); 2280int dcpPositionStart = _complexContent.TextContainer.Start.GetOffsetToPosition(startPosition); 2281int dcpPositionEnd = _complexContent.TextContainer.Start.GetOffsetToPosition(endPosition); 2388int characterIndex = _complexContent.TextContainer.Start.GetOffsetToPosition(position); 2454int characterIndex = _complexContent.TextContainer.Start.GetOffsetToPosition(position); 2583int characterIndex = _complexContent.TextContainer.Start.GetOffsetToPosition(position);
System\Windows\Documents\DocumentSequenceTextContainer.cs (2)
131return ((ITextPointer)position1.Handle0).GetOffsetToPosition((ITextPointer)position2.Handle0); 305return ((ITextContainer)this).Start.GetOffsetToPosition(((ITextContainer)this).End);
System\Windows\Documents\DocumentSequenceTextPointer.cs (4)
72/// <see cref="ITextPointer.GetOffsetToPosition"/> 609/// <see cref="ITextPointer.GetOffsetToPosition"/> 1003count += tpScan.ChildPointer.GetOffsetToPosition(tpScan.ChildPointer.TextContainer.End); 1010count += tpScan.ChildPointer.GetOffsetToPosition(tp2.ChildPointer);
System\Windows\Documents\FixedTextContainer.cs (2)
115return ((ITextPointer)position1.Handle0).GetOffsetToPosition((ITextPointer)position2.Handle0); 273return ((ITextContainer)this).Start.GetOffsetToPosition(((ITextContainer)this).End);
System\Windows\Documents\FlowDocument.cs (2)
1428textSegment.Start.GetOffsetToPosition(textSegment.End), 1429textSegment.Start.GetOffsetToPosition(textSegment.End)
System\Windows\Documents\FrameworkTextComposition.cs (2)
204_length = (_resultStart == null) ? -1 : _resultStart.GetOffsetToPosition(_resultEnd); 228_length = (_compositionStart == null) ? -1 : _compositionStart.GetOffsetToPosition(_compositionEnd);
System\Windows\Documents\ImmComposition.cs (3)
1676edge = _editor.TextContainer.Start.GetOffsetToPosition(positionCurrent); 1677int startComposition = _editor.TextContainer.Start.GetOffsetToPosition(_startComposition); 1678int endComposition = _editor.TextContainer.Start.GetOffsetToPosition(_endComposition);
System\Windows\Documents\NullTextContainer.cs (1)
108return ((ITextPointer)position1.Handle0).GetOffsetToPosition((ITextPointer)position2.Handle0);
System\Windows\Documents\Speller.cs (7)
659if (start.GetOffsetToPosition(end) > MaxScanBlockSize) 1661maxChars = contextStart.GetOffsetToPosition(contextEnd); 1690runCount = Math.Min(runCount, position.GetOffsetToPosition(contextEnd)); 1699distance = position.GetOffsetToPosition(contentStart); 1702_contentStartOffset = _textLength + position.GetOffsetToPosition(contentStart); 1704distance = position.GetOffsetToPosition(contentEnd); 1707_contentEndOffset = _textLength + position.GetOffsetToPosition(contentEnd);
System\Windows\Documents\SpellerStatusTable.cs (1)
737Debug.WriteLine($"{i}: {run.Position.TextContainer.Start.GetOffsetToPosition(run.Position)} {runType}");
System\windows\Documents\TextEditor.cs (2)
1162return _FilterText(textData, range.Start.GetOffsetToPosition(range.End)); 1172return _FilterText(textData, range.Start.GetOffsetToPosition(range.End), filterMaxLength);
System\windows\Documents\TextEditorDragDrop.cs (1)
473int indexInWord = wordSegment.Start.GetOffsetToPosition(dropPosition);
System\windows\Documents\TextEditorSpelling.cs (2)
146((TextPointer)textStart).DeleteTextInRun(textStart.GetOffsetToPosition(textEnd)); 345isSelectionIgnoringErrors = selection.Start.GetOffsetToPosition(selection.End) >= 256;
System\Windows\Documents\TextFindEngine.cs (3)
332int maxCharCount = position.GetOffsetToPosition(nextPosition); 667runCount = Math.Min(runCount, navigator.GetOffsetToPosition(endPosition)); 677runCount = Math.Min(runCount, startPosition.GetOffsetToPosition(navigator));
System\Windows\Documents\TextPointerBase.cs (3)
102maxCount = Math.Min(count, thisPointer.GetOffsetToPosition(limit)); 106maxCount = Math.Min(count, limit.GetOffsetToPosition(thisPointer)); 451return thisPosition.TextContainer.Start.GetOffsetToPosition(thisPosition);
System\Windows\Documents\TextRangeBase.cs (1)
1632if (context == TextPointerContext.EmbeddedElement && start.GetOffsetToPosition(end) == 1)
System\Windows\Documents\TextStore.cs (4)
504string filteredText = FilterCompositionString(new string(text), start.GetOffsetToPosition(end)); // does NOT filter MaxLength. 705string filteredText = FilterCompositionString(new string(text), range.Start.GetOffsetToPosition(range.End)); // does NOT filter MaxLength. 1509string filteredText = FilterCompositionString(result, TextSelection.Start.GetOffsetToPosition(TextSelection.End)); // does NOT filter MaxLength. 2477offset = limit.GetOffsetToPosition(navigator);