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

.NET MAUI DataForm Boolean Editors

You can use the following Boolean Editors the DataForm provides:

  • DataFormRadCheckBoxEditor —Of type RadCheckBox. Using the IsThreeState property of type bool? you can specify whether the CheckBox editor will have three states—true, false, indeterminate.
  • DataFormSwitchEditor—Of type .NET MAUI Switch.

Other properties that are common for all editors are listed in the Editors Overview article.

Styling

You can style the editors using the properties BackgroundColor, BorderColor and BorderThickness. You can additionally style each editor by applying a style with the same target type as the underlying control.

Example with DataFormRadCheckBoxEditor

<telerik:RadDataForm x:Name="dataForm" AutoGenerateItems="False">
    <telerik:DataFormRadEntryEditor PropertyName="FirstName" 
                                HeaderText="Name" 
                                BackgroundColor="#8AAAFF" />
    <telerik:DataFormRadNumericEditor PropertyName="People" 
                                   HeaderText="People" 
                                   Minimum="1" 
                                   BorderColor="Navy" 
                                   BorderThickness="2" />
    <telerik:DataFormRadTimeSpanPickerEditor PropertyName="Duration" 
                                          HeaderText="Duration" 
                                          BackgroundColor="BlanchedAlmond" 
                                          BorderColor="Orange" 
                                          BorderThickness="2" />
    <telerik:DataFormRadCheckBoxEditor PropertyName="Visited" 
                                    HeaderText="Visited before"  
                                    EditorStyle="{StaticResource CheckBoxStyle}" />
</telerik:RadDataForm>

Define the CheckBoxStyle for the RadCheckBox editor

<Style x:Key="CheckBoxStyle" TargetType="telerik:RadCheckBox">
    <Setter Property="CheckedColor" Value="DarkSeaGreen" />
    <Setter Property="UncheckedColor" Value="Orange" />
</Style>

For a runnable example with the DataForm Editors Styling, see the SDKBrowser Demo Application and go to DataForm > Styling category.

See Also

In this article