Back to Devexpress

CheckEdit Class

maui-devexpress-dot-maui-dot-editors-fdd7a4db.md

latest7.1 KB
Original Source

CheckEdit Class

A checkbox that supports the indeterminate state.

Namespace : DevExpress.Maui.Editors

Assembly : DevExpress.Maui.Editors.dll

NuGet Package : DevExpress.Maui.Editors

Declaration

csharp
[DXLicenseMAUI]
public class CheckEdit :
    View,
    IAppearanceOwner,
    IDXViewController

Remarks

The CheckEdit is a three-state editor that supports the checked, unchecked, and indeterminate states.

State

Use the IsChecked property to specify the checked state. If this property is set to null , the editor is in the indeterminate state. To allow users to set the indeterminate state, enable the AllowIndeterminateInput option.

xaml
<dxe:CheckEdit Label="Automatic date and time"
               IsChecked="True"/>
<dxe:CheckEdit Label="Automatic time zone"
               IsChecked="False"/>
<dxe:CheckEdit Label="Use 24-hour format"
               AllowIndeterminateInput="True"
               IsChecked="{x:Null}"/>

When the IsChecked property value changes, the CheckedChanged event raises.

Checkbox and Label

The CheckEdit consists of a checkbox icon that indicates the state and a label next to the checkbox.

Use the following properties to customize the label:

|

Property

|

Description

| | --- | --- | |

Label

|

Gets or sets the text displayed next to the checkbox.

| |

LabelColor

DisabledLabelColor

|

Specify the color of the label.

| |

LabelHorizontalAlignment

LabelVerticalAlignment

|

Specify the alignment of the label.

| |

LabelTextDecorations

|

Allows you to underline and/or cross out the label.

| |

LabelFontSize

LabelFontFamily

LabelFontAttributes

|

Specify the font settings of the label.

|

Use the following properties to customize the checkbox:

|

Property

|

Description

| | --- | --- | |

CheckedCheckBoxImage

UncheckedCheckBoxImage

IndeterminateCheckBoxImage

|

Specify the checkbox image in different states.

| |

CheckBoxAlignment

CheckBoxPosition

|

Specify the alignment of the checkbox.

| |

CheckBoxColor

CheckedCheckBoxColor

DisabledCheckBoxColor

DisabledCheckedCheckBoxColor

|

Specify the color of the checkbox in different states.

| |

CheckBoxIndent

|

Gets or sets the indent between the checkbox and label.

|

The code below uses custom toggle icons for the CheckEdit in the checked and unchecked states.

xaml
<dxe:CheckEdit Label="Automatic date and time" 
               IsChecked="True" 
               CheckedCheckBoxImage="baseline_toggle_on_24" 
               UncheckedCheckBoxImage="baseline_toggle_off_24"/>
<dxe:CheckEdit Label="Automatic time zone" 
               IsChecked="False" 
               CheckedCheckBoxImage="baseline_toggle_on_24" 
               UncheckedCheckBoxImage="baseline_toggle_off_24"/>

The following featured scenario shows how you can use the CheckEdit class:

DataGrid Column Chooser

Implements

Show 14 items

INotifyPropertyChanged

IAnimatable

Microsoft.Maui.Controls.ITabStopElement

IViewController

IVisualElementController

IElementController

IGestureController

IGestureRecognizers

IPropertyMapperView

IHotReloadableView

IView

Microsoft.Maui.IFrameworkElement

ITransform

IReplaceableView

Inheritance

System.Object BindableObject Element NavigableElement VisualElement View CheckEdit TreeNodeCheckBox

Extension Methods

Yield<CheckEdit>()

YieldIfNotNull<CheckEdit>()

See Also

CheckEdit Members

DevExpress.Maui.Editors Namespace