XRControl.AnchorVertical Property

Specifies the vertical anchoring style of a report control.

Namespace: DevExpress.XtraReports.UI

Assembly: DevExpress.XtraReports.v20.2.dll

Declaration

[SRCategory(ReportStringId.CatBehavior)]
public virtual VerticalAnchorStyles AnchorVertical { get; set; }
<SRCategory(ReportStringId.CatBehavior)>
Public Overridable Property AnchorVertical As VerticalAnchorStyles

Property Value

Type Description
VerticalAnchorStyles

The style of vertical anchoring.

Remarks

When the height of a control grows or shrinks in Preview, the position of controls that are located below changes. You can use the AnchorVertical property to attach the control top and\or bottom edges to the edges of its container on a rendered document page. You can set the value of this property to one of the VerticalAnchorStyles enumeration values. The following examples demonstrate how different values affect the anchoring.

The below image shows the initial report layout. Three XRLabel controls are located inside a panel. The top and bottom controls contain multiline text. Different values of the AnchorVertical property are set for the control in the middle.

anchor-vertical-layout

See how these values affect the position of this middle control when the report is rendered in Preview.

NOTE

To adjust the control height to the control's content size, use the control's CanGrow and CanShrink properties. Note that these two properties are not in effect if you set the control's AnchorVertical property to Bottom or Both.

The following descendants of the XRControl control do not implement the AnchorVertical property:

Implements

See Also