XRControl.AnchorHorizontal Property
Specifies the horizontal anchoring type of a report control.
Namespace: DevExpress.XtraReports.UI
Assembly: DevExpress.XtraReports.v24.2.dll
NuGet Package: DevExpress.Reporting.Core
Declaration
[SRCategory(ReportStringId.CatBehavior)]
public virtual HorizontalAnchorStyles AnchorHorizontal { get; set; }
Property Value
Type | Description |
---|---|
HorizontalAnchorStyles | The type of horizontal anchoring. |
Available values:
Name | Description |
---|---|
None | Identical to the Left member. |
Left | Anchors a control to the left edge of its container. |
Right | Anchors a control to the right edge of its container. |
Both | Anchores a control to the left and right edges of its container. |
Remarks
This property defines how to resize a report control to maintain the distance to the left and right edges of its container. You can set the value of this property to one of the HorizontalAnchorStyles enumeration values. The following examples demonstrate how different property values affect anchoring:
Tip
Review the following blog post: Reporting - Responsive Report Layouts with Control Anchoring.
The property is hidden in the following descendants of the XRControl class:
- Band
- XRCrossTab
- XRPageBreak
- XRPdfContent
- XRSubreport
- XRTableOfContents
- XRTableCell
- XRTableRow
- XtraReport
- XRCrossTabCell
Note
The AnchorHorizontal
property does not work with controls inside a subreport unless the GenerateOwnPages option is enabled for the subreport.