TX Text Control .NET for WPF

DateField Class

Class|Introduced in 15.0
Namespace
TXTextControl.DocumentServer.Fields
Package
TXTextControl.TextControl.WPF.SDK from the private NuGet feed or Text Control Offline Packages
Assembly
TXDocumentServer.dll
Install
dotnet add package TXTextControl.TextControl.WPF.SDK .NET 8 and later. For .NET Framework, reference TXDocumentServer.dll from the setup.
Inherits
  1. FieldAdapter
  2. MailMergeFieldAdapter
  3. DateField

Description

The DateField implements the MS Word specific DATEFIELD field. This field must be used in combination with an ApplicationField that should be modified using this adapter.

Syntax

public sealed class DateField : MailMergeFieldAdapter

Examples

The following example creates a Date Field instance and configures its text setting for a document workflow.

TXTextControl.DocumentServer.Fields.DateField dateField = new();
dateField.Text = "Quarterly results";

Members

Constructors

ConstructorDescription
DateFieldInitializes a new instance of the DateField class.
MailMergeFieldAdapterInitializes a new instance of the MailMergeFieldAdapter class. (Inherited from MailMergeFieldAdapter.)

Properties

PropertyDescription
CultureSpecifies a CultureInfo instance that supplies culture-specific formatting information which is used when applying the formatting string to the field content. The default value for this property is the current thread culture.
DateSets the date of the field.
FormatGets and sets the format of the field. It must be a standard DateTime format string of the .NET Framework.
PreserveFormattingSpecifies whether the field's formatting should be preserved. (Inherited from MailMergeFieldAdapter.)
TextGets and sets the displayed text of the field.

Fields

FieldDescription
TYPE_NAMENot described in the reference. public const string TYPE_NAME = "DATE";

Further Reading

  • Inserting and Processing MS Word Compatible DATE Fields –