We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to hide the increment or decrement button in Xamarin.Forms numeric control (SfNumericUpDown)

Platform: Xamarin.Forms |
Control: SfNumericUpDown |
Published Date: June 28, 2020 |
Last Revised Date: June 30, 2020

The SfNumericUpDown control provides up and down buttons to increase and decrease numeric values. The control respects UI culture and it can be configured to display different formats like currency, scientific, etc.  You can refer the below screenshot for the appearance of the control.

 

Getting started of numeric updown

 

 

This section explains how to hide the  decrement button in NumericUpdown (SfNumericUpDown) control.

 

Steps

 

  1. Create a NumericUpDown button.
  2. Update the DecrementButtonSettings by setting the button’s height and width as 0.

 

Please find the complete code snippet below.

 

[XAML]

xmlns:numericupdown="clr-namespace:Syncfusion.SfNumericUpDown.XForms;assembly=Syncfusion.SfNumericUpDown.XForms"
 
 
<StackLayout>
 
    <numericupdown:SfNumericUpDown>
        <!--  Setting the Button width and height to 0 will hide the button  -->
        <numericupdown:SfNumericUpDown.DecrementButtonSettings>
            <numericupdown:UpDownButtonSettings ButtonHeight="0" ButtonWidth="0" />
        </numericupdown:SfNumericUpDown.DecrementButtonSettings>
    </numericupdown:SfNumericUpDown>
 
</StackLayout> 

Output

numeric up down spin button

 

 

You can find the sample in the following link: Sample

 

The same can be applied to increment button in the control.

 

Note:

Currently we have support to hide the increment or decrement button in our SfNumericUpDown with Android and iOS platforms alone.

 

See Also


How to customize the color appearance of numeric controls

How to set customized currency symbol in Xamarin.Forms numeric controls

How to display the value with currency symbol in Xamarin.Forms numeric controls

Does SfNumericUpDown support other formats

 

 

2X faster development

The ultimate Xamarin UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon