IAdornmentLayer 接口

表示一个修饰层。

命名空间:  Microsoft.VisualStudio.Text.Editor
程序集:  Microsoft.VisualStudio.Text.UI.Wpf(在 Microsoft.VisualStudio.Text.UI.Wpf.dll 中)

语法

声明
Public Interface IAdornmentLayer
public interface IAdornmentLayer
public interface class IAdornmentLayer
type IAdornmentLayer =  interface end
public interface IAdornmentLayer

IAdornmentLayer 类型公开以下成员。

属性

  名称 说明
公共属性 Elements 获取该层中的修饰及其关联数据的集合。
公共属性 IsEmpty 确定此层是否为空,即是否未包含任何修饰。
公共属性 Opacity 获取或设置当用户界面中呈现修饰层时为其整体应用的不透明度因子。
公共属性 TextView 获取此层要附加到的 IWpfTextView

页首

方法

  名称 说明
公共方法 AddAdornment(SnapshotSpan, Object, UIElement) 添加是 TextRelative 到层的 UIElement
公共方法 AddAdornment(AdornmentPositioningBehavior, Nullable<SnapshotSpan>, Object, UIElement, AdornmentRemovedCallback) 向该层中添加 UIElement
公共方法 RemoveAdornment 移除特定的 UIElement
公共方法 RemoveAdornmentsByTag 移除与特定标记相关联的所有 UIElement 对象。
公共方法 RemoveAdornmentsByVisualSpan 移除其可视跨距与给定可视跨距重叠的所有修饰。
公共方法 RemoveAllAdornments 移除该层中的所有 UIElement 对象。
公共方法 RemoveMatchingAdornments(Predicate<IAdornmentLayerElement>) 移除所有匹配的修饰。
公共方法 RemoveMatchingAdornments(SnapshotSpan, Predicate<IAdornmentLayerElement>) 移除所有匹配的修饰与可视跨距 \。

页首

备注

有关修饰的说明,请参见 编辑扩展点 “扩展的修饰”部分和 在编辑器内“修饰”一节。

请参阅

参考

Microsoft.VisualStudio.Text.Editor 命名空间