BaseView.BeginFloating Event
Fires when an end-user starts to drag a docked document, so that it is transformed into a floating window.
Namespace: DevExpress.XtraBars.Docking2010.Views
Assembly: DevExpress.XtraBars.v24.1.dll
NuGet Package: DevExpress.Win.Navigation
Declaration
Event Data
The BeginFloating event's data class is DocumentCancelEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
Cancel | Gets or sets a value indicating whether the event should be canceled. Inherited from CancelEventArgs. |
Document | The Document related to the current event. |
Remarks
You can prevent a document from becoming a floating window with the IBaseDocumentDefaultProperties.AllowFloat/IBaseDocumentProperties.AllowFloat properties or by handling the BeginFloating event. To prevent a document from becoming floating when handling the event, set the event’s Cancel parameter to true.
The BeginFloating event is not raised when an end-user invokes the “Float” command from a document’s context menu. To change the context menu, you can handle the BaseView.PopupMenuShowing event.
When an end-user starts to drag a docked document, the following events raise in the following order:
- BeginFloating (when the docked document is about to become floating).
- BaseView.Floating (after this document becomes floating).
- BaseView.EndFloating (after the mouse button is released and this document is dropped).
By default, documents within a NativeMdiView can be dragged only within the View’s bounds. These documents are considered as “docked”. When you make a document floating within a NativeMdiView via the IBaseViewController.Float method, the document can be dragged outside the View. To “dock” a document back to a NativeMdiView, so it can be dragged only within the View’s bounds, call the IBaseViewController.Dock method.