In This Article

IAdornment Interface

Provides the base requirements for an adornment that is within an IAdornmentLayer.

public interface IAdornment

Properties

DrawCallback

The callback method that is invoked to draw the adornment.

DrawAdornmentCallback? DrawCallback { get; }

Property Value

DrawAdornmentCallback

Location

A Point indicating the current location of the adornment.

Point Location { get; set; }

Property Value

Point

RemovedCallback

The callback method that is invoked when the adornment is removed from its parent IAdornmentLayer.

Action<IAdornment>? RemovedCallback { get; }

Property Value

Action<IAdornment>

Size

A Size indicating the current size of the adornment.

Size Size { get; }

Property Value

Size

SnapshotRange

The nullable TextSnapshotRange that optionally indicates the range of the adornment.

TextSnapshotRange? SnapshotRange { get; }

Property Value

TextSnapshotRange?

Tag

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

object? Tag { get; }

Property Value

object:

The default is null.

TrackingModes

A nullable TextRangeTrackingModes indicating the tracking modes to use.

TextRangeTrackingModes? TrackingModes { get; }

Property Value

TextRangeTrackingModes?

ViewLine

The ITextViewLine with which the adornment is associated, if any.

ITextViewLine? ViewLine { get; }

Property Value

ITextViewLine

VisualElement

The IUIElement that is used to visually render the adornment.

IUIElement? VisualElement { get; }

Property Value

IUIElement

Methods

Translate(int, int)

Translates the adornment by the specified x- and y-coordinate values.

void Translate(int deltaX, int deltaY)
Parameter Type Description
deltaX int

The x-amount by which to move the adornment.

deltaY int

The y-amount by which to move the adornment.

Extension Methods