New to Telerik UI for .NET MAUI? Start a free 30-day trial

Checked States

The CheckBox enables you to define its state as Checked, Unchecked, or Indeterminate.

The state is controlled through the IsChecked property, which is of the bool? type. You can set all states either through the UI or programmatically. The Indeterminate state can be applied through the UI only for three-state checkboxes.

  • Checked state—When IsChecked is set to true.

  • (Default) Unchecked state—When IsChecked is set to false.

  • Indeterminate state—When IsChecked is null.

  • IsThreeState (bool)—Defines whether you can apply the Indeterminate state through the UI. When IsThreeState is true, it allows the end user to go to the Indeterminate state along with the Checked and Unchecked states. By default, IsThreeState is set to false.

The following example demonstrates how to set the IsChecked property.

Define the checked state of the CheckBox.

<telerik:RadCheckBox x:Name="checkboxIsChecked" 
                     IsChecked="{Binding IsChecked}" 
                     IsThreeState="True" />

Set the ViewModel.

public class ViewModel : NotifyPropertyChangedBase
    private bool? isChecked;

    public bool? IsChecked
        get { return this.isChecked; }
            if (this.isChecked != value)
                this.isChecked = value;

The image below shows the result at runtime displaying the defined Indeterminate state together with the configured StrokeWidth and Length properties.

CheckBox Key Feature Example

See Also

In this article
Not finding the help you need?