TX Text Control .NET Server

ContentControlFieldAdapter Class

Class|Introduced in 21.0
Namespace
TXTextControl.DocumentServer.Fields
Package
TXTextControl.TextControl.Core.SDK from the private NuGet feed or Text Control Offline Packages
Assembly
TXDocumentServer.Core.dll
Install
dotnet add package TXTextControl.TextControl.Core.SDK .NET 8 and later. For .NET Framework, reference TXDocumentServer.dll from the setup.
Also in
TXTextControl.TextControl.ASP.SDK as TXDocumentServer.dll
Inherits
  1. FieldAdapter
  2. ContentControlFieldAdapter
Derived
CheckBoxContentControl, ComboBoxContentControl, DateContentControl, DropDownListContentControl, PlainTextContentControl, RichTextContentControl

Description

The abstract ContentControlFieldAdapter class is the base class of all Microsoft Word content control field adapter classes. It implements general features like the adapted ApplicationField or the specific content control type name. These special fields can be only used in combination with the ApplicationField class.

Syntax

public abstract class ContentControlFieldAdapter : FieldAdapter

Examples

The following example includes the type name value from a Content Control Field Adapter object in application diagnostics. The created object is then available to the surrounding document workflow.

Console.WriteLine($"Type Name: {contentControlFieldAdapter.TypeName}");
Console.WriteLine("Content Control Field Adapter is ready for use.");

Members

Constructors

ConstructorDescription
ContentControlFieldAdapterInitializes a new instance of the ContentControlFieldAdapter class.
FieldAdapterInitializes a new instance of the FieldAdapter class. (Inherited from FieldAdapter.)

Properties

PropertyDescription
ApplicationFieldGets the adapted ApplicationField of the field. Each special field acts like an adapter for the specific ApplicationField. (Inherited from FieldAdapter.)
ContentDeletableSpecifies whether the content of the content control field should be deletable or not.
ContentEditableSpecifies whether the content of the content control field should be editable or not.
IdGets or sets the content control's id.
IDGets the ID of the specific field through its adapter. (Inherited from FieldAdapter.)
LengthGets the number of characters in a text field through its adapter. (Inherited from FieldAdapter.)
PlaceholderGets or sets the placeholder field part of the content control field.
StartGets the first character position (one-based) of the field through its adapter. (Inherited from FieldAdapter.)
TagGets or sets the content control's tag.
TitleGets or sets the content control's title.
TypeGets or sets the type of the content control field.
TypeNameGets the field's type name of the specific field through its adapter. For example for the type name of a Microsoft Word MergeField is MERGEFIELD. If the type name of the field is changed, its parameters must also be changed. (Inherited from FieldAdapter.)
XmlBaseStructureNot described in the reference. public XmlDocument XmlBaseStructure { get; }

Methods

MethodDescription
CreateContentControlNot described in the reference. public static ContentControlFieldAdapter CreateContentControl(ApplicationField appField);
ShowDialogOpens the specific field options dialog box. (Inherited from FieldAdapter.)

Fields

FieldDescription
TYPE_NAMERepresents the name of the respective field type. Every subclass of FieldAdapter overwrites this with its respective type name. (Inherited from FieldAdapter.)