Back to Devexpress

BaseLayoutItem.FloatSize Property

wpf-devexpress-dot-xpf-dot-docking-dot-baselayoutitem-7e8a52ea.md

latest3.8 KB
Original Source

BaseLayoutItem.FloatSize Property

Gets or sets the size of the item when it is floating. This is a dependency property.

Namespace : DevExpress.Xpf.Docking

Assembly : DevExpress.Xpf.Docking.v25.2.dll

NuGet Package : DevExpress.Wpf.Docking

Declaration

csharp
public Size FloatSize { get; set; }
vb
Public Property FloatSize As Size

Property Value

TypeDescription
Size

The item’s size, in pixels.

|

Remarks

The following code sample specifies the FloatGroup‘s FloatSize and FloatLocation properties:

xaml
<dx:ThemedWindow 
  ...
  xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
  xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking">
  <dxdo:DockLayoutManager>
    <dxdo:DockLayoutManager.FloatGroups>
      <dxdo:FloatGroup FloatLocation="50,40" FloatSize="200,150">
        <dxdo:LayoutPanel Caption="Panel1"/>
      </dxdo:FloatGroup>
    </dxdo:DockLayoutManager.FloatGroups>
  </dxdo:DockLayoutManager>
</dx:ThemedWindow>

Tip

You can specify the FloatSize property even if an item is not currently floating. Refer to the code sample below for the example.

In Code

The following code sample creates the same FloatGroup in code :

xaml
<dx:ThemedWindow 
  ...
  xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
  xmlns:dxdo="http://schemas.devexpress.com/winfx/2008/xaml/docking">
  <dxdo:DockLayoutManager x:Name="DockLayoutManager1">
    <dxdo:LayoutGroup>
      <dxdo:LayoutPanel Caption="Panel1"/>
    </dxdo:LayoutGroup>
  </dxdo:DockLayoutManager>
</dx:ThemedWindow>
csharp
FloatGroup floatgroup = DockLayoutManager1.DockController.Float(Panel1);
floatgroup.FloatLocation = new Point(50, 40);
floatgroup.FloatSize = new Size(200, 150);
vb
Dim floatgroup As FloatGroup = DockLayoutManager1.DockController.Float(Panel1)
floatgroup.FloatLocation = New Point(50, 40)
floatgroup.FloatSize = New Size(200, 150)

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

wpf-docklayoutmanager-dock-panels-in-code/CS/DockPanelInCode_Ex/Window1.xaml#L29

xml
<dxdo:DockLayoutManager.FloatGroups>
    <dxdo:FloatGroup FloatLocation="100,50" FloatSize="200,150">
        <dxdo:LayoutPanel x:Name="paneProperties" Caption="Properties">

See Also

BaseLayoutItem Class

BaseLayoutItem Members

DevExpress.Xpf.Docking Namespace