Format Class
Text Box Form Field Formatting.When the object is serialized out as xml, its qualified name is w:format.
Inheritance Hierarchy
System.Object
DocumentFormat.OpenXml.OpenXmlElement
DocumentFormat.OpenXml.OpenXmlLeafElement
DocumentFormat.OpenXml.Wordprocessing.Format
Namespace: DocumentFormat.OpenXml.Wordprocessing
Assembly: DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)
Syntax
'Declaration
Public Class Format _
Inherits OpenXmlLeafElement
'Usage
Dim instance As Format
public class Format : OpenXmlLeafElement
Remarks
[ISO/IEC 29500-1 1st Edition]
17.16.15 format (Text Box Form Field Formatting)
This element specifies the field formatting which shall be applied to the contents of the parent form field whenever those contents are modified. The type of formatting which is applied to the field depends on the value of its type element (§17.16.34), as follows:
When the type is equal to currentDate, currentTime, or date, a date formatting string using the syntax defined in §17.16.4.1
When the type is equal to calculated or number, a number formatting string using the syntax defined in §17.16.4.2
When the type is equal to regular, a text formatting string defined as follows:
Argument
Description
Uppercase
All letters are uppercase. [Example: Mary Smith results in MARY SMITH. end example]
Lowercase
All letters are lowercase. [Example: Mary Smith results in mary smith. end example]
First capital
Capitalizes the first letter of the first word. [Example: Mary Smith results in Mary smith. end example]
Title case
Capitalizes the first letter of each word. [Example: Mary Smith results in Mary Smith. end example]
[Example: Consider the following WordprocessingML fragment for the properties of a text box form field:
<w:ffData> <w:textInput> <w:type w:val="number" /> <w:maxLength w:val="4" /> <w:format w:val="0.00" /> </w:textInput> </w:ffData>
The format element specifies the field formatting which is applied to the input to the field (in this case, a grouping of number formatting picture items as the type element specifies a value of number). If a value of 8 was entered into this field, the formatted result would be 8.00. end example]
Parent Elements |
---|
textInput (§17.16.33) |
Attributes |
Description |
---|---|
val (String Value) |
Specifies that its contents contain a string. The contents of this string are interpreted based on the context of the parent XML element. [Example: Consider the following WordprocessingML fragment: <w:pPr> <w:pStyle w:val="heading1" /> </w:pPr> The value of the val attribute is the ID of the associated paragraph style's styleId. However, consider the following fragment: <w:sdtPr> <w:alias w:val="SDT Title Example" /> … </w:sdtPr> In this case, the decimal number in the val attribute is the caption of the parent structured document tag. In each case, the value is interpreted in the context of the parent element. end example] The possible values for this attribute are defined by the ST_String simple type (§22.9.2.13). |
[Note: The W3C XML Schema definition of this element’s content model (CT_String) is located in §A.1. end note]
© ISO/IEC29500: 2008.
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.