In This Article

IndicatorTagBase Class

Provides the abstract base class for an ITag that can be used to mark an indicator over a text range.

public abstract class IndicatorTagBase : IIndicatorTag, ITag
Inheritance:
object object
Derived:
BookmarkIndicatorTag IndicatorClassificationTagBase
Implements:
IIndicatorTag ITag

Constructors

IndicatorTagBase()

Initializes an instance of the class.

protected IndicatorTagBase()

Properties

ContentProvider

The optional IContentProvider used to provide content for IntelliPrompt quick info popups or other UI.

public IContentProvider? ContentProvider { get; set; }

Property Value

IContentProvider

GlyphSize

The size of the indicator's glyph in an editor view margin.

public virtual Size GlyphSize { get; }

Property Value

Size

Remarks

The default return value is 16, 16.

Tag

The object that contains user-defined data about the object.

public object? Tag { get; set; }

Property Value

object:

The default is null.

Remarks

Any type derived from the object class can be assigned to this property.

Methods

DrawGlyph(TextViewDrawContext, ITextViewLine, TagSnapshotRange<IIndicatorTag>, Rectangle)

Draws the indicator's glyph in an editor view margin.

public abstract void DrawGlyph(TextViewDrawContext context, ITextViewLine viewLine, TagSnapshotRange<IIndicatorTag> tagRange, Rectangle bounds)
Parameter Type Description
context TextViewDrawContext

The TextViewDrawContext to use for rendering.

viewLine ITextViewLine

The ITextViewLine for which the glyph is rendered.

tagRange TagSnapshotRange<IIndicatorTag>

The ITag and the range it covers.

bounds Rectangle

The bounds in which the indicator will be rendered.

GetLocation(Rectangle)

Returns the location of the glyph, centered within the specified editor view margin bounds.

protected Point GetLocation(Rectangle bounds)
Parameter Type Description
bounds Rectangle

The view margin bounds in which to render.

Returns

Point

GetLocation(Rectangle, HorizontalAlignment, VerticalAlignment)

Returns the location of the glyph within the specified editor view margin bounds based on alignments.

protected Point GetLocation(Rectangle bounds, HorizontalAlignment horizontalAlignment, VerticalAlignment verticalAlignment)
Parameter Type Description
bounds Rectangle

The view margin bounds in which to render.

horizontalAlignment HorizontalAlignment

The horizontal alignment within the bounds.

verticalAlignment VerticalAlignment

The vertical alignment within the bounds.

Returns

Point

Inherited Members

Extension Methods