다음을 통해 공유


IAdornmentLayer Interface

Definition

Represents an adornment layer.

public interface class IAdornmentLayer
public interface class IAdornmentLayer
__interface IAdornmentLayer
public interface IAdornmentLayer
type IAdornmentLayer = interface
Public Interface IAdornmentLayer

Remarks

For an explanation of adornments, see the "Extending Adornments" section of Language Service and Editor Extension Points and the "Adornments" section of Inside the Editor.

Properties

Elements

Gets a collection of the adornments and their associated data in the layer.

IsEmpty

Determines whether this layer is empty, that is, it does not contain any adornments.

Opacity

Gets or sets the opacity factor applied to the entire adornment layer when it is rendered in the user interface.

TextView

Gets the IWpfTextView to which this layer is attached.

Methods

AddAdornment(AdornmentPositioningBehavior, Nullable<SnapshotSpan>, Object, UIElement, AdornmentRemovedCallback)

Adds a UIElement to the layer.

AddAdornment(SnapshotSpan, Object, UIElement)

Adds a AdornmentPositioningBehavior.TextRelative UIElement to the layer.

RemoveAdornment(UIElement)

Removes a specific UIElement.

RemoveAdornmentsByTag(Object)

Removes all UIElement objects associated with a particular tag.

RemoveAdornmentsByVisualSpan(SnapshotSpan)

Removes all adornments with visual spans that overlap the given visual span. Any adornments without specified visual spans are ignored.

RemoveAllAdornments()

Removes all UIElement objects in the layer.

RemoveMatchingAdornments(Predicate<IAdornmentLayerElement>)

Removes all adornments for which the given predicate returns true.

RemoveMatchingAdornments(SnapshotSpan, Predicate<IAdornmentLayerElement>)

Removes all adornments with visual spans for which the given predicate returns true. Any adornments without specified visual spans and tag are ignored.

Applies to