Skip to content

Commit 598e619

Browse files
author
Vignesh Ramesh
authored
Merge pull request #2 from VishalOmprasad/master
XAMARIN-43979 : Code example site improvements
2 parents ed7f27d + 3601309 commit 598e619

File tree

1 file changed

+30
-57
lines changed

1 file changed

+30
-57
lines changed

README.md

Lines changed: 30 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,49 @@
11
# Getting Started with Xamarin.iOS NumericTextBox
22

3-
This section explains you the steps to configure a NumericTextBox control in a real-time scenario and also provides a walk-through on some of the customization features available in NumericTextBox control.
4-
5-
## Reference Essential Studio Components in your Solution
3+
This repository contains sample to get started with the [Syncfusion Xamarin.iOS Numeric TextBox](https://help.syncfusion.com/xamarin-ios/sfnumerictextbox/getting-started) control. The Numeric TextBox is an advanced version of the Entry control that restricts input to numeric values.
64

7-
After installing Essential Studio for Xamarin, you can find all the required assemblies in the installation folders, typically:
5+
## Syncfusion controls
86

9-
{Syncfusion Installed location}\Essential Studio{version number}\lib
7+
This project used the following Syncfusion control(s):
8+
* [SfNumericTextBox](https://www.syncfusion.com/xamarin-ios-ui-controls/numeric-textbox)
109

11-
N> Assemblies are available in unzipped package location in Mac
10+
## Requirements to run the sample
1211

13-
and below assembly reference to the iOS unified project.
12+
* [Visual Studio](https://visualstudio.microsoft.com/downloads/) or [Visual Studio for Mac](https://visualstudio.microsoft.com/vs/mac/)
1413

15-
iOS-unifed\Syncfusion.SfNumericTextBox.iOS.dll
14+
Refer to the following link for more details - [System Requirements](https://help.syncfusion.com/xamarin-ios/system-requirements)
1615

17-
## Add SfNumericTextBox
16+
## How to run the sample
1817

19-
* Adding namespace for the added assemblies.
18+
1. Clone the sample and open it in Visual Studio.
2019

21-
{% highlight c# %}
20+
*Note: If you download the sample using the "Download ZIP" option, right-click it, select Properties, and then select Unblock.*
21+
22+
2. Register your license key in the FinishedLaunching override method of AppDelegate.cs file as demonstrated in the following code.
2223

23-
using Syncfusion.SfNumericTextBox.iOS;
24+
public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
25+
{
26+
//Register Syncfusion license
27+
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("YOUR LICENSE KEY");
2428

25-
{% endhighlight %}
29+
// create a new window instance based on the screen size
30+
Window = new UIWindow(UIScreen.MainScreen.Bounds);
2631

27-
* Now add the SfNumericTextBox control with a required optimal name by using the included namespace.
32+
// If you have defined a root view controller, set it here:
33+
// Window.RootViewController = myViewController;
2834

29-
{% highlight c# %}
35+
// make the window visible
36+
Window.MakeKeyAndVisible();
3037

31-
[C#]
32-
33-
SfNumericTextBox numericTextBox = new SfNumericTextBox()
34-
{
38+
return true;
39+
}
40+
41+
Refer to this [link](https://help.syncfusion.com/xamarin-ios/licensing/overview) for more details.
3542

36-
Frame = new CGRect(10, 50, 350, 40),
37-
};
38-
this.Add(numericTextBox);
39-
40-
{% endhighlight %}
41-
42-
## Enable Parsing Mode
43+
3. Clean and build the application.
4344

44-
SfNumericTextBox provides option to display the value in double or decimal. Following code shows the Decimal parsing mode which can be set through `ParserMode` property.
45+
4. Run the application.
4546

46-
{% highlight c# %}
47-
48-
[C#]
49-
50-
numericTextBox.ParserMode = SFNumericTextBoxParsers.Decimal;
51-
52-
{% endhighlight %}
47+
## License
5348

54-
## Configuring properties
55-
56-
Format string, value and maximum number of decimal digits can be customized in SfNumericTextBox as below.
57-
58-
{% highlight c# %}
59-
60-
[C#]
61-
62-
SfNumericTextBox numericTextBox = new SfNumericTextBox()
63-
{
64-
65-
Value = 1000,
66-
Watermark = "Principal Amount",
67-
MaximumNumberDecimalDigits = 2,
68-
FormatString = "c",
69-
AllowNull = true,
70-
CultureInfo = new NSLocale("en_us"),
71-
PercentDisplayMode = SFNumericTextBoxPercentDisplayMode.Compute,
72-
};
73-
74-
{% endhighlight %}
75-
76-
![NumericTextBox-iOS](images/NumericTextBox-iOS.png)
49+
Syncfusion has no liability for any damage or consequence that may arise by using or viewing the samples. The samples are for demonstrative purposes, and if you choose to use or access the samples, you agree to not hold Syncfusion liable, in any form, for any damage that is related to use, for accessing, or viewing the samples. By accessing, viewing, or seeing the samples, you acknowledge and agree Syncfusion’s samples will not allow you seek injunctive relief in any form for any claim related to the sample. If you do not agree to this, do not view, access, utilize, or otherwise do anything with Syncfusion’s samples.

0 commit comments

Comments
 (0)