共用方式為


ITextViewLine.GetNormalizedTextBounds(SnapshotSpan) Method

Definition

Gets a collection of TextBounds structures for the text that corresponds to the given span.

public:
 System::Collections::ObjectModel::Collection<Microsoft::VisualStudio::Text::Formatting::TextBounds> ^ GetNormalizedTextBounds(Microsoft::VisualStudio::Text::SnapshotSpan bufferSpan);
public System.Collections.ObjectModel.Collection<Microsoft.VisualStudio.Text.Formatting.TextBounds> GetNormalizedTextBounds (Microsoft.VisualStudio.Text.SnapshotSpan bufferSpan);
abstract member GetNormalizedTextBounds : Microsoft.VisualStudio.Text.SnapshotSpan -> System.Collections.ObjectModel.Collection<Microsoft.VisualStudio.Text.Formatting.TextBounds>
Public Function GetNormalizedTextBounds (bufferSpan As SnapshotSpan) As Collection(Of TextBounds)

Parameters

bufferSpan
SnapshotSpan

The SnapshotSpan representing the text for which to compute the text bounds.

Returns

A collection of TextBounds structures that contain the text specified in bufferSpan.

Exceptions

bufferSpan is not a legal span in the underlying text buffer.

Remarks

If the line contains bidirectional text, the TextBounds structures that are returned may be disjoint.

The height and top of the bounds will correspond to the top and bottom of this ITextViewLine.

Applies to