BaseLayoutItem.Location Property

Gets or sets the coordinates of the layout item's top left corner.

Namespace: DevExpress.XtraLayout

Assembly: DevExpress.XtraLayout.v20.1.dll

Declaration

[XtraSerializableProperty]
[DXCategory("Layout")]
public virtual Point Location { get; set; }
<XtraSerializableProperty>
<DXCategory("Layout")>
Public Overridable Property Location As Point

Property Value

Type Description
Point

A Point structure that specifies the coordinates of the layout item's top left corner.

Remarks

Changing the value of an item's Location property modifies the coordinates of the item's top left corner and so modifies the item's size and indirectly the size of the adjacent items. To change the item's size relative to the top left corner use the BaseLayoutItem.Size property.

The Location property can't be used to change an item's position in respect to the other items. To move an item to a new position use the BaseLayoutItem.Move method.

The LayoutControl takes into account the size constraints imposed by the current and adjacent layout items while setting the item's size via the Size and/or BaseLayoutItem.Location properties The item's new size will be set as close as possible to the assigned size so that the size constraints of the items are not violated.

NOTE

The Location property returns the coordinates relative to the top left corner of the group that owns the current layout item. To get the coordinates relative to the layout control's top left corner use the BoundsRelativeToControl property of the BaseLayoutItem.ViewInfo object.

See Also