New to Telerik UI for .NET MAUI? Start a free 30-day trial
.NET MAUI DataForm Boolean Editors
Updated over 6 months ago
You can use the following Boolean Editors the DataForm provides:
DataFormRadCheckBoxEditor—Of typeRadCheckBox. Using theIsThreeStateproperty of typebool?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
xaml
<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
xaml
<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.