TX Text Control .NET for Windows Forms

Remove Method

Method|Introduced in 32.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.WinForms.SDK as TXTextControl.dll from the private NuGet feed or Text Control Offline Packages

Description

Removes a footnote from a Text Control document.

Syntax

public bool Remove(Footnote footnote);

Parameters

ParameterDescription
footnote

Specifies the footnote to remove.

Return Value

The return value is true, if the footnote could be removed. Otherwise, it is false.

Examples

The following example works with footnotes in the current document by using FootnoteCollection.Remove.

textControl.Text = "Customer: Contoso Ltd.";
textControl.Select(10, 12);
FootnoteCollection footnoteCollection = textControl.Footnotes;
footnoteCollection.Add(new Footnote("Source: FY 2026 annual report") { ID = 100 }, false);

if (footnoteCollection.Count > 0)
{
    Footnote footnote = footnoteCollection[1];
    if (footnoteCollection.Remove(footnote))
    {
        Console.WriteLine("The item was removed.");
    }
}