Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

RichEditControl.DocumentClosing Event

Occurs when a document that contains unsaved changes is about to be closed.

Namespace: DevExpress.Xpf.RichEdit

Assembly: DevExpress.Xpf.RichEdit.v24.2.dll

NuGet Package: DevExpress.Wpf.RichEdit

#Declaration

public event CancelEventHandler DocumentClosing

#Event Data

The DocumentClosing event's data class is CancelEventArgs. The following properties provide information specific to this event:

Property Description
Cancel Gets or sets a value indicating whether the event should be canceled.

#Remarks

Handle the DocumentClosing event to specify the actions to perform before the document is closed. To cancel closing, set the e.Cancel value to true.

The DocumentClosing event is raised only if the document has unsaved changes (that is, if the RichEditControl.Modified property is true).

The event is raised when the following commands and methods are executed:

See Also