Float Groups
- 2 minutes to read
#Overview
A Float Group (a FloatGroup object) is a kind of floating window that displays a dock panel, groups of dock panels or a DocumentPanel in a floating state. The following image shows a Float Group containing two layout panels:
When a panel/DocumentPanel is about to become floating, a Float Group is automatically created and the panel is added to this group. Docking a floating panel destroys the Float Group.
Float groups can be moved within the boundaries of a window or a desktop. This feature is controlled by the DockLayoutManager.FloatingMode option.
#Child Items
The following objects can be children of a Float Group:
You can add multiple child objects to a Float Group. In this instance, the Float Group's children will be arranged side by side.
To create a floating panel in XAML, you need to:
- Add a FloatGroup object to the DockLayoutManager.FloatGroups collection. This collection contains all Float Groups, so it allows you to access all floating panels.
- Add a dock object(s) (for instance, a LayoutPanel object(s)) to the created FloatGroup.
- Set the size for the created FloatGroup object via the BaseLayoutItem.FloatSize property.
- Set the position for the created FloatGroup object via the FloatGroup.FloatLocation property.
In code, a panel can be made floating via the DockController.Float method of the DockLayoutManager.DockController object.
#Dock Operations
To prevent a panel from being made floating, use the BaseLayoutItem.AllowFloat option. You can create a floating panel and then prevent it from being docked via the BaseLayoutItem.AllowDock option.
To make a panel floating in code, use the DockController.Float method of the DockLayoutManager.DockController object.
The DockLayoutManager.DockItemStartDocking, DockLayoutManager.DockItemDocking and DockLayoutManager.DockItemEndDocking events allow dock operations to be dynamically controlled.