corelibraries-devexpress-dot-xtrareports-dot-ui-dee50ed2.md
Lists the horizontal anchoring styles available for a report control.
Namespace : DevExpress.XtraReports.UI
Assembly : DevExpress.Printing.v25.2.Core.dll
NuGet Package : DevExpress.Printing.Core
[Flags]
[ResourceFinder(typeof(ResFinder))]
public enum HorizontalAnchorStyles
<Flags>
<ResourceFinder(GetType(ResFinder))>
Public Enum HorizontalAnchorStyles
| 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.
|
The following properties accept/return HorizontalAnchorStyles values:
| Library | Related API Members |
|---|---|
| Cross-Platform Class Library | IBrickOwner.AnchorHorizontal |
| .NET Reporting Tools | XRControl.AnchorHorizontal |
The AnchorHorizontal property defines how a report control is resized 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:
Initial layout. The band contains the XRPanel control with the XRLabel control inside it. Different values of the AnchorHorizontal property are set for the XRLabel control. The following images show how these values affect the anchoring of this control when the width of the panel is changed.
The control property value is Left (works the same as None ). The right edge of the panel moves to the right. The XRLabel control’s position does not change to preserve the distance to the left edge of the panel.
The control property value is Right. The right edge of the panel moves to the right. The XRLabel control’s position changes to preserve the distance to the right edge of the panel.
The control property value is Both. The right edge of the panel moves to the right. The XRLabel control’s width increases to preserve the distance to both edges of its container.
The AnchorHorizontal property is hidden in the following descendants of the XRControl class:
See Also