ConnectionSite Class

Shape Connection Site.When the object is serialized out as xml, its qualified name is a:cxn.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.Drawing.ConnectionSite

Namespace:  DocumentFormat.OpenXml.Drawing
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Declaration
<ChildElementInfoAttribute(GetType(Position))> _
Public Class ConnectionSite _
    Inherits OpenXmlCompositeElement
'Usage
Dim instance As ConnectionSite
[ChildElementInfoAttribute(typeof(Position))]
public class ConnectionSite : OpenXmlCompositeElement

Remarks

The following table lists the possible child types:

  • Position <a:pos>

[ISO/IEC 29500-1 1st Edition]

20.1.9.9 cxn (Shape Connection Site)

This element specifies the existence of a connection site on a custom shape. A connection site allows a cxnSp to be attached to this shape. This connection is maintained when the shape is repositioned within the document. It should be noted that this connection is placed within the shape bounding box using the transform coordinate system which is also called the shape coordinate system, as it encompasses the entire shape. The width and height for this coordinate system are specified within the ext transform element.

[Note: The transform coordinate system is different from a path coordinate system as it is per shape instead of per path within the shape. end note]

[Example: Consider the following custom geometry that has two connection sites specified. One connection is located at the bottom left of the shape and the other at the bottom right. The following DrawingML would describe such a custom geometry.

DocumentFormat.OpenXml.Drawing.ConnectionSite-imag

<a:xfrm>
<a:off x="3200400" y="1600200"/>
<a:ext cx="1705233" cy="679622"/>
</a:xfrm>
<a:custGeom>
<a:avLst/>
<a:gdLst/>
<a:ahLst/>
<a:cxnLst>
<a:cxn ang="0">
<a:pos x="0" y="679622"/>
</a:cxn>
    <a:cxn ang="0">
<a:pos x="1705233" y="679622"/>
</a:cxn>
</a:cxnLst>
  <a:rect l="0" t="0" r="0" b="0"/>
<a:pathLst>
<a:path w="2" h="2">
<a:moveTo>
<a:pt x="0" y="2"/>
</a:moveTo>
      <a:lnTo>
<a:pt x="2" y="2"/>
</a:lnTo>
      <a:lnTo>
<a:pt x="1" y="0"/>
</a:lnTo>
      <a:close/>
</a:path>
</a:pathLst>
</a:custGeom>

end example]

Parent Elements

cxnLst (§20.1.9.10)

Child Elements

Subclause

pos (Shape Position Coordinate)

§20.1.9.17

Attributes

Description

ang (Connection Site Angle)

Specifies the incoming connector angle. This angle is the angle around the connection site that an incoming connector tries to be routed to. This allows connectors to know where the shape is in relation to the connection site and route connectors so as to avoid any overlap with the shape.

[Example: Consider a simple square. In order to not have any connectors routed over the shape, the collowing angles would be specified for their respective connection sites.

DocumentFormat.OpenXml.Drawing.ConnectionSite-imag

end example]

The possible values for this attribute are defined by the ST_AdjAngle simple type (§20.1.10.1).

[Note: The W3C XML Schema definition of this element’s content model (CT_ConnectionSite) is located in §A.4.1. end note]

© ISO/IEC29500: 2008.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

ConnectionSite Members

DocumentFormat.OpenXml.Drawing Namespace