Skip to main content
Tab

ASPxCheckBox.ToggleSwitchDisplayMode Property

Specifies the checkbox display mode.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v22.1.dll

Declaration

[DefaultValue(ToggleSwitchDisplayMode.Never)]
public virtual ToggleSwitchDisplayMode ToggleSwitchDisplayMode { get; set; }

Property Value

Type Default Description
ToggleSwitchDisplayMode Never

One of the ToggleSwitchDisplayMode values.

Available values:

Name Description
Never

Never displays a check box as a toggle switch.

Auto

A check box is displayed as a toggle switch on touch devices and as a regular check box - on other devices.

Always

A check box is always displayed as a toggle switch.

Remarks

ASPxCheckBox allows you to assign custom images to checkbox states when the ToggleSwitchDisplayMode property value is Auto or Never. In this case, you should set the Width and the Height properties of these images.

Custom image for toggle ASPxCheckBox

<dx:ASPxCheckBox ID="ToggleCheckBox" runat="server" >
    <CheckedImage URL="Images/on.png" Width="50px" Height="50px" />
    <UncheckedImage URL="Images/off.png" Width="50px" Height="50px" />
</dx:ASPxCheckBox>

Run Demo: ASPxCheckBox Features

See Also