Skip to main content
A newer version of this page is available. .
.NET Framework 4.5.2+

HyperlinkCollection.Remove(Hyperlink) Method

Converts a hyperlink to plain text.

Namespace: DevExpress.XtraRichEdit.API.Native

Assembly: DevExpress.RichEdit.v19.2.Core.dll

Declaration

void Remove(
    Hyperlink hyperlink
)

Parameters

Name Type Description
hyperlink Hyperlink

A Hyperlink to convert.

Remarks

To add a hyperlink to a document, use the HyperlinkCollection.Create method.

To remove an existing hyperlink, use the HyperlinkCollection.Remove method.

The code sample below locates and removes all hyperlinks in the first section:

using (RichEditDocumentServer wordProcessor = new RichEditDocumentServer())
{
    Document document = wordProcessor.Document;
    ReadOnlyHyperlinkCollection hyperlinks = document.Hyperlinks.Get(document.Sections[0].Range);
    if (hyperlinks != null)
    {
        foreach (Hyperlink hyperlink in hyperlinks)
        {
            document.Hyperlinks.Remove(hyperlink);
        }
    }
}
See Also