Partager via


RelativeWidth Class

Defines the RelativeWidth Class.This class is only available in Office2010.When the object is serialized out as xml, its qualified name is wp14:sizeRelH.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.Office2010.Word.Drawing.RelativeWidth

Namespace:  DocumentFormat.OpenXml.Office2010.Word.Drawing
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Declaration
<OfficeAvailabilityAttribute(FileFormatVersions.Office2010)> _
<ChildElementInfoAttribute(GetType(PercentageWidth), FileFormatVersions.Office2010)> _
Public Class RelativeWidth _
    Inherits OpenXmlCompositeElement
'Usage
Dim instance As RelativeWidth
[OfficeAvailabilityAttribute(FileFormatVersions.Office2010)]
[ChildElementInfoAttribute(typeof(PercentageWidth), FileFormatVersions.Office2010)]
public class RelativeWidth : OpenXmlCompositeElement

Remarks

The following table lists the possible child types:

  • PercentageWidth <wp14:pctWidth>

2.3.32 sizeRelH

Target namespace: https://schemas.microsoft.com/office/word/2008/9/16/wordprocessingDrawing

Optional child element of: [ISO/IEC-29500-1] section §20.4.2.3 anchor. If present, this element specifies that the horizontal size (width) is relative. If absent, the horizontal size is absolute.

A CT_SizeRelH element that specifies the relative width of a floating DrawingML object within a WordprocessingML document.

The following W3C XML Schema ([XMLSCHEMA1] section 2.1) fragment specifies the contents of this element.

<xsd:element name="sizeRelH" type="CT_SizeRelH"/>

See section 5.12 for the full W3C XML Schema ([XMLSCHEMA1] section 2.1).

2.5.71 CT_SizeRelH

Target namespace: https://schemas.microsoft.com/office/word/2008/9/16/wordprocessingDrawing

Referenced by: sizeRelH

Specifies the relative width of floating DrawingML object within a WordprocessingML document.

Child Elements:

pctWidth : An ST_Percentage (as specified in [ISO/IEC-29500-4] section 12.1.2.2 and [ISO/IEC-29500-1] section 20.1.10.40) element that specifies the width<17>.

Attributes:

relativeFrom : An ST_SizeRelFromH attribute that specifies the base on which the relative width is calculated.

The following W3C XML Schema ([XMLSCHEMA1] section 2.1) fragment specifies the contents of this complex type.

<xsd:complexType name="CT_SizeRelH">

<xsd:sequence>

<xsd:element name="pctWidth" type="a:ST_Percentage" minOccurs="1" maxOccurs="1"/>

</xsd:sequence>

<xsd:attribute name="relativeFrom" type="ST_SizeRelFromH" use="required"/>

</xsd:complexType>

See section 5.12 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.

See Also

Reference

RelativeWidth Members

DocumentFormat.OpenXml.Office2010.Word.Drawing Namespace