# OdfTextField

A basic native field. Other field kinds remain preserved as opaque inline XML.

Class 

`OfficeIMO.OpenDocument`

**Namespace**

`OfficeIMO.OpenDocument`

**Assembly**

`OfficeIMO.OpenDocument`

**Source revision**

`15caddadea70` with working tree changes

**Source**

[OdfTextField.cs:33](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Text/OdfTextField.cs#L33)

**Modifiers**

sealed

A basic native field. Other field kinds remain preserved as opaque inline XML.

## Inheritance

- object
- OdfTextField

## Usage

Explore 9 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 9

- Method [OdfTextContent.AddField](/api/open-document/officeimo-opendocument-odftextcontent/#method-addfield-officeimo-opendocument-odftextfieldkind-string)
- Property [OdfTextContent.Fields](/api/open-document/officeimo-opendocument-odftextcontent/#property-fields)
- Method [OdfTextHyperlink.AddField](/api/open-document/officeimo-opendocument-odftexthyperlink/#method-addfield-odftextfieldkind-string)
- Property [OdfTextHyperlink.Fields](/api/open-document/officeimo-opendocument-odftexthyperlink/#property-fields)
- Property [OdfTextNode.Field](/api/open-document/officeimo-opendocument-odftextnode/#property-field)
- Method [OdfTextParagraph.AddField](/api/open-document/officeimo-opendocument-odftextparagraph/#method-addfield-odftextfieldkind-string)
- Property [OdfTextParagraph.Fields](/api/open-document/officeimo-opendocument-odftextparagraph/#property-fields)
- Method [OdfTextRun.AddField](/api/open-document/officeimo-opendocument-odftextrun/#method-addfield-odftextfieldkind-string)
- Property [OdfTextRun.Fields](/api/open-document/officeimo-opendocument-odftextrun/#property-fields)

Filter members 

Show inherited

## Methods

`public XElement ToXml()` [#](#method-toxml)

[OdfTextField.cs:33](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Text/OdfTextField.cs#L33)

Returns a detached copy including native date/time values, style names and offsets.

Returns

`XElement`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public OdfTextFieldKind Kind { get; }` [#](#property-kind)

[OdfTextField.cs:21](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Text/OdfTextField.cs#L21)

Native field kind.

`public string DisplayText { get; set; }` [#](#property-displaytext)

[OdfTextField.cs:23](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Text/OdfTextField.cs#L23)

Cached display text, which a native application may refresh. Assignment preserves field attributes.

`public bool IsFixed { get; set; }` [#](#property-isfixed)

[OdfTextField.cs:26](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Text/OdfTextField.cs#L26)

Whether the cached value is fixed. Page count is always dynamic.

`public string? DataStyleName { get; set; }` [#](#property-datastylename)

[OdfTextField.DateTime.cs:6](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Text/OdfTextField.DateTime.cs#L6)

Native date/time data-style binding. Null removes the binding.

`public string? DateTimeValueLexical { get; set; }` [#](#property-datetimevaluelexical)

[OdfTextField.DateTime.cs:16](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Text/OdfTextField.DateTime.cs#L16)

Saved native date/dateTime or time/dateTime lexical value. Assignment preserves the original offset notation.

`public string? DateTimeAdjustmentLexical { get; set; }` [#](#property-datetimeadjustmentlexical)

[OdfTextField.DateTime.cs:25](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Text/OdfTextField.DateTime.cs#L25)

Native ISO duration adjustment. Time fields accept day/clock durations and truncate them to full minutes during projection.

`public string? NumberFormat { get; set; }` [#](#property-numberformat)

[OdfTextField.Numbering.cs:19](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Text/OdfTextField.Numbering.cs#L19)

Native page-number/count format: 1, a, A, i, I, or an empty string for no number. Null removes the override. Other native formats are preserved but require a native formatter.

`public bool? NumberLetterSync { get; set; }` [#](#property-numberlettersync)

[OdfTextField.Numbering.cs:26](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Text/OdfTextField.Numbering.cs#L26)

True uses repeated letters after Z (AA, BB); false uses AA, AB. Null removes the override.

`public OdfTextFieldPageSelection PageSelection { get; set; }` [#](#property-pageselection)

[OdfTextField.Numbering.cs:37](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Text/OdfTextField.Numbering.cs#L37)

The native page selection. This property applies only to page-number fields.

`public int PageAdjustment { get; set; }` [#](#property-pageadjustment)

[OdfTextField.Numbering.cs:60](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Text/OdfTextField.Numbering.cs#L60)

Integer added to the selected page number. A result outside the drawing has no displayed number.

<!-- PowerForge markdown artifact sha256:25F546BD4BA5FCF901EAF86A23D73672D5ED6C2641B32929D9B2BE760BE47189 -->
