Skip to main content

BaseView.RegisterDocumentsHostWindow Event

Fires when a document starts to float in its individual container. Provides access to the host window and its DocumentManager so you can handle events as required. This event is in effect in DocumentsHost mode.

Namespace: DevExpress.XtraBars.Docking2010.Views

Assembly: DevExpress.XtraBars.v24.1.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

public event DocumentsHostWindowEventHandler RegisterDocumentsHostWindow

Event Data

The RegisterDocumentsHostWindow event's data class is DevExpress.XtraBars.Docking2010.DocumentsHostWindowEventArgs.

Remarks

If the BaseView.FloatingDocumentContainer property is set to DocumentsHost, when a document is undocked from the main form and made floating, it is placed within a special container (IDocumentsHostWindow object) which possesses its own DocumentManager (accessible via the IDocumentsHostWindow.DocumentManager property). This DocumentManager does not handle those events that the main form’s DocumentManager handles. The RegisterDocumentsHostWindow event is fired when a document is made floating and provides access to the created documents host window via the DocumentsHostWindowEventArgs.HostWindow property. This allows you to get access to its DocumentManager via the IDocumentsHostWindow.DocumentManager property and subscribe its events to the event handles of the main form’s DocumentManager. To unsubscribe event handlers from the DocumentManager when the documents host window is closed, use the BaseView.UnregisterDocumentsHostWindow event.

You can also use the BaseView.CustomDocumentsHostWindow event to provide a custom documents host window for floating documents in the DocumentsHost mode.

See Also