Spacing and Paddings
DevExpress Layout Control allows you to customize spacing inside and around layout items and groups. Use padding and spacing properties to control layout density and visual structure.
Padding
Use the Padding property to specify inner indents (the distance between a layout item’s border and its content area).
Spacing
Use the Spacing property to specify outer indents (the distance between a layout item’s border and the space surrounding it).
Border Visibility
Layout items and groups have borders—visible or invisible.
- Layout groups display borders by default. To hide them, set the LayoutGroup.GroupBordersVisible property to
false
. - Regular layout items and tabbed groups do not display borders, but the layout engine applies spacing and padding.
Example
The following image shows a layout group with:
- Padding set to
10
on all sides. - Spacing set to
20
on all sides.
layoutControlGroup2.Padding = new DevExpress.XtraLayout.Utils.Padding(10);
layoutControlGroup2.Spacing = new DevExpress.XtraLayout.Utils.Padding(20);
Note
Spacing
and Padding
properties are not in effect for groups that are displayed as tabs within a tabbed group.
See Also