ConnectorDecorator 类

类封装了使用的 ShapeFields 和子形状,以将其放置在连接器上时表示 Notation Decorators

继承层次结构

System.Object
  Microsoft.VisualStudio.Modeling.Diagrams.Decorator
    Microsoft.VisualStudio.Modeling.Diagrams.ConnectorDecorator

命名空间:  Microsoft.VisualStudio.Modeling.Diagrams
程序集:  Microsoft.VisualStudio.Modeling.Sdk.Diagrams.12.0(在 Microsoft.VisualStudio.Modeling.Sdk.Diagrams.12.0.dll 中)

语法

声明
Public Class ConnectorDecorator _
    Inherits Decorator
public class ConnectorDecorator : Decorator

ConnectorDecorator 类型公开以下成员。

构造函数

  名称 说明
公共方法 ConnectorDecorator(ShapeField, ConnectorDecoratorPosition) 生成 ConnectorDecorator。
公共方法 ConnectorDecorator(ShapeField, ConnectorDecoratorPosition, PointD) 生成 ConnectorDecorator。
公共方法 ConnectorDecorator(ShapeField, ConnectorDecoratorPosition, Boolean) 生成 ConnectorDecorator。
公共方法 ConnectorDecorator(ShapeField, ConnectorDecoratorPosition, PointD, Boolean) 生成 ConnectorDecorator。

页首

属性

  名称 说明
公共属性 CanMove 此修饰器是否可移动。只有在其实例化为可移动的,且需要宿主时,才可以移动修饰器。 (继承自 Decorator。)
受保护的属性 DecoratorAnchorMargins 获取字段周围的边距。修饰器可将其本身附加到此区域内的字段。 (继承自 Decorator。)
公共属性 Field 获取修饰符被分配到的字段。 (继承自 Decorator。)
公共属性 Offset 获取或设置用于修改修饰器的默认位置的偏移量。 (继承自 Decorator。)
公共属性 Position 获取与父形状相关的修饰器的位置。
公共属性 RequiresHost 所有连接器修饰器都需要一个宿主。 (重写 Decorator.RequiresHost。)

页首

方法

  名称 说明
公共方法 AssociateValueWith(Store, AssociatedPropertyInfo) 修饰器与与分配给形状的存储区属性关联。 (继承自 Decorator。)
公共方法 AssociateValueWith(Store, Guid) 修饰器与与分配给形状的存储区属性关联。 (继承自 Decorator。)
公共方法 AssociateValueWith(Store, Guid, AssociatedPropertyInfo) 修饰器与与分配给形状的存储区属性关联。 (继承自 Decorator。)
公共方法 AssociateVisibilityWith(Store, AssociatedPropertyInfo) 将修饰器的可见性与分配到形状的存储属性关联。 (继承自 Decorator。)
公共方法 AssociateVisibilityWith(Store, Guid) 将修饰器的可见性与分配到形状的存储属性关联。 (继承自 Decorator。)
公共方法 AssociateVisibilityWith(Store, Guid, AssociatedPropertyInfo) 将修饰器的可见性与分配到形状的存储属性关联。 (继承自 Decorator。)
公共方法 ConfigureHostShape 配置用于此修饰器的主机形状。如果给定的父类没有为该修饰器准备一个主机形状,则将生成一个新的主机形状。如果主机形状已存在,则位修饰器的设置将重新应用到现有主机形状;将不会删生成新主机形状。 (重写 Decorator.ConfigureHostShape(ShapeElement)。)
公共方法 Equals 确定指定的对象是否等于当前对象。 (继承自 Object。)
受保护的方法 Finalize 允许对象在“垃圾回收”回收之前尝试释放资源并执行其他清理操作。 (继承自 Object。)
公共方法 GetHashCode 作为默认哈希函数。 (继承自 Object。)
公共方法 GetHostShape 获取宿主形状。 (继承自 Decorator。)
公共方法 GetType 获取当前实例的 Type。 (继承自 Object。)
公共方法 GetValue 获取修饰器和形状之间的关联。 (继承自 Decorator。)
公共方法 GetVisible 获取分配给形状的修饰器可见性。 (继承自 Decorator。)
受保护的方法 MemberwiseClone 创建当前 Object 的浅表副本。 (继承自 Object。)
受保护的方法 OnAfterOffsetChanged 启动派生类在偏移量改变后修改装饰器。 (继承自 Decorator。)
公共方法 RepositionHostShape 重新定位给定主机形状,基于连接器的位置。 (重写 Decorator.RepositionHostShape(DecoratorHostShape)。)
公共方法 SetValue 设置修饰和形状的关联。 (继承自 Decorator。)
公共方法 SetVisible 设置分配给形状的修饰器可见性。 (继承自 Decorator。)
公共方法 ToString 返回表示当前对象的字符串。 (继承自 Object。)
公共方法 UpdateDecoratorHostShapes(ModelElement) 更新主机形状的边界。 (继承自 Decorator。)
公共方法 UpdateDecoratorHostShapes(ModelElement, Guid) 更新主机形状的边界。 (继承自 Decorator。)
公共方法 UpdateHostShapeVisibility 更新主形状的可见性。 (继承自 Decorator。)

页首

备注

连接线的所有装饰器需要托管形状

线程安全

此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。但不保证所有实例成员都是线程安全的。

请参阅

参考

Microsoft.VisualStudio.Modeling.Diagrams 命名空间