wpf-devexpress-dot-xpf-dot-docking-d170a706.md
A container for floating panels.
Namespace : DevExpress.Xpf.Docking
Assembly : DevExpress.Xpf.Docking.v25.2.dll
NuGet Package : DevExpress.Wpf.Docking
public class FloatGroup :
LayoutGroup,
IClosable
Public Class FloatGroup
Inherits LayoutGroup
Implements IClosable
The following members return FloatGroup objects:
A FloatGroup object is a floating window that contains content. The content can be a dock panel, group of dock panels, or the floating DocumentPanel.
View Example: Create FloatPanels in XAML
The following code sample creates a FloatGroup that contains a LayoutPanel:
<Window ...
xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking">
<dxdo:DockLayoutManager>
<dxdo:DockLayoutManager.FloatGroups>
<dxdo:FloatGroup FloatLocation="15,50" FloatSize="180,200">
<dxdo:LayoutPanel Caption="Panel2"/>
</dxdo:FloatGroup>
</dxdo:DockLayoutManager.FloatGroups>
</dxdo:DockLayoutManager>
</Window>
The following code sample uses the DockLayoutManager.DockController object’s Float method to create a FloatGroup :
<Window ...
xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking">
<dxdo:DockLayoutManager>
<dxdo:LayoutGroup Caption="LayoutRoot" x:Name="rootgroup" Orientation="Horizontal">
<dxdo:LayoutPanel x:Name="Panel2" Caption="Panel2" >
<RichTextBox></RichTextBox>
</dxdo:LayoutPanel>
</dxdo:LayoutGroup>
</dxdo:DockLayoutManager>
</Window>
FloatGroup floatgroup = DockLayoutManager1.DockController.Float(Panel2);
floatgroup.FloatLocation = new Point(50, 50);
floatgroup.FloatSize = new Size(300, 200);
Dim floatgroup As FloatGroup = DockLayoutManager1.DockController.Float(Panel1)
floatgroup.FloatLocation = New Point(50, 50)
floatgroup.FloatSize = New Size(300, 200)
Tip
Use the DockLayoutManager.FloatGroups collection to access FloatGroups.
The DockLayoutManager creates a FloatGroup when a user undocks a panel/DocumentPanel from its parent container. The DockLayoutManager removes a FloatGroup when a user docks the last FloatGroup ‘s child panel.
The Float Group can contain the following child objects:
Tip
You can add multiple child objects to a FloatGroup. In this case, the FloatGroup arranges its children side by side.
Use the DockLayoutManager.FloatingMode property to specify how floating panels can be dragged, inside or outside the boundaries of the current window.
Use the FloatGroup ‘s BaseLayoutItem.FloatSize property to specify the FloatGroup size.
Tip
You can use the SizeToContent property to specify whether a panel should size itself based on the content size.
Use the FloatLocation property to specify the FloatGroup ‘s location.
Use the FloatState property to specify the FloatGroup ‘s state.
Use the ShowMinimizeButton property to specify whether the minimize button is displayed in the floating panel.
Floating panels display their image and caption in the Windows Taskbar’s preview. Use the WindowTaskbarTitle and WindowTaskbarIcon attached properties to specify a FloatPanel ‘s caption and image.
Note
These properties are in effect only when DockLayoutManager.FloatingMode is Desktop.
Use the DockLayoutManager.EnableWin32Compatibility property to specify whether the FloatGroup should be displayed over WindowsFormsHost elements.
Set the DockLayoutManager.OwnsFloatWindows property to false to send FloatGroup behind its parent window when you click the parent window.
Set a panel’s BaseLayoutItem.AllowFloat property to true to allow the panel to be a floating panel. You can specify the panel’s BaseLayoutItem.AllowDock property to prevent it from being docked.
Use a floating panel’s BaseLayoutItem.AllowMinimize property to specify whether a user can minimize the panel.
The following events allow you to control a panel’s dock operations at runtime:
| Event | Description |
|---|---|
| DockLayoutManager.DockItemStartDocking | Fires when a docking operation starts, and allows you to prevent this operation. |
| DockLayoutManager.DockItemDocking | Fires before a dock item is dragged over dock hints, and allows you to prevent dock zones from being displayed. |
| DockLayoutManager.DockItemEndDocking | Fires after a dock item has been dropped, and allows you to prevent this action. |
The following code snippets (auto-collected from DevExpress Examples) contain references to the FloatGroup class.
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.
wpf-docklayoutmanager-dock-panels-in-code/CS/DockPanelInCode_Ex/Window1.xaml#L29
<dxdo:DockLayoutManager.FloatGroups>
<dxdo:FloatGroup FloatLocation="100,50" FloatSize="200,150">
<dxdo:LayoutPanel x:Name="paneProperties" Caption="Properties">
wpf-diagram-mdi/CS/MainWindow.xaml#L151
<dxdo:DockLayoutManager.FloatGroups>
<dxdo:FloatGroup
AllowActivate="False"
Show 11 items
Object DispatcherObject DependencyObject Visual UIElement FrameworkElement Control DevExpress.Xpf.Docking.psvFrameworkElement BaseLayoutItem LayoutGroup FloatGroup
See Also