Category / Section
                                    
                                How to set AutoReverse property in SfNumericUpDown
                
                
                    1 min read
                
            
    Syncfusion SfNumericUpDown provide AutoReverse support in SfNumericUpDown.
To enable AutoReverse property:
Step 1: Set AutoReverse property to true.
Step 2: The values in SfNumericUpDown gets repeated after reaching the minimum and maximum range.
The below code illustrates the way to achieve this
Code Snippet
XAML code to enable AutoReverse property:
<?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:NumericUpDown" xmlns:numeric="clr-namespace:Syncfusion.SfNumericUpDown.XForms;assembly=Syncfusion.SfNumericUpDown.XForms" x:Class="NumericUpDown.MainPage"> <ContentPage.Content> <StackLayout HeightRequest="150" > <numeric:SfNumericUpDown x:Name="sfNumericUpDown" AutoReverse="true" Minimum="10" Maximum="60" HeightRequest="100" Value="20" AllowNull="false" TextAlignment="Center" SpinButtonAlignment="Both" FormatString="n"/> </StackLayout> </ContentPage.Content> </ContentPage>
C# Code to enable AutoReverse property:
namespace NumericUpDown
{
public partial class MainPage : ContentPage
{
    SfNumericUpDown numeric;
    public MainPage()
    {
        InitializeComponent();
        numeric = new SfNumericUpDown();
        numeric.Minimum = 10;
        numeric.Maximum = 60;
        numeric.Value = 20;
        numeric.TextAlignment = TextAlignment.Center;
        numeric.SpinButtonAlignment = SpinButtonAlignment.Both;
        numeric.HeightRequest = 100;
        numeric.AllowNull = false;
        numeric.AutoReverse = true;
        StackLayout stack = new StackLayout();
        stack.Children.Add(numeric);
        this.Content = stack;
 
    }
}
}