Partager via


Rule Class

Rule.When the object is serialized out as xml, its qualified name is o:r.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.Vml.Office.Rule

Namespace:  DocumentFormat.OpenXml.Vml.Office
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

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

Remarks

The following table lists the possible child types:

  • Proxy <o:proxy>

[ISO/IEC 29500-1 1st Edition]

14.2.2.22 r (Rule)

This element specifies a rule entry in a rules element rule set that describes how a certain shape or set of shapes behaves during editing.

[Example: The following rule defines a connection between two shapes. The shape with id _s1036 connects shape _s1033 to _s1032:

<o:shapelayout v:ext="edit">
  <o:rules v:ext="edit">
    <o:r id="V:Rule1" type="connector" idref="#_s1036">
      <o:proxy start="" idref="#_s1033" connectloc="0"/>
      <o:proxy end="" idref="#_s1032" connectloc="2"/>
    </o:r>
  </o:rules>
</o:shapelayout>

end example]

Parent Elements

rules (§14.2.2.27)

Child Elements

Subclause

proxy (Shape Reference)

§14.2.2.21

Attributes

Description

how (Alignment Rule Type)

Specifies the kind of alignment for an alignment rule. Default is no value. Allowed values are:

  • top

  • middle

  • bottom

  • left

  • center

  • right

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

id (Rule ID)

Specifies an identifier for the rule. Default is no value.

The possible values for this attribute are defined by the W3C XML Schema string datatype.

idref (Rule Shape Reference)

Specifies a reference to a shape in the current document that is the primary shape in the rule. [Example: For a connector rule, the connector. end example]

Default is no value. A shape name is used as the reference mechanism; this is not a relationship ID.

The possible values for this attribute are defined by the W3C XML Schema string datatype.

type (Rule Type)

Specifies the kind of the rule. Default is no value. Allowed values are:

  • arc

  • callout

  • connector

  • align

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

[Note: The W3C XML Schema definition of this element’s content model (CT_R) is located in §A.6.2. 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

Rule Members

DocumentFormat.OpenXml.Vml.Office Namespace