TableOfContentsField
Builds a table of contents from heading and outline levels, TC fields, or captions, with optional page numbers and hyperlinks.
Definition
Namespace:Telerik.WinForms.Documents.Model
Assembly:Telerik.WinControls.RichTextEditor.dll
Syntax:
public class TableOfContentsField : CodeBasedField, ISupportInitialize
Inheritance: objectFieldCodeBasedFieldTableOfContentsField
Implements:
Inherited Members
Constructors
Creates a table-of-contents field with dot leaders and no calculated entries.
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.
public static readonly FieldPropertyDefinition AlignmentStringProperty
Identifies the field property that stores the caption sequence filter.
public static readonly FieldPropertyDefinition CaptionNameProperty
Tab character inserted between an entry and its page number when no alignment character is specified.
public static readonly string DefaultAlignmentString
Text returned when the field finds no entries to display.
public static readonly string ErrorString
Text returned when a configured heading or TC-level range is invalid.
public static readonly string InvalidHeadingLevelRangeErrorString
Identifies the field property that stores the outline-level range.
public static readonly FieldPropertyDefinition OutlineLevelsInRangeProperty
Identifies the field property that stores the TC-field type filter.
public static readonly FieldPropertyDefinition TCEntryProperty
Identifies the field property that stores the TC-level range.
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.
[XamlSerializable]
public string AlignmentString { get; set; }
Gets or sets whether the AlignmentString is used before each page number.
[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.
[XamlSerializable]
public string CaptionName { get; set; }
Gets or sets whether page-number references are omitted from generated entries.
[XamlSerializable]
public bool DontShowPageNumbers { get; set; }
Gets the name of the field type.
public override string FieldTypeName { get; }
Overrides:
Gets or sets whether generated entries are hyperlinks to their source content.
[XamlSerializable]
public bool HyperlinkEntries { get; set; }
Gets or sets whether matching caption entries are considered; a non-empty CaptionName is required to include them.
[XamlSerializable]
public bool IncludeCaptions { get; set; }
Gets or sets whether entries marked with TCField fields are included.
[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.
[XamlSerializable]
public string OutlineLevelsInRange { get; set; }
Gets or sets the type identifier used to filter TCField entries; an empty value selects untyped entries.
[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.
[XamlSerializable]
public string TCLevelsInRange { get; set; }
Gets or sets whether heading levels in OutlineLevelsInRange are used to select entries.
[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.
[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.
[XamlSerializable]
public bool UseTCLevelsInRange { get; set; }
Methods
Builds the field-specific parts of the code fragment, using the current CodeBuilder.
protected override void BuildCodeOverride()
Overrides:
Copies all properties from another field of the same type.
public override void CopyPropertiesFrom(Field fromField)
The other field, which has to be of the same type as the current instance.
Overrides:
Copies the field-specific properties from a FieldCodeExpression.
protected override void CopyPropertiesFromCodeExpression(FieldCodeExpression fieldCodeExpression)
The field code expression.
Overrides:
Creates a new instance of the current field class.
Builds the result fragment of the field.
protected override DocumentFragment GetResultFragment()
The result fragment.
Overrides: