.NET MAUI Entry Styling
The Entry provides styling options for setting the appearance of its border and font.
Style the Entry using the following properties:
-
CornerRadius
(Microsoft.Maui.CornerRadius
) -
BackgroundColor
(Microsoft.Maui.Graphics.Color
) -
TextColor
(Microsoft.Maui.Graphics.Color
) -
PlaceholderColor
(Microsoft.Maui.Graphics.Color
) -
BorderBrush
(Microsoft.Maui.Controls.Brush
) -
BorderThickness
(Microsoft.Maui.Thickness
)
In addition to the available styling properties, you can apply specific Visual States to the Entry control.
For a runnable example demonstrating the Entry Styling options, see the SDKBrowser Demo Application and go to the Entry > Styling category.
Clear Button Style
Style the Clear button which is displayed by default when entering text in the control using the following properties:
-
ClearButtonVisibility
(enum
of typeMicrosoft.Maui.ClearButtonVisibility
)—Defines a value indicating whether the clear button (the button that clears the text when pressed) will be visible. The options are:Never
andWhileEditing
(default). -
ClearButtonStyle
(Style
with target typeRadTemplatedButton
)—Specifies the style of the clear button. Review the TemplatedButton Visual States article for more details on the available visual states.
For a runnable example demonstrating the Entry Styling options, see the SDKBrowser Demo Application and go to the Entry > Styling category.
Font Options
The Entry control has the following properties for defining the font options:
-
FontAttributes
(enum
of typeMicrosoft.Maui.Controls.FontAttributes
) -
FontFamily
(string
) -
FontSize
(double
) -
FontAutoScalingEnabled
(bool
)
The following example demonstrates how to apply the font options to the Entry.
<VerticalStackLayout>
<telerik:RadEntry Text="Normal Text" x:Name="entry"/>
<telerik:RadEntry Text="Bold Text - Large" FontAttributes="Bold" FontSize="Large" />
<telerik:RadEntry Text="Italic Text - Medium" FontAttributes="Italic" FontSize="Medium"/>
<telerik:RadEntry Text="Italic and Bold Text - Small" FontSize="Small" x:Name="smallEntry"/>
<telerik:RadEntry Text="Micro Text" FontSize="Micro" />
</VerticalStackLayout>