Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

CharacterSpacingControl class

Character-Level Whitespace Compression. When the object is serialized out as xml, its qualified name is w:characterSpacingControl.


Namespace:  DocumentFormat.OpenXml.Wordprocessing
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

public class CharacterSpacingControl : OpenXmlLeafElement

[ISO/IEC 29500-1 1st Edition]

characterSpacingControl (Character-Level Whitespace Compression)

This element specifies how full-width characters in the current WordprocessingML document should be compressed to remove additional whitespace when the contents of this document are displayed, specifically by specifying the set(s) of characters which can be compressed to remove additional whitespace. [Note: The behavior of this element is functionally identical to the text-justify-trim property. end note]

If this element is omitted, then the default value shall be dontCompress.

[Example: Consider the WordprocessingML below:

<w:characterSpacingControl w:val="doNotCompress" />

The characterSpacingControl element has a val attribute value of doNotCompress, which specifies that no character compression shall be applied to any character when the document is displayed. end example]

Parent Elements

settings (§



val (Value)

Specifies the set(s) of characters which should be compressed when the contents of this document are displayed.

[Example: Consider a WordprocessingML document for which only full-width punctuation characters must have their whitespace compression applied. This requirement would be specified using the following WordprocessingML:

<w:characterSpacingControl w:val="compressPunctuation"/>

The val attribute value of compressPunctuation specifies that character compression must be applied to full-width punctuation characters only when the document is displayed. end example]

The possible values for this attribute are defined by the ST_CharacterSpacing simple type (§17.18.7).

[Note: The W3C XML Schema definition of this element’s content model (CT_CharacterSpacing) is located in §A.1. end note]

© ISO/IEC29500: 2008.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
© 2015 Microsoft