ReadOnlyHyperlinkCollection Interface
A collection of Hyperlink objects in the document.
Namespace: DevExpress.XtraRichEdit.API.Native
Assembly: DevExpress.RichEdit.v24.2.Core.dll
NuGet Package: DevExpress.RichEdit.Core
Declaration
[ComVisible(true)]
public interface ReadOnlyHyperlinkCollection :
ISimpleCollection<Hyperlink>,
IEnumerable<Hyperlink>,
IEnumerable,
ICollection
Related API Members
The following members return ReadOnlyHyperlinkCollection objects:
Remarks
Contains a ReadOnlyHyperlinkCollection.Get method that obtains all hyperlinks located in the specified document range. You can access individual items of this collection, but you cannot add or delete items. Use index notation to obtain an individual Hyperlink object from this collection.
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