Share via


IWpfTextView Interface

Represents a Visual Studio ITextView for the Windows Presentation Foundation (WPF) platform.

Namespace:  Microsoft.VisualStudio.Text.Editor
Assembly:  Microsoft.VisualStudio.Text.UI.Wpf (in Microsoft.VisualStudio.Text.UI.Wpf.dll)

Syntax

'Declaration
Public Interface IWpfTextView _
    Inherits ITextView, IPropertyOwner
public interface IWpfTextView : ITextView, 
    IPropertyOwner
public interface class IWpfTextView : ITextView, 
    IPropertyOwner
type IWpfTextView =  
    interface
        interface ITextView
        interface IPropertyOwner
    end
public interface IWpfTextView extends ITextView, IPropertyOwner

The IWpfTextView type exposes the following members.

Properties

  Name Description
Public property Background Gets or sets the background for the visual element.
Public property BufferGraph Gets the IBufferGraph that contains the set of source buffers that contribute to this view. (Inherited from ITextView.)
Public property Caret Gets the caret element. (Inherited from ITextView.)
Public property FormattedLineSource Gets the text formatter used by the view.
Public property HasAggregateFocus Determines whether the view or any of its adornments has focus. (Inherited from ITextView.)
Public property InLayout Determines whether the view is in the process of being laid out. (Inherited from ITextView.)
Public property IsClosed Determines whether this text view has been closed. (Inherited from ITextView.)
Public property IsMouseOverViewOrAdornments Determines whether the mouse is over the view or any of its adornments. (Inherited from ITextView.)
Public property LineHeight Gets the nominal height of a line of text in the view. (Inherited from ITextView.)
Public property LineTransformSource Gets the line transformer used by the view.
Public property MaxTextRightCoordinate Gets the right coordinate of the longest line, whether or not that line is currently visible, in logical pixels. (Inherited from ITextView.)
Public property Options Gets the options for this text view. (Inherited from ITextView.)
Public property Properties Gets the collection of properties controlled by the property owner. (Inherited from IPropertyOwner.)
Public property ProvisionalTextHighlight Gets the span of text covered by the provisional text highlight. (Inherited from ITextView.)
Public property Roles The roles which this view plays. Roles partially determine the extensions that are instantiated for the view. (Inherited from ITextView.)
Public property Selection Gets the selection element. (Inherited from ITextView.)
Public property TextBuffer Gets the ITextBuffer whose text is rendered in this view. (Inherited from ITextView.)
Public property TextDataModel Gets the ITextDataModel of this text view. (Inherited from ITextView.)
Public property TextSnapshot Gets the ITextSnapshot of the text that is currently rendered in the view. (Inherited from ITextView.)
Public property TextViewLines Gets the text view lines as an IWpfTextViewLineCollection.
Public property TextViewModel Gets the ITextViewModel of this text view. (Inherited from ITextView.)
Public property ViewportBottom Gets the position of the bottom edge of the viewpoint in the text rendering coordinate system. (Inherited from ITextView.)
Public property ViewportHeight Gets the height of the visible content window (including the margin) in logical pixels. (Inherited from ITextView.)
Public property ViewportLeft Gets or sets the position of the left edge of the viewpoint in the text rendering coordinate system. (Inherited from ITextView.)
Public property ViewportRight Gets the position of the right edge of the viewpoint in the text rendering coordinate system. (Inherited from ITextView.)
Public property ViewportTop Gets the position of the top edge of the viewpoint in the text rendering coordinate system. (Inherited from ITextView.)
Public property ViewportWidth Gets the width of the visible content window (including the margin) in logical pixels. (Inherited from ITextView.)
Public property ViewScroller Gets a helper that provides various methods to scroll or manipulate the view. (Inherited from ITextView.)
Public property VisualElement Gets the FrameworkElement that renders the view.
Public property VisualSnapshot Gets the ITextSnapshot of the visual buffer that is being rendered. (Inherited from ITextView.)
Public property ZoomLevel Gets or sets the zoom level for the IWpfTextView between 20% to 400%.

Top

Methods

  Name Description
Public method Close Closes the text view host and its view. (Inherited from ITextView.)
Public method DisplayTextLineContainingBufferPosition(SnapshotPoint, Double, ViewRelativePosition) Formats and displays the contents of the text buffer so that the ITextViewLine containing the buffer position is displayed at the desired position. (Inherited from ITextView.)
Public method DisplayTextLineContainingBufferPosition(SnapshotPoint, Double, ViewRelativePosition, Nullable<Double>, Nullable<Double>) Formats and displays the contents of the text buffer so that the ITextViewLine containing the specified buffer position is displayed at the desired position. (Inherited from ITextView.)
Public method GetAdornmentLayer Gets a named IAdornmentLayer.
Public method GetSpaceReservationManager Gets a named ISpaceReservationManager.
Public method GetTextElementSpan Gets the SnapshotSpan of text that constitutes a text element (a single visual representation) at the given SnapshotPoint. (Inherited from ITextView.)
Public method GetTextViewLineContainingBufferPosition Gets the IWpfTextViewLine that contains the specified text buffer position.
Public method QueueSpaceReservationStackRefresh Requests a refresh of the space reservation stack. (Inherited from ITextView.)

Top

Events

  Name Description
Public event BackgroundBrushChanged Occurs when the Background is set.
Public event Closed Occurs immediately after the text view is closed. (Inherited from ITextView.)
Public event GotAggregateFocus Occurs when the keyboard focus switches to the view or one of its adornments. (Inherited from ITextView.)
Public event LayoutChanged Occurs when the text editor performs a text line layout. (Inherited from ITextView.)
Public event LostAggregateFocus Occurs when the keyboard focus switches away from the view and any of its adornments. (Inherited from ITextView.)
Public event MouseHover Occurs when the mouse has hovered over a character. (Inherited from ITextView.)
Public event ViewportHeightChanged Occurs when the viewport height is changed. Deprecated. (Inherited from ITextView.)
Public event ViewportLeftChanged Occurs when the position of the viewport left edge is changed. Deprecated (Inherited from ITextView.)
Public event ViewportWidthChanged Occurs when the viewport width is changed. Deprecated. (Inherited from ITextView.)
Public event ZoomLevelChanged Occurs when the ZoomLevel is set.

Top

Remarks

For more information about this interface, and about how it differs from ITextView, see "Text View Subsystem" in Inside the Editor.

See Also

Reference

Microsoft.VisualStudio.Text.Editor Namespace