Styling

The MaskedEntry control delivers a set of options for styling its appearance.

The MaskedEntryBase class exposes the following properties, which are valid for all mask types.:

  • TextColor(Microsoft.Maui.Graphics)—Defines the color of the text inside the MaskedEntry.
  • EntryCornerRadius(Microsoft.Maui)—Defines the corner radius around the MaskedEntry.
  • EntryBackgroundColor(Microsoft.Maui.Graphics)—Defines the background color of the MaskedEntry.
  • BackgroundColor(Microsoft.Maui.Graphics)—Defines the background color of the masked control.
  • ClearButtonColor(Microsoft.Maui.Graphics)—Defines the color of the Clear button.
  • HoveredClearButtonColor(Microsoft.Maui.Graphics)—Defines the color of the Clear button when it is hovered. The color appears only on desktop.
  • PressedClearButtonColor(Microsoft.Maui.Graphics)—Defines the color of the Clear button when it is clicked.

The following example demonstrates how to style the EmailMaskedEntry. Define the control in XAML:

<telerik:RadEmailMaskedEntry x:Name="styleEmailMaskedEntry" 
                             Placeholder="your_email@gmail.com"
                             EntryCornerRadius="25" 
                             FontSize="20"
                             TextColor="Black"
                             BackgroundColor="Transparent"
                             ClearButtonColor="Red"
                             HoveredClearButtonColor="Blue"
                             PressedClearButtonColor="Black"
                             EntryBackgroundColor="LightGray"/>

Add the namespace:

xmlns:telerik="clr-namespace:Telerik.Maui.Controls;assembly=Telerik.Maui.Controls"

ClearButtonColor

maskedentry-styling

PressedClearButtonColor

maskedentry-styling

HoveredClearButtonColor

maskedentry-styling

For the MaskedEntry Styling example, go to the SDKBrowser Demo Application and navigate to MaskedEntry -> Features category.

See Also

In this article
Not finding the help you need?