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

Hiding Numeric buttons

Environment

Version Product Author
10.0.0 Telerik UI for .NET MAUI NumericInput Dobrinka Yordanova

Description

This article explains how to hide the numeric input buttons. The buttons are used for increasing/decreasing the value.

Solution

1. Define the .NET MAUI NumericInput control in XAML with the DecreaseButtonStyle (Style with target type RadTemplatedButton) and the IncreaseButtonStyle (Style with target type RadTemplatedButton) properties set:

<VerticalStackLayout>
    <telerik:RadNumericInput DecreaseButtonStyle="{StaticResource DecreaseButtonStyle}"
                             IncreaseButtonStyle="{StaticResource IncreaseButtonStyle}" />

</VerticalStackLayout>

2. Hide the increase and decrease buttons by setting the IsVisible property of the RadTemplatedButton to false:

<ContentPage.Resources>
    <ResourceDictionary>
        <Style x:Key="DecreaseButtonStyle" TargetType="telerik:RadTemplatedButton">
            <Setter Property="IsVisible" Value="False" />
        </Style>

        <Style x:Key="IncreaseButtonStyle" TargetType="telerik:RadTemplatedButton">
            <Setter Property="IsVisible" Value="False" />
        </Style>
    </ResourceDictionary>
</ContentPage.Resources>
In this article