Skip to main content

RichEditControl.Copy() Method

Copies the content of the selection to the Clipboard.

Namespace: DevExpress.XtraRichEdit

Assembly: DevExpress.XtraRichEdit.v23.2.dll

NuGet Packages: DevExpress.Win.PivotGrid, DevExpress.Win.RichEdit, DevExpress.Win.TreeMap

Declaration

public void Copy()

Example

The following code finds all occurrences of the “text from RichEditControl” phrase using the SubDocument.FindAll method, selects and copies them.

View Example

richEditControl.Text = "Open any text editor (Notepad, Word) and press the 'Ctrl+V' shortcut, the 'text from RichEditControl' string will be pasted into the editor's document";
DocumentRange[] foundRanges = richEditControl.Document.FindAll("text from RichEditControl", SearchOptions.None);
richEditControl.Document.Selection = foundRanges[0];
richEditControl.Copy();

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

Note

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