Back to Devexpress

BaseView.FloatingDocumentContainer Property

windowsforms-devexpress-dot-xtrabars-dot-docking2010-dot-views-dot-baseview-fbc40220.md

latest6.1 KB
Original Source

BaseView.FloatingDocumentContainer Property

Gets or sets a type of container for floating documents within the current BaseView.

Namespace : DevExpress.XtraBars.Docking2010.Views

Assembly : DevExpress.XtraBars.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DefaultValue(FloatingDocumentContainer.Default)]
[XtraSerializableProperty]
public virtual FloatingDocumentContainer FloatingDocumentContainer { get; set; }
vb
<DefaultValue(FloatingDocumentContainer.Default)>
<XtraSerializableProperty>
Public Overridable Property FloatingDocumentContainer As FloatingDocumentContainer

Property Value

TypeDefaultDescription
FloatingDocumentContainerDefault

A FloatingDocumentContainer enumerator value that specifies the type of container for floating documents within the current BaseView.

|

Available values:

NameDescription
Default

A Default value. Acts identically to the SingleDocument value.

| | SingleDocument |

Floating documents are hosted within independent containers and cannot be docked to each other.

| | DocumentsHost |

Floating documents are hosted within a float document container capable of containing multiple documents. You can drag documents to dock them into a floating container.

|

Remarks

Floating BaseView‘s documents can be hosted in two types of containers. If the FloatingDocumentContainer property is set to SingleDocument , every floating document is hosted within its personal container. Such documents can be docked only to a DocumentManager. If the FloatingDocumentContainer property is set to DocumentsHost , floating documents are hosted within a container to which other documents can be docked. Documents docked to such a floating container are presented as tabs. The figure below shows an example:

Use the BaseView.AddFloatingDocumentsHost method to display the specified control/form within a floating document container. Note that this method has no effect if the FloatingDocumentContainer property is not set to the DocumentsHost value.

A floating document container contains its own DocumentManager. Thus, all events related to floating documents are fired for this local manager rather than for the main DocumentManager. If you need to handle these events, create your own custom document container that owns the DocumentManager component and subscribe to this manager’s required events. See the BaseView.CustomDocumentsHostWindow property for an example.

The following code snippets (auto-collected from DevExpress Examples) contain references to the FloatingDocumentContainer property.

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.

winforms-document-manager-web-browser-ui/CS/Form1.cs#L24

csharp
InitializeComponent();
    tabbedView1.FloatingDocumentContainer = DevExpress.XtraBars.Docking2010.Views.FloatingDocumentContainer.DocumentsHost;
}

winforms-tabbed-ui-control-based-document/CS/DcoumentManagerContentGenerator/Form1.cs#L22

csharp
documentManager2.View.UseDocumentSelector = DevExpress.Utils.DefaultBoolean.True;
    tabbedView1.FloatingDocumentContainer = FloatingDocumentContainer.DocumentsHost;
}

winforms-document-manager-web-browser-ui/VB/Form1.vb#L17

vb
InitializeComponent()
    tabbedView1.FloatingDocumentContainer = FloatingDocumentContainer.DocumentsHost
End Sub

winforms-tabbed-ui-control-based-document/VB/DcoumentManagerContentGenerator/Form1.vb#L24

vb
documentManager2.View.UseDocumentSelector = DevExpress.Utils.DefaultBoolean.True
    tabbedView1.FloatingDocumentContainer = FloatingDocumentContainer.DocumentsHost
End Sub

See Also

AddFloatingDocumentsHost

BaseView Class

BaseView Members

DevExpress.XtraBars.Docking2010.Views Namespace