1 instantiation of TextSelection
PresentationFramework (1)
System\windows\Documents\TextEditor.cs (1)
77_selection = new TextSelection(this);
118 references to TextSelection
PresentationFramework (118)
MS\Internal\Documents\TextBoxLine.cs (1)
461&& highlights.GetHighlightValue(position, LogicalDirection.Forward, typeof(TextSelection)) != DependencyProperty.UnsetValue)
MS\Internal\Documents\TextBoxView.cs (2)
1468&& (!((ITextView)this).RendersOwnSelection || args.OwnerType != typeof(TextSelection))) 1496if (args.OwnerType == typeof(TextSelection))
MS\Internal\Text\DynamicPropertyReader.cs (1)
260selected = position.TextContainer.Highlights.GetHighlightValue(position, LogicalDirection.Forward, typeof(TextSelection));
System\Windows\Controls\FlowDocumentReader.cs (3)
205public TextSelection Selection 209TextSelection result = null; 216result = viewer.TextSelection as TextSelection;
System\Windows\Controls\FlowDocumentScrollViewer.cs (2)
213public TextSelection Selection 223return textSelection as TextSelection;
System\Windows\Controls\PasswordBox.cs (1)
1231caretElement.UpdateCaretBrush(TextSelection.GetCaretBrush(passwordBox.Selection.TextEditor));
System\Windows\Controls\Primitives\TextBoxBase.cs (3)
1785internal TextSelection TextSelectionInternal 1789return (TextSelection)_textEditor.Selection; 2204caretElement.UpdateCaretBrush(TextSelection.GetCaretBrush(textBoxBase.TextEditor));
System\Windows\Controls\RichTextBox.cs (2)
555public TextSelection Selection 559return (TextSelection)TextSelectionInternal;
System\Windows\Controls\SinglePageViewer.cs (2)
142public TextSelection Selection 152return textSelection as TextSelection;
System\Windows\Controls\TextBox.cs (2)
1339internal TextSelection Selection 1343return (TextSelection)TextSelectionInternal;
System\windows\Documents\CaretElement.cs (1)
193((TextSelection)_textEditor.Selection).UpdateCaretState(CaretScrollMethod.None);
System\Windows\Documents\ChildDocumentBlock.cs (1)
130Debug.Assert(ChildContainer.Highlights.GetLayer(typeof(TextSelection)) == null);
System\Windows\Documents\DocumentSequenceHighlightLayer.cs (2)
104return typeof(TextSelection); 165return typeof(TextSelection);
System\Windows\Documents\DocumentSequenceTextContainer.cs (1)
687selected = highlights.GetHighlightValue(highlightTransitionPosition, LogicalDirection.Forward, typeof(TextSelection));
System\Windows\Documents\FixedDocument.cs (2)
1093selected = highlights.GetHighlightValue(highlightTransitionPosition, LogicalDirection.Forward, typeof(TextSelection)); 1114while (highlights.GetHighlightValue(highlightTransitionPosition, LogicalDirection.Forward, typeof(TextSelection)) != DependencyProperty.UnsetValue);
System\windows\Documents\TextEditor.cs (5)
458((TextSelection)this.Selection).ApplySpringloadFormatting(); 596if (_selection is TextSelection) 598((TextSelection)_selection).ClearSpringloadFormatting(); 649if (_selection is TextSelection) 651((TextSelection)_selection).ClearSpringloadFormatting();
System\windows\Documents\TextEditorCharacters.cs (18)
85if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection is TextSelection)) 97TextSelection selection = (TextSelection)This.Selection; 157((TextSelection)This.Selection).ClearSpringloadFormatting(); 183if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection is TextSelection)) 190object propertyValue = ((TextSelection)This.Selection).GetCurrentValue(TextElement.FontWeightProperty); 203if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection is TextSelection)) 210object propertyValue = ((TextSelection)This.Selection).GetCurrentValue(TextElement.FontStyleProperty); 226if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection is TextSelection)) 233object propertyValue = ((TextSelection)This.Selection).GetCurrentValue(Inline.TextDecorationsProperty); 255if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection is TextSelection)) 262FontVariants fontVariants = (FontVariants)((TextSelection)This.Selection).GetCurrentValue(Typography.VariantsProperty); 274if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection is TextSelection)) 281FontVariants fontVariants = (FontVariants)((TextSelection)This.Selection).GetCurrentValue(Typography.VariantsProperty); 302if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection is TextSelection)) 312double fontSize = (double)((TextSelection)This.Selection).GetCurrentValue(TextElement.FontSizeProperty); 344if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection is TextSelection)) 354double fontSize = (double)((TextSelection)This.Selection).GetCurrentValue(TextElement.FontSizeProperty);
System\windows\Documents\TextEditorCopyPaste.cs (8)
320if (This.Selection is TextSelection) 322((TextSelection)This.Selection).ClearSpringloadFormatting(); 414if (This.Selection is TextSelection) 416((TextSelection)This.Selection).ClearSpringloadFormatting(); 690if (This.AcceptsRichContent && This.Selection is TextSelection) 711if (This.AcceptsRichContent && This.Selection is TextSelection) 725((TextSelection)This.Selection).InsertEmbeddedUIElement((FrameworkElement)element); 753if (This.AcceptsRichContent && This.Selection is TextSelection)
System\windows\Documents\TextEditorDragDrop.cs (1)
432Brush caretBrush = TextSelection.GetCaretBrush(_textEditor);
System\windows\Documents\TextEditorLists.cs (11)
56TextSelection thisSelection = (TextSelection)This.Selection; 126if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection is TextSelection)) 133if (!TextRangeEditLists.IsListOperationApplicable((TextSelection)This.Selection)) 140TextSelection thisSelection = (TextSelection)This.Selection; 177private static void ToggleBullets(TextSelection thisSelection, ListItem parentListItem, ListItem immediateListItem, List list) 206private static void ToggleNumbering(TextSelection thisSelection, ListItem parentListItem, ListItem immediateListItem, List list) 235private static void IncreaseIndentation(TextSelection thisSelection, ListItem parentListItem, ListItem immediateListItem) 290private static void DecreaseIndentation(TextSelection thisSelection, ListItem parentListItem, ListItem immediateListItem) 346private static void CreateImplicitParagraphIfNeededAndUpdateSelection(TextSelection thisSelection)
System\windows\Documents\TextEditorMouse.cs (2)
95if (This.Selection is TextSelection) 97((TextSelection)This.Selection).ClearSpringloadFormatting();
System\windows\Documents\TextEditorSelection.cs (2)
2023if (This.Selection is TextSelection) 2025((TextSelection)This.Selection).ClearSpringloadFormatting();
System\windows\Documents\TextEditorSpelling.cs (1)
159((TextSelection)This.Selection).SpringloadCurrentFormatting();
System\windows\Documents\TextEditorTables.cs (8)
73if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection is TextSelection)) 86((TextSelection)This.Selection).InsertTable(/*rowCount:*/4, /*columnCount:*/4); 90((TextSelection)This.Selection).InsertRows(+1); 94((TextSelection)This.Selection).InsertColumns(+1); 98((TextSelection)This.Selection).DeleteRows(); 102((TextSelection)This.Selection).DeleteColumns(); 106((TextSelection)This.Selection).MergeCells(); 110((TextSelection)This.Selection).SplitCell(1000, 1000); // Split all ways to possible maximum
System\windows\Documents\TextEditorThreadLocalStore.cs (2)
110internal TextSelection FocusedTextSelection 180private TextSelection _focusedTextSelection;
System\windows\Documents\TextEditorTyping.cs (19)
542((TextSelection)This.Selection).ClearSpringloadFormatting(); 634((TextSelection)This.Selection).ClearSpringloadFormatting(); 641((TextSelection)This.Selection).ClearSpringloadFormatting(); 709((TextSelection)This.Selection).ClearSpringloadFormatting(); 710((TextSelection)This.Selection).SpringloadCurrentFormatting(); 785((TextSelection)This.Selection).ClearSpringloadFormatting(); 945((TextSelection)This.Selection).ClearSpringloadFormatting(); 1007((TextSelection)This.Selection).ClearSpringloadFormatting(); 1009((TextSelection)This.Selection).SpringloadCurrentFormatting(); 1104((TextSelection)This.Selection).SpringloadCurrentFormatting(); 1119TextPointer newEnd = ((TextSelection)This.Selection).End; 1180TextRange range = ((TextSelection)This.Selection).InsertRows(+1); 1231if (This.AcceptsRichContent && (This.Selection is TextSelection)) 1234((TextSelection)This.Selection).ApplyPropertyValue(FlowDocument.FlowDirectionProperty, FlowDirection.LeftToRight, /*applyToParagraphs*/true); 1247if (This.AcceptsRichContent && (This.Selection is TextSelection)) 1250((TextSelection)This.Selection).ApplyPropertyValue(FlowDocument.FlowDirectionProperty, FlowDirection.RightToLeft, /*applyToParagraphs*/true); 1259((TextSelection)This.Selection).UpdateCaretState(CaretScrollMethod.Simple); 1679TextSelection.OnInputLanguageChanged(e.NewLanguage); 1762if (TextSelection.IsBidiInputLanguageInstalled() == true)
System\Windows\Documents\TextPointer.cs (1)
76/// "insertion positions". Boundary positions of <see cref="TextRange"/> and <see cref="TextSelection"/>
System\Windows\Documents\TextRangeEditTables.cs (4)
430internal static TextPointer GetNextTableCellRangeInsertionPosition(TextSelection selection, LogicalDirection direction) 560internal static TextPointer GetNextRowEndMovingPosition(TextSelection selection, LogicalDirection direction) 575internal static bool MovingPositionCrossesCellBoundary(TextSelection selection) 589internal static TextPointer GetNextRowStartMovingPosition(TextSelection selection, LogicalDirection direction)
System\windows\Documents\TextSelection.cs (8)
176propertyValue = ((TextSelection)this).GetCurrentValue(formattingProperty); 728if (_highlightLayer != null && thisSelection.Start.TextContainer.Highlights.GetLayer(typeof(TextSelection)) == _highlightLayer) 1646if (focusedTextSelection is TextSelection) 1648backgroundPropertyValue = ((TextSelection)focusedTextSelection).GetCurrentValue(TextElement.BackgroundProperty); 1816if (textContainer.Highlights.GetLayer(typeof(TextSelection)) == null) 1826TextSelectionHighlightLayer highlightLayer = textContainer.Highlights.GetLayer(typeof(TextSelection)) as TextSelectionHighlightLayer; 1830Invariant.Assert(textContainer.Highlights.GetLayer(typeof(TextSelection)) == null); 2047fontStylePropertyValue = ((TextSelection)textSelection).GetCurrentValue(TextElement.FontStyleProperty);
System\windows\Documents\TextSelectionHighlightLayer.cs (2)
269return typeof(TextSelection); 369return typeof(TextSelection);