DocGrid.CharacterSpace Property

Definition

Document Grid Character Pitch

Represents the following attribute in the schema: w:charSpace

[DocumentFormat.OpenXml.SchemaAttr(23, "charSpace")]
public DocumentFormat.OpenXml.Int32Value CharacterSpace { get; set; }
public DocumentFormat.OpenXml.Int32Value CharacterSpace { get; set; }
[DocumentFormat.OpenXml.SchemaAttr(23, "charSpace")]
public DocumentFormat.OpenXml.Int32Value? CharacterSpace { get; set; }
[DocumentFormat.OpenXml.SchemaAttr("w:charSpace")]
public DocumentFormat.OpenXml.Int32Value? CharacterSpace { get; set; }
public DocumentFormat.OpenXml.Int32Value? CharacterSpace { get; set; }
member this.CharacterSpace : DocumentFormat.OpenXml.Int32Value with get, set
[<DocumentFormat.OpenXml.SchemaAttr(23, "charSpace")>]
member this.CharacterSpace : DocumentFormat.OpenXml.Int32Value with get, set
[<DocumentFormat.OpenXml.SchemaAttr("w:charSpace")>]
member this.CharacterSpace : DocumentFormat.OpenXml.Int32Value with get, set
Public Property CharacterSpace 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 the number of characters to be allowed on the document grid for each line in this section.

This attribute's value shall be specified by multiplying the difference between the desired character pitch and the character pitch for that character in the font size of the Normal font by 4096.

This value shall then be used to add the character pitch for the specified point size to each character in the section This results in text in the Normal style having a specific number of characters per line.

Consider a section with a Normal font size of 11 points on which a 21-point pitch document grid has been defined.. The resulting WordprocessingML would be defined as follows:

<w:docGrid w:charSpace="40960" …/>  

The charSpace attribute specifies a value of 40960, which means that the delta between the character pitch of each character in the grid and the Normal font is 10 points, resulting in a character pitch of 11 + 10 = 21 points for all characters in this section.

Individual runs of text can override the line pitch information specified for the document grid by specifying that the run text shall not snap to the document grid via the snapToGrid element.

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

Applies to