Condividi tramite


IAdornmentLayer Interface

Represents an adornment layer.

Namespace:  Microsoft.VisualStudio.Text.Editor
Assembly:  Microsoft.VisualStudio.Text.UI.Wpf (in Microsoft.VisualStudio.Text.UI.Wpf.dll)

Syntax

'Declaration
Public Interface IAdornmentLayer
public interface IAdornmentLayer
public interface class IAdornmentLayer
type IAdornmentLayer =  interface end
public interface IAdornmentLayer

The IAdornmentLayer type exposes the following members.

Properties

  Name Description
Public property Elements Gets a collection of the adornments and their associated data in the layer.
Public property IsEmpty Determines whether this layer is empty, that is, it does not contain any adornments.
Public property Opacity Gets or sets the opacity factor applied to the entire adornment layer when it is rendered in the user interface.
Public property TextView Gets the IWpfTextView to which this layer is attached.

Top

Methods

  Name Description
Public method AddAdornment(SnapshotSpan, Object, UIElement) Adds a UIElement that is TextRelative to the layer.
Public method AddAdornment(AdornmentPositioningBehavior, Nullable<SnapshotSpan>, Object, UIElement, AdornmentRemovedCallback) Adds a UIElement to the layer.
Public method RemoveAdornment Removes a specific UIElement.
Public method RemoveAdornmentsByTag Removes all UIElement objects associated with a particular tag.
Public method RemoveAdornmentsByVisualSpan Removes all adornments with visual spans that overlap the given visual span.
Public method RemoveAllAdornments Removes all UIElement objects in the layer.
Public method RemoveMatchingAdornments(Predicate<IAdornmentLayerElement>) Removes all matching adornments.
Public method RemoveMatchingAdornments(SnapshotSpan, Predicate<IAdornmentLayerElement>) Removes all matching adornments with visual spans \.

Top

Remarks

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

See Also

Reference

Microsoft.VisualStudio.Text.Editor Namespace