System\Windows\Documents\TextStore.cs (59)
330selection[0].start = this.TextSelection.Start.CharOffset;
331selection[0].end = this.TextSelection.End.CharOffset;
332selection[0].style.ase = (this.TextSelection.MovingPosition.CompareTo(this.TextSelection.Start) == 0) ? UnsafeNativeMethods.TsActiveSelEnd.TS_AE_START : UnsafeNativeMethods.TsActiveSelEnd.TS_AE_END;
366this.TextSelection.SetCaretToPosition(start, LogicalDirection.Backward, /*allowStopAtLineEnd:*/true, /*allowStopNearSpace:*/true);
370this.TextSelection.Select(end, start);
374this.TextSelection.Select(start, end);
384this.TextSelection.OnInterimSelectionChanged(_interimSelection);
673ITextRange range = new TextRange(this.TextSelection.AnchorPosition, this.TextSelection.MovingPosition);
713this.TextSelection.ApplyTypingHeuristics(false /* overType */);
741if (start.CompareTo(this.TextSelection.Start) != 0 ||
742end.CompareTo(this.TextSelection.End) != 0)
744this.TextSelection.Select(start, end);
755_previousCompositionStartOffset = this.TextSelection.Start.Offset;
756_previousCompositionEndOffset = this.TextSelection.End.Offset;
1424TextSelection.OnInterimSelectionChanged(_interimSelection);
1476if (TextEditor.AllowOvertype && TextEditor._OvertypeMode && TextSelection.IsEmpty)
1481navigator = TextSelection.End.CreatePointer();
1499TextSelection.ExtendToNextInsertionPosition(LogicalDirection.Forward);
1505string filteredText = FilterCompositionString(result, TextSelection.Start.GetOffsetToPosition(TextSelection.End)); // does NOT filter MaxLength.
1511this.TextEditor.SetText(TextSelection, filteredText, InputLanguageManager.Current.CurrentInputLanguage);
1512TextSelection.Select(TextSelection.End, TextSelection.End);
1760if ((compositionStart.CompareTo(TextSelection.Start) <= 0) &&
1761(compositionStart.CompareTo(TextSelection.End) <= 0) &&
1762(compositionEnd.CompareTo(TextSelection.Start) >= 0) &&
1763(compositionEnd.CompareTo(TextSelection.End) >= 0))
1774fReconvertable = GetFnReconv(TextSelection.Start, TextSelection.End, out funcReconv, out range);
1799fReconvertable = GetFnReconv(TextSelection.Start, TextSelection.End, out funcReconv, out range);
1906pointer = this.TextSelection.Start.CreatePointer(direction);
1992this.TextSelection.BeginChange();
2000this.TextSelection.Select(range.Start, range.End);
2004this.TextSelection.SetCaretToPosition(range.End, LogicalDirection.Backward, /*allowStopAtLineEnd:*/true, /*allowStopNearSpace:*/true);
2022this.TextSelection.EndChange();
3136if (compositionStart != null && compositionStart.CompareTo(this.TextSelection.Start) > 0)
3142start = this.TextSelection.Start;
3145CompositionParentUndoUnit unit = new CompositionParentUndoUnit(this.TextSelection, start, start, _nextUndoUnitIsFirstCompositionUnit);
3529int imeSelectionAnchorOffset = this.TextSelection.AnchorPosition.Offset;
3530int imeSelectionMovingOffset = this.TextSelection.MovingPosition.Offset;
3584TextParentUndoUnit textParentUndoUnit = new TextParentUndoUnit(this.TextSelection, this.TextSelection.Start, this.TextSelection.Start);
3769appSelectionAnchorOffset = this.TextSelection.AnchorPosition.Offset;
3770appSelectionMovingOffset = this.TextSelection.MovingPosition.Offset;
3796appSelectionAnchorOffset = this.TextSelection.AnchorPosition.Offset;
3797appSelectionMovingOffset = this.TextSelection.MovingPosition.Offset;
3863this.TextSelection.BeginChangeNoUndo();
3949this.TextSelection.Select(anchor, moving);
3970this.TextSelection.Select(anchor, moving);
3980this.TextSelection.EndChange(false /* disableScroll */, true /* skipEvents */);
4001this.TextSelection.BeginChangeNoUndo();
4008this.TextSelection.EndChange(false /* disableScroll */, true /* skipEvents */);
4030this.TextSelection.BeginChangeNoUndo();
4037this.TextSelection.EndChange(false /* disableScroll */, true /* skipEvents */);