Skip to main content

DXErrorProvider.SetIconAlignment(Control, ErrorIconAlignment) Method

Specifies the alignment of an error icon for a control.

Namespace: DevExpress.XtraEditors.DXErrorProvider

Assembly: DevExpress.XtraEditors.v23.1.dll

NuGet Package: DevExpress.Win.Navigation


public void SetIconAlignment(
    Control control,
    ErrorIconAlignment alignment


Name Type Description
control Control

The control for which the error icon alignment is specified.

alignment ErrorIconAlignment

A ErrorIconAlignment value that specifies the alignment of the control’s error icon.


Errors can be assigned to editors via their BaseEdit.ErrorText properties and the methods of the DXErrorProvider class. When an error is assigned, an error icon is displayed within the editor. Its position can be adjused via the SetIconAlignment method or the BaseEdit.ErrorIconAlignment property:


To return the current error icon alignment, the DXErrorProvider.GetIconAlignment method can be used.


The SetIconAlignment method is only in effect for BaseEdit control descendants

See Also