显示任何打开的关系图或指定的打开关系图上的模型元素的所有形状。
命名空间:  Microsoft.VisualStudio.ArchitectureTools.Extensibility.Presentation
程序集:  Microsoft.VisualStudio.ArchitectureTools.Extensibility(在 Microsoft.VisualStudio.ArchitectureTools.Extensibility.dll 中)
语法
声明
<ExtensionAttribute> _
Public Shared Function Shapes ( _
    element As IElement, _
    diagram As IDiagram _
) As IEnumerable(Of IShape)
public static IEnumerable<IShape> Shapes(
    this IElement element,
    IDiagram diagram
)
[ExtensionAttribute]
public:
static IEnumerable<IShape^>^ Shapes(
    IElement^ element, 
    IDiagram^ diagram
)
static member Shapes : 
        element:IElement * 
        diagram:IDiagram -> IEnumerable<IShape> 
public static function Shapes(
    element : IElement, 
    diagram : IDiagram
) : IEnumerable<IShape>
参数
- element
 类型:Microsoft.VisualStudio.Uml.Classes.IElement
- diagram
 类型:Microsoft.VisualStudio.ArchitectureTools.Extensibility.Presentation.IDiagram
 忽略查找所有关系图中的形状。
返回值
类型:System.Collections.Generic.IEnumerable<IShape>
使用说明
在 Visual Basic 和 C# 中,可以在 IElement 类型的任何对象上将此方法作为实例方法来调用。当使用实例方法语法调用此方法时,请省略第一个参数。有关更多信息,请参见扩展方法 (Visual Basic)或扩展方法(C# 编程指南)。
备注
有关更多信息,请参见:
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。
请参见
参考
Microsoft.VisualStudio.ArchitectureTools.Extensibility.Presentation 命名空间