7 writes to TextView
PresentationFramework (7)
System\Windows\Controls\FlowDocumentScrollViewer.cs (1)
997_textEditor.TextView = textView;
System\Windows\Controls\PasswordBox.cs (2)
1042_textEditor.TextView = textview; 1055_textEditor.TextView = null;
System\Windows\Controls\Primitives\DocumentViewerBase.cs (1)
1044_textEditor.TextView = _textView;
System\Windows\Controls\Primitives\TextBoxBase.cs (2)
1894_textEditor.TextView = textView; // REVIEW:benwest: this is redundant! TextEditor already has a ref to TextContainer! 1909_textEditor.TextView = null;
System\windows\Documents\TextEditor.cs (1)
209this.TextView = null;
192 references to TextView
PresentationFramework (192)
MS\Internal\Documents\DocumentGrid.cs (1)
925return TextEditor.TextView;
MS\Internal\Documents\TextBoxLine.cs (1)
460if ((textEditor?.TextView?.RendersOwnSelection == true)
System\Windows\Controls\FlowDocumentReader.cs (2)
1586findResult = DocumentViewerHelper.Find(findToolBar, textEditor, textEditor.TextView, textEditor.TextView);
System\Windows\Controls\FlowDocumentScrollViewer.cs (2)
1550findResult = DocumentViewerHelper.Find(findToolBar, _textEditor, _textEditor.TextView, _textEditor.TextView);
System\windows\Documents\CaretElement.cs (9)
50internal CaretElement(TextEditor textEditor, bool isBlinkEnabled) : base(textEditor.TextView.RenderScope) 52Invariant.Assert(textEditor.TextView != null && textEditor.TextView.RenderScope != null, "Assert: textView != null && RenderScope != null"); 374MS.Internal.Documents.TextViewBase.BringRectIntoViewMinimally(_textEditor.TextView, new Rect(scrollToOriginPosition, scrollRectangle.Y, scrollRectangle.Width, scrollRectangle.Height)); 382MS.Internal.Documents.TextViewBase.BringRectIntoViewMinimally(_textEditor.TextView, scrollRectangle); 396GeneralTransform transform = _textEditor.TextView.RenderScope.TransformToAncestor(scroller); 444if (!_textEditor.Selection.MovingPosition.HasValidLayout && _textEditor.TextView != null && _textEditor.TextView.IsValid) 862AdornerLayer layer = AdornerLayer.GetAdornerLayer(_textEditor.TextView.RenderScope);
System\Windows\Documents\ImmComposition.cs (6)
743view = _editor.TextView; 1193_compositionAdorner = new CompositionAdorner(_editor.TextView); 1194_compositionAdorner.Initialize(_editor.TextView); 1262_editor.TextView.RenderScope.UpdateLayout(); 1870get { return _editor.TextView == null ? null : _editor.TextView.RenderScope; }
System\windows\Documents\TextEditor.cs (9)
1339FrameworkElement scroller = this.TextView == null ? null : (this.TextView.RenderScope as FrameworkElement); 1477this.TextView != null && this.TextView.IsValid && TextEditorSelection.IsPaginated(this.TextView)) 1480this.TextView.BringPointIntoViewCompleted += new BringPointIntoViewCompletedEventHandler(HandleBringPointIntoViewCompleted); 1481this.TextView.BringPointIntoViewAsync(_mouseSelectionState.Point, this); 1508Invariant.Assert(e.UserState == this && this.TextView == sender); 1616if (this.TextView == null)
System\windows\Documents\TextEditorContextMenu.cs (3)
51if (This == null || This.TextView == null) 58Point renderScopeMouseDownPoint = Mouse.GetPosition(This.TextView.RenderScope); 272FrameworkElement element = This.TextView.RenderScope as FrameworkElement;
System\windows\Documents\TextEditorDragDrop.cs (31)
143Point mouseDownPoint = e.GetPosition(_textEditor.TextView.RenderScope); 358if (!_textEditor.TextView.Validate(e.GetPosition(_textEditor.TextView.RenderScope))) 418_textEditor.TextView.RenderScope.UpdateLayout(); // REVIEW:benwest:6/27/2006: This should use TextView.Validate, and check the return value instead of using IsValid below. 420if (_textEditor.TextView.IsValid) 422ITextPointer dragPosition = GetDropPosition(_textEditor.TextView.RenderScope as Visual, e.GetPosition(_textEditor.TextView.RenderScope)); 456Invariant.Assert(_textEditor.TextView.IsValid); // caller must guarantee this. 459if (target != _textEditor.TextView.RenderScope && target != null && (_textEditor.TextView.RenderScope).IsAncestorOf(target)) 461GeneralTransform transform = target.TransformToAncestor(_textEditor.TextView.RenderScope); 545if (!_textEditor.TextView.Validate(e.GetPosition(_textEditor.TextView.RenderScope))) 552ITextPointer dropPosition = GetDropPosition(_textEditor.TextView.RenderScope as Visual, e.GetPosition(_textEditor.TextView.RenderScope)); 645if (!_textEditor.IsReadOnly && _textEditor.TextView != null && _textEditor.TextView.RenderScope != null) 647Window window = Window.GetWindow(_textEditor.TextView.RenderScope); 687return _textEditor.TextView; 787if (!This._IsEnabled || This.TextView == null || This.TextView.RenderScope == null) 809if (!This.TextView.Validate(e.GetPosition(This.TextView.RenderScope))) 835if (!This._IsEnabled || This.TextView == null || This.TextView.RenderScope == null) 856if (!This.TextView.Validate(e.GetPosition(This.TextView.RenderScope))) 891if (!This.TextView.Validate(e.GetPosition(This.TextView.RenderScope))) 916if (!This.TextView.Validate(e.GetPosition(This.TextView.RenderScope)))
System\windows\Documents\TextEditorMouse.cs (36)
79ITextPointer cursorPosition = This.TextView.GetTextPositionFromPoint(mouseDownPoint, /*snapToText:*/true); 145interactiveArea = textEditor.TextView.IsValid; 149transform = textEditor.UiScope.TransformToDescendant(textEditor.TextView.RenderScope); 154position = textEditor.TextView.GetTextPositionFromPoint(point, true); 213if (This.TextView == null) 223if (!This.TextView.IsValid) 228This.TextView.RenderScope.UpdateLayout(); 229if (This.TextView == null || !This.TextView.IsValid) 242This.TextView.ThrottleBackgroundTasksForUserInput(); 245Point mouseDownPoint = e.GetPosition(This.TextView.RenderScope); 248if (TextEditor.IsTableEditingEnabled && TextRangeEditTables.TableBorderHitTest(This.TextView, mouseDownPoint)) 251This._tableColResizeInfo = TextRangeEditTables.StartColumnResize(This.TextView, mouseDownPoint); 298if (This.TextView == null || !This.TextView.IsValid) 340if (This.TextView == null || !This.TextView.IsValid) 356Point mousePoint = e.GetPosition(This.TextView.RenderScope); 405if (This.TextView == null) 447TextEditorMouse.UpdateCursor(This, e.GetPosition(This.TextView.RenderScope)); 464Point mouseMovePoint = e.GetPosition(This.TextView.RenderScope); 486This.TextView.ThrottleBackgroundTasksForUserInput(); 501ITextPointer snappedCursorPosition = This.TextView.GetTextPositionFromPoint(mouseMovePoint, /*snapToText:*/true); 539Rect targetRect = This.TextView.GetRectangleFromTextPosition(snappedCursorPosition); 541acceleratedCursorPosition = This.TextView.GetTextPositionFromPoint(targetPoint, /*snapToText:*/true); 545Rect targetRect = This.TextView.GetRectangleFromTextPosition(snappedCursorPosition); 547acceleratedCursorPosition = This.TextView.GetTextPositionFromPoint(targetPoint, /*snapToText:*/true); 557acceleratedCursorPosition = This.TextView.GetTextPositionFromPoint(targetPoint, /*snapToText:*/true); 562acceleratedCursorPosition = This.TextView.GetTextPositionFromPoint(targetPoint, /*snapToText:*/true); 687Invariant.Assert(This.TextView != null && This.TextView.IsValid); 693if (TextEditor.IsTableEditingEnabled && TextRangeEditTables.TableBorderHitTest(This.TextView, mouseMovePoint)) 730ITextPointer mouseMovePosition = This.TextView.GetTextPositionFromPoint(mouseMovePoint, /*snapToText:*/false); 755Rect uiElementFirstEdgeRect = This.TextView.GetRectangleFromTextPosition(mouseMovePosition); 756Rect uiElementSecondEdgeRect = This.TextView.GetRectangleFromTextPosition(otherEdgePosition); 775UIElement renderScope = textEditor.TextView.RenderScope;
System\windows\Documents\TextEditorSelection.cs (71)
305ITextPointer newMovingPosition = This.TextView.GetPositionAtNextLine(This.Selection.MovingPosition, suggestedX, +1, out newSuggestedX, out linesMoved); 332else if (IsPaginated(This.TextView)) 335This.TextView.BringLineIntoViewCompleted += new BringLineIntoViewCompletedEventHandler(HandleMoveByLineCompleted); 336This.TextView.BringLineIntoViewAsync(newMovingPosition, newSuggestedX, +1, This); 394ITextPointer newMovingPosition = This.TextView.GetPositionAtNextLine(This.Selection.MovingPosition, suggestedX, -1, out newSuggestedX, out linesMoved); 422else if (IsPaginated(This.TextView)) 425This.TextView.BringLineIntoViewCompleted += new BringLineIntoViewCompletedEventHandler(HandleMoveByLineCompleted); 426This.TextView.BringLineIntoViewAsync(newMovingPosition, newSuggestedX, -1, This); 600if (IsPaginated(This.TextView)) 608targetPosition = This.TextView.GetPositionAtNextPage(movingPosition, new Point(GetViewportXOffset(This.TextView, suggestedX), suggestedY), +1, out newSuggestedOffset, out pagesMoved); 620else if (IsPaginated(This.TextView)) 623This.TextView.BringPageIntoViewCompleted += new BringPageIntoViewCompletedEventHandler(HandleMoveByPageCompleted); 624This.TextView.BringPageIntoViewAsync(targetPosition, newSuggestedOffset, +1, This); 631Rect targetRect = This.TextView.GetRectangleFromTextPosition(movingPosition); 632Point targetPoint = new Point(GetViewportXOffset(This.TextView, suggestedX), targetRect.Top + pageHeight); 633targetPosition = This.TextView.GetTextPositionFromPoint(targetPoint, /*snapToText:*/true); 649ScrollBar.PageDownCommand.Execute(null, This.TextView.RenderScope); 653This.TextView.RenderScope.UpdateLayout(); 714if (IsPaginated(This.TextView)) 722targetPosition = This.TextView.GetPositionAtNextPage(movingPosition, new Point(GetViewportXOffset(This.TextView, suggestedX), suggestedY), -1, out newSuggestedOffset, out pagesMoved); 734else if (IsPaginated(This.TextView)) 737This.TextView.BringPageIntoViewCompleted += new BringPageIntoViewCompletedEventHandler(HandleMoveByPageCompleted); 738This.TextView.BringPageIntoViewAsync(targetPosition, newSuggestedOffset, -1, This); 745Rect targetRect = This.TextView.GetRectangleFromTextPosition(movingPosition); 746Point targetPoint = new Point(GetViewportXOffset(This.TextView, suggestedX), targetRect.Bottom - pageHeight); 747targetPosition = This.TextView.GetTextPositionFromPoint(targetPoint, /*snapToText:*/true); 763ScrollBar.PageUpCommand.Execute(null, This.TextView.RenderScope); 767This.TextView.RenderScope.UpdateLayout(); 806TextSegment lineRange = TextEditorSelection.GetNormalizedLineRange(This.TextView, startPositionInner); 857TextSegment lineRange = TextEditorSelection.GetNormalizedLineRange(This.TextView, endPositionInner); 1062newMovingPosition = This.TextView.GetPositionAtNextLine(newMovingPosition, suggestedX, +1, out newSuggestedX, out linesMoved); 1090else if (IsPaginated(This.TextView)) 1093This.TextView.BringLineIntoViewCompleted += new BringLineIntoViewCompletedEventHandler(HandleSelectByLineCompleted); 1094This.TextView.BringLineIntoViewAsync(newMovingPosition, newSuggestedX, +1, This); 1140double newPositionX = GetAbsoluteXOffset(This.TextView, newMovingPosition); 1234newMovingPosition = This.TextView.GetPositionAtNextLine(newMovingPosition, suggestedX, -1, out newSuggestedX, out linesMoved); 1280else if (IsPaginated(This.TextView)) 1283This.TextView.BringLineIntoViewCompleted += new BringLineIntoViewCompletedEventHandler(HandleSelectByLineCompleted); 1284This.TextView.BringLineIntoViewAsync(newMovingPosition, newSuggestedX, -1, This); 1425if (IsPaginated(This.TextView)) 1433targetPosition = This.TextView.GetPositionAtNextPage(movingPosition, new Point(GetViewportXOffset(This.TextView, suggestedX), suggestedY), +1, out newSuggestedOffset, out pagesMoved); 1443else if (IsPaginated(This.TextView)) 1446This.TextView.BringPageIntoViewCompleted += new BringPageIntoViewCompletedEventHandler(HandleSelectByPageCompleted); 1447This.TextView.BringPageIntoViewAsync(targetPosition, newSuggestedOffset, +1, This); 1459Rect targetRect = This.TextView.GetRectangleFromTextPosition(movingPosition); 1460Point targetPoint = new Point(GetViewportXOffset(This.TextView, suggestedX), targetRect.Top + pageHeight); 1461targetPosition = This.TextView.GetTextPositionFromPoint(targetPoint, /*snapToText:*/true); 1479ScrollBar.PageDownCommand.Execute(null, This.TextView.RenderScope); 1521if (IsPaginated(This.TextView)) 1529targetPosition = This.TextView.GetPositionAtNextPage(movingPosition, new Point(GetViewportXOffset(This.TextView, suggestedX), suggestedY), -1, out newSuggestedOffset, out pagesMoved); 1539else if (IsPaginated(This.TextView)) 1542This.TextView.BringPageIntoViewCompleted += new BringPageIntoViewCompletedEventHandler(HandleSelectByPageCompleted); 1543This.TextView.BringPageIntoViewAsync(targetPosition, newSuggestedOffset, -1, This); 1555Rect targetRect = This.TextView.GetRectangleFromTextPosition(movingPosition); 1556Point targetPoint = new Point(GetViewportXOffset(This.TextView, suggestedX), targetRect.Bottom - pageHeight); 1557targetPosition = This.TextView.GetTextPositionFromPoint(targetPoint, /*snapToText:*/true); 1575ScrollBar.PageUpCommand.Execute(null, This.TextView.RenderScope); 1609TextSegment lineRange = TextEditorSelection.GetNormalizedLineRange(This.TextView, movingPositionInner); 1654TextSegment lineRange = TextEditorSelection.GetNormalizedLineRange(This.TextView, movingPositionInner); 1677TextSegment anchorLineRange = TextEditorSelection.GetNormalizedLineRange(This.TextView, This.Selection.AnchorPosition); 2249This._suggestedX = GetAbsoluteXOffset(This.TextView, innerMovingPosition); 2287suggestedY = This.TextView.GetRectangleFromTextPosition(position).Y; 2396textEditor.TextView != null && textEditor.TextView.IsValid && !textEditor.TextView.Contains(position) && IsPaginated(textEditor.TextView)) 2399textEditor.TextView.BringPositionIntoViewAsync(position, textEditor);
System\windows\Documents\TextEditorTyping.cs (13)
159if (This.TextView != null) 161This.TextView.ThrottleBackgroundTasksForUserInput(); 316if (This.TextView != null && !This.UiScope.IsMouseCaptured) 388if (This.TextView != null) 390This.TextView.ThrottleBackgroundTasksForUserInput(); 659if (This.TextView != null && 665backspacePosition = This.TextView.GetBackspaceCaretUnitPosition(position); 1295if (This.TextView != null) 1297This.TextView.ThrottleBackgroundTasksForUserInput(); 1895if (This.UiScope is RichTextBox && This.TextView != null && This.TextView.IsValid) 1897TextPointer pointer = (TextPointer)This.TextView.GetTextPositionFromPoint(Mouse.GetPosition(This.TextView.RenderScope), false);
System\windows\Documents\TextSelection.cs (5)
1603if (_textEditor.TextView != null && _textEditor.TextView.IsValid) 2108if (_textEditor.TextView == null || !_textEditor.TextView.IsValid) 2634return _textEditor.TextView;
System\Windows\Documents\TextStore.cs (3)
2091if (this.TextEditor.TextView == null) 2094return this.TextEditor.TextView.RenderScope; 2110get { return TextEditor.TextView; }