In This Article

AdornmentManagerBase<TView> Class

Provides an abstract base class for an adornment manager.

public abstract class AdornmentManagerBase<TView> : IAdornmentManager where TView : ITextView
Type Parameters:
TView -

The type of ITextView to support. Use ITextView to support all text view types.

Inheritance:
object object
Derived:
DecorationAdornmentManagerBase<TView, TTag> IntraLineAdornmentManagerBase<TView, TTag> IntraTextAdornmentManagerBase<TView, TTag>
Implements:
IAdornmentManager

Constructors

AdornmentManagerBase(TView, AdornmentLayerDefinition)

Initializes a new instance of the AdornmentManagerBase class.

protected AdornmentManagerBase(TView view, AdornmentLayerDefinition layerDefinition)
Parameter Type Description
view TView

The view to which this manager is attached.

layerDefinition AdornmentLayerDefinition

The AdornmentLayerDefinition indicating which adornment layer to use.

AdornmentManagerBase(TView, AdornmentLayerDefinition, bool)

Initializes a new instance of the AdornmentManagerBase class.

protected AdornmentManagerBase(TView view, AdornmentLayerDefinition layerDefinition, bool isForLanguage)
Parameter Type Description
view TView

The view to which this manager is attached.

layerDefinition AdornmentLayerDefinition

The AdornmentLayerDefinition indicating which adornment layer to use.

isForLanguage bool

Indicates whether this adornment manager is for a language.
If true, the adornment manager is closed when the language or document within a SyntaxEditor changes.

Properties

AdornmentLayer

Gets the IAdornmentLayer being managed by this manager.

public IAdornmentLayer AdornmentLayer { get; }

Property Value

IAdornmentLayer:

The IAdornmentLayer being managed by this manager.

IsActive

Gets or sets whether the manager's adornments are currently active, generally based on some option or event.

public bool IsActive { get; set; }

Property Value

bool:

true if the manager's adornments are currently active; otherwise, false.

View

Gets the view to which this manager is attached.

public TView View { get; }

Property Value

TView:

The view to which this manager is attached.

Methods

Close()

Closes the manager and detaches it from the view.

public void Close()

OnClosed()

Occurs when the manager is closed and detached from the view.

protected virtual void OnClosed()

Remarks

The default implementation of this method does nothing. Overrides should release any event handlers set up in the manager's constructor.

OnIsActiveChanged()

Occurs when the IsActive property changes.

protected virtual void OnIsActiveChanged()

Remarks

The default implementation of this method does nothing. Overrides should attach to or detach from other events that are needed while active.

Inherited Members