PreferredNumberOfChildren Class

Preferred Number of Children.When the object is serialized out as xml, its qualified name is dgm:chPref.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlLeafElement
      DocumentFormat.OpenXml.Drawing.Diagrams.PreferredNumberOfChildren

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

Syntax

'Declaration
Public Class PreferredNumberOfChildren _
    Inherits OpenXmlLeafElement
'Usage
Dim instance As PreferredNumberOfChildren
public class PreferredNumberOfChildren : OpenXmlLeafElement

Remarks

[ISO/IEC 29500-1 1st Edition]

21.4.6.5 chPref (Preferred Number of Children)

This variable indicates the number of children that the current node prefers to have. This determines what the next action of the ‘Add Shape’ button should be in the user interface.

[Example: Consider the following example of chPref being used in DiagramML:

<varLst>                       
<chMax val="3" />          
<chPref val="1" />         
<dir val="norm" />         
<animLvl val="lvl" />      
<resizeHandles val="rel" />
</varLst>                      

In this example, chPref is set to a single node and the user interface disables after a single node has been inserted. end example]

Parent Elements

presLayoutVars (§21.4.5.4); varLst (§21.4.2.31)

Attributes

Description

val (Preferred Number of CHildren Value)

This attribute indicates the number of children that the current node prefers to have. This determines what the next action of the ‘Add Shape’ button should be. A value of -1 indicates an infinite number of children. Default value is -1.

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

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

PreferredNumberOfChildren Members

DocumentFormat.OpenXml.Drawing.Diagrams Namespace