Back to Devexpress

RichEditControl.DocumentClosing Event

windowsforms-devexpress-dot-xtrarichedit-dot-richeditcontrol-ca334eab.md

latest2.5 KB
Original Source

RichEditControl.DocumentClosing Event

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

Namespace : DevExpress.XtraRichEdit

Assembly : DevExpress.XtraRichEdit.v25.2.dll

NuGet Package : DevExpress.Win.RichEdit

Declaration

csharp
public event CancelEventHandler DocumentClosing
vb
Public Event DocumentClosing As CancelEventHandler

Event Data

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

PropertyDescription
CancelGets 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

CreateEmptyDocumentCommand

LoadDocumentCommand

CreateNewDocument(Boolean)

RichEditControl Class

RichEditControl Members

DevExpress.XtraRichEdit Namespace