DiagramChooseIf Class
If.When the object is serialized out as xml, its qualified name is dgm:if.
Inheritance Hierarchy
System.Object
DocumentFormat.OpenXml.OpenXmlElement
DocumentFormat.OpenXml.OpenXmlCompositeElement
DocumentFormat.OpenXml.Drawing.Diagrams.DiagramChooseIf
Namespace: DocumentFormat.OpenXml.Drawing.Diagrams
Assembly: DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)
Syntax
声明
<ChildElementInfoAttribute(GetType(Constraints))> _
<ChildElementInfoAttribute(GetType(LayoutNode))> _
<ChildElementInfoAttribute(GetType(Choose))> _
<ChildElementInfoAttribute(GetType(ExtensionList))> _
<ChildElementInfoAttribute(GetType(Shape))> _
<ChildElementInfoAttribute(GetType(PresentationOf))> _
<ChildElementInfoAttribute(GetType(Algorithm))> _
<ChildElementInfoAttribute(GetType(RuleList))> _
<ChildElementInfoAttribute(GetType(ForEach))> _
Public Class DiagramChooseIf _
Inherits OpenXmlCompositeElement
用法
Dim instance As DiagramChooseIf
[ChildElementInfoAttribute(typeof(Constraints))]
[ChildElementInfoAttribute(typeof(LayoutNode))]
[ChildElementInfoAttribute(typeof(Choose))]
[ChildElementInfoAttribute(typeof(ExtensionList))]
[ChildElementInfoAttribute(typeof(Shape))]
[ChildElementInfoAttribute(typeof(PresentationOf))]
[ChildElementInfoAttribute(typeof(Algorithm))]
[ChildElementInfoAttribute(typeof(RuleList))]
[ChildElementInfoAttribute(typeof(ForEach))]
public class DiagramChooseIf : OpenXmlCompositeElement
Remarks
The following table lists the possible child types:
Algorithm <dgm:alg>
Shape <dgm:shape>
PresentationOf <dgm:presOf>
Constraints <dgm:constrLst>
RuleList <dgm:ruleLst>
ForEach <dgm:forEach>
LayoutNode <dgm:layoutNode>
Choose <dgm:choose>
ExtensionList <dgm:extLst>
[ISO/IEC 29500-1 第 1 个版本]
21.4.2.15 if (If)
Like an if statement in a programming language, wraps elements which are to be used under the conditions defined by its attributes.
[Example: Consider the following example of an if element in a DrawingML diagram within the context of a choose statement:
<choose name="Name1">
<if name="Name2" func="var" arg="dir" op="equ" val="norm">
<alg type="snake">
<param type="grDir" val="tL"/>
<param type="flowDir" val="row"/>
<param type="contDir" val="sameDir"/>
<param type="off" val="ctr"/>
</alg>
</if>
<else name="Name3">
<alg type="snake">
<param type="grDir" val="tR"/>
<param type="flowDir" val="row"/>
<param type="contDir" val="sameDir"/>
<param type="off" val="ctr"/>
</alg>
</else>
</choose>
In this example, a if element is used to define a set of parameters associated with the snake algorithm when the diagram is in the normal direction*. end example*]
Parent Elements |
---|
choose (§21.4.2.6) |
Child Elements |
Subclause |
---|---|
alg (Algorithm) |
§21.4.2.3 |
choose (Choose Element) |
§21.4.2.6 |
constrLst (Constraint List) |
§21.4.2.9 |
extLst (Extension List) |
§21.4.2.13 |
forEach (For Each) |
§21.4.2.14 |
layoutNode (Layout Node) |
§21.4.2.19 |
presOf (Presentation Of) |
§21.4.2.21 |
ruleLst (Rule List) |
§21.4.2.25 |
shape (Shape) |
§21.4.2.27 |
Attributes |
Description |
---|---|
arg (Argument) |
Specifies the variable to use as part of the test in an if element. Ignored unless the function attribute is set to "var". The possible values for this attribute are defined by the ST_FunctionArgument simple type (§21.4.7.31). |
axis (Axis) |
Specifies the axis on which to select data from the data model. [Example: axis="ch" selects children of the current point node and axis="des" selects all descendants. end example] The possible values for this attribute are defined by the ST_AxisTypes simple type (§21.4.7.7). |
cnt (Count) |
Specifies the count of items to use in a data set. [Example: Consider the following example of a forEach in a DrawingML diagram:
In this example, up to two children are obtained through this forEach. end example] The possible values for this attribute are defined by the ST_UnsignedInts simple type (§21.4.7.63). |
func (Function) |
The function used to evaluate the if condition. [Example: Consider the following example of func being used in DrawingML:
In this example, func is set to var. end example] The possible values for this attribute are defined by the ST_FunctionType simple type (§21.4.7.33). |
hideLastTrans (Hide Last Transition) |
In algorithms that support transitions, this attribute specifies that the last transition is not rendered. This allows for diagrams that start and end with a node. The possible values for this attribute are defined by the ST_Booleans simple type (§21.4.7.9). |
name (Name) |
A unique identifier for the layout node. The function used to evaluate the if condition. [Example: Consider the following example of name being used in DrawingML:
In this example, the name attribute is set to Name2. end example] The possible values for this attribute are defined by the W3C XML Schema string datatype. |
op (Operator) |
The operator used to evaluate the condition. [Example: Consider the following example of op being used in DrawingML:
In this example, op is being used to test the equality of the argument and value. end example] The possible values for this attribute are defined by the ST_FunctionOperator simple type (§21.4.7.32). |
ptType (Data Point Type) |
Specifies the type of data point to select. [Example: Consider the following example of a forEach in a DrawingML diagram:
In this example, the forEach selects all node type points in the set. end example] The possible values for this attribute are defined by the ST_ElementTypes simple type (§21.4.7.28). |
st (Start) |
Specifies where to start in a data set. [Example: Consider the following example of a forEach in a DrawingML diagram:
In this example, the second element in the set is the first point returned. end example] The possible values for this attribute are defined by the ST_Ints simple type (§21.4.7.40). |
step (Step) |
Specifies the step to use in a data set. A step with a value of 2 returns every other item in the set. The possible values for this attribute are defined by the ST_Ints simple type (§21.4.7.40). |
val (Value) |
An absolute value. The possible values for this attribute are defined by the ST_FunctionValue simple type (§21.4.7.34). |
[Note: The W3C XML Schema definition of this element's content model (CT_When) is located in §A.5.3. end note]
© ISO/IEC29500: 2008. 以上摘要已经由 Microsoft(和/或其代理公司)从英语翻译为简体中文,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.