How to provide null value to NumericTextBox?
To provide null value to NumericTextBox, follow the given steps:
Step 1: Create the NumericTextBox sample and include the necessary source files.
Step 2: First create an instance for NumericTextBox.
Step 3: By using the object, set allownull property to true such that the value will be empty. And set the Contentview.
Step 4: And by using StackLayout add the children principalNumericTextBox.
Code Snippet
public class NumericTextBox { public NumericTextBox() { SfNumericTextBox principalNumericTextBox = new SfNumericTextBox(); principalNumericTextBox.AllowNull = true; this.Content = GetNumeric(); } private StackLayout GetNumeric() { var mainStack = new StackLayout { Children = { principalLayout } }; return mainStack; } } |
The following image provides null value to NumericTextBox:
NumericTextBox Null Value