TX Text Control .NET for WPF

Date Property

Property|Introduced in 28.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.WPF.SDK as TXTextControl.dll from the private NuGet feed or Text Control Offline Packages

Description

Gets or sets the DateFormField's date.

Syntax

public DateTime? Date { get; set; }

Examples

The following example adds a prefilled delivery-date field to a form by using DateFormField.Date.

DateFormField dateFormField = new(DateTime.Today.AddDays(14), 0) { Name = "DeliveryDate" };
textControl.FormFields.Add(dateFormField);

dateFormField.Date = DateTime.Today;
if (dateFormField.Date != null)
{
    Console.WriteLine("Date Form Field: Date is available.");
}

Remarks

The property is null when the DateFormField is empty.