ILayerComment 介面
註解項目。 註解可包含在圖層模型或圖層中,也可以連結至任意數量的圖層。
命名空間: Microsoft.VisualStudio.ArchitectureTools.Extensibility.Layer
組件: Microsoft.VisualStudio.ArchitectureTools.Extensibility.Layer (在 Microsoft.VisualStudio.ArchitectureTools.Extensibility.Layer.dll 中)
語法
'宣告
Public Interface ILayerComment _
Inherits ILayerElement
public interface ILayerComment : ILayerElement
public interface class ILayerComment : ILayerElement
type ILayerComment =
interface
interface ILayerElement
end
public interface ILayerComment extends ILayerElement
ILayerComment 類型會公開下列成員。
屬性
名稱 | 描述 | |
---|---|---|
![]() |
Body | 取得/設定註解文字。 |
![]() |
Description | (繼承自 ILayerElement)。 |
![]() |
Id | (繼承自 ILayerElement)。 |
![]() |
IsDeleted | (繼承自 ILayerElement)。 |
![]() |
Links | 取得連結至此註解的元素。 |
![]() |
Name | (繼承自 ILayerElement)。 |
![]() |
Parent | 取得父容器,ILayer 或 ILayerModel。 |
![]() |
Properties | (繼承自 ILayerElement)。 |
回頁首
擴充方法
名稱 | 描述 | |
---|---|---|
![]() |
CreateCommentLink(ILayer) | 多載。 將此註解連結至圖層。 (以 Extensions 定義。) |
![]() |
CreateCommentLink(ILayerComment) | 多載。 將此圖層連結到註解。 (以 Extensions 定義。) |
![]() |
Delete | 刪除項目。 (以 Extensions 定義。) |
![]() |
GetShape | 取得代表此圖層元素的圖形。 (以 Extensions 定義。) |
回頁首
備註
若要取得附加至圖層項目的註解,請使用:
ILayerModel model = diagram.GetLayerModel();
IEnumerable<ILayerComment> comments = model.Comments
.Where(comment => comment.Links
.Any(link => link.Target == layerElement));
請注意,ILayerElement 的 Comments 屬性取得包含在ILayerElement 中的註解,而非與其連結的註解。
請參閱
參考
Microsoft.VisualStudio.ArchitectureTools.Extensibility.Layer 命名空間