HorzAlignment Enum
Specifies the horizontal alignment of an object or text in a control.
Namespace: DevExpress.Utils
Assembly:
DevExpress.Data.v18.1.dll
Declaration
[TypeConverter(typeof(EnumTypeConverter))]
[ResourceFinder(typeof(ResFinder))]
public enum HorzAlignment
<ResourceFinder(GetType(ResFinder))>
<TypeConverter(GetType(EnumTypeConverter))>
Public Enum HorzAlignment
Members
Name |
Description |
Default
|
Places an object or text at the default position, which is determined by a control.
|
Near
|
Places an object/text at a near position.
|
Center
|
Centers an object or text within a region.
|
Far
|
Places an object/text at a far position.
|
The HorzAlignment enumeration represents different horizontal alignment options for an object or text in a control.
The following code snippets (auto-collected from DevExpress Examples) contain references to the HorzAlignment enum.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
does-the-lookup-editor-support-guid-values-e720/CS/Form1.cs#L119
this.lookUpEdit1.Properties.Columns.AddRange(new DevExpress.XtraEditors.Controls.LookUpColumnInfo[] {
new DevExpress.XtraEditors.Controls.LookUpColumnInfo("ID", "ID", 37, DevExpress.Utils.FormatType.None, "", true, DevExpress.Utils.HorzAlignment.Near),
new DevExpress.XtraEditors.Controls.LookUpColumnInfo("Item", "Item", 37, DevExpress.Utils.FormatType.None, "", true, DevExpress.Utils.HorzAlignment.Near)});
xtraform-how-to-center-align-a-header-caption-text-t103979/CS/WindowsApplication1/XtraForm1.cs#L13
protected override DevExpress.Skins.XtraForm.FormPainter CreateFormBorderPainter() {
HorzAlignment formCaptionAlignment = HorzAlignment.Center;
return new CustomFormPainter(this, LookAndFeel, formCaptionAlignment);
how-to-copy-cell-data-in-an-excel-format-biff8-to-the-clipboard-using-xl-export-library-t266171/CS/gridCopyToClipboardExample/CopyToClipboardHelper.cs#L127
XlHorizontalAlignment ConvertAlignment(HorzAlignment horizontalAlignment) {
switch (horizontalAlignment) {
how-to-print-a-custom-usercontrol-that-lays-inside-a-grid-cell-e3992/CS/CustomControlInGrid/ProjectLayoutControl.cs#L83
rect.Height = info.Rectangle.Bottom - rect.Y - info.Rectangle.Y;
PrintCellHelperInfo inf = new PrintCellHelperInfo(info.LineColor, info.PS, progressBarControl1.Position, progressBarControl1.Properties.Appearance, progressBarControl1.Properties.DisplayFormat.GetDisplayText(progressBarControl1.Position), rect, info.Graph, DevExpress.Utils.HorzAlignment.Near, true, true, progressBarControl1.Properties.DisplayFormat.GetFormatString(), BorderSide.All);
how-to-add-custom-header-buttons-to-a-dockpanel-e3926/CS/CustomHeaderButtonsExample/Form1.cs#L33
void panelContainer1_CustomButtonChecked(object sender, DevExpress.XtraBars.Docking2010.ButtonEventArgs e) {
if (e.Button == panelContainer1.CustomHeaderButtons[4]) (panelContainer1.ActiveChild.ControlContainer.Controls[0] as MemoEdit).Properties.Appearance.TextOptions.HAlignment = HorzAlignment.Near;
if (e.Button == panelContainer1.CustomHeaderButtons[3]) (panelContainer1.ActiveChild.ControlContainer.Controls[0] as MemoEdit).Properties.Appearance.TextOptions.HAlignment = HorzAlignment.Center;
See Also