5 implementations of GetOffsetToPosition
PresentationFramework (5)
System\Windows\Controls\PasswordTextNavigator.cs (1)
117
int ITextPointer.
GetOffsetToPosition
(ITextPointer position)
System\Windows\Documents\DocumentSequenceTextPointer.cs (1)
71
int ITextPointer.
GetOffsetToPosition
(ITextPointer position)
System\Windows\Documents\FixedTextPointer.cs (1)
82
int ITextPointer.
GetOffsetToPosition
(ITextPointer position)
System\Windows\Documents\NullTextNavigator.cs (1)
58
int ITextPointer.
GetOffsetToPosition
(ITextPointer position)
System\Windows\Documents\TextPointer.cs (1)
2377
int ITextPointer.
GetOffsetToPosition
(ITextPointer position)
63 references to GetOffsetToPosition
PresentationFramework (63)
MS\Internal\Annotations\Anchoring\TextSelectionProcessor.cs (4)
222
int textRangeLength = elementStart.
GetOffsetToPosition
(elementEnd);
526
startOffset = elementStart.
GetOffsetToPosition
(segment.Start);
531
endOffset = elementStart.
GetOffsetToPosition
(segment.End);
536
endOffset = elementStart.
GetOffsetToPosition
(elementEnd);
MS\Internal\Annotations\Anchoring\TextViewSelectionProcessor.cs (2)
235
startOffset = end.TextContainer.Start.
GetOffsetToPosition
(start);
236
endOffset = end.TextContainer.Start.
GetOffsetToPosition
(end);
MS\Internal\Documents\TextParagraphView.cs (1)
360
int dcp = lines[0].StartPosition.
GetOffsetToPosition
(position) + lines[0].StartPositionCP;
MS\Internal\LayoutDump.cs (2)
613
int cpStart = start.TextContainer.Start.
GetOffsetToPosition
(start);
614
int cpEnd = end.TextContainer.Start.
GetOffsetToPosition
(end);
MS\Internal\PtsHost\OptimalTextSource.cs (1)
177
return position.TextContainer.Start.
GetOffsetToPosition
(position);
MS\Internal\PtsHost\TextParagraph.cs (4)
875
return textPointerContentStart.
GetOffsetToPosition
(textPointer);
892
while(textPointerContentStart.
GetOffsetToPosition
(textPointer) < dcpLast)
962
FigureObject figureObject = new FigureObject(textPointerContentStart.
GetOffsetToPosition
(textElement.ElementStart), figurePara);
982
FloaterObject floaterObject = new FloaterObject(textPointerContentStart.
GetOffsetToPosition
(textElement.ElementStart), floaterPara);
System\Windows\Controls\PasswordTextContainer.cs (1)
239
return ((ITextPointer)position1.Handle0).
GetOffsetToPosition
((ITextPointer)position2.Handle0);
System\Windows\Controls\TextBlock.cs (8)
1767
int startOffset = _complexContent.TextContainer.Start.
GetOffsetToPosition
(start);
1768
int endOffset = _complexContent.TextContainer.Start.
GetOffsetToPosition
(end);
2164
int characterIndex = _complexContent.TextContainer.Start.
GetOffsetToPosition
(orientedPosition);
2268
int dcpPositionStart = _complexContent.TextContainer.Start.
GetOffsetToPosition
(startPosition);
2269
int dcpPositionEnd = _complexContent.TextContainer.Start.
GetOffsetToPosition
(endPosition);
2376
int characterIndex = _complexContent.TextContainer.Start.
GetOffsetToPosition
(position);
2442
int characterIndex = _complexContent.TextContainer.Start.
GetOffsetToPosition
(position);
2571
int characterIndex = _complexContent.TextContainer.Start.
GetOffsetToPosition
(position);
System\Windows\Documents\DocumentSequenceTextContainer.cs (2)
122
return ((ITextPointer)position1.Handle0).
GetOffsetToPosition
((ITextPointer)position2.Handle0);
296
return ((ITextContainer)this).Start.
GetOffsetToPosition
(((ITextContainer)this).End);
System\Windows\Documents\DocumentSequenceTextPointer.cs (4)
69
/// <see cref="ITextPointer.
GetOffsetToPosition
"/>
605
/// <see cref="ITextPointer.
GetOffsetToPosition
"/>
999
count += tpScan.ChildPointer.
GetOffsetToPosition
(tpScan.ChildPointer.TextContainer.End);
1006
count += tpScan.ChildPointer.
GetOffsetToPosition
(tp2.ChildPointer);
System\Windows\Documents\FixedTextContainer.cs (2)
107
return ((ITextPointer)position1.Handle0).
GetOffsetToPosition
((ITextPointer)position2.Handle0);
265
return ((ITextContainer)this).Start.
GetOffsetToPosition
(((ITextContainer)this).End);
System\Windows\Documents\FlowDocument.cs (2)
1418
textSegment.Start.
GetOffsetToPosition
(textSegment.End),
1419
textSegment.Start.
GetOffsetToPosition
(textSegment.End)
System\Windows\Documents\FrameworkTextComposition.cs (2)
203
_length = (_resultStart == null) ? -1 : _resultStart.
GetOffsetToPosition
(_resultEnd);
227
_length = (_compositionStart == null) ? -1 : _compositionStart.
GetOffsetToPosition
(_compositionEnd);
System\Windows\Documents\ImmComposition.cs (3)
1662
edge = _editor.TextContainer.Start.
GetOffsetToPosition
(positionCurrent);
1663
int startComposition = _editor.TextContainer.Start.
GetOffsetToPosition
(_startComposition);
1664
int endComposition = _editor.TextContainer.Start.
GetOffsetToPosition
(_endComposition);
System\Windows\Documents\NullTextContainer.cs (1)
107
return ((ITextPointer)position1.Handle0).
GetOffsetToPosition
((ITextPointer)position2.Handle0);
System\Windows\Documents\Speller.cs (7)
655
if (start.
GetOffsetToPosition
(end) > MaxScanBlockSize)
1657
maxChars = contextStart.
GetOffsetToPosition
(contextEnd);
1686
runCount = Math.Min(runCount, position.
GetOffsetToPosition
(contextEnd));
1695
distance = position.
GetOffsetToPosition
(contentStart);
1698
_contentStartOffset = _textLength + position.
GetOffsetToPosition
(contentStart);
1700
distance = position.
GetOffsetToPosition
(contentEnd);
1703
_contentEndOffset = _textLength + position.
GetOffsetToPosition
(contentEnd);
System\Windows\Documents\SpellerStatusTable.cs (1)
736
Debug.WriteLine($"{i}: {run.Position.TextContainer.Start.
GetOffsetToPosition
(run.Position)} {runType}");
System\windows\Documents\TextEditor.cs (2)
1155
return _FilterText(textData, range.Start.
GetOffsetToPosition
(range.End));
1165
return _FilterText(textData, range.Start.
GetOffsetToPosition
(range.End), filterMaxLength);
System\windows\Documents\TextEditorDragDrop.cs (1)
472
int indexInWord = wordSegment.Start.
GetOffsetToPosition
(dropPosition);
System\windows\Documents\TextEditorSpelling.cs (2)
145
((TextPointer)textStart).DeleteTextInRun(textStart.
GetOffsetToPosition
(textEnd));
344
isSelectionIgnoringErrors = selection.Start.
GetOffsetToPosition
(selection.End) >= 256;
System\Windows\Documents\TextFindEngine.cs (3)
330
int maxCharCount = position.
GetOffsetToPosition
(nextPosition);
665
runCount = Math.Min(runCount, navigator.
GetOffsetToPosition
(endPosition));
675
runCount = Math.Min(runCount, startPosition.
GetOffsetToPosition
(navigator));
System\Windows\Documents\TextPointerBase.cs (3)
101
maxCount = Math.Min(count, thisPointer.
GetOffsetToPosition
(limit));
105
maxCount = Math.Min(count, limit.
GetOffsetToPosition
(thisPointer));
450
return thisPosition.TextContainer.Start.
GetOffsetToPosition
(thisPosition);
System\Windows\Documents\TextRangeBase.cs (1)
1631
if (context == TextPointerContext.EmbeddedElement && start.
GetOffsetToPosition
(end) == 1)
System\Windows\Documents\TextStore.cs (4)
503
string filteredText = FilterCompositionString(new string(text), start.
GetOffsetToPosition
(end)); // does NOT filter MaxLength.
704
string filteredText = FilterCompositionString(new string(text), range.Start.
GetOffsetToPosition
(range.End)); // does NOT filter MaxLength.
1505
string filteredText = FilterCompositionString(result, TextSelection.Start.
GetOffsetToPosition
(TextSelection.End)); // does NOT filter MaxLength.
2470
offset = limit.
GetOffsetToPosition
(navigator);