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

Set the Visual States of the Entry


Product Progress® Telerik® UI for .NET MAUI Entry
Product Version 5.1.0


How can I set the visual states of the Telerik UI for .NET MAUI Entry control?


To set the visual states of the Entry control, use the RadEntry class, which inherits them from the Entry, and the concept of the visual states, which is introduced by the VisualStateManager configuration. VisualStateManager defines a visual state group named CommonStates and supports the Normal, Disabled, Focused, Selected, and PointerOver values. It is recommended that you add configurations for all visual states that are available.

<telerik:RadEntry x:Name="tEntry" Placeholder="telerik">
            <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="Normal">
                        <Setter Property="FontSize" Value="35" />
                <VisualState x:Name="Focused">
                        <Setter Property="BackgroundColor" Value="Red" />
                <VisualState x:Name="Disabled">
                        <Setter Property="BackgroundColor" Value="Pink" />
                <VisualState x:Name="Unfocused">
                        <Setter Property="BackgroundColor"  Value="yellow" />
                <VisualState x:Name="PointerOver"/>

The following .gif file represents the result from the code snippet:

End result for setting the visual states of the Telerik UI for .NET MAUI Entry control

In this article