New to Telerik UI for Xamarin? Download free 30-day trial

Key Features

The purpose of this help article is to show you the key features of the RadNumericInput control.

Setting and reading numbers

RadNumericInput exposes a Value property that is used to set and read the number presented by the control.

The Value property is of type nullable double, which enables the NumericInput control to accept null value as well.

<telerikInput:RadNumericInput x:Name="numericInput" Value="12" />

Where:

xmlns:telerikInput="clr-namespace:Telerik.XamarinForms.Input;assembly=Telerik.XamarinForms.Input"

Restricting the input

RadNumericInput provides Minimum and Maximum properties used to define the allowed range of its value:

<telerikInput:RadNumericInput x:Name="numericMinMax" Minimum="0" Maximum="15" />

Setting the step for decrement/increment the value

The Step property defines the value step that will be applied to the input value upon each decrease/increase action. The default step is 1.

<telerikInput:RadNumericInput x:Name="numericStep" Step="10" />

Setting buttons’ text

You could use IncreaseButtonText and DecreaseButtonText properties to specify the text of the NumericInput buttons, so that it’s applicable to your scenario.

<telerikInput:RadNumericInput x:Name="numericBtnText" IncreaseButtonText=" &gt;" DecreaseButtonText=" &lt;" />

Read-only mode

RadNumericInput supports read-only mode in which the end user cannot type into the input field – updating the value is possible only through the increase/decrease buttons. You could enable the read-only mode through IsReadOnly property:

<telerikInput:RadNumericInput x:Name="numericReadOnly" IsReadOnly="True" />

Formatting the value

RadNumericInput provides you the option to define the format of its numeric value through the StringFormat property. You can set it to the desired format which will be applied when the control loses focus.

<telerikInput:RadNumericInput x:Name="numericStrFormat" StringFormat="{}{0:C2}" />

You can find detailed information about the supported numeric formats here: Standard Numeric Format Strings.

See Also

In this article