Back to Devexpress

ICheckBoxSettings.Alignment Property

blazor-devexpress-dot-blazor-dot-icheckboxsettings.md

latest3.5 KB
Original Source

ICheckBoxSettings.Alignment Property

Specifies the alignment of the checkbox editor in the edit or pop-up edit form.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

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

Property Value

TypeDefaultDescription
CheckBoxContentAlignmentDefault

An 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 change checkbox alignment at runtime. To specify the alignment in markup, use the DxCheckBoxSettings.Alignment property.

The Grid aligns the checkbox editor to the left border of the container if the editor’s Alignment property is set to SpaceBetween. If the property is set to SpaceAround, the Grid centers the checkbox within the container.

Note

In EditRow and EditCell edit modes mode, the Alignment property has no effect and the checkbox editor is centered within its cell.

The ICheckBoxSettings interface allows you to get and customize settings of a checkbox editor at runtime. You can get editor settings in the following ways:

csharp
void Grid_CustomizeFilterRowEditor(GridCustomizeFilterRowEditorEventArgs e) {
    if(e.EditSettings is ICheckBoxSettings checkboxSettings)
        checkboxSettings.Alignment = CheckBoxContentAlignment.Right;
}
csharp
void Grid_CustomizeDataRowEditor(GridCustomizeDataRowEditorEventArgs e) {
    if(e.EditSettings is ICheckBoxSettings checkboxSettings)
        checkboxSettings.Alignment = CheckBoxContentAlignment.Right;
}

See Also

ICheckBoxSettings Interface

ICheckBoxSettings Members

DevExpress.Blazor Namespace