Skip to main content
.NET Framework 4.5.2+

SelectionCollection.Clear() Method

Removes all items from the collection.

Namespace: DevExpress.XtraRichEdit.API.Native

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

NuGet Package: DevExpress.RichEdit.Core


public void Clear()


View Example

document.LoadDocument("SelectionCollection.docx", DocumentFormat.OpenXml);
DocumentRange range1 = document.CreateRange(80, 100);
DocumentRange range2 = document.CreateRange(300, 100);
int startPos3 = document.Tables[0].Rows[0].LastCell.ContentRange.Start.ToInt();
DocumentRange range3 = document.CreateRange(startPos3, 100);
DocumentRange range4 = document.CreateRange(720, 100);
document.Selections.Add(new List<DocumentRange>() { range1, range2, range3, range4 });

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Clear() method.


The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also