7 writes to TextView
PresentationFramework (7)
System\Windows\Controls\FlowDocumentScrollViewer.cs (1)
991TextView = textView
System\Windows\Controls\PasswordBox.cs (2)
1022_textEditor.TextView = textview; 1035_textEditor.TextView = null;
System\Windows\Controls\Primitives\DocumentViewerBase.cs (1)
1020TextView = _textView
System\Windows\Controls\Primitives\TextBoxBase.cs (2)
1818_textEditor.TextView = textView; // REVIEW:benwest: this is redundant! TextEditor already has a ref to TextContainer! 1833_textEditor.TextView = null;
System\windows\Documents\TextEditor.cs (1)
198this.TextView = null;
188 references to TextView
PresentationFramework (188)
MS\Internal\Documents\DocumentGrid.cs (1)
918return TextEditor.TextView;
MS\Internal\Documents\TextBoxLine.cs (1)
453if ((textEditor?.TextView?.RendersOwnSelection == true)
System\Windows\Controls\FlowDocumentReader.cs (2)
1558findResult = DocumentViewerHelper.Find(findToolBar, textEditor, textEditor.TextView, textEditor.TextView);
System\Windows\Controls\FlowDocumentScrollViewer.cs (2)
1514findResult = DocumentViewerHelper.Find(findToolBar, _textEditor, _textEditor.TextView, _textEditor.TextView);
System\windows\Documents\CaretElement.cs (9)
44internal CaretElement(TextEditor textEditor, bool isBlinkEnabled) : base(textEditor.TextView.RenderScope) 46Invariant.Assert(textEditor.TextView != null && textEditor.TextView.RenderScope != null, "Assert: textView != null && RenderScope != null"); 370MS.Internal.Documents.TextViewBase.BringRectIntoViewMinimally(_textEditor.TextView, new Rect(scrollToOriginPosition, scrollRectangle.Y, scrollRectangle.Width, scrollRectangle.Height)); 378MS.Internal.Documents.TextViewBase.BringRectIntoViewMinimally(_textEditor.TextView, scrollRectangle); 392GeneralTransform transform = _textEditor.TextView.RenderScope.TransformToAncestor(scroller); 440if (!_textEditor.Selection.MovingPosition.HasValidLayout && _textEditor.TextView != null && _textEditor.TextView.IsValid) 860AdornerLayer layer = AdornerLayer.GetAdornerLayer(_textEditor.TextView.RenderScope);
System\Windows\Documents\ImmComposition.cs (5)
720view = _editor.TextView; 1172_compositionAdorner = new CompositionAdorner(_editor.TextView); 1173_compositionAdorner.Initialize(_editor.TextView); 1241_editor.TextView.RenderScope.UpdateLayout(); 1849get { return _editor.TextView?.RenderScope; }
System\windows\Documents\TextEditor.cs (9)
1321FrameworkElement scroller = this.TextView == null ? null : (this.TextView.RenderScope as FrameworkElement); 1459this.TextView != null && this.TextView.IsValid && TextEditorSelection.IsPaginated(this.TextView)) 1462this.TextView.BringPointIntoViewCompleted += new BringPointIntoViewCompletedEventHandler(HandleBringPointIntoViewCompleted); 1463this.TextView.BringPointIntoViewAsync(_mouseSelectionState.Point, this); 1490Invariant.Assert(e.UserState == this && this.TextView == sender); 1598if (this.TextView == null)
System\windows\Documents\TextEditorContextMenu.cs (3)
49if (This == null || This.TextView == null) 56Point renderScopeMouseDownPoint = Mouse.GetPosition(This.TextView.RenderScope); 270FrameworkElement element = This.TextView.RenderScope as FrameworkElement;
System\windows\Documents\TextEditorDragDrop.cs (31)
126Point mouseDownPoint = e.GetPosition(_textEditor.TextView.RenderScope); 341if (!_textEditor.TextView.Validate(e.GetPosition(_textEditor.TextView.RenderScope))) 401_textEditor.TextView.RenderScope.UpdateLayout(); // REVIEW:benwest:6/27/2006: This should use TextView.Validate, and check the return value instead of using IsValid below. 403if (_textEditor.TextView.IsValid) 405ITextPointer dragPosition = GetDropPosition(_textEditor.TextView.RenderScope as Visual, e.GetPosition(_textEditor.TextView.RenderScope)); 439Invariant.Assert(_textEditor.TextView.IsValid); // caller must guarantee this. 442if (target != _textEditor.TextView.RenderScope && target != null && (_textEditor.TextView.RenderScope).IsAncestorOf(target)) 444GeneralTransform transform = target.TransformToAncestor(_textEditor.TextView.RenderScope); 528if (!_textEditor.TextView.Validate(e.GetPosition(_textEditor.TextView.RenderScope))) 535ITextPointer dropPosition = GetDropPosition(_textEditor.TextView.RenderScope as Visual, e.GetPosition(_textEditor.TextView.RenderScope)); 628if (!_textEditor.IsReadOnly && _textEditor.TextView != null && _textEditor.TextView.RenderScope != null) 630Window window = Window.GetWindow(_textEditor.TextView.RenderScope); 670return _textEditor.TextView; 770if (!This._IsEnabled || This.TextView == null || This.TextView.RenderScope == null) 792if (!This.TextView.Validate(e.GetPosition(This.TextView.RenderScope))) 818if (!This._IsEnabled || This.TextView == null || This.TextView.RenderScope == null) 839if (!This.TextView.Validate(e.GetPosition(This.TextView.RenderScope))) 874if (!This.TextView.Validate(e.GetPosition(This.TextView.RenderScope))) 899if (!This.TextView.Validate(e.GetPosition(This.TextView.RenderScope)))
System\windows\Documents\TextEditorMouse.cs (36)
65ITextPointer cursorPosition = This.TextView.GetTextPositionFromPoint(mouseDownPoint, /*snapToText:*/true); 131interactiveArea = textEditor.TextView.IsValid; 135transform = textEditor.UiScope.TransformToDescendant(textEditor.TextView.RenderScope); 137position = textEditor.TextView.GetTextPositionFromPoint(point, true); 196if (This.TextView == null) 206if (!This.TextView.IsValid) 211This.TextView.RenderScope.UpdateLayout(); 212if (This.TextView == null || !This.TextView.IsValid) 225This.TextView.ThrottleBackgroundTasksForUserInput(); 228Point mouseDownPoint = e.GetPosition(This.TextView.RenderScope); 231if (TextEditor.IsTableEditingEnabled && TextRangeEditTables.TableBorderHitTest(This.TextView, mouseDownPoint)) 234This._tableColResizeInfo = TextRangeEditTables.StartColumnResize(This.TextView, mouseDownPoint); 281if (This.TextView == null || !This.TextView.IsValid) 323if (This.TextView == null || !This.TextView.IsValid) 339Point mousePoint = e.GetPosition(This.TextView.RenderScope); 388if (This.TextView == null) 430TextEditorMouse.UpdateCursor(This, e.GetPosition(This.TextView.RenderScope)); 447Point mouseMovePoint = e.GetPosition(This.TextView.RenderScope); 469This.TextView.ThrottleBackgroundTasksForUserInput(); 484ITextPointer snappedCursorPosition = This.TextView.GetTextPositionFromPoint(mouseMovePoint, /*snapToText:*/true); 522Rect targetRect = This.TextView.GetRectangleFromTextPosition(snappedCursorPosition); 524acceleratedCursorPosition = This.TextView.GetTextPositionFromPoint(targetPoint, /*snapToText:*/true); 528Rect targetRect = This.TextView.GetRectangleFromTextPosition(snappedCursorPosition); 530acceleratedCursorPosition = This.TextView.GetTextPositionFromPoint(targetPoint, /*snapToText:*/true); 540acceleratedCursorPosition = This.TextView.GetTextPositionFromPoint(targetPoint, /*snapToText:*/true); 545acceleratedCursorPosition = This.TextView.GetTextPositionFromPoint(targetPoint, /*snapToText:*/true); 670Invariant.Assert(This.TextView != null && This.TextView.IsValid); 676if (TextEditor.IsTableEditingEnabled && TextRangeEditTables.TableBorderHitTest(This.TextView, mouseMovePoint)) 713ITextPointer mouseMovePosition = This.TextView.GetTextPositionFromPoint(mouseMovePoint, /*snapToText:*/false); 738Rect uiElementFirstEdgeRect = This.TextView.GetRectangleFromTextPosition(mouseMovePosition); 739Rect uiElementSecondEdgeRect = This.TextView.GetRectangleFromTextPosition(otherEdgePosition); 758UIElement renderScope = textEditor.TextView.RenderScope;
System\windows\Documents\TextEditorSelection.cs (71)
290ITextPointer newMovingPosition = This.TextView.GetPositionAtNextLine(This.Selection.MovingPosition, suggestedX, +1, out newSuggestedX, out linesMoved); 317else if (IsPaginated(This.TextView)) 320This.TextView.BringLineIntoViewCompleted += new BringLineIntoViewCompletedEventHandler(HandleMoveByLineCompleted); 321This.TextView.BringLineIntoViewAsync(newMovingPosition, newSuggestedX, +1, This); 379ITextPointer newMovingPosition = This.TextView.GetPositionAtNextLine(This.Selection.MovingPosition, suggestedX, -1, out newSuggestedX, out linesMoved); 407else if (IsPaginated(This.TextView)) 410This.TextView.BringLineIntoViewCompleted += new BringLineIntoViewCompletedEventHandler(HandleMoveByLineCompleted); 411This.TextView.BringLineIntoViewAsync(newMovingPosition, newSuggestedX, -1, This); 585if (IsPaginated(This.TextView)) 593targetPosition = This.TextView.GetPositionAtNextPage(movingPosition, new Point(GetViewportXOffset(This.TextView, suggestedX), suggestedY), +1, out newSuggestedOffset, out pagesMoved); 605else if (IsPaginated(This.TextView)) 608This.TextView.BringPageIntoViewCompleted += new BringPageIntoViewCompletedEventHandler(HandleMoveByPageCompleted); 609This.TextView.BringPageIntoViewAsync(targetPosition, newSuggestedOffset, +1, This); 616Rect targetRect = This.TextView.GetRectangleFromTextPosition(movingPosition); 617Point targetPoint = new Point(GetViewportXOffset(This.TextView, suggestedX), targetRect.Top + pageHeight); 618targetPosition = This.TextView.GetTextPositionFromPoint(targetPoint, /*snapToText:*/true); 634ScrollBar.PageDownCommand.Execute(null, This.TextView.RenderScope); 638This.TextView.RenderScope.UpdateLayout(); 699if (IsPaginated(This.TextView)) 707targetPosition = This.TextView.GetPositionAtNextPage(movingPosition, new Point(GetViewportXOffset(This.TextView, suggestedX), suggestedY), -1, out newSuggestedOffset, out pagesMoved); 719else if (IsPaginated(This.TextView)) 722This.TextView.BringPageIntoViewCompleted += new BringPageIntoViewCompletedEventHandler(HandleMoveByPageCompleted); 723This.TextView.BringPageIntoViewAsync(targetPosition, newSuggestedOffset, -1, This); 730Rect targetRect = This.TextView.GetRectangleFromTextPosition(movingPosition); 731Point targetPoint = new Point(GetViewportXOffset(This.TextView, suggestedX), targetRect.Bottom - pageHeight); 732targetPosition = This.TextView.GetTextPositionFromPoint(targetPoint, /*snapToText:*/true); 748ScrollBar.PageUpCommand.Execute(null, This.TextView.RenderScope); 752This.TextView.RenderScope.UpdateLayout(); 791TextSegment lineRange = TextEditorSelection.GetNormalizedLineRange(This.TextView, startPositionInner); 842TextSegment lineRange = TextEditorSelection.GetNormalizedLineRange(This.TextView, endPositionInner); 1047newMovingPosition = This.TextView.GetPositionAtNextLine(newMovingPosition, suggestedX, +1, out newSuggestedX, out linesMoved); 1075else if (IsPaginated(This.TextView)) 1078This.TextView.BringLineIntoViewCompleted += new BringLineIntoViewCompletedEventHandler(HandleSelectByLineCompleted); 1079This.TextView.BringLineIntoViewAsync(newMovingPosition, newSuggestedX, +1, This); 1125double newPositionX = GetAbsoluteXOffset(This.TextView, newMovingPosition); 1219newMovingPosition = This.TextView.GetPositionAtNextLine(newMovingPosition, suggestedX, -1, out newSuggestedX, out linesMoved); 1265else if (IsPaginated(This.TextView)) 1268This.TextView.BringLineIntoViewCompleted += new BringLineIntoViewCompletedEventHandler(HandleSelectByLineCompleted); 1269This.TextView.BringLineIntoViewAsync(newMovingPosition, newSuggestedX, -1, This); 1410if (IsPaginated(This.TextView)) 1418targetPosition = This.TextView.GetPositionAtNextPage(movingPosition, new Point(GetViewportXOffset(This.TextView, suggestedX), suggestedY), +1, out newSuggestedOffset, out pagesMoved); 1428else if (IsPaginated(This.TextView)) 1431This.TextView.BringPageIntoViewCompleted += new BringPageIntoViewCompletedEventHandler(HandleSelectByPageCompleted); 1432This.TextView.BringPageIntoViewAsync(targetPosition, newSuggestedOffset, +1, This); 1444Rect targetRect = This.TextView.GetRectangleFromTextPosition(movingPosition); 1445Point targetPoint = new Point(GetViewportXOffset(This.TextView, suggestedX), targetRect.Top + pageHeight); 1446targetPosition = This.TextView.GetTextPositionFromPoint(targetPoint, /*snapToText:*/true); 1464ScrollBar.PageDownCommand.Execute(null, This.TextView.RenderScope); 1506if (IsPaginated(This.TextView)) 1514targetPosition = This.TextView.GetPositionAtNextPage(movingPosition, new Point(GetViewportXOffset(This.TextView, suggestedX), suggestedY), -1, out newSuggestedOffset, out pagesMoved); 1524else if (IsPaginated(This.TextView)) 1527This.TextView.BringPageIntoViewCompleted += new BringPageIntoViewCompletedEventHandler(HandleSelectByPageCompleted); 1528This.TextView.BringPageIntoViewAsync(targetPosition, newSuggestedOffset, -1, This); 1540Rect targetRect = This.TextView.GetRectangleFromTextPosition(movingPosition); 1541Point targetPoint = new Point(GetViewportXOffset(This.TextView, suggestedX), targetRect.Bottom - pageHeight); 1542targetPosition = This.TextView.GetTextPositionFromPoint(targetPoint, /*snapToText:*/true); 1560ScrollBar.PageUpCommand.Execute(null, This.TextView.RenderScope); 1594TextSegment lineRange = TextEditorSelection.GetNormalizedLineRange(This.TextView, movingPositionInner); 1639TextSegment lineRange = TextEditorSelection.GetNormalizedLineRange(This.TextView, movingPositionInner); 1662TextSegment anchorLineRange = TextEditorSelection.GetNormalizedLineRange(This.TextView, This.Selection.AnchorPosition); 2234This._suggestedX = GetAbsoluteXOffset(This.TextView, innerMovingPosition); 2272suggestedY = This.TextView.GetRectangleFromTextPosition(position).Y; 2381textEditor.TextView != null && textEditor.TextView.IsValid && !textEditor.TextView.Contains(position) && IsPaginated(textEditor.TextView)) 2384textEditor.TextView.BringPositionIntoViewAsync(position, textEditor);
System\windows\Documents\TextEditorTyping.cs (10)
150This.TextView?.ThrottleBackgroundTasksForUserInput(); 304if (This.TextView != null && !This.UiScope.IsMouseCaptured) 376This.TextView?.ThrottleBackgroundTasksForUserInput(); 641if (This.TextView != null && 647backspacePosition = This.TextView.GetBackspaceCaretUnitPosition(position); 1277This.TextView?.ThrottleBackgroundTasksForUserInput(); 1874if (This.UiScope is RichTextBox && This.TextView != null && This.TextView.IsValid) 1876TextPointer pointer = (TextPointer)This.TextView.GetTextPositionFromPoint(Mouse.GetPosition(This.TextView.RenderScope), false);
System\windows\Documents\TextSelection.cs (5)
1585if (_textEditor.TextView != null && _textEditor.TextView.IsValid) 2090if (_textEditor.TextView == null || !_textEditor.TextView.IsValid) 2618return _textEditor.TextView;
System\Windows\Documents\TextStore.cs (3)
2074if (this.TextEditor.TextView == null) 2077return this.TextEditor.TextView.RenderScope; 2093get { return TextEditor.TextView; }