Поделиться через


StyleDefinition Class

Style Definition. It is the root element of DiagramStylePart.When the object is serialized out as xml, its qualified name is dgm:styleDef.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.OpenXmlPartRootElement
        DocumentFormat.OpenXml.Drawing.Diagrams.StyleDefinition

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

Syntax

'Declaration
<ChildElementInfoAttribute(GetType(Scene3D))> _
<ChildElementInfoAttribute(GetType(ExtensionList))> _
<ChildElementInfoAttribute(GetType(StyleDefinitionTitle))> _
<ChildElementInfoAttribute(GetType(StyleLabel))> _
<ChildElementInfoAttribute(GetType(StyleLabelDescription))> _
<ChildElementInfoAttribute(GetType(StyleDisplayCategories))> _
Public Class StyleDefinition _
    Inherits OpenXmlPartRootElement
'Usage
Dim instance As StyleDefinition
[ChildElementInfoAttribute(typeof(Scene3D))]
[ChildElementInfoAttribute(typeof(ExtensionList))]
[ChildElementInfoAttribute(typeof(StyleDefinitionTitle))]
[ChildElementInfoAttribute(typeof(StyleLabel))]
[ChildElementInfoAttribute(typeof(StyleLabelDescription))]
[ChildElementInfoAttribute(typeof(StyleDisplayCategories))]
public class StyleDefinition : OpenXmlPartRootElement

Remarks

The following table lists the possible child types:

  • StyleDefinitionTitle <dgm:title>

  • StyleLabelDescription <dgm:desc>

  • StyleDisplayCategories <dgm:catLst>

  • Scene3D <dgm:scene3d>

  • StyleLabel <dgm:styleLbl>

  • ExtensionList <dgm:extLst>

[ISO/IEC 29500-1 1st Edition]

21.4.5.7 styleDef (Style Definition)

This element is the root tag for a style definition.

[Example: Consider the following example of a styleDef in DiagramML:

<dgm:styleDef xmlns:dgm="https://schemas.openxmlformats.org/drawingml/2006/3/diagram" xmlns:a="https://schemas.openxmlformats.org/drawingml/2006/3/main" uniqueId="urn:microsoft.com/office/officeart/2005/8/quickstyle/3d1" minVer="12.0">
<dgm:title lang="" val="3-D Style 1"/>
<dgm:desc lang="" val="3-D Style 1"/>
<dgm:catLst>
<dgm:cat type="3D" pri="11100"/>
</dgm:catLst>
<dgm:scene3d>
<a:camera prst="orthographicFront"/>
<a:lightRig rig="threePt" dir="t"/>
</dgm:scene3d>
<dgm:style>
                    …
</dgm:style>
<dgm:styleLbl name="node0">
<dgm:scene3d>
<a:camera prst="orthographicFront"/>
<a:lightRig rig="flat" dir="t"/>
</dgm:scene3d>
<dgm:sp3d prstMaterial="flat">
<a:bevelT w="120900" h="88900"/>
<a:bevelB w="88900" h="31750" prst="angle"/>
</dgm:sp3d>
<dgm:txPr/>
<dgm:style>
<a:lnRef idx="0">
<a:scrgbClr r="0" g="0" b="0"/>
</a:lnRef>
<a:fillRef idx="3">
<a:scrgbClr r="0" g="0" b="0"/>
</a:fillRef>
<a:effectRef idx="2">
<a:scrgbClr r="0" g="0" b="0"/>
</a:effectRef>
<a:fontRef idx="minor">
<a:schemeClr val="lt1"/>
</a:fontRef>
</dgm:style>
</dgm:styleLbl>
…
</dgm:styleDef>

In this example we see a styleDef being defined along with many properties. end example]

Parent Elements

Root element of DrawingML Diagram Style part

Child Elements

Subclause

catLst (Category List)

§21.4.5.2

desc (Style Label Description)

§21.4.5.3

extLst (Extension List)

§21.4.2.13

scene3d (3-D Scene)

§21.4.5.5

styleLbl (Style Label)

§21.4.5.10

title (Title)

§21.4.5.11

Attributes

Description

minVer (Minimum Version)

The minimum product version that can support this quick style.

[Example: Consider the following example of a styleDef in DiagramML:

<styleDef uniqueId="urn:quickstyle/3d1" minVer="12.0">

</styleDef>

In this example we see the minVer defined to be 12.0. end example]

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

uniqueId (Unique Style ID)

Unique ID that identifies a style.

[Example: Consider the following example of a styleDef in DiagramML:

<styleDef uniqueId="urn:quickstyle/3d1" minVer="12.0">

</styleDef>

In this example we see the uniqueId defined to be urn:quickstyle/3d1. end example]

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

[Note: The W3C XML Schema definition of this element’s content model (CT_StyleDefinition) 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

StyleDefinition Members

DocumentFormat.OpenXml.Drawing.Diagrams Namespace