New to Telerik UI for WinForms? Start a free 30-day trial

TCField

Class

Marks content as a table-of-contents entry and supplies its optional display text, type identifier, and level.

Definition

Constructors

Creates a TC field with an empty result; its values are consumed when a table of contents is generated.

C#
public TCField()

Fields

Identifies the field property that stores the entry's display text.

C#
public static readonly FieldPropertyDefinition EntryTextProperty

Identifies this field type in field code.

C#
public static readonly string FieldType

Identifies the field property that stores the entry's TC level.

C#
public static readonly FieldPropertyDefinition TCLevelProperty

Identifies the field property that stores the entry's type identifier.

C#
public static readonly FieldPropertyDefinition TypeIdentifierProperty

Properties

Gets or sets replacement text for this table-of-contents entry; when empty, the marked document content is used.

C#
[XamlSerializable]
public string EntryText { get; set; }

Gets the name of the field type.

C#
public override string FieldTypeName { get; }

Overrides: Field.FieldTypeName

Gets or sets the level argument emitted when UseTCLevel is enabled. Table-of-contents fields can use this value to filter or style the entry.

C#
[XamlSerializable]
public string TCLevel { get; set; }

Gets or sets the type identifier that a table-of-contents field can use to filter this entry.

C#
[XamlSerializable]
public string TypeIdentifier { get; set; }

Gets or sets whether a TC-level switch is included in the field code.

C#
[XamlSerializable]
public bool UseTCLevel { get; set; }

Methods

Builds the field-specific parts of the code fragment, using the current CodeBuilder.

C#
protected override void BuildCodeOverride()

Overrides: CodeBasedField.BuildCodeOverride()

Copies all properties from another field of the same type.

C#
public override void CopyPropertiesFrom(Field fromField)
Parameters:fromFieldField

The other field, which has to be of the same type as the current instance.

Overrides: CodeBasedField.CopyPropertiesFrom(Field)

Copies the field-specific properties from a FieldCodeExpression.

C#
protected override void CopyPropertiesFromCodeExpression(FieldCodeExpression fieldCodeExpression)
Parameters:fieldCodeExpressionFieldCodeExpression

The field code expression.

Overrides: CodeBasedField.CopyPropertiesFromCodeExpression(FieldCodeExpression)

Creates a new instance of the current field class.

C#
public override Field CreateInstance()
Returns:

Field

The new field instance.

Overrides: Field.CreateInstance()

Builds the result fragment of the field.

C#
protected override DocumentFragment GetResultFragment()
Returns:

DocumentFragment

The result fragment.

Overrides: Field.GetResultFragment()