HyperlinkCollection.Remove(Hyperlink) Method
Converts a hyperlink to plain text.
Namespace: DevExpress.XtraRichEdit.API.Native
Assembly: DevExpress.RichEdit.v20.1.Core.dll
NuGet Package: DevExpress.RichEdit.Core
NuGet Packages: DevExpress.RichEdit.Core, DevExpress.WindowsDesktop.RichEdit.Core
Declaration
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