ContentPart Class
Defines the ContentPart Class.This class is only available in Office2010.When the object is serialized out as xml, its qualified name is w14:contentPart.
Inheritance Hierarchy
System.Object
DocumentFormat.OpenXml.OpenXmlElement
DocumentFormat.OpenXml.OpenXmlCompositeElement
DocumentFormat.OpenXml.Office2010.Word.ContentPart
Namespace: DocumentFormat.OpenXml.Office2010.Word
Assembly: DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)
Syntax
声明
<ChildElementInfoAttribute(GetType(Transform2D), FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(WordNonVisualContentPartShapeProperties), FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(WordNonVisualContentPartProperties), FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(OfficeArtExtensionList), FileFormatVersions.Office2010)> _
<OfficeAvailabilityAttribute(FileFormatVersions.Office2010)> _
Public Class ContentPart _
Inherits OpenXmlCompositeElement
用法
Dim instance As ContentPart
[ChildElementInfoAttribute(typeof(Transform2D), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(WordNonVisualContentPartShapeProperties), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(WordNonVisualContentPartProperties), FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(OfficeArtExtensionList), FileFormatVersions.Office2010)]
[OfficeAvailabilityAttribute(FileFormatVersions.Office2010)]
public class ContentPart : OpenXmlCompositeElement
Remarks
The following table lists the possible child types:
WordNonVisualContentPartProperties <w14:nvContentPr>
WordNonVisualContentPartShapeProperties <w14:nvContentPartPr>
Transform2D <w14:xfrm>
OfficeArtExtensionList <w14:extLst>
2.3.15 contentPart
Target namespace: https://schemas.microsoft.com/office/word/2008/9/12/wordm
Referenced by: CT_WordProcessingGroup, CT_WordProcessingCanvasGroup, CT_WordProcessingCanvas
A CT_WordContentPart element that specifies a reference to XML content in a format not defined by [ISO/IEC-29500-1].
This element serves the same purpose as the contentPart element in WordprocessingML ([ISO/IEC-29500-1], section 17.3.3.2) but appears underneath graphicData ([ISO/IEC-29500-1], section 20.1.2.2.17), CT_WordProcessingGroup, CT_WordProcessingCanvas and CT_WordProcessingCanvasGroup.
The following W3C XML Schema ([XMLSCHEMA1] section 2.1) fragment specifies the contents of this element.
<xsd:element name="contentPart" type="CT_WordContentPart"/>
See section 5.4 for the full W3C XML Schema ([XMLSCHEMA1] section 2.1).
2.5.44 CT_WordContentPart
Target namespace: https://schemas.microsoft.com/office/word/2008/9/12/wordm
Referenced by: contentPart, CT_WordProcessingGroup, CT_WordProcessingCanvasGroup, CT_WordProcessingCanvas
A complex type that specifies a reference to XML content in a format not defined by [ISO/IEC-29500-1].
This element serves the same purpose as the contentPart element in WordprocessingML ([ISO/IEC-29500-1], section 17.3.3.2) but appears underneath graphicData ([ISO/IEC-29500-1], section 20.1.2.2.17), CT_WordProcessingGroup, CT_WordProcessingCanvas and CT_WordProcessingCanvasGroup.
Child Elements:
nvContentPr : A CT_WordContentPartNonVisual element that specifies non-visual properties for the content part
xfrm : A CT_Transform2D ([ISO/IEC-29500-1] section A.4.1) element that specifies the 2-D transform for the content part.
extLst : A CT_OfficeArtExtensionList ([ISO/IEC-29500-1] section A.4.1) element that specifies the extension list within which all future extensions of element type ext is defined. The extension list along with corresponding future extensions is used to extend the storage capabilities of the DrawingML framework. This allows for various new types of data to be stored natively within the framework.
Attributes:
bwMode : An ST_BlackWhiteMode ([ISO/IEC-29500-1] section 20.1.10.10) attribute that specifies that the content part SHOULD be rendered using black and white coloring. The color information for the content part SHOULD be converted to black, white or grayscale when rendering the content part.
This attribute sets the rendering mode applied to the content part when rendering. This attribute SHOULD NOT modify the color information of the content part stored within the file.
r:id : An ST_RelationshipId ([ISO/IEC-29500-1] section 22.8.2.1) attribute that specifies the relationship ID to a content part.
The following W3C XML Schema ([XMLSCHEMA1] section 2.1) fragment specifies the contents of this complex type.
<xsd:complexType name="CT_WordContentPart">
<xsd:sequence>
<xsd:element name="nvContentPr" type="CT_WordContentPartNonVisual" minOccurs="0" maxOccurs="1"/>
<xsd:element name="xfrm" type="a:CT_Transform2D" minOccurs="0" maxOccurs="1"/>
<xsd:element name="extLst" type="a:CT_OfficeArtExtensionList" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
<xsd:attribute name="bwMode" type="a:ST_BlackWhiteMode" use="optional"/>
<xsd:attribute ref="r:id" use="required"/>
</xsd:complexType>
See section 5.4 for the full W3C XML Schema ([XMLSCHEMA1] section 2.1).
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.