Condividi tramite


SimpleTagger<T>.CreateTagSpan Method

Adds a tag over the given span.

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

Syntax

'Dichiarazione
Public Function CreateTagSpan ( _
    span As ITrackingSpan, _
    tag As T _
) As TrackingTagSpan(Of T)
public TrackingTagSpan<T> CreateTagSpan(
    ITrackingSpan span,
    T tag
)
public:
TrackingTagSpan<T>^ CreateTagSpan(
    ITrackingSpan^ span, 
    T tag
)
member CreateTagSpan : 
        span:ITrackingSpan * 
        tag:'T -> TrackingTagSpan<'T> 
public function CreateTagSpan(
    span : ITrackingSpan, 
    tag : T
) : TrackingTagSpan<T>

Parameters

  • 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.

Exceptions

Exception Condition
ArgumentNullException

span or tag is nulla null reference (Nothing in Visual Basic).

Remarks

This method is safe to use from any thread.

.NET Framework Security

See Also

Reference

SimpleTagger<T> Class

Microsoft.VisualStudio.Text.Tagging Namespace