1 instantiation of TextSelection
PresentationFramework (1)
src\Framework\System\windows\Documents\TextEditor.cs (1)
81_selection = new TextSelection(this);
117 references to TextSelection
PresentationFramework (117)
src\Framework\MS\Internal\Documents\TextBoxLine.cs (1)
463&& highlights.GetHighlightValue(position, LogicalDirection.Forward, typeof(TextSelection)) != DependencyProperty.UnsetValue)
src\Framework\MS\Internal\Documents\TextBoxView.cs (2)
1468&& (!((ITextView)this).RendersOwnSelection || args.OwnerType != typeof(TextSelection))) 1496if (args.OwnerType == typeof(TextSelection))
src\Framework\MS\Internal\Text\DynamicPropertyReader.cs (1)
263selected = position.TextContainer.Highlights.GetHighlightValue(position, LogicalDirection.Forward, typeof(TextSelection));
src\Framework\System\Windows\Controls\FlowDocumentReader.cs (3)
206public TextSelection Selection 210TextSelection result = null; 217result = viewer.TextSelection as TextSelection;
src\Framework\System\Windows\Controls\FlowDocumentScrollViewer.cs (2)
214public TextSelection Selection 224return textSelection as TextSelection;
src\Framework\System\Windows\Controls\PasswordBox.cs (1)
1265caretElement.UpdateCaretBrush(TextSelection.GetCaretBrush(passwordBox.Selection.TextEditor));
src\Framework\System\Windows\Controls\Primitives\TextBoxBase.cs (3)
1816internal TextSelection TextSelectionInternal 1820return (TextSelection)_textEditor.Selection; 2240caretElement.UpdateCaretBrush(TextSelection.GetCaretBrush(textBoxBase.TextEditor));
src\Framework\System\Windows\Controls\RichTextBox.cs (2)
566public TextSelection Selection 570return (TextSelection)TextSelectionInternal;
src\Framework\System\Windows\Controls\SinglePageViewer.cs (2)
144public TextSelection Selection 154return textSelection as TextSelection;
src\Framework\System\Windows\Controls\TextBox.cs (2)
1331internal TextSelection Selection 1335return (TextSelection)TextSelectionInternal;
src\Framework\System\windows\Documents\CaretElement.cs (1)
196((TextSelection)_textEditor.Selection).UpdateCaretState(CaretScrollMethod.None);
src\Framework\System\Windows\Documents\ChildDocumentBlock.cs (1)
133Debug.Assert(ChildContainer.Highlights.GetLayer(typeof(TextSelection)) == null);
src\Framework\System\Windows\Documents\DocumentSequenceHighlightLayer.cs (2)
108return typeof(TextSelection); 169return typeof(TextSelection);
src\Framework\System\Windows\Documents\FixedDocument.cs (2)
1129selected = highlights.GetHighlightValue(highlightTransitionPosition, LogicalDirection.Forward, typeof(TextSelection)); 1150while (highlights.GetHighlightValue(highlightTransitionPosition, LogicalDirection.Forward, typeof(TextSelection)) != DependencyProperty.UnsetValue);
src\Framework\System\windows\Documents\TextEditor.cs (5)
473((TextSelection)this.Selection).ApplySpringloadFormatting(); 623if (_selection is TextSelection) 625((TextSelection)_selection).ClearSpringloadFormatting(); 676if (_selection is TextSelection) 678((TextSelection)_selection).ClearSpringloadFormatting();
src\Framework\System\windows\Documents\TextEditorCharacters.cs (18)
87if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection is TextSelection)) 99TextSelection selection = (TextSelection)This.Selection; 159((TextSelection)This.Selection).ClearSpringloadFormatting(); 185if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection is TextSelection)) 192object propertyValue = ((TextSelection)This.Selection).GetCurrentValue(TextElement.FontWeightProperty); 205if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection is TextSelection)) 212object propertyValue = ((TextSelection)This.Selection).GetCurrentValue(TextElement.FontStyleProperty); 228if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection is TextSelection)) 235object propertyValue = ((TextSelection)This.Selection).GetCurrentValue(Inline.TextDecorationsProperty); 257if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection is TextSelection)) 264FontVariants fontVariants = (FontVariants)((TextSelection)This.Selection).GetCurrentValue(Typography.VariantsProperty); 276if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection is TextSelection)) 283FontVariants fontVariants = (FontVariants)((TextSelection)This.Selection).GetCurrentValue(Typography.VariantsProperty); 304if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection is TextSelection)) 314double fontSize = (double)((TextSelection)This.Selection).GetCurrentValue(TextElement.FontSizeProperty); 346if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection is TextSelection)) 356double fontSize = (double)((TextSelection)This.Selection).GetCurrentValue(TextElement.FontSizeProperty);
src\Framework\System\windows\Documents\TextEditorCopyPaste.cs (8)
402if (This.Selection is TextSelection) 404((TextSelection)This.Selection).ClearSpringloadFormatting(); 529if (This.Selection is TextSelection) 531((TextSelection)This.Selection).ClearSpringloadFormatting(); 857if (This.AcceptsRichContent && This.Selection is TextSelection && 881if (This.AcceptsRichContent && This.Selection is TextSelection && 896((TextSelection)This.Selection).InsertEmbeddedUIElement((FrameworkElement)element); 924if (This.AcceptsRichContent && This.Selection is TextSelection)
src\Framework\System\windows\Documents\TextEditorDragDrop.cs (1)
444Brush caretBrush = TextSelection.GetCaretBrush(_textEditor);
src\Framework\System\windows\Documents\TextEditorLists.cs (11)
58TextSelection thisSelection = (TextSelection)This.Selection; 128if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection is TextSelection)) 135if (!TextRangeEditLists.IsListOperationApplicable((TextSelection)This.Selection)) 142TextSelection thisSelection = (TextSelection)This.Selection; 179private static void ToggleBullets(TextSelection thisSelection, ListItem parentListItem, ListItem immediateListItem, List list) 208private static void ToggleNumbering(TextSelection thisSelection, ListItem parentListItem, ListItem immediateListItem, List list) 237private static void IncreaseIndentation(TextSelection thisSelection, ListItem parentListItem, ListItem immediateListItem) 292private static void DecreaseIndentation(TextSelection thisSelection, ListItem parentListItem, ListItem immediateListItem) 348private static void CreateImplicitParagraphIfNeededAndUpdateSelection(TextSelection thisSelection)
src\Framework\System\windows\Documents\TextEditorMouse.cs (2)
97if (This.Selection is TextSelection) 99((TextSelection)This.Selection).ClearSpringloadFormatting();
src\Framework\System\windows\Documents\TextEditorSelection.cs (2)
2032if (This.Selection is TextSelection) 2034((TextSelection)This.Selection).ClearSpringloadFormatting();
src\Framework\System\windows\Documents\TextEditorSpelling.cs (1)
161((TextSelection)This.Selection).SpringloadCurrentFormatting();
src\Framework\System\windows\Documents\TextEditorTables.cs (8)
75if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection is TextSelection)) 88((TextSelection)This.Selection).InsertTable(/*rowCount:*/4, /*columnCount:*/4); 92((TextSelection)This.Selection).InsertRows(+1); 96((TextSelection)This.Selection).InsertColumns(+1); 100((TextSelection)This.Selection).DeleteRows(); 104((TextSelection)This.Selection).DeleteColumns(); 108((TextSelection)This.Selection).MergeCells(); 112((TextSelection)This.Selection).SplitCell(1000, 1000); // Split all ways to possible maximum
src\Framework\System\windows\Documents\TextEditorThreadLocalStore.cs (2)
110internal TextSelection FocusedTextSelection 180private TextSelection _focusedTextSelection;
src\Framework\System\windows\Documents\TextEditorTyping.cs (19)
558((TextSelection)This.Selection).ClearSpringloadFormatting(); 650((TextSelection)This.Selection).ClearSpringloadFormatting(); 657((TextSelection)This.Selection).ClearSpringloadFormatting(); 725((TextSelection)This.Selection).ClearSpringloadFormatting(); 726((TextSelection)This.Selection).SpringloadCurrentFormatting(); 802((TextSelection)This.Selection).ClearSpringloadFormatting(); 962((TextSelection)This.Selection).ClearSpringloadFormatting(); 1024((TextSelection)This.Selection).ClearSpringloadFormatting(); 1026((TextSelection)This.Selection).SpringloadCurrentFormatting(); 1121((TextSelection)This.Selection).SpringloadCurrentFormatting(); 1136TextPointer newEnd = ((TextSelection)This.Selection).End; 1197TextRange range = ((TextSelection)This.Selection).InsertRows(+1); 1248if (This.AcceptsRichContent && (This.Selection is TextSelection)) 1251((TextSelection)This.Selection).ApplyPropertyValue(FlowDocument.FlowDirectionProperty, FlowDirection.LeftToRight, /*applyToParagraphs*/true); 1264if (This.AcceptsRichContent && (This.Selection is TextSelection)) 1267((TextSelection)This.Selection).ApplyPropertyValue(FlowDocument.FlowDirectionProperty, FlowDirection.RightToLeft, /*applyToParagraphs*/true); 1276((TextSelection)This.Selection).UpdateCaretState(CaretScrollMethod.Simple); 1709TextSelection.OnInputLanguageChanged(e.NewLanguage); 1792if (TextSelection.IsBidiInputLanguageInstalled() == true)
src\Framework\System\Windows\Documents\TextPointer.cs (1)
78/// "insertion positions". Boundary positions of <see cref="TextRange"/> and <see cref="TextSelection"/>
src\Framework\System\Windows\Documents\TextRangeEditTables.cs (4)
433internal static TextPointer GetNextTableCellRangeInsertionPosition(TextSelection selection, LogicalDirection direction) 563internal static TextPointer GetNextRowEndMovingPosition(TextSelection selection, LogicalDirection direction) 578internal static bool MovingPositionCrossesCellBoundary(TextSelection selection) 592internal static TextPointer GetNextRowStartMovingPosition(TextSelection selection, LogicalDirection direction)
src\Framework\System\windows\Documents\TextSelection.cs (8)
179propertyValue = ((TextSelection)this).GetCurrentValue(formattingProperty); 731if (_highlightLayer != null && thisSelection.Start.TextContainer.Highlights.GetLayer(typeof(TextSelection)) == _highlightLayer) 1649if (focusedTextSelection is TextSelection) 1651backgroundPropertyValue = ((TextSelection)focusedTextSelection).GetCurrentValue(TextElement.BackgroundProperty); 1824if (textContainer.Highlights.GetLayer(typeof(TextSelection)) == null) 1834TextSelectionHighlightLayer highlightLayer = textContainer.Highlights.GetLayer(typeof(TextSelection)) as TextSelectionHighlightLayer; 1838Invariant.Assert(textContainer.Highlights.GetLayer(typeof(TextSelection)) == null); 2055fontStylePropertyValue = ((TextSelection)textSelection).GetCurrentValue(TextElement.FontStyleProperty);
src\Framework\System\windows\Documents\TextSelectionHighlightLayer.cs (2)
275return typeof(TextSelection); 375return typeof(TextSelection);