共用方式為


IViewScroller.EnsureSpanVisible Method

Definition

Overloads

EnsureSpanVisible(SnapshotSpan)

Ensures that all the text in span is entirely visible in the view.

EnsureSpanVisible(SnapshotSpan, EnsureSpanVisibleOptions)

Ensures that all the text in span is entirely visible in the view.

EnsureSpanVisible(VirtualSnapshotSpan, EnsureSpanVisibleOptions)

Ensures that all the text in span is entirely visible in the view.

EnsureSpanVisible(SnapshotSpan)

Ensures that all the text in span is entirely visible in the view.

public:
 void EnsureSpanVisible(Microsoft::VisualStudio::Text::SnapshotSpan span);
void EnsureSpanVisible(Microsoft::VisualStudio::Text::SnapshotSpan span);
public void EnsureSpanVisible (Microsoft.VisualStudio.Text.SnapshotSpan span);
abstract member EnsureSpanVisible : Microsoft.VisualStudio.Text.SnapshotSpan -> unit
Public Sub EnsureSpanVisible (span As SnapshotSpan)

Parameters

span
SnapshotSpan

The span to make visible.

Remarks

This is equivalent to scroller.EnsureSpanVisible(span, EnsureSpanVisibleOptions.None);

Applies to

EnsureSpanVisible(SnapshotSpan, EnsureSpanVisibleOptions)

Ensures that all the text in span is entirely visible in the view.

public:
 void EnsureSpanVisible(Microsoft::VisualStudio::Text::SnapshotSpan span, Microsoft::VisualStudio::Text::Editor::EnsureSpanVisibleOptions options);
void EnsureSpanVisible(Microsoft::VisualStudio::Text::SnapshotSpan span, Microsoft::VisualStudio::Text::Editor::EnsureSpanVisibleOptions options);
public void EnsureSpanVisible (Microsoft.VisualStudio.Text.SnapshotSpan span, Microsoft.VisualStudio.Text.Editor.EnsureSpanVisibleOptions options);
abstract member EnsureSpanVisible : Microsoft.VisualStudio.Text.SnapshotSpan * Microsoft.VisualStudio.Text.Editor.EnsureSpanVisibleOptions -> unit
Public Sub EnsureSpanVisible (span As SnapshotSpan, options As EnsureSpanVisibleOptions)

Parameters

span
SnapshotSpan

The span to make visible.

Remarks

The view will not be scrolled if the text in span is completely visible. If the text in span is partially visible, then the view will be scrolled as little as possible to make the text completely visible. If none of the text in span was visible, then it will be centered in the view.

Applies to

EnsureSpanVisible(VirtualSnapshotSpan, EnsureSpanVisibleOptions)

Ensures that all the text in span is entirely visible in the view.

public:
 void EnsureSpanVisible(Microsoft::VisualStudio::Text::VirtualSnapshotSpan span, Microsoft::VisualStudio::Text::Editor::EnsureSpanVisibleOptions options);
void EnsureSpanVisible(Microsoft::VisualStudio::Text::VirtualSnapshotSpan span, Microsoft::VisualStudio::Text::Editor::EnsureSpanVisibleOptions options);
public void EnsureSpanVisible (Microsoft.VisualStudio.Text.VirtualSnapshotSpan span, Microsoft.VisualStudio.Text.Editor.EnsureSpanVisibleOptions options);
abstract member EnsureSpanVisible : Microsoft.VisualStudio.Text.VirtualSnapshotSpan * Microsoft.VisualStudio.Text.Editor.EnsureSpanVisibleOptions -> unit
Public Sub EnsureSpanVisible (span As VirtualSnapshotSpan, options As EnsureSpanVisibleOptions)

Parameters

span
VirtualSnapshotSpan

The span to make visible.

Remarks

The view will not be scrolled if the text in span is completely visible. If the text in span is partially visible, then the view will be scrolled as little as possible to make the text completely visible. If none of the text in span was visible, then it will be centered in the view.

Applies to