共用方式為


ITextViewModel Interface

Definition

Represents a set of zero or more ITextBuffer objects that are unique to the presentation of text in a particular ITextView.

public interface class ITextViewModel : IDisposable, Microsoft::VisualStudio::Utilities::IPropertyOwner
public interface ITextViewModel : IDisposable, Microsoft.VisualStudio.Utilities.IPropertyOwner
type ITextViewModel = interface
    interface IPropertyOwner
    interface IDisposable
Public Interface ITextViewModel
Implements IDisposable, IPropertyOwner
Derived
Implements

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.

Properties

DataBuffer

Represents the ITextBuffer for the data level. The data level text buffer is the highest buffer in the graph that is shared across multiple views and is therefore the base of the view model.

DataModel

The ITextDataModel that supplies the DataBuffer and the governing IContentType for the view.

EditBuffer

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.

Properties

The collection of properties controlled by the property owner.

(Inherited from IPropertyOwner)
VisualBuffer

The ITextBuffer whose contents should be presented in the editor.

Methods

GetNearestPointInVisualBuffer(SnapshotPoint)

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.

GetNearestPointInVisualSnapshot(SnapshotPoint, ITextSnapshot, PointTrackingMode)

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.

IsPointInVisualBuffer(SnapshotPoint, PositionAffinity)

Determines whether a point in the edit buffer is represented in the visual buffer.

Applies to