ITextSnapshot.CreateTrackingSpan Method

Definition

Overloads

CreateTrackingSpan(Span, SpanTrackingMode)

Creates a ITrackingSpan against this snapshot.

C++/CX
public:
 Microsoft::VisualStudio::Text::ITrackingSpan ^ CreateTrackingSpan(Microsoft::VisualStudio::Text::Span span, Microsoft::VisualStudio::Text::SpanTrackingMode trackingMode);

Parameters

span
Span

The span of text in this snapshot.

trackingMode
SpanTrackingMode

How the tracking span will react to changes at its boundaries.

Returns

A non-null ITrackingSpan.

Exceptions

The end of the span is greater than the length of the text snapshot.

Applies to

Visual Studio SDK 2022 a ďalšie verzie
Produkt Verzie
Visual Studio SDK 2015, 2017, 2019, 2022

CreateTrackingSpan(Span, SpanTrackingMode, TrackingFidelityMode)

Creates a ITrackingSpan against this snapshot.

C++/CX
public:
 Microsoft::VisualStudio::Text::ITrackingSpan ^ CreateTrackingSpan(Microsoft::VisualStudio::Text::Span span, Microsoft::VisualStudio::Text::SpanTrackingMode trackingMode, Microsoft::VisualStudio::Text::TrackingFidelityMode trackingFidelity);

Parameters

span
Span

The span of text in this snapshot.

trackingMode
SpanTrackingMode

How the tracking span should react to changes at its boundaries.

trackingFidelity
TrackingFidelityMode

The tracking fidelity of the span.

Returns

A non-null ITrackingSpan.

Exceptions

The end of the span is greater than the length of the text snapshot.

Applies to

Visual Studio SDK 2022 a ďalšie verzie
Produkt Verzie
Visual Studio SDK 2015, 2017, 2019, 2022

CreateTrackingSpan(Int32, Int32, SpanTrackingMode)

Creates a ITrackingSpan against this snapshot.

C++/CX
public:
 Microsoft::VisualStudio::Text::ITrackingSpan ^ CreateTrackingSpan(int start, int length, Microsoft::VisualStudio::Text::SpanTrackingMode trackingMode);

Parameters

start
Int32

The starting position of the tracking span.

length
Int32

The length of the tracking span.

trackingMode
SpanTrackingMode

How the tracking span should react to changes at its boundaries.

Returns

A non-null ITrackingSpan.

Exceptions

start is negative or greater than Length, or length is negative, or start plus length is less than start.

Applies to

Visual Studio SDK 2022 a ďalšie verzie
Produkt Verzie
Visual Studio SDK 2015, 2017, 2019, 2022

CreateTrackingSpan(Int32, Int32, SpanTrackingMode, TrackingFidelityMode)

Creates a ITrackingSpan against this snapshot.

C++/CX
public:
 Microsoft::VisualStudio::Text::ITrackingSpan ^ CreateTrackingSpan(int start, int length, Microsoft::VisualStudio::Text::SpanTrackingMode trackingMode, Microsoft::VisualStudio::Text::TrackingFidelityMode trackingFidelity);

Parameters

start
Int32

The starting position of the tracking span.

length
Int32

The length of the tracking span.

trackingMode
SpanTrackingMode

How the tracking span should react to changes at its boundaries.

trackingFidelity
TrackingFidelityMode

The tracking fidelilty mode.

Returns

A non-null ITrackingSpan..

Exceptions

start is negative or greater than Length, or length is negative, or start plus length is less than start.

Applies to

Visual Studio SDK 2022 a ďalšie verzie
Produkt Verzie
Visual Studio SDK 2015, 2017, 2019, 2022