SimpleTagger<T>::CreateTagSpan Method (ITrackingSpan^, T)

 

Adds a tag over the given span.

Namespace:   Microsoft.VisualStudio.Text.Tagging
Assembly:  Microsoft.VisualStudio.Text.Logic (in Microsoft.VisualStudio.Text.Logic.dll)

public:
TrackingTagSpan<T>^ CreateTagSpan(
	ITrackingSpan^ span,
	T tag
)

Parameters

span
Type: Microsoft.VisualStudio.Text::ITrackingSpan^

The ITrackingSpan that tracks the tag across text versions.

tag
Type: T

The tag to associate with the given span.

Return Value

Type: Microsoft.VisualStudio.Text.Tagging::TrackingTagSpan<T>^

The TrackingTagSpan<T> that was added, which can be used to remove the tag later on.

Exception Condition
ArgumentNullException

span or tag is null.

This method is safe to use from any thread.

Return to top
Show: