1 instantiation of TextSelection
PresentationFramework (1)
System\windows\Documents\TextEditor.cs (1)
71_selection = new TextSelection(this);
118 references to TextSelection
PresentationFramework (118)
MS\Internal\Documents\TextBoxLine.cs (1)
454&& highlights.GetHighlightValue(position, LogicalDirection.Forward, typeof(TextSelection)) != DependencyProperty.UnsetValue)
MS\Internal\Documents\TextBoxView.cs (2)
1466&& (!((ITextView)this).RendersOwnSelection || args.OwnerType != typeof(TextSelection))) 1494if (args.OwnerType == typeof(TextSelection))
MS\Internal\Text\DynamicPropertyReader.cs (1)
254selected = position.TextContainer.Highlights.GetHighlightValue(position, LogicalDirection.Forward, typeof(TextSelection));
System\Windows\Controls\FlowDocumentReader.cs (3)
200public TextSelection Selection 204TextSelection result = null; 211result = viewer.TextSelection as TextSelection;
System\Windows\Controls\FlowDocumentScrollViewer.cs (2)
210public TextSelection Selection 220return textSelection as TextSelection;
System\Windows\Controls\PasswordBox.cs (1)
1223caretElement.UpdateCaretBrush(TextSelection.GetCaretBrush(passwordBox.Selection.TextEditor));
System\Windows\Controls\Primitives\TextBoxBase.cs (3)
1776internal TextSelection TextSelectionInternal 1780return (TextSelection)_textEditor.Selection; 2195caretElement.UpdateCaretBrush(TextSelection.GetCaretBrush(textBoxBase.TextEditor));
System\Windows\Controls\RichTextBox.cs (2)
551public TextSelection Selection 555return (TextSelection)TextSelectionInternal;
System\Windows\Controls\SinglePageViewer.cs (2)
139public TextSelection Selection 149return textSelection as TextSelection;
System\Windows\Controls\TextBox.cs (2)
1332internal TextSelection Selection 1336return (TextSelection)TextSelectionInternal;
System\windows\Documents\CaretElement.cs (1)
190((TextSelection)_textEditor.Selection).UpdateCaretState(CaretScrollMethod.None);
System\Windows\Documents\ChildDocumentBlock.cs (1)
127Debug.Assert(ChildContainer.Highlights.GetLayer(typeof(TextSelection)) == null);
System\Windows\Documents\DocumentSequenceHighlightLayer.cs (2)
101return typeof(TextSelection); 162return typeof(TextSelection);
System\Windows\Documents\DocumentSequenceTextContainer.cs (1)
679selected = highlights.GetHighlightValue(highlightTransitionPosition, LogicalDirection.Forward, typeof(TextSelection));
System\Windows\Documents\FixedDocument.cs (2)
1082selected = highlights.GetHighlightValue(highlightTransitionPosition, LogicalDirection.Forward, typeof(TextSelection)); 1103while (highlights.GetHighlightValue(highlightTransitionPosition, LogicalDirection.Forward, typeof(TextSelection)) != DependencyProperty.UnsetValue);
System\windows\Documents\TextEditor.cs (5)
452((TextSelection)this.Selection).ApplySpringloadFormatting(); 590if (_selection is TextSelection) 592((TextSelection)_selection).ClearSpringloadFormatting(); 643if (_selection is TextSelection) 645((TextSelection)_selection).ClearSpringloadFormatting();
System\windows\Documents\TextEditorCharacters.cs (18)
69if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection is TextSelection)) 81TextSelection selection = (TextSelection)This.Selection; 141((TextSelection)This.Selection).ClearSpringloadFormatting(); 167if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection is TextSelection)) 174object propertyValue = ((TextSelection)This.Selection).GetCurrentValue(TextElement.FontWeightProperty); 187if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection is TextSelection)) 194object propertyValue = ((TextSelection)This.Selection).GetCurrentValue(TextElement.FontStyleProperty); 210if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection is TextSelection)) 217object propertyValue = ((TextSelection)This.Selection).GetCurrentValue(Inline.TextDecorationsProperty); 239if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection is TextSelection)) 246FontVariants fontVariants = (FontVariants)((TextSelection)This.Selection).GetCurrentValue(Typography.VariantsProperty); 258if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection is TextSelection)) 265FontVariants fontVariants = (FontVariants)((TextSelection)This.Selection).GetCurrentValue(Typography.VariantsProperty); 286if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection is TextSelection)) 296double fontSize = (double)((TextSelection)This.Selection).GetCurrentValue(TextElement.FontSizeProperty); 328if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection is TextSelection)) 338double fontSize = (double)((TextSelection)This.Selection).GetCurrentValue(TextElement.FontSizeProperty);
System\windows\Documents\TextEditorCopyPaste.cs (8)
307if (This.Selection is TextSelection) 309((TextSelection)This.Selection).ClearSpringloadFormatting(); 401if (This.Selection is TextSelection) 403((TextSelection)This.Selection).ClearSpringloadFormatting(); 677if (This.AcceptsRichContent && This.Selection is TextSelection) 698if (This.AcceptsRichContent && This.Selection is TextSelection) 712((TextSelection)This.Selection).InsertEmbeddedUIElement((FrameworkElement)element); 740if (This.AcceptsRichContent && This.Selection is TextSelection)
System\windows\Documents\TextEditorDragDrop.cs (1)
415Brush caretBrush = TextSelection.GetCaretBrush(_textEditor);
System\windows\Documents\TextEditorLists.cs (11)
40TextSelection thisSelection = (TextSelection)This.Selection; 110if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection is TextSelection)) 117if (!TextRangeEditLists.IsListOperationApplicable((TextSelection)This.Selection)) 124TextSelection thisSelection = (TextSelection)This.Selection; 161private static void ToggleBullets(TextSelection thisSelection, ListItem parentListItem, ListItem immediateListItem, List list) 190private static void ToggleNumbering(TextSelection thisSelection, ListItem parentListItem, ListItem immediateListItem, List list) 219private static void IncreaseIndentation(TextSelection thisSelection, ListItem parentListItem, ListItem immediateListItem) 274private static void DecreaseIndentation(TextSelection thisSelection, ListItem parentListItem, ListItem immediateListItem) 330private static void CreateImplicitParagraphIfNeededAndUpdateSelection(TextSelection thisSelection)
System\windows\Documents\TextEditorMouse.cs (2)
81if (This.Selection is TextSelection) 83((TextSelection)This.Selection).ClearSpringloadFormatting();
System\windows\Documents\TextEditorSelection.cs (2)
2008if (This.Selection is TextSelection) 2010((TextSelection)This.Selection).ClearSpringloadFormatting();
System\windows\Documents\TextEditorSpelling.cs (1)
158((TextSelection)This.Selection).SpringloadCurrentFormatting();
System\windows\Documents\TextEditorTables.cs (8)
56if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection is TextSelection)) 69((TextSelection)This.Selection).InsertTable(/*rowCount:*/4, /*columnCount:*/4); 73((TextSelection)This.Selection).InsertRows(+1); 77((TextSelection)This.Selection).InsertColumns(+1); 81((TextSelection)This.Selection).DeleteRows(); 85((TextSelection)This.Selection).DeleteColumns(); 89((TextSelection)This.Selection).MergeCells(); 93((TextSelection)This.Selection).SplitCell(1000, 1000); // Split all ways to possible maximum
System\windows\Documents\TextEditorThreadLocalStore.cs (2)
108internal TextSelection FocusedTextSelection 178private TextSelection _focusedTextSelection;
System\windows\Documents\TextEditorTyping.cs (19)
533((TextSelection)This.Selection).ClearSpringloadFormatting(); 625((TextSelection)This.Selection).ClearSpringloadFormatting(); 632((TextSelection)This.Selection).ClearSpringloadFormatting(); 700((TextSelection)This.Selection).ClearSpringloadFormatting(); 701((TextSelection)This.Selection).SpringloadCurrentFormatting(); 776((TextSelection)This.Selection).ClearSpringloadFormatting(); 936((TextSelection)This.Selection).ClearSpringloadFormatting(); 998((TextSelection)This.Selection).ClearSpringloadFormatting(); 1000((TextSelection)This.Selection).SpringloadCurrentFormatting(); 1095((TextSelection)This.Selection).SpringloadCurrentFormatting(); 1110TextPointer newEnd = ((TextSelection)This.Selection).End; 1171TextRange range = ((TextSelection)This.Selection).InsertRows(+1); 1222if (This.AcceptsRichContent && (This.Selection is TextSelection)) 1225((TextSelection)This.Selection).ApplyPropertyValue(FlowDocument.FlowDirectionProperty, FlowDirection.LeftToRight, /*applyToParagraphs*/true); 1238if (This.AcceptsRichContent && (This.Selection is TextSelection)) 1241((TextSelection)This.Selection).ApplyPropertyValue(FlowDocument.FlowDirectionProperty, FlowDirection.RightToLeft, /*applyToParagraphs*/true); 1250((TextSelection)This.Selection).UpdateCaretState(CaretScrollMethod.Simple); 1670TextSelection.OnInputLanguageChanged(e.NewLanguage); 1753if (TextSelection.IsBidiInputLanguageInstalled() == true)
System\Windows\Documents\TextPointer.cs (1)
71/// "insertion positions". Boundary positions of <see cref="TextRange"/> and <see cref="TextSelection"/>
System\Windows\Documents\TextRangeEditTables.cs (4)
428internal static TextPointer GetNextTableCellRangeInsertionPosition(TextSelection selection, LogicalDirection direction) 558internal static TextPointer GetNextRowEndMovingPosition(TextSelection selection, LogicalDirection direction) 573internal static bool MovingPositionCrossesCellBoundary(TextSelection selection) 587internal static TextPointer GetNextRowStartMovingPosition(TextSelection selection, LogicalDirection direction)
System\windows\Documents\TextSelection.cs (8)
173propertyValue = ((TextSelection)this).GetCurrentValue(formattingProperty); 725if (_highlightLayer != null && thisSelection.Start.TextContainer.Highlights.GetLayer(typeof(TextSelection)) == _highlightLayer) 1643if (focusedTextSelection is TextSelection) 1645backgroundPropertyValue = ((TextSelection)focusedTextSelection).GetCurrentValue(TextElement.BackgroundProperty); 1813if (textContainer.Highlights.GetLayer(typeof(TextSelection)) == null) 1823TextSelectionHighlightLayer highlightLayer = textContainer.Highlights.GetLayer(typeof(TextSelection)) as TextSelectionHighlightLayer; 1827Invariant.Assert(textContainer.Highlights.GetLayer(typeof(TextSelection)) == null); 2044fontStylePropertyValue = ((TextSelection)textSelection).GetCurrentValue(TextElement.FontStyleProperty);
System\windows\Documents\TextSelectionHighlightLayer.cs (2)
267return typeof(TextSelection); 367return typeof(TextSelection);