DateFormField Constructor
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WPF. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Initializes a new instance of the DateFormField class.
Syntax
DateFormField(int)
Initializes a new instance of an empty DateFormField. The date is set to January 1, 1601.
public DateFormField(int emptyWidth);Public Sub New(emptyWidth As Integer)| Parameter | Description |
|---|---|
| emptyWidth | Specifies the horizontal extension, in twips, of the DateFormField, when a date is not set. When this parameter is set to 0, a default value is used. |
DateFormField(DateTime, int)
Initializes a new instance of a DateFormField with the specified date.
public DateFormField(DateTime date, int emptyWidth);Public Sub New([date] As DateTime, emptyWidth As Integer)| Parameter | Description |
|---|---|
| date | Specifies the date of the DateFormField. |
| emptyWidth | Specifies the horizontal extension, in twips, of the DateFormField, when a date is not set. When this parameter is set to 0, a default value is used. |
Examples
The following example adds a prefilled delivery-date field to a form.
DateFormField dateFormField = new(DateTime.Today.AddDays(14), 0) { Name = "DeliveryDate" };
textControl.FormFields.Add(dateFormField);Dim dateFormField As New DateFormField(Date.Today.AddDays(14), 0) With { .Name = "DeliveryDate" }
textControl.FormFields.Add(dateFormField)