Share via


ITextViewModel Interface

Represents a set of ITextBuffer objects that take part in the presentation of text in a particular ITextView.

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

Syntax

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

The ITextViewModel type exposes the following members.

Properties

  Name Description
Public property DataBuffer Represents the ITextBuffer for the data level.
Public property DataModel Gets the ITextDataModel that supplies the DataBuffer and the governing IContentType for the view.
Public property EditBuffer Gets the ITextBuffer in which editing positions are tracked and to which edits are applied. All the text that appears in the view must reside in this buffer.
Public property Properties Gets the collection of properties controlled by the property owner. (Inherited from IPropertyOwner.)
Public property VisualBuffer Gets the ITextBuffer whose contents should be presented in the editor.

Top

Methods

  Name Description
Public method Dispose Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. (Inherited from IDisposable.)
Public method GetNearestPointInVisualBuffer Gets a point in the VisualBuffer that corresponds to the specified point in the edit buffer. If the point is hidden or has an alternative representation, gets the nearest point to it.
Public method GetNearestPointInVisualSnapshot Gets a point in the VisualBuffer that corresponds to the specified point in the edit buffer. If the point is hidden or has an alternative representation, gets the nearest point to it.
Public method IsPointInVisualBuffer Determines whether a point in the edit buffer is represented in the visual buffer.

Top

Remarks

You can get the text view model for the text view with the TextViewModel property. For more information about the text view model, see Inside the Editor.

See Also

Reference

Microsoft.VisualStudio.Text.Editor Namespace