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

Builds a table of contents from heading and outline levels, TC fields, or captions, with optional page numbers and hyperlinks.

Definition

Constructors

Creates a table-of-contents field with dot leaders and no calculated entries.

C#
public TableOfContentsField()

Fields

Identifies the field property that stores the page-number alignment string. Its serialized name is currently CaptionName, shared with CaptionNameProperty, so nested values can be restored to the wrong property.

C#
public static readonly FieldPropertyDefinition AlignmentStringProperty

Identifies the field property that stores the caption sequence filter.

C#
public static readonly FieldPropertyDefinition CaptionNameProperty

Tab character inserted between an entry and its page number when no alignment character is specified.

C#
public static readonly string DefaultAlignmentString

Text returned when the field finds no entries to display.

C#
public static readonly string ErrorString

Identifies this field type in field code.

C#
public static readonly string FieldType

Text returned when a configured heading or TC-level range is invalid.

C#
public static readonly string InvalidHeadingLevelRangeErrorString

Identifies the field property that stores the outline-level range.

C#
public static readonly FieldPropertyDefinition OutlineLevelsInRangeProperty

Identifies the field property that stores the TC-field type filter.

C#
public static readonly FieldPropertyDefinition TCEntryProperty

Identifies the field property that stores the TC-level range.

C#
public static readonly FieldPropertyDefinition TCLevelsInRangeProperty

Properties

Gets or sets the separator inserted before each page number when AlignPageNumbers is enabled. Only the first character is used; an empty value falls back to a tab.

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

Gets or sets whether the AlignmentString is used before each page number.

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

Gets or sets the sequence identifier used to select captions; only entries with a matching non-empty identifier are included.

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

Gets or sets whether page-number references are omitted from generated entries.

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

Gets the name of the field type.

C#
public override string FieldTypeName { get; }

Overrides: Field.FieldTypeName

Gets or sets whether generated entries are hyperlinks to their source content.

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

Gets or sets whether matching caption entries are considered; a non-empty CaptionName is required to include them.

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

Gets or sets whether entries marked with TCField fields are included.

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

Gets or sets the inclusive outline-level range, such as 1-3; an empty value includes levels 1 through 9.

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

Gets or sets the type identifier used to filter TCField entries; an empty value selects untyped entries.

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

Gets or sets the inclusive TC-level range, such as 1-3; an empty value includes levels 1 through 9.

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

Gets or sets whether heading levels in OutlineLevelsInRange are used to select entries.

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

Gets or sets whether paragraphs with an explicit outline level are included in addition to heading-styled paragraphs. The selected levels come from OutlineLevelsInRange.

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

Gets or sets whether TC-field entries are filtered by TCLevelsInRange. Enabling this option also enables inclusion of TC-field entries.

C#
[XamlSerializable]
public bool UseTCLevelsInRange { 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()