1 instantiation of TextSelection
PresentationFramework (1)
System\windows\Documents\TextEditor.cs (1)
65_selection = new TextSelection(this);
118 references to TextSelection
PresentationFramework (118)
MS\Internal\Documents\TextBoxLine.cs (1)
453&& highlights.GetHighlightValue(position, LogicalDirection.Forward, typeof(TextSelection)) != DependencyProperty.UnsetValue)
MS\Internal\Documents\TextBoxView.cs (2)
1425&& (!((ITextView)this).RendersOwnSelection || args.OwnerType != typeof(TextSelection))) 1453if (args.OwnerType == typeof(TextSelection))
MS\Internal\Text\DynamicPropertyReader.cs (1)
253selected = position.TextContainer.Highlights.GetHighlightValue(position, LogicalDirection.Forward, typeof(TextSelection));
System\Windows\Controls\FlowDocumentReader.cs (3)
199public TextSelection Selection 203TextSelection result = null; 210result = viewer.TextSelection as TextSelection;
System\Windows\Controls\FlowDocumentScrollViewer.cs (2)
209public TextSelection Selection 219return textSelection as TextSelection;
System\Windows\Controls\PasswordBox.cs (1)
1204caretElement.UpdateCaretBrush(TextSelection.GetCaretBrush(passwordBox.Selection.TextEditor));
System\Windows\Controls\Primitives\TextBoxBase.cs (3)
1711internal TextSelection TextSelectionInternal 1715return (TextSelection)_textEditor.Selection; 2124caretElement.UpdateCaretBrush(TextSelection.GetCaretBrush(textBoxBase.TextEditor));
System\Windows\Controls\RichTextBox.cs (2)
552public TextSelection Selection 556return (TextSelection)TextSelectionInternal;
System\Windows\Controls\SinglePageViewer.cs (2)
138public TextSelection Selection 148return textSelection as TextSelection;
System\Windows\Controls\TextBox.cs (2)
1333internal TextSelection Selection 1337return (TextSelection)TextSelectionInternal;
System\windows\Documents\CaretElement.cs (1)
188((TextSelection)_textEditor.Selection).UpdateCaretState(CaretScrollMethod.None);
System\Windows\Documents\ChildDocumentBlock.cs (1)
126Debug.Assert(ChildContainer.Highlights.GetLayer(typeof(TextSelection)) == null);
System\Windows\Documents\DocumentSequenceHighlightLayer.cs (2)
100return typeof(TextSelection); 161return typeof(TextSelection);
System\Windows\Documents\DocumentSequenceTextContainer.cs (1)
669selected = highlights.GetHighlightValue(highlightTransitionPosition, LogicalDirection.Forward, typeof(TextSelection));
System\Windows\Documents\FixedDocument.cs (2)
1083selected = highlights.GetHighlightValue(highlightTransitionPosition, LogicalDirection.Forward, typeof(TextSelection)); 1104while (highlights.GetHighlightValue(highlightTransitionPosition, LogicalDirection.Forward, typeof(TextSelection)) != DependencyProperty.UnsetValue);
System\windows\Documents\TextEditor.cs (5)
443((TextSelection)this.Selection).ApplySpringloadFormatting(); 583if (_selection is TextSelection) 585((TextSelection)_selection).ClearSpringloadFormatting(); 636if (_selection is TextSelection) 638((TextSelection)_selection).ClearSpringloadFormatting();
System\windows\Documents\TextEditorCharacters.cs (18)
68if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection is TextSelection)) 80TextSelection selection = (TextSelection)This.Selection; 140((TextSelection)This.Selection).ClearSpringloadFormatting(); 166if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection is TextSelection)) 173object propertyValue = ((TextSelection)This.Selection).GetCurrentValue(TextElement.FontWeightProperty); 186if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection is TextSelection)) 193object propertyValue = ((TextSelection)This.Selection).GetCurrentValue(TextElement.FontStyleProperty); 209if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection is TextSelection)) 216object propertyValue = ((TextSelection)This.Selection).GetCurrentValue(Inline.TextDecorationsProperty); 238if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection is TextSelection)) 245FontVariants fontVariants = (FontVariants)((TextSelection)This.Selection).GetCurrentValue(Typography.VariantsProperty); 257if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection is TextSelection)) 264FontVariants fontVariants = (FontVariants)((TextSelection)This.Selection).GetCurrentValue(Typography.VariantsProperty); 285if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection is TextSelection)) 295double fontSize = (double)((TextSelection)This.Selection).GetCurrentValue(TextElement.FontSizeProperty); 327if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection is TextSelection)) 337double fontSize = (double)((TextSelection)This.Selection).GetCurrentValue(TextElement.FontSizeProperty);
System\windows\Documents\TextEditorCopyPaste.cs (8)
306if (This.Selection is TextSelection) 308((TextSelection)This.Selection).ClearSpringloadFormatting(); 400if (This.Selection is TextSelection) 402((TextSelection)This.Selection).ClearSpringloadFormatting(); 678if (This.AcceptsRichContent && This.Selection is TextSelection) 699if (This.AcceptsRichContent && This.Selection is TextSelection) 713((TextSelection)This.Selection).InsertEmbeddedUIElement((FrameworkElement)element); 741if (This.AcceptsRichContent && This.Selection is TextSelection)
System\windows\Documents\TextEditorDragDrop.cs (1)
414Brush caretBrush = TextSelection.GetCaretBrush(_textEditor);
System\windows\Documents\TextEditorLists.cs (11)
39TextSelection thisSelection = (TextSelection)This.Selection; 109if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection is TextSelection)) 116if (!TextRangeEditLists.IsListOperationApplicable((TextSelection)This.Selection)) 123TextSelection thisSelection = (TextSelection)This.Selection; 160private static void ToggleBullets(TextSelection thisSelection, ListItem parentListItem, ListItem immediateListItem, List list) 189private static void ToggleNumbering(TextSelection thisSelection, ListItem parentListItem, ListItem immediateListItem, List list) 218private static void IncreaseIndentation(TextSelection thisSelection, ListItem parentListItem, ListItem immediateListItem) 273private static void DecreaseIndentation(TextSelection thisSelection, ListItem parentListItem, ListItem immediateListItem) 329private static void CreateImplicitParagraphIfNeededAndUpdateSelection(TextSelection thisSelection)
System\windows\Documents\TextEditorMouse.cs (2)
80if (This.Selection is TextSelection) 82((TextSelection)This.Selection).ClearSpringloadFormatting();
System\windows\Documents\TextEditorSelection.cs (2)
2007if (This.Selection is TextSelection) 2009((TextSelection)This.Selection).ClearSpringloadFormatting();
System\windows\Documents\TextEditorSpelling.cs (1)
157((TextSelection)This.Selection).SpringloadCurrentFormatting();
System\windows\Documents\TextEditorTables.cs (8)
55if (This == null || !This._IsEnabled || This.IsReadOnly || !This.AcceptsRichContent || !(This.Selection is TextSelection)) 68((TextSelection)This.Selection).InsertTable(/*rowCount:*/4, /*columnCount:*/4); 72((TextSelection)This.Selection).InsertRows(+1); 76((TextSelection)This.Selection).InsertColumns(+1); 80((TextSelection)This.Selection).DeleteRows(); 84((TextSelection)This.Selection).DeleteColumns(); 88((TextSelection)This.Selection).MergeCells(); 92((TextSelection)This.Selection).SplitCell(1000, 1000); // Split all ways to possible maximum
System\windows\Documents\TextEditorThreadLocalStore.cs (2)
107internal TextSelection FocusedTextSelection 177private TextSelection _focusedTextSelection;
System\windows\Documents\TextEditorTyping.cs (19)
523((TextSelection)This.Selection).ClearSpringloadFormatting(); 615((TextSelection)This.Selection).ClearSpringloadFormatting(); 622((TextSelection)This.Selection).ClearSpringloadFormatting(); 690((TextSelection)This.Selection).ClearSpringloadFormatting(); 691((TextSelection)This.Selection).SpringloadCurrentFormatting(); 766((TextSelection)This.Selection).ClearSpringloadFormatting(); 926((TextSelection)This.Selection).ClearSpringloadFormatting(); 988((TextSelection)This.Selection).ClearSpringloadFormatting(); 990((TextSelection)This.Selection).SpringloadCurrentFormatting(); 1085((TextSelection)This.Selection).SpringloadCurrentFormatting(); 1100TextPointer newEnd = ((TextSelection)This.Selection).End; 1161TextRange range = ((TextSelection)This.Selection).InsertRows(+1); 1212if (This.AcceptsRichContent && (This.Selection is TextSelection)) 1215((TextSelection)This.Selection).ApplyPropertyValue(FlowDocument.FlowDirectionProperty, FlowDirection.LeftToRight, /*applyToParagraphs*/true); 1228if (This.AcceptsRichContent && (This.Selection is TextSelection)) 1231((TextSelection)This.Selection).ApplyPropertyValue(FlowDocument.FlowDirectionProperty, FlowDirection.RightToLeft, /*applyToParagraphs*/true); 1240((TextSelection)This.Selection).UpdateCaretState(CaretScrollMethod.Simple); 1657TextSelection.OnInputLanguageChanged(e.NewLanguage); 1740if (TextSelection.IsBidiInputLanguageInstalled())
System\Windows\Documents\TextPointer.cs (1)
70/// "insertion positions". Boundary positions of <see cref="TextRange"/> and <see cref="TextSelection"/>
System\Windows\Documents\TextRangeEditTables.cs (4)
427internal static TextPointer GetNextTableCellRangeInsertionPosition(TextSelection selection, LogicalDirection direction) 557internal static TextPointer GetNextRowEndMovingPosition(TextSelection selection, LogicalDirection direction) 572internal static bool MovingPositionCrossesCellBoundary(TextSelection selection) 586internal static TextPointer GetNextRowStartMovingPosition(TextSelection selection, LogicalDirection direction)
System\windows\Documents\TextSelection.cs (8)
172propertyValue = ((TextSelection)this).GetCurrentValue(formattingProperty); 712if (_highlightLayer != null && thisSelection.Start.TextContainer.Highlights.GetLayer(typeof(TextSelection)) == _highlightLayer) 1627if (focusedTextSelection is TextSelection) 1629backgroundPropertyValue = ((TextSelection)focusedTextSelection).GetCurrentValue(TextElement.BackgroundProperty); 1797if (textContainer.Highlights.GetLayer(typeof(TextSelection)) == null) 1807TextSelectionHighlightLayer highlightLayer = textContainer.Highlights.GetLayer(typeof(TextSelection)) as TextSelectionHighlightLayer; 1811Invariant.Assert(textContainer.Highlights.GetLayer(typeof(TextSelection)) == null); 2028fontStylePropertyValue = ((TextSelection)textSelection).GetCurrentValue(TextElement.FontStyleProperty);
System\windows\Documents\TextSelectionHighlightLayer.cs (2)
266return typeof(TextSelection); 366return typeof(TextSelection);