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

.NET MAUI DataForm Validation Styling

You can customize the validation look using the following styling properties:

  • ValidationSummaryStyle(of type Style with target type DataFormValidationSummaryView)—Defines the style of the validation summary view.
  • ValidationSummaryLabelStyle(of type Style with target type Label)—Defines the validation summary label style.
  • ValidationSummaryImageStyle(of type Style with target type Image)—Defines the validation summary image style.


The following examples demonstrate how to style the DataForm validation summary.

  1. Define the RadDataForm
<telerik:RadDataForm x:Name="dataForm"
                     ValidationSummaryLabelStyle="{StaticResource ValidationLabelStyle}"
                     ValidationSummaryStyle="{StaticResource ValidationSummaryStyle}"
        <local:EditorsViewModel />
  1. Define the ValidationSummaryStyle
<Style x:Key="ValidationSummaryStyle" TargetType="telerik:DataFormValidationSummaryView">
    <Setter Property="BackgroundColor" Value="LightGrey" />
    <Setter Property="BorderThickness" Value="2" />
    <Setter Property="BorderColor" Value="Red" />
    <Setter Property="HorizontalOptions" Value="Center" />
  1. Define the ValidationLabelStyle
<Style x:Key="ValidationLabelStyle" TargetType="Label">
    <Setter Property="TextColor" Value="Red" />
    <Setter Property="VerticalTextAlignment" Value="Center" />
    <Setter Property="HorizontalTextAlignment" Value="Center" />
    <Setter Property="HorizontalOptions" Value="Center" />
  1. Add the following namespace:


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

.NET MAUI DataForm Validation Styling

See Also

In this article