Skip to main content

RichEditControl.DeselectAll() Method

Specifies that no content is selected in the control.

Namespace: DevExpress.XtraRichEdit

Assembly: DevExpress.XtraRichEdit.v24.2.dll

Declaration

public void DeselectAll()

Example

The following code resets document selection and sets the caret to the end of the former selection.

The RichEditControl instance is passed to the BarItem.ItemClick event handler using the BarItem.Tag property.

View Example

static void buttonCustomAction_ItemClick_Deselect(object sender, ItemClickEventArgs e) {
    RichEditControl richEdit = e.Item.Tag as RichEditControl;
    DocumentPosition endOfSelection = richEdit.Document.Selection.End;
    richEdit.DeselectAll();
    richEdit.Document.CaretPosition = endOfSelection;
}

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the DeselectAll() 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