Back to Devexpress

BaseView.DocumentClosing Event

windowsforms-devexpress-dot-xtrabars-dot-docking2010-dot-views-dot-baseview-12e5be53.md

latest3.7 KB
Original Source

BaseView.DocumentClosing Event

Fires when a document is about to be closed.

Namespace : DevExpress.XtraBars.Docking2010.Views

Assembly : DevExpress.XtraBars.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
public event DocumentCancelEventHandler DocumentClosing
vb
Public Event DocumentClosing As DocumentCancelEventHandler

Event Data

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

PropertyDescription
CancelGets or sets a value indicating whether the event should be canceled. Inherited from CancelEventArgs.
DocumentThe Document related to the current event.

Remarks

You can handle the DocumentClosing event to prevent a document from being closed. This can be accomplished by setting the event’s Cancel parameter to true.

When a document is closed, it is destroyed. After the document has been closed, the BaseView.DocumentClosed event fires. This event serves for notifications only.

To temporarily hide a document, use the BaseView.RemoveDocument or IBaseViewController.RemoveDocument method. The IBaseViewController.RemoveDocument method is accessible via the View’s Controller property (TabbedView.Controller or NativeMdiView.Controller).

See Also

Close(BaseDocument)

CloseAllButThis(BaseDocument)

DocumentClosed

IBaseDocumentDefaultProperties.AllowClose

IBaseDocumentProperties.AllowClose

ClosePageButtonShowMode

BaseView Class

BaseView Members

DevExpress.XtraBars.Docking2010.Views Namespace