Articles in this section
Category / Section

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

1 min read

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

 

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied