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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to customize the color appearance of numeric controls in Xamarin.Forms

Platform: Xamarin.Forms |
Control: SfNumericTextBox

This article explains how to change the default appearance of both the SfNumericTextBox and SfNumericUpDown controls in Xamarin.Forms by using its available color customization properties like BackgroundColor, TextColor, BorderColor and WatermarkColor as per in the following code snippets

 

[XAML]

…
       <xforms:SfNumericTextBox 
            HorizontalOptions="Center"  
            BackgroundColor="Black"
            BorderColor="White"
            TextColor="#dd47e8"
            Value="1000"    
            FormatString="c" />
…
        <xforms1:SfNumericUpDown 
            HorizontalOptions="Center"  
            WidthRequest="200"
            BorderColor="White"
            BackgroundColor="Black"
            TextColor="#dd47e8"
            Value="1000"    
            FormatString="c" >
            <xforms1:SfNumericUpDown.DecrementButtonSettings>
                <xforms1:UpDownButtonSettings BackgroundColor="#f69d7b"/>
            </xforms1:SfNumericUpDown.DecrementButtonSettings>
            <xforms1:SfNumericUpDown.IncrementButtonSettings>
                <xforms1:UpDownButtonSettings BackgroundColor="#60b976"/>
            </xforms1:SfNumericUpDown.IncrementButtonSettings>
        </xforms1:SfNumericUpDown>
…

Output

Numeric control color customization

 

See Also

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

How to customize the font in numeric controls in Xamarin.Forms

How to format the numeric value

How to restrict the value entry in numeric control

How to customize the appearance of spin button in Xamarin.Forms SfNumericUpDown

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