Getting Started

This section provides overview for working with Essential NumericUpDown for Xamarin.iOS. You can walk through the entire process of creating a SfNumericUpDown.

Referencing Essential Studio Components in Your Solution

After installing Essential Studio for Xamarin, you can find all the required assemblies in the installation folders, typically:

{Syncfusion Installed location}\Essential Studio{version number}\lib

NOTE

Assemblies are available in unzipped package location in Mac

and below assembly reference to the iOS unified project.

iOS-unifed\Syncfusion.SfNumericUpDown.iOS.dll

Add SfNumericUpDown

The SfNumericUpDown control configured entirely in C# code. The following steps explain on how to create a SfNumericUpDown and configure its elements,

  • Adding namespace for the added assemblies.
Using Syncfusion.SfNumericUpDown.iOS;
  • Now add the SfNumericUpDown control with a required optimal name by using the included namespace.
SFNumericUpDown numeric=new SFNumericUpDown();
this.AddSubview(numeric);

Set Value

The SfNumericUpDown control display value can be set using Value property.

numeric.Value= 5;

Enable Parsing Mode

SfNumericTextBox provides option to display the value in double or decimal. Following code shows the Decimal parsing mode which can be set through ParsingMode property.

numeric.ParsingMode=SFNumericUpDownParsingMode.Decimal;

Add Format String

The FormatString property determines the format specifier by which the display text has to be formatted.

It has three types,

  • c - Display the value with currency notation.
  • n – Display the value in number format.
  • p – Display the value in Percentage.

NOTE

The control displays the formatted text on lost focus. Default Value of FormatString is “n”.

numeric.FormatString= @“c;