TX Text Control .NET for WPF

AddResult Enumeration

Enumeration|Introduced in 29.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.WPF.SDK from the private NuGet feed or Text Control Offline Packages
Assembly
TXTextControl.dll
Install
dotnet add package TXTextControl.TextControl.WPF.SDK .NET 8 and later. For .NET Framework, reference TXTextControl.dll from the setup.

Description

Specifies the result when an existing table of contents has been updated or a new table of contents has been added to the document.

Syntax

public enum TableOfContentsCollection.AddResult

Members

MemberValueDescription
ContentNotFound1The table of contents could not be inserted or updated because it has no content. A paragraph with a structure level as specified through the TableOfContents.MinimumStructureLevel and TableOfContents.MaximumStructureLevel properties could not be found.
Error0An unexpected error has occurred or the current text input position is a position where a table of contents cannot be inserted. Tables of content cannot be inserted in a TextField or a HypertextLink. Furthermore, tables of contents cannot be nested.
Successful2The table of contents has successfully been inserted or updated.

Examples

The following example selects the Error value from the Add Result enumeration and uses it as a documented workflow choice.

TableOfContentsCollection.AddResult value = TableOfContentsCollection.AddResult.Error;
Console.WriteLine($"Using Add Result: {value}");