Skip to main content
A newer version of this page is available. .

DockPanel.MakeFloat(Point) Method

Floats the current dock panel at the specified position.

Namespace: DevExpress.XtraBars.Docking

Assembly: DevExpress.XtraBars.v19.1.dll

Declaration

public void MakeFloat(
    Point ptScreen
)

Parameters

Name Type Description
ptScreen Point

A Point structure specifying the position of the top-left corner of the floating window (in screen coordinates).

Remarks

Use the MakeFloat method to make the panel floating.

To simulate the floating state the MakeFloat method creates a floating form and this will contain the panel being made to float. The created floating form can be accessed via the panel’s DockPanel.FloatForm property. The DockPanel.FloatForm property can for instance, be useful when changing the position and size of the floating panel. If the panel isn’t floating the DockPanel.FloatForm property returns null.

Note

Do not change the panel’s DockPanel.Visibility property or call the MakeFloat method in the form’s constructor. Use the DockManager.Load event for this purpose.

Note

When implementing tooltips using the standard System.Windows.Forms.ToolTip class, take note that the tooltips will not be displayed for controls that reside within floating dock panels. To provide tooltips for controls, use the DefaultToolTipController or ToolTipController component instead. See Tooltip Management to learn more.

Example

In the following example a new panel is created and floated in the bottom right corner of the screen.

using DevExpress.XtraBars.Docking;
// ...
// Create a panel and make it floated.
DockPanel p1 = dockManager1.AddPanel(DockingStyle.Float);
p1.Text = "Panel 1";
// ...
p1.FloatSize = new Size(100, 150);
Point pt = new Point(Screen.PrimaryScreen.WorkingArea.Width - p1.Width, 
  Screen.PrimaryScreen.WorkingArea.Height - p1.Height);
// Move the panel to the bottom right corner of the screen.
p1.MakeFloat(pt);         

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the MakeFloat(Point) 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