Rule Class
Rule.When the object is serialized out as xml, its qualified name is dgm:rule.
Inheritance Hierarchy
System.Object
DocumentFormat.OpenXml.OpenXmlElement
DocumentFormat.OpenXml.OpenXmlCompositeElement
DocumentFormat.OpenXml.Drawing.Diagrams.Rule
Namespace: DocumentFormat.OpenXml.Drawing.Diagrams
Assembly: DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)
Syntax
'Декларация
<ChildElementInfoAttribute(GetType(ExtensionList))> _
Public Class Rule _
Inherits OpenXmlCompositeElement
'Применение
Dim instance As Rule
[ChildElementInfoAttribute(typeof(ExtensionList))]
public class Rule : OpenXmlCompositeElement
Remarks
The following table lists the possible child types:
- ExtensionList <dgm:extLst>
[ISO/IEC 29500-1 редакция 1]
21.4.2.24 rule (Rule)
This element allows for a rule to be specified which changes the value of an existing constraint.
[Example: Consider the following example of a rule in a DrawingML diagram:
<ruleLst>
<rule type="primFontSz" val="2" />
</ruleLst>
In this example a rule is being defined that shrinks the primary font size down to a lower limit of 2pt font when the text no longer fits correctly in the layout node. end example]
Parent Elements |
---|
ruleLst (§21.4.2.25) |
Child Elements |
Subclause |
---|---|
extLst (Extension List) |
§21.4.2.13 |
Attributes |
Description |
---|---|
fact (Factor) |
Factor used in a reference constraint or a rule in order to modify a referenced value by the factor defined. [Example: Consider the following example of fact in use in a DrawingML diagram:
In this example, the width for transition1 is being defined as one-tenth the width of node1. end example] The possible values for this attribute are defined by the W3C XML Schema double datatype. |
for (For) |
Specifies the axis of layout nodes to apply a constraint or rule to. [Example: Consider the following example of for in use in a DrawingML diagram:
In this example, the for attribute is specifying that node1 is a child node to the current layout node. end example] The possible values for this attribute are defined by the ST_ConstraintRelationship simple type (§21.4.7.20). |
forName (For Name) |
Specifies the name of the layout node to apply a constraint or rule to. [Example: Consider the following example of forName in use in a DrawingML diagram:
In this example, forName is specifying the layout node named transition1 for its reference. end example] The possible values for this attribute are defined by the W3C XML Schema string datatype. |
max (Max Value) |
Sets the maximum value for a constraint so rules can no longer increase the constraint beyond that value. The possible values for this attribute are defined by the W3C XML Schema double datatype. |
ptType (Data Point Type) |
Specifies the type of data point to select. The possible values for this attribute are defined by the ST_ElementType simple type (§21.4.7.27). |
type (Constraint Type) |
Specifies the constraint to apply to this layout node. [Example: Consider the following example of type in use in a DrawingML diagram:
In this example, type is specifying the width attribute of transition1. end example] The possible values for this attribute are defined by the ST_ConstraintType simple type (§21.4.7.21). |
val (Value) |
Specifies an absolute value instead of reference another constraint. [Example: Consider the following example of forName in use in a DrawingML diagram:
In this example, val is specifying the absolute value of the width of transition1. end example] The possible values for this attribute are defined by the W3C XML Schema double datatype. |
[Note: The W3C XML Schema definition of this element's content model (CT_NumericRule) is located in §A.5.3. end note]
© ISO/IEC29500: 2008. Приведенный выше текст переведен с английского языка на русский корпорацией Майкрософт (или ее подрядчиками) и ISO не несет ответственности за эти переводы.
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.