Removes a document link from a Text Control document.

Remove(DocumentLink)

public bool Remove(DocumentLink documentLink);
Public Function Remove(ByVal documentLink As DocumentLink) As Boolean

Remove(DocumentLink, Bool)

public bool Remove(DocumentLink documentLink, bool keepText);
Public Function Remove(ByVal documentLink As DocumentLink, ByVal keepText As Boolean) As Boolean

Parameters

Parameter Description
documentLink Specifies the document link to remove.
keepText If this parameter is set to true, the document link is removed without deleting its text. Otherwise, the link's text is also deleted.

Return Value

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

Examples

The following example shows how to use the TXTextControl.DocumentLinkCollection.Remove Method.

//create new documentLink
TXTextControl.DocumentLink newLink = new TXTextControl.DocumentLink("Jump to page 1", newTarget);
//Remove DocLink 'newLink'
if (textControl1.DocumentLinks.Remove(newLink))
{
    textBox1.Text = "The DocumentLink 'newlink' could be Removed! " + Environment.NewLine + Environment.NewLine";
}
Dim newLink As TXTextControl.DocumentLink = New TXTextControl.DocumentLink("Jump to page 1", newTarget)

If textControl1.DocumentLinks.Remove(newLink) Then
    textBox1.Text = "The DocumentLink 'newlink' could be Removed! " & Environment.NewLine + Environment.NewLine
End If