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

.NET MAUI DataForm Editors Styling

The DataForm control for .NET MAUI provides styling options for customizing the appearance of its editors. You have to apply a style to each editor individually.

Each editor provides the following properties:

  • BackgroundColor—Defines the background color of the editor.
  • BorderColor—Defines the border color of the editor.
  • BorderThickness—Specifies the border thickness of the editor.
  • EditorStyle (Style with TargetType depending on the input control which the editor uses). For example, the target type of the RadCheckBoxEditor is RadCheckBox.


The example shows how to style the DataForm

Define the RadDataForm and the editors

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

Define the CheckBoxStyle for the RadCheckBox editor

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

Add the following namespace:

The following image shows what the DataForm control looks like when the styles described above are applied:

.NET MAUI DataForm Editor Styling

See Also

In this article