Back to Devexpress

DxCheckBox<T>.Alignment Property

blazor-devexpress-dot-blazor-dot-dxcheckbox-1-77cc375f.md

latest2.5 KB
Original Source

DxCheckBox<T>.Alignment Property

Specifies the alignment of a CheckBox’s content.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[DefaultValue(CheckBoxContentAlignment.Default)]
[Parameter]
public CheckBoxContentAlignment Alignment { get; set; }

Property Value

TypeDefaultDescription
CheckBoxContentAlignmentDefault

A CheckBoxContentAlignment enumeration value.

|

Available values:

NameDescription
Default

The component’s content is aligned according to outer styles a user applies.

| | Left |

The component’s content is aligned to the left of the component’s root element.

| | Right |

The component’s content is aligned to the right of the component’s root element.

| | Center |

The component’s content is aligned to the center of the component’s root element.

| | SpaceBetween |

The component’s content uses the justify-content: space-between alignment.

| | SpaceAround |

The component’s content uses justify-content: space-around alignment.

|

Remarks

Use the Alignment property to align a CheckBox‘s text label and check mark relative to each other.

razor
<div>
    <DxCheckBox Checked="false" 
                LabelPosition="LabelPosition.Right" 
                Alignment="CheckBoxContentAlignment.Left">Multimedia</DxCheckBox>
</div>

Note

Checkbox alignment can work incorrectly when the CheckType property is set to CheckType.Switch and a text label is not specified.

Run Demo: CheckBox - Alignment

See Also

DxCheckBox<T> Class

DxCheckBox<T> Members

DevExpress.Blazor Namespace