Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

BaseView.AddFloatDocument(Control, String) Method

Creates a floating document that hosts the target control.

Namespace: DevExpress.XtraBars.Docking2010.Views

Assembly: DevExpress.XtraBars.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#Declaration

public BaseDocument AddFloatDocument(
    Control control,
    string caption = null
)

#Parameters

Name Type Description
control Control

The floating document content.

#Optional Parameters

Name Type Default Description
caption String null

The Document caption.

#Returns

Type Description
BaseDocument

A newly created BaseDocument object.

#Remarks

The control parameter specifies the contents for the newly created document. You can use any Control or Form descendant as the document’s contents.

To subsequently access the document’s contents, use the BaseDocument.Control property.

When a document is added to a View, the BaseView.DocumentAdded event fires.

If a TabbedView is currently used, call the BaseView.AddDocument method to add a tabbed document instead of a floating document.

Floating documents within a TabbedView can be hosted either in individual containers, or in containers where other floating documents can be docked. See the BaseView.FloatingDocumentContainer property to learn more.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the AddFloatDocument(Control, String) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also