In This Article

IAdornment Interface

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

public interface IAdornment

Properties

DrawCallback

Gets the callback method that is invoked to draw the adornment.

DrawAdornmentCallback DrawCallback { get; }

Property Value

DrawAdornmentCallback:

The callback method that is invoked to draw the adornment.

Location

Gets or sets a System.Windows.Point indicating the current location of the adornment.

Point Location { get; set; }

Property Value

Point:

A System.Windows.Point indicating the current location of the adornment.

RemovedCallback

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

Action<IAdornment> RemovedCallback { get; }

Property Value

Action<IAdornment>:

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

Size

Gets a Size indicating the current size of the adornment.

Size Size { get; }

Property Value

Size:

A Size indicating the current size of the adornment.

SnapshotRange

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

TextSnapshotRange? SnapshotRange { get; }

Property Value

TextSnapshotRange?:

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

Tag

Gets or sets the object that contains user-defined data about the object.

object Tag { get; }

Property Value

object:

An object that contains user-defined data about the object. The default is null.

Remarks

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

TrackingModes

Gets a nullable TextRangeTrackingModes indicating the tracking modes to use.

TextRangeTrackingModes? TrackingModes { get; }

Property Value

TextRangeTrackingModes?:

A nullable TextRangeTrackingModes indicating the tracking modes to use.

ViewLine

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

ITextViewLine ViewLine { get; }

Property Value

ITextViewLine:

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

VisualElement

Gets the UIElement that is used to visually render the adornment.

UIElement VisualElement { get; }

Property Value

UIElement:

The UIElement that is used to visually render the adornment.

Methods

Translate(double, double)

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

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

The x-amount by which to move the adornment.

deltaY double

The y-amount by which to move the adornment.