IfField Class
- Namespace
TXTextControl.DocumentServer. Fields
- Package
TXTextControl.from the private NuGet feed or Text Control Offline PackagesTextControl. Core. SDK
- Assembly
TXDocumentServer.Core. dll
- Install
dotnet add package TXTextControl..NET 8 and later. For .NET Framework, referenceTextControl. Core. SDK TXDocumentServer.from the setup.dll
- Also in
TXTextControl.asTextControl. ASP. SDK TXDocumentServer.dll
- Inherits
Description
The IfField class implements the MS Word specific IF field. This field must be used in combination with an ApplicationField that should be modified using this adapter.
Syntax
public sealed class IfField : MailMergeFieldAdapterPublic NotInheritable Class IfField
Inherits MailMergeFieldAdapterExamples
The following example creates an If Field instance and configures its text setting for a document workflow.
TXTextControl.DocumentServer.Fields.IfField ifField = new();
ifField.Text = "Quarterly results";Dim ifField As New TXTextControl.DocumentServer.Fields.IfField()
ifField.Text = "Quarterly results"Members
Constructors
| Constructor | Description |
|---|---|
| IfField | Initializes a new instance of the IfField class. |
| MailMergeFieldAdapter | Initializes a new instance of the MailMergeFieldAdapter class. (Inherited from MailMergeFieldAdapter.) |
Properties
| Property | Description |
|---|---|
| DataSourceCulture | Specifies the culture which is used for the relational comparison of numerical values. The default value for this property is the current thread culture. |
| Expression1 | Gets and sets the first expression text that should be compared. To use this field in the MailMerge component, this property must be a valid field name. |
| Expression2 | Gets and sets the second expression text that should be compared to Expression1. |
| FalseText | Gets and sets the text that should be displayed when the comparison is false. |
| FieldValue | Gets or sets the field's value of the field that has been specified in Expression1. |
| MergeCulture | Specifies the culture with which numerical and date / time values are formatted when merged into the target document. The default value for this property is the current thread culture. |
| Operator | Gets and sets the operator of the field. |
| PreserveFormatting | Specifies whether the field's formatting should be preserved. (Inherited from MailMergeFieldAdapter.) |
| Text | Gets and sets the displayed text of the field. |
| TrueText | Gets and sets the text that should be displayed when the comparison is true. |
Fields
| Field | Description |
|---|---|
| TYPE_NAME | Not described in the reference. public const string TYPE_NAME = "IF"; |