Fires when an end-user starts to drag a docked document, so that it is transformed into a floating window.
public event DocumentCancelEventHandler BeginFloating
Public Event BeginFloating As DocumentCancelEventHandler
The BeginFloating event's data class is DocumentCancelEventArgs. The following properties provide information specific to this event:
|Cancel||Gets or sets a value indicating whether the event should be canceled. Inherited from CancelEventArgs.|
|Document||The Document related to the current event.|
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.