New to Telerik UI for .NET MAUI? Start a free 30-day trial
How to Remove Border/Underline in the RadNumericMaskedEntry Control
Updated over 6 months ago
Environment
| Version | Product | Author |
|---|---|---|
| 6.7.0 | Telerik UI for .NET MAUI MaskedEntry | Dobrinka Yordanova |
Description
I want to remove the border or underline in the RadNumericMaskedEntry control in my .NET MAUI project. How can I achieve this?
Solution
To remove the border or underline in the RadNumericMaskedEntry control, you can follow one of the following approaches:
Approach 1: Override the Default Control Template
1. Set the ControlTemplate property of the RadNumericMaskedEntry control to a custom control template. For example:
XAML
<telerik:RadNumericMaskedEntry ControlTemplate="{StaticResource MaskedEntry_ControlTemplate}" />
2. Define the custom control template in your resources. Here is an example:
XAML
<ControlTemplate x:Key="MaskedEntry_ControlTemplate">
<telerikMauiControls:RadEntry FocusedBorderBrush="Transparent" />
</ControlTemplate>
Approach 2: Use Implicit Style for RadEntry
1. Define an implicit style for the RadEntry control in your resources. For example:
XAML
<Style TargetType="telerik:RadEntry">
<Setter Property="FocusedBorderBrush" Value="Transparent" />
</Style>
2. Define the RadNumericMaskedEntry control:
XAML
<telerik:RadNumericMaskedEntry />
In both approaches, the
FocusedBorderBrushproperty is set toTransparentto remove the border or underline. You can customize the color as needed.