5 implementations of GetOffsetToPosition
PresentationFramework (5)
src\Framework\System\Windows\Controls\PasswordTextNavigator.cs (1)
124int ITextPointer.GetOffsetToPosition(ITextPointer position)
src\Framework\System\Windows\Documents\DocumentSequenceTextPointer.cs (1)
84int ITextPointer.GetOffsetToPosition(ITextPointer position)
src\Framework\System\Windows\Documents\FixedTextPointer.cs (1)
96int ITextPointer.GetOffsetToPosition(ITextPointer position)
src\Framework\System\Windows\Documents\NullTextNavigator.cs (1)
66int ITextPointer.GetOffsetToPosition(ITextPointer position)
src\Framework\System\Windows\Documents\TextPointer.cs (1)
2403int ITextPointer.GetOffsetToPosition(ITextPointer position)
62 references to GetOffsetToPosition
PresentationFramework (62)
src\Framework\MS\Internal\Annotations\Anchoring\TextSelectionProcessor.cs (4)
246int textRangeLength = elementStart.GetOffsetToPosition(elementEnd); 551startOffset = elementStart.GetOffsetToPosition(segment.Start); 556endOffset = elementStart.GetOffsetToPosition(segment.End); 561endOffset = elementStart.GetOffsetToPosition(elementEnd);
src\Framework\MS\Internal\Annotations\Anchoring\TextViewSelectionProcessor.cs (2)
254startOffset = end.TextContainer.Start.GetOffsetToPosition(start); 255endOffset = end.TextContainer.Start.GetOffsetToPosition(end);
src\Framework\MS\Internal\Documents\TextParagraphView.cs (1)
392int dcp = lines[0].StartPosition.GetOffsetToPosition(position) + lines[0].StartPositionCP;
src\Framework\MS\Internal\LayoutDump.cs (2)
618int cpStart = start.TextContainer.Start.GetOffsetToPosition(start); 619int cpEnd = end.TextContainer.Start.GetOffsetToPosition(end);
src\Framework\MS\Internal\PtsHost\OptimalTextSource.cs (1)
197return position.TextContainer.Start.GetOffsetToPosition(position);
src\Framework\MS\Internal\PtsHost\TextParagraph.cs (4)
906return textPointerContentStart.GetOffsetToPosition(textPointer); 923while(textPointerContentStart.GetOffsetToPosition(textPointer) < dcpLast) 997FigureObject figureObject = new FigureObject(textPointerContentStart.GetOffsetToPosition(textElement.ElementStart), figurePara); 1020FloaterObject floaterObject = new FloaterObject(textPointerContentStart.GetOffsetToPosition(textElement.ElementStart), floaterPara);
src\Framework\System\Windows\Controls\PasswordTextContainer.cs (1)
249return ((ITextPointer)position1.Handle0).GetOffsetToPosition((ITextPointer)position2.Handle0);
src\Framework\System\Windows\Controls\TextBlock.cs (8)
1874int startOffset = _complexContent.TextContainer.Start.GetOffsetToPosition(start); 1875int endOffset = _complexContent.TextContainer.Start.GetOffsetToPosition(end); 2273int characterIndex = _complexContent.TextContainer.Start.GetOffsetToPosition(orientedPosition); 2378int dcpPositionStart = _complexContent.TextContainer.Start.GetOffsetToPosition(startPosition); 2379int dcpPositionEnd = _complexContent.TextContainer.Start.GetOffsetToPosition(endPosition); 2486int characterIndex = _complexContent.TextContainer.Start.GetOffsetToPosition(position); 2552int characterIndex = _complexContent.TextContainer.Start.GetOffsetToPosition(position); 2682int characterIndex = _complexContent.TextContainer.Start.GetOffsetToPosition(position);
src\Framework\System\Windows\Documents\DocumentSequenceTextContainer.cs (2)
143return ((ITextPointer)position1.Handle0).GetOffsetToPosition((ITextPointer)position2.Handle0); 317return ((ITextContainer)this).Start.GetOffsetToPosition(((ITextContainer)this).End);
src\Framework\System\Windows\Documents\DocumentSequenceTextPointer.cs (4)
82/// <see cref="ITextPointer.GetOffsetToPosition"/> 619/// <see cref="ITextPointer.GetOffsetToPosition"/> 1026count += tpScan.ChildPointer.GetOffsetToPosition(tpScan.ChildPointer.TextContainer.End); 1033count += tpScan.ChildPointer.GetOffsetToPosition(tp2.ChildPointer);
src\Framework\System\Windows\Documents\FixedTextContainer.cs (2)
128return ((ITextPointer)position1.Handle0).GetOffsetToPosition((ITextPointer)position2.Handle0); 286return ((ITextContainer)this).Start.GetOffsetToPosition(((ITextContainer)this).End);
src\Framework\System\Windows\Documents\FlowDocument.cs (2)
1437textSegment.Start.GetOffsetToPosition(textSegment.End), 1438textSegment.Start.GetOffsetToPosition(textSegment.End)
src\Framework\System\Windows\Documents\FrameworkTextComposition.cs (2)
235_length = (_resultStart == null) ? -1 : _resultStart.GetOffsetToPosition(_resultEnd); 259_length = (_compositionStart == null) ? -1 : _compositionStart.GetOffsetToPosition(_compositionEnd);
src\Framework\System\Windows\Documents\ImmComposition.cs (3)
1858edge = _editor.TextContainer.Start.GetOffsetToPosition(positionCurrent); 1859int startComposition = _editor.TextContainer.Start.GetOffsetToPosition(_startComposition); 1860int endComposition = _editor.TextContainer.Start.GetOffsetToPosition(_endComposition);
src\Framework\System\Windows\Documents\NullTextContainer.cs (1)
115return ((ITextPointer)position1.Handle0).GetOffsetToPosition((ITextPointer)position2.Handle0);
src\Framework\System\Windows\Documents\Speller.cs (7)
725if (start.GetOffsetToPosition(end) > MaxScanBlockSize) 1793maxChars = contextStart.GetOffsetToPosition(contextEnd); 1822runCount = Math.Min(runCount, position.GetOffsetToPosition(contextEnd)); 1831distance = position.GetOffsetToPosition(contentStart); 1834_contentStartOffset = _textLength + position.GetOffsetToPosition(contentStart); 1836distance = position.GetOffsetToPosition(contentEnd); 1839_contentEndOffset = _textLength + position.GetOffsetToPosition(contentEnd);
src\Framework\System\windows\Documents\TextEditor.cs (2)
1195return _FilterText(textData, range.Start.GetOffsetToPosition(range.End)); 1205return _FilterText(textData, range.Start.GetOffsetToPosition(range.End), filterMaxLength);
src\Framework\System\windows\Documents\TextEditorDragDrop.cs (1)
502int indexInWord = wordSegment.Start.GetOffsetToPosition(dropPosition);
src\Framework\System\windows\Documents\TextEditorSpelling.cs (2)
149((TextPointer)textStart).DeleteTextInRun(textStart.GetOffsetToPosition(textEnd)); 348isSelectionIgnoringErrors = selection.Start.GetOffsetToPosition(selection.End) >= 256;
src\Framework\System\Windows\Documents\TextFindEngine.cs (3)
345int maxCharCount = position.GetOffsetToPosition(nextPosition); 686runCount = Math.Min(runCount, navigator.GetOffsetToPosition(endPosition)); 696runCount = Math.Min(runCount, startPosition.GetOffsetToPosition(navigator));
src\Framework\System\Windows\Documents\TextPointerBase.cs (3)
106maxCount = Math.Min(count, thisPointer.GetOffsetToPosition(limit)); 110maxCount = Math.Min(count, limit.GetOffsetToPosition(thisPointer)); 455return thisPosition.TextContainer.Start.GetOffsetToPosition(thisPosition);
src\Framework\System\Windows\Documents\TextRangeBase.cs (1)
1663if (context == TextPointerContext.EmbeddedElement && start.GetOffsetToPosition(end) == 1)
src\Framework\System\Windows\Documents\TextStore.cs (4)
394string filteredText = FilterCompositionString(new string(text), start.GetOffsetToPosition(end)); // does NOT filter MaxLength. 584string filteredText = FilterCompositionString(new string(text), range.Start.GetOffsetToPosition(range.End)); // does NOT filter MaxLength. 1385string filteredText = FilterCompositionString(result, TextSelection.Start.GetOffsetToPosition(TextSelection.End)); // does NOT filter MaxLength. 2343offset = limit.GetOffsetToPosition(navigator);