Remove Method
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WinForms. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Removes a footnote from a Text Control document.
Syntax
public bool Remove(Footnote footnote);Public Function Remove(footnote As Footnote) As BooleanParameters
| Parameter | Description |
|---|---|
| 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.");
}
}textControl.Text = "Customer: Contoso Ltd."
textControl.Select(10, 12)
Dim footnoteCollection As FootnoteCollection = textControl.Footnotes
footnoteCollection.Add(New Footnote("Source: FY 2026 annual report") With { .ID = 100 }, False)
If footnoteCollection.Count > 0 Then
Dim footnote As Footnote = footnoteCollection.Item(1)
If footnoteCollection.Remove(footnote) Then
Console.WriteLine("The item was removed.")
End If
End If