Share via


FitText.Id Property

Definition

Fit Text Run ID

Represents the following attribute in the schema: w:id

[DocumentFormat.OpenXml.SchemaAttr(23, "id")]
public DocumentFormat.OpenXml.Int32Value Id { get; set; }
public DocumentFormat.OpenXml.Int32Value Id { get; set; }
[DocumentFormat.OpenXml.SchemaAttr(23, "id")]
public DocumentFormat.OpenXml.Int32Value? Id { get; set; }
[DocumentFormat.OpenXml.SchemaAttr("w:id")]
public DocumentFormat.OpenXml.Int32Value? Id { get; set; }
public DocumentFormat.OpenXml.Int32Value? Id { get; set; }
member this.Id : DocumentFormat.OpenXml.Int32Value with get, set
[<DocumentFormat.OpenXml.SchemaAttr(23, "id")>]
member this.Id : DocumentFormat.OpenXml.Int32Value with get, set
[<DocumentFormat.OpenXml.SchemaAttr("w:id")>]
member this.Id : DocumentFormat.OpenXml.Int32Value with get, set
Public Property Id As Int32Value

Property Value

Returns Int32Value.

Attributes

Remarks

The following information from the ECMA International Standard ECMA-376 can be useful when working with this class.

Specifies a unique ID which shall be used to link multiple contiguous runs containing fitText elements to each other to ensure that their contents are correctly merged into the specified width in the document.

This means that multiple runs which are broken apart due to differences in formatting can be identified as belonging to the same grouping in terms of fitText properties, although they are multiple runs of text in the WordprocessingML.

If the runs are not contiguous, then the id attribute is ignored, and the runs are not linked.

If this attribute is omitted, then this run has no id and shall not be linked with any other run in the parent paragraph.

Consider the following three runs in a document, which should be fit into exactly one inch at display time:

<w:r>  
  <w:rPr>  
    <w:fitText w:id="99" w:val="1440" />   
  </w:rPr>  
  <w:t>fit this into</w:t>   
</w:r>  
<w:r>  
  <w:rPr>  
    <w:b/>   
    <w:fitText w:id="99" w:val="1440" />   
   </w:rPr>  
  <w:t>one</w:t>   
</w:r>  
<w:r>  
  <w:rPr>  
    <w:fitText w:id="99" w:val="1440" />   
   </w:rPr>  
  <w:t>inch</w:t>   
</w:r>  

Although there are three runs of content, all three regions shall be combined into a single fit text region (e.g. they all fit into one inch, rather than one inch each) based on the identical value used in the id attribute for all three runs.

The possible values for this attribute are defined by the ST_DecimalNumber simple type.

Applies to