FloatGroup Class

A container for floating panels.

Namespace: DevExpress.Xpf.Docking

Assembly: DevExpress.Xpf.Docking.v21.1.dll

Declaration

public class FloatGroup :
    LayoutGroup,
    IClosable

The following members accept/return FloatGroup objects:

Remarks

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.

DockLayoutManager - FloatingGroups

Create Float Groups

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>

In Code

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);

DockLayoutManager - FloatGroup

Tip

Use the DockLayoutManager.FloatGroups collection to access FloatGroups.

At Runtime

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.

Child Items

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.

Customize Float Groups

Mode

Use the DockLayoutManager.FloatingMode property to specify how floating panels can be dragged, within or outside the boundaries of the current window.

DockLayoutManager - FloatGroup

Size

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.

Location

Use the FloatLocation property to specify the FloatGroup‘s location.

DockLayoutManager - FloatLocation Property

State

Use the FloatState property to specify the FloatGroup‘s state.

DockLayoutManager - FloatState Property

Minimize Buttons

Use the ShowMinimizeButton property to specify whether the minimize button is displayed in the floating panel.

Taskbar

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.

DockLayoutManager - WindowTaskBarTitle and WindowTaskBarIcon Properties

Note

These properties are in effect only when DockLayoutManager.FloatingMode is Desktop.

WindowsFormsHost Elements

Use the DockLayoutManager.EnableWin32Compatibility property to specify whether the FloatGroup should be displayed over WindowsFormsHost elements.

Send FloatGroups Behind the Parent Window

Set the DockLayoutManager.OwnsFloatWindows property to false to send FloatGroup behind its parent window when you click the parent window.

DockLayoutManager - OwnsFloatWindows

Runtime Operations

Float Group Availability

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.

Minimization

Use a floating panel’s BaseLayoutItem.AllowMinimize property to specify whether a user can minimize the panel.

Events

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.

Inheritance

Show 11 items
See Also